Skip to content

Commit

Permalink
Deprecate ruby 1.x, document known issue with redirect drops
Browse files Browse the repository at this point in the history
  • Loading branch information
EfrainOlivares committed Oct 15, 2015
1 parent 5b3f512 commit 3512659
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 28 deletions.
6 changes: 2 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ end

# Gems used during test and development that should be OMITTED from the gemspec
group :test do
gem 'ruby-debug',
:platforms => [:ruby_18]
gem 'debugger',
:platforms => [:ruby_19, :ruby_20, :ruby_21]
gem 'byebug',
:platforms => [:ruby_20, :ruby_21]
gem 'jeweler', '~> 2.0'
end
22 changes: 5 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,14 @@ GEM
specs:
addressable (2.3.6)
builder (3.2.2)
byebug (6.0.2)
coderay (1.1.0)
columnize (0.3.6)
coveralls (0.7.1)
multi_json (~> 1.3)
rest-client
simplecov (>= 0.7)
term-ansicolor
thor
debugger (1.6.6)
columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0)
debugger-ruby_core_source (~> 1.3.2)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.3.2)
diff-lcs (1.1.3)
docile (1.1.5)
faraday (0.8.9)
Expand Down Expand Up @@ -44,8 +38,6 @@ GEM
json (1.8.1)
jwt (0.1.11)
multi_json (>= 1.5)
linecache (0.46)
rbx-require-relative (> 0.0.4)
method_source (0.8.2)
mime-types (1.25.1)
multi_json (1.10.1)
Expand All @@ -64,7 +56,6 @@ GEM
slop (~> 3.4)
rack (1.5.2)
rake (0.8.7)
rbx-require-relative (0.0.9)
rdoc (4.1.1)
json (~> 1.4)
rest-client (1.6.8)
Expand All @@ -78,11 +69,6 @@ GEM
rspec-expectations (2.9.1)
diff-lcs (~> 1.1.3)
rspec-mocks (2.9.0)
ruby-debug (0.10.4)
columnize (>= 0.1)
ruby-debug-base (~> 0.10.4.0)
ruby-debug-base (0.10.4)
linecache (>= 0.3)
simplecov (0.9.0)
docile (~> 1.1.0)
multi_json
Expand All @@ -98,8 +84,8 @@ PLATFORMS
ruby

DEPENDENCIES
byebug
coveralls
debugger
flexmock (= 0.8.7)
jeweler (~> 2.0)
json (~> 1.0)
Expand All @@ -108,4 +94,6 @@ DEPENDENCIES
rake (= 0.8.7)
rest-client (~> 1.6)
rspec (= 2.9.0)
ruby-debug

BUNDLED WITH
1.10.6
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@ It is assumed that users are already familiar with the RightScale API:
Maintained by the RightScale QA ServerTemplate and Ivory Automation Team

## Installation
Ruby 1.8.7 or higher is required.
Ruby 2.0 or higher is required as of version 1.6

gem install right_api_client

## Known issues:
* Cookies are lost on follow redirect. This is a bug introduced in rest-client.
[Github issue #406](https://github.com/rest-client/rest-client/issues/406)
has already been filed for this. To work around this, please lock the rest-client version
to 1.7 until the issue is fixed.

## Versioning
The right\_api\_client gem is versioned using the usual X.Y.Z notation, where X.Y is the
RightScale API version, and Z is the client version. For example, if you want to use
RightScale API 1.5, you should use the latest version of the 1.5 gem. This will ensure
RightScale API 1.5, you should use the latest version of the 1.6 gem. This will ensure
that you get the latest bug fixes for the client that is compatible with that API version.

## Usage Instructions
Expand All @@ -33,7 +39,7 @@ navigate to the Settings > Account Settings page. The account is is at the end o
puts "Available methods: #{@client.api_methods}"

The client makes working with and getting to know the API much easier. It spiders the API dynamically to
discover its resources on the fly. At every step, the user has the ability to query api_methods(), which
discover its resources on the fly. At every step, the user has the ability to query api\_methods(), which
indicates the potential methods that can be called. **The ```config/login.yml.example``` file provides
details of different login parameters, for example, oauth authentication.**

Expand Down Expand Up @@ -162,7 +168,7 @@ Launch the newly created server. Inputs are a bit tricky so they have to be set
inputs = "inputs[][name]=NAME1&inputs[][value]=text:VALUE1&inputs[][name]=NAME2&inputs[][value]=text:VALUE2"
new_server.show.launch(inputs)

Run a script on the server. The API does not currently expose right_scripts, hence, the script href has
Run a script on the server. The API does not currently expose right\_scripts, hence, the script href has
to be retrieved from the dashboard and put in the following href format.

script_href = "right_script_href=/api/right_scripts/382371"
Expand All @@ -174,7 +180,7 @@ Update the server's name
params = { :server => {:name => 'New Server Name'}}
@client.servers(:id => 'my_server_id').update(params)

Terminate the server (i.e. shutdown its current_instance)
Terminate the server (i.e. shutdown its current\_instance)

@client.servers(:id => 'my_server_id').show.terminate

Expand Down Expand Up @@ -309,14 +315,15 @@ bundle exec rspec spec/functional

## Wrong ruby version

Ruby 1.8.7 or higher is required.
Version 1.5.x: Ruby 1.x is required.
Version 1.6.x Ruby 2.0 or higher is required.

## Warning message: To disable read timeouts, please set timeout to nil instead of -1

To avoid this message you can set ```:timeout``` when creating your RightAp::Client object. You will need
to use a different value depending on which version of rest-client is being used.

### rest-client 1.6.x supports ruby 1.8.x
### for right\_api\_client versions 1.5x, rest-client 1.6.x supports ruby 1.8.x
* ```:timeout => nil```, 60 second timeout (default of Net::HTTP)
* ```:timeout => -1```, infinite timeout.

Expand Down

0 comments on commit 3512659

Please sign in to comment.