README.md in fastly-1.01 vs README.md in fastly-1.1.0

- old
+ new

@@ -1,9 +1,11 @@ -Fastly - client library for interacting with the Fastly web acceleration service +# Fastly -# Example +Client library for interacting with the Fastly web acceleration service [API](http://docs.fastly.com/api) +## Example + ```ruby fastly = Fastly.new(login_opts) current_user = fastly.current_user current_customer = fastly.current_customer @@ -20,11 +22,11 @@ fastly.list_services.each do |service| puts "Service ID: #{service.id}" puts "Service Name: #{service.name}" puts "Service Versions:" service.versions.each do |version| - puts "\t#{version.number}" + puts "\t#{version.number}" end end service = fastly.create_service(:name => "MyFirstService") latest_version = service.version @@ -32,11 +34,11 @@ # Create a domain and a backend for the service ... domain = fastly.create_domain(:service_id => service.id, :version => latest_version.number, :name => "www.example.com") backend = fastly.create_backend(:service_id => service.id, :version => latest_version.number, :name => "Backend 1", :ipv4 => "192.0.43.10", :port => 80) # ... and activate it. You're now hosted on Fastly. -latest_version.activate +latest_version.activate! # Let's take a peek at the VCL that Fastly generated for us vcl = latest_version.generated_vcl puts "Generated VCL file is:\n#{vcl.content}" @@ -54,16 +56,43 @@ fastly.client.put("/service/#{service.id}/version/#{new_version.number}/vcl/#{vcl_name}/main") new_version.activate! ``` -# Copyright - -Copyright 2011 - Fastly Inc +## Contributing +1. Fork it +2. Create your feature branch (`git checkout -b my-new-feature`) +3. Commit your changes (`git commit -am 'Added some feature'`) +4. Push to the branch (`git push origin my-new-feature`) +5. Create new Pull Request + +### Notes for testing + +The test suite requires the following `ENV` variables to be set: + +* `FASTLY_TEST_USER` - Your user email +* `FASTLY_TEST_NAME` - Your name on your account (ie "John Smith") +* `FASTLY_TEST_PASSWORD` - Your account password +* `FASTLY_TEST_CUSTOMER` - Your customer or company name (ie. "Fastly" or "Acme, Inc.") +* `FASTLY_TEST_API_KEY` - Your API key (found at https://app.fastly.com/#account) + +While the test suite is safe to be run on all accounts and isn't harmful to your +data, the tests will create and delete 3 services in sequence so you may want +to create an account just for tests. + +## Copyright + +Copyright 2011-2014 - Fastly Inc + +## Redistribution + +MIT license, see LICENSE. + +## Contact + Mail support at fastly dot com if you have problems. - -# Developers -http://github.com/fastly/fastly-ruby +## Developers -http://www.fastly.com/documentation +* http://github.com/fastly/fastly-ruby +* http://www.fastly.com/documentation