Project

General

Profile

Revision e5f2394a

Added by Justin Sherrill over 5 years ago

Support rest_client 2.0

Runcible was built around being able to take a
rest client response body, pull out relevant details
and craft a new rest client response object with the boy
being the parsed json rather than the raw json. Rest Client
2.0 makes this impossible by making the Response object extend
string.

To resolve this while attempting to not break compatibility, we
have introduced a Runcible::Response object that attempts to pass
method calls to the parsed JSON body, and if that does not make
sense, to the Rest Client Response object.

Even still, I still bumped the version to 2.0 in case there is any
change I am not seeing.

View differences:

test/extensions/repository_test.rb
133 133
        'yum_importer',
134 134
        '2012-10-25T20:44:00Z/P7D'
135 135
      )
136
      response = @extension.remove_schedules(RepositorySupport.repo_id, 'yum_importer')
137

  
138
      assert_equal 200, response.code
136
      @extension.remove_schedules(RepositorySupport.repo_id, 'yum_importer')
139 137
    end
140 138

  
141 139
    def test_retrieve_with_details

Also available in: Unified diff