Skip to content
Browse files

Update Gemfile to use RestClient 1.6.3, add license file, add shortcu…

…ts for quick login
  • Loading branch information...
1 parent c976612 commit dd4af3d06835b057e6b75f6aa5bee35e1f1a02d9 @alikhajeh1 alikhajeh1 committed Jun 22, 2011
Showing with 42 additions and 6 deletions.
  1. +1 −1 .gitignore
  2. +1 −1 Gemfile
  3. +2 −2 Gemfile.lock
  4. +19 −0 LICENSE.txt
  5. +1 −1 README.rdoc
  6. +18 −0 login_to_client_irb.rb
  7. +0 −1 right_api_client.gemspec
View
2 .gitignore
@@ -7,4 +7,4 @@ local_login.yml
.bundle
.idea
.idea/*
-rc.rb
+*~
View
2 Gemfile
@@ -1,4 +1,4 @@
source :gemcutter
-gem 'rest-client', '1.6.1'
+gem 'rest-client', '1.6.3'
gem 'rspec', '1.3.0'
View
4 Gemfile.lock
@@ -2,13 +2,13 @@ GEM
remote: http://rubygems.org/
specs:
mime-types (1.16)
- rest-client (1.6.1)
+ rest-client (1.6.3)
mime-types (>= 1.16)
rspec (1.3.0)
PLATFORMS
ruby
DEPENDENCIES
- rest-client (= 1.6.1)
+ rest-client (= 1.6.3)
rspec (= 1.3.0)
View
19 LICENSE.txt
@@ -0,0 +1,19 @@
+Copyright (c) 2010-2011, RightScale.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
View
2 README.rdoc
@@ -1,7 +1,7 @@
= RightScale API Client
== Installation
-- right_api_client uses rest_client 1.6.1:
+- right_api_client uses rest_client 1.6.3:
gem install rest-client
View
18 login_to_client_irb.rb
@@ -0,0 +1,18 @@
+# A quick way to login to the API and jump into IRB so you can experiment with the client.
+# Add this to your bash profile to make it simpler:
+# alias client='bundle exec ruby login_to_client_irb.rb'
+
+require './lib/right_api_client'
+require 'yaml'
+require 'irb'
+
+client = RightApiClient.new(YAML.load_file(File.dirname(__FILE__) + '/examples/login.yml'))
+puts "logged-in to the API, use the 'client' variable to use the client:"
+client.session.message
+begin
+ local_client = RightApiClient.new(YAML.load_file(File.dirname(__FILE__) + '/examples/local_login.yml'))
+ puts 'local_client is also available.'
+rescue
+ puts 'local_client is not available, API is probably not running locally.'
+end
+IRB.start
View
1 right_api_client.gemspec
@@ -26,7 +26,6 @@ RightScale API HTTP client. Spiders the API to discover its resources on the fly
]
s.add_runtime_dependency 'rest-client', '1.6.3'
- #s.add_runtime_dependency 'em-http-request', '1.0.0.beta.4'
s.add_development_dependency 'rake'
s.add_development_dependency 'bundler'

0 comments on commit dd4af3d

Please sign in to comment.
Something went wrong with that request. Please try again.