flexirest 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +16 -0
  3. data/.rspec +2 -0
  4. data/.simplecov +4 -0
  5. data/.travis.yml +6 -0
  6. data/CHANGELOG.md +37 -0
  7. data/CONTRIBUTING.md +62 -0
  8. data/Gemfile +4 -0
  9. data/Guardfile +9 -0
  10. data/LICENSE.txt +22 -0
  11. data/README.md +846 -0
  12. data/Rakefile +13 -0
  13. data/doc/ActiveRestClient Internals.graffle +1236 -0
  14. data/doc/ActiveRestClient Internals.png +0 -0
  15. data/flexirest.gemspec +39 -0
  16. data/lib/flexirest.rb +25 -0
  17. data/lib/flexirest/base.rb +189 -0
  18. data/lib/flexirest/caching.rb +92 -0
  19. data/lib/flexirest/configuration.rb +209 -0
  20. data/lib/flexirest/connection.rb +103 -0
  21. data/lib/flexirest/connection_manager.rb +36 -0
  22. data/lib/flexirest/headers_list.rb +47 -0
  23. data/lib/flexirest/instrumentation.rb +62 -0
  24. data/lib/flexirest/lazy_association_loader.rb +97 -0
  25. data/lib/flexirest/lazy_loader.rb +23 -0
  26. data/lib/flexirest/logger.rb +67 -0
  27. data/lib/flexirest/mapping.rb +69 -0
  28. data/lib/flexirest/monkey_patching.rb +7 -0
  29. data/lib/flexirest/proxy_base.rb +193 -0
  30. data/lib/flexirest/recording.rb +24 -0
  31. data/lib/flexirest/request.rb +573 -0
  32. data/lib/flexirest/request_delegator.rb +44 -0
  33. data/lib/flexirest/request_filtering.rb +62 -0
  34. data/lib/flexirest/result_iterator.rb +85 -0
  35. data/lib/flexirest/validation.rb +60 -0
  36. data/lib/flexirest/version.rb +3 -0
  37. data/spec/lib/base_spec.rb +389 -0
  38. data/spec/lib/caching_spec.rb +217 -0
  39. data/spec/lib/configuration_spec.rb +234 -0
  40. data/spec/lib/connection_manager_spec.rb +43 -0
  41. data/spec/lib/connection_spec.rb +159 -0
  42. data/spec/lib/headers_list_spec.rb +61 -0
  43. data/spec/lib/instrumentation_spec.rb +58 -0
  44. data/spec/lib/lazy_association_loader_spec.rb +135 -0
  45. data/spec/lib/lazy_loader_spec.rb +25 -0
  46. data/spec/lib/logger_spec.rb +63 -0
  47. data/spec/lib/mapping_spec.rb +52 -0
  48. data/spec/lib/proxy_spec.rb +189 -0
  49. data/spec/lib/recording_spec.rb +34 -0
  50. data/spec/lib/request_filtering_spec.rb +84 -0
  51. data/spec/lib/request_spec.rb +711 -0
  52. data/spec/lib/result_iterator_spec.rb +140 -0
  53. data/spec/lib/validation_spec.rb +113 -0
  54. data/spec/lib/xml_spec.rb +74 -0
  55. data/spec/spec_helper.rb +88 -0
  56. metadata +347 -0
@@ -0,0 +1,140 @@
1
+ require 'spec_helper'
2
+
3
+ describe Flexirest::ResultIterator do
4
+ let(:response) { double(status: 200, response_headers: { some: 'header'}) }
5
+
6
+ it "should be able to have a status set during creation" do
7
+ result = Flexirest::ResultIterator.new(response)
8
+ expect(result._status).to eq(200)
9
+ end
10
+
11
+ it "should be able to have headers set during creation" do
12
+ result = Flexirest::ResultIterator.new(response)
13
+ expect(result._headers).to eq({ some: 'header'})
14
+ end
15
+
16
+ it "should be able to have a status set after creation" do
17
+ result = Flexirest::ResultIterator.new
18
+ result._status = 200
19
+ expect(result._status).to eq(200)
20
+ end
21
+
22
+ it "should remember objects given to it" do
23
+ result = Flexirest::ResultIterator.new
24
+ result << "a"
25
+ result.each do |element|
26
+ expect(element).to eq("a")
27
+ end
28
+ end
29
+
30
+ it "should implement first" do
31
+ result = Flexirest::ResultIterator.new
32
+ result << "a"
33
+ result << "z"
34
+ expect(result.first).to eq("a")
35
+ end
36
+
37
+ it "should implement any?" do
38
+ result = Flexirest::ResultIterator.new
39
+ expect(result.any?).to be_falsey
40
+ result << "a"
41
+ expect(result.any?).to be_truthy
42
+ end
43
+
44
+ it "should implement items" do
45
+ result = Flexirest::ResultIterator.new
46
+ result << "a"
47
+ result << "ab"
48
+ expect(result.items).to eq(["a","ab"])
49
+ end
50
+
51
+ it "should implement last" do
52
+ result = Flexirest::ResultIterator.new
53
+ result << "a"
54
+ result << "z"
55
+ expect(result.last).to eq("z")
56
+ end
57
+
58
+ it "should implement size" do
59
+ result = Flexirest::ResultIterator.new
60
+ result << "a"
61
+ result << "z"
62
+ expect(result.size).to eq(2)
63
+ end
64
+
65
+ it "should implement index" do
66
+ result = Flexirest::ResultIterator.new
67
+ result << "a"
68
+ result << "z"
69
+ expect(result.index("z")).to eq(1)
70
+ end
71
+
72
+ it "should implement empty?" do
73
+ result = Flexirest::ResultIterator.new
74
+ expect(result.empty?).to be_truthy
75
+ result << "a"
76
+ result << "z"
77
+ expect(result.empty?).to be_falsey
78
+ end
79
+
80
+ it "should implement reverse" do
81
+ result = Flexirest::ResultIterator.new
82
+ result << "a"
83
+ result << "z"
84
+ expect(result.reverse.first).to eq("z")
85
+ expect(result.reverse.last).to eq("a")
86
+ end
87
+
88
+ it "should implement direct index access" do
89
+ result = Flexirest::ResultIterator.new
90
+ result << "a"
91
+ result << "z"
92
+ expect(result[0]).to eq("a")
93
+ expect(result[1]).to eq("z")
94
+ end
95
+
96
+ it "should implement shuffle" do
97
+ result = Flexirest::ResultIterator.new
98
+ 100.times do |n|
99
+ result << n
100
+ end
101
+ expect(result.shuffle.first == result.shuffle.first && result.shuffle.first == result.shuffle.first).to_not be_truthy
102
+ end
103
+
104
+ it "can parallelise calls to each item" do
105
+ result = Flexirest::ResultIterator.new
106
+ result << 3
107
+ result << 2
108
+ result << 1
109
+ delay = 0.05
110
+ start_time = Time.now
111
+ response = result.parallelise do |item|
112
+ sleep(delay * item)
113
+ item*2
114
+ end
115
+ end_time = Time.now
116
+ expect(end_time-start_time).to be < (6*delay)
117
+ expect(response).to eq([6,4,2])
118
+ end
119
+
120
+ it "raises an error if you call paginate without WillPaginate installed" do
121
+ result = Flexirest::ResultIterator.new
122
+ result << 3
123
+ expect{result.paginate}.to raise_error
124
+ end
125
+
126
+ it "returns a WillPaginate::Collection if you call paginate with WillPaginate installed" do
127
+ result = Flexirest::ResultIterator.new
128
+ result << 3
129
+
130
+ module ::WillPaginate
131
+ class Collection ; end
132
+ end
133
+ allow(::WillPaginate).to receive(:per_page).and_return(10)
134
+ collection = double("WillPaginate::Collection")
135
+ allow(collection).to receive(:create).with(page: 1, per_page: 2).and_return(collection)
136
+ allow(::WillPaginate::Collection).to receive(:create).and_return(collection)
137
+ expect(result.paginate(page: 1, per_page: 2)).to eq(collection)
138
+ Object.send(:remove_const, :WillPaginate)
139
+ end
140
+ end
@@ -0,0 +1,113 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Flexirest::Validation" do
4
+ class SimpleValidationExample < OpenStruct
5
+ include Flexirest::Validation
6
+ validates :first_name, presence:true
7
+ validates :password, length:{within:6..12}
8
+ validates :post_code, length:{minimum:6, maximum:8}
9
+ validates :salary, numericality:true, minimum:20_000, maximum:50_000
10
+ end
11
+
12
+ it "should be able to register a validation" do
13
+ expect(SimpleValidationExample._validations.size).to eq(4)
14
+ end
15
+
16
+ it "should be invalid if a required value isn't present" do
17
+ a = SimpleValidationExample.new
18
+ a.first_name = nil
19
+ a.valid?
20
+ expect(a._errors[:first_name].size).to eq(1)
21
+ end
22
+
23
+ it "should be valid if a required value is present" do
24
+ a = SimpleValidationExample.new
25
+ a.first_name = "John"
26
+ a.valid?
27
+ expect(a._errors[:first_name]).to be_empty
28
+ end
29
+
30
+ it "should be invalid if a length within value is outside the range" do
31
+ a = SimpleValidationExample.new(password:"12345")
32
+ a.valid?
33
+ expect(a._errors[:password].size).to eq(1)
34
+ end
35
+
36
+ it "should be valid if a length within value is inside the range" do
37
+ a = SimpleValidationExample.new(password:"123456")
38
+ a.valid?
39
+ expect(a._errors[:password].size).to eq(0)
40
+ end
41
+
42
+ it "should be invalid if a length is below the minimum" do
43
+ a = SimpleValidationExample.new(post_code:"12345")
44
+ a.valid?
45
+ expect(a._errors[:post_code].size).to eq(1)
46
+ end
47
+
48
+ it "should be valid if a length is above or equal to the minimum and below the maximum" do
49
+ a = SimpleValidationExample.new(post_code:"123456")
50
+ a.valid?
51
+ expect(a._errors[:post_code].size).to eq(0)
52
+ end
53
+
54
+ it "should be invalid if a length is above the maximum" do
55
+ a = SimpleValidationExample.new(post_code:"123456789")
56
+ a.valid?
57
+ expect(a._errors[:post_code].size).to eq(1)
58
+ end
59
+
60
+ it "should be able to validate that a field is numeric" do
61
+ a = SimpleValidationExample.new(salary:"Bob")
62
+ a.valid?
63
+ expect(a._errors[:salary].size).to be > 0
64
+ end
65
+
66
+ it "should be able to validate that a numeric field is above or equal to a minimum" do
67
+ a = SimpleValidationExample.new(salary:10_000)
68
+ a.valid?
69
+ expect(a._errors[:salary].size).to be > 0
70
+ end
71
+
72
+ it "should be able to validate that a numeric field is above or equal to a minimum" do
73
+ a = SimpleValidationExample.new(salary:100_000)
74
+ a.valid?
75
+ expect(a._errors[:salary].size).to be > 0
76
+ end
77
+
78
+ it "should be invalid when a block adds an error" do
79
+ class ValidationExample1 < OpenStruct
80
+ include Flexirest::Validation
81
+ validates :first_name do |object, name, value|
82
+ object._errors[name] << "must be over 4 chars long" if value.length <= 4
83
+ end
84
+ end
85
+ a = ValidationExample1.new(first_name:"John")
86
+ a.valid?
87
+ expect(a._errors[:first_name].size).to eq(1)
88
+ end
89
+
90
+ it "should be valid when a block doesn't add an error" do
91
+ class ValidationExample2 < OpenStruct
92
+ include Flexirest::Validation
93
+ validates :first_name do |object, name, value|
94
+ object._errors[name] << "must be over 4 chars long" if value.length <= 4
95
+ end
96
+ end
97
+ a = ValidationExample2.new(first_name:"Johnny")
98
+ a.valid?
99
+ expect(a._errors[:first_name]).to be_empty
100
+ end
101
+
102
+ it "should call valid? before making a request" do
103
+ class ValidationExample3 < Flexirest::Base
104
+ whiny_missing true
105
+ post :create, '/'
106
+ validates :name, presence:true
107
+ end
108
+
109
+ expect_any_instance_of(ValidationExample3).to receive(:valid?)
110
+ object = ValidationExample3.new
111
+ expect { object.create }.to raise_exception(Flexirest::ValidationFailedException)
112
+ end
113
+ end
@@ -0,0 +1,74 @@
1
+ require 'spec_helper'
2
+
3
+ class XmlResponseExample < Flexirest::Base
4
+ base_url "http://www.example.com/v1/"
5
+ get :root, "/root", ignore_xml_root: "feed", fake_content_type: "application/xml", fake: %Q{
6
+ <?xml version="1.0" encoding="utf-8"?>
7
+ <feed xmlns="http://www.w3.org/2005/Atom">
8
+ <title>Example Feed</title>
9
+ </feed>
10
+ }
11
+ get :atom, "/atom", fake: %Q{
12
+ <?xml version="1.0" encoding="utf-8"?>
13
+ <feed xmlns="http://www.w3.org/2005/Atom">
14
+
15
+ <title>Example Feed</title>
16
+ <link href="http://example.org/"/>
17
+ <updated>2003-12-13T18:30:02Z</updated>
18
+ <author>
19
+ <name>John Doe</name>
20
+ </author>
21
+ <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
22
+
23
+ <entry>
24
+ <title>Atom-Powered Robots Run Amok</title>
25
+ <link href="http://example.org/2003/12/13/atom03"/>
26
+ <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
27
+ <updated>2003-12-13T18:30:02Z</updated>
28
+ <summary>Some text.</summary>
29
+ </entry>
30
+
31
+ <entry>
32
+ <title>Something else cool happened</title>
33
+ <link href="http://example.org/2015/08/11/andyjeffries"/>
34
+ <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6b</id>
35
+ <updated>2015-08-11T18:30:02Z</updated>
36
+ <summary>Some other text.</summary>
37
+ </entry>
38
+
39
+ </feed>}.strip_heredoc, fake_content_type: "application/xml"
40
+ end
41
+
42
+ describe XmlResponseExample do
43
+ it "should parse the response without error" do
44
+ expect {
45
+ XmlResponseExample.atom
46
+ }.to_not raise_error
47
+ end
48
+
49
+ it "provides the feed title" do
50
+ @atom = XmlResponseExample.atom
51
+ expect(@atom.feed.title).to eq("Example Feed")
52
+ end
53
+
54
+ it "provides the link's href" do
55
+ @atom = XmlResponseExample.atom
56
+ expect(@atom.feed.link.href).to eq("http://example.org/")
57
+ end
58
+
59
+ it "each entry item has a title" do
60
+ @atom = XmlResponseExample.atom
61
+ expect(@atom.feed.entry.class).to eq(Flexirest::ResultIterator)
62
+ end
63
+
64
+ it "provides a list of entry items" do
65
+ @atom = XmlResponseExample.atom
66
+ expect(@atom.feed.entry[0].title).to eq("Atom-Powered Robots Run Amok")
67
+ expect(@atom.feed.entry[1].title).to eq("Something else cool happened")
68
+ end
69
+
70
+ it "allows ignoring of the XML root node" do
71
+ @feed = XmlResponseExample.root
72
+ expect(@feed.title).to eq("Example Feed")
73
+ end
74
+ end
@@ -0,0 +1,88 @@
1
+ require 'rspec'
2
+ require 'simplecov'
3
+ require 'flexirest'
4
+ require "ostruct"
5
+ require 'webmock/rspec'
6
+
7
+ if ENV["JENKINS"]
8
+ require 'simplecov-rcov'
9
+ SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
10
+ elsif ENV["TRAVIS"]
11
+ require 'coveralls'
12
+ Coveralls.wear!
13
+ end
14
+
15
+ RSpec.configure do |config|
16
+ config.color = true
17
+ # config.formatter = 'documentation'
18
+
19
+ # Run specs in random order to surface order dependencies. If you find an
20
+ # order dependency and want to debug it, you can fix the order by providing
21
+ # the seed, which is printed after each run.
22
+ # --seed 1234
23
+ config.order = 'random'
24
+
25
+ config.mock_with :rspec do |mocks|
26
+ # In RSpec 3, `any_instance` implementation blocks will be yielded the receiving
27
+ # instance as the first block argument to allow the implementation block to use
28
+ # the state of the receiver.
29
+ # In RSpec 2.99, to maintain compatibility with RSpec 3 you need to either set
30
+ # this config option to `false` OR set this to `true` and update your
31
+ # `any_instance` implementation blocks to account for the first block argument
32
+ # being the receiving instance.
33
+ mocks.yield_receiver_to_any_instance_implementation_blocks = true
34
+ end
35
+ end
36
+
37
+ class TestCacheStore
38
+ def initialize
39
+ @items = {}
40
+ end
41
+
42
+ def read(key)
43
+ @items[key]
44
+ end
45
+
46
+ def write(key, value, options={})
47
+ @items[key] = value
48
+ end
49
+
50
+ def fetch(key, &block)
51
+ read(key) || begin
52
+ value = block.call
53
+ write(value)
54
+ value
55
+ end
56
+ end
57
+ end
58
+
59
+ class FaradayResponseMock < ::Flexirest::FaradayResponseProxy
60
+ # The FaradayResponseMock is setup to automatically resolve all calls by default.
61
+ # By setting auto_resolve to false it allows the spec to control when the response
62
+ # is resolved, which simulates what it is like when inside a Faraday in_parallel block.
63
+ def initialize(response, auto_resolve=true)
64
+ super(response)
65
+ @auto_resolve = auto_resolve
66
+ @finished = false
67
+ end
68
+
69
+ def on_complete
70
+ if @auto_resolve
71
+ @finished = true
72
+ yield(@response)
73
+ else
74
+ @callback = Proc.new
75
+ end
76
+ end
77
+
78
+ # This is exactly what is called on responses after a Faraday in_parallel block ends.
79
+ # This method simulates the end of in_parallel block.
80
+ def finish
81
+ @finished = true
82
+ @callback.call(@response)
83
+ end
84
+
85
+ def finished?
86
+ @finished
87
+ end
88
+ end
metadata ADDED
@@ -0,0 +1,347 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: flexirest
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.0
5
+ platform: ruby
6
+ authors:
7
+ - Which Ltd
8
+ - Andy Jeffries
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2015-10-22 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: bundler
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '1.3'
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '1.3'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rake
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rspec
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '3'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '3'
56
+ - !ruby/object:Gem::Dependency
57
+ name: webmock
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: rspec_junit_formatter
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: simplecov
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: simplecov-rcov
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: guard-rspec
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: terminal-notifier-guard
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ - !ruby/object:Gem::Dependency
141
+ name: coveralls
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ version: '0'
147
+ type: :development
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ - !ruby/object:Gem::Dependency
155
+ name: api-auth
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ">="
159
+ - !ruby/object:Gem::Version
160
+ version: 1.3.1
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: 1.3.1
168
+ - !ruby/object:Gem::Dependency
169
+ name: typhoeus
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - ">="
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ type: :development
176
+ prerelease: false
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ - !ruby/object:Gem::Dependency
183
+ name: multi_json
184
+ requirement: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ version: '0'
189
+ type: :runtime
190
+ prerelease: false
191
+ version_requirements: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ version: '0'
196
+ - !ruby/object:Gem::Dependency
197
+ name: crack
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: '0'
203
+ type: :runtime
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - ">="
208
+ - !ruby/object:Gem::Version
209
+ version: '0'
210
+ - !ruby/object:Gem::Dependency
211
+ name: activesupport
212
+ requirement: !ruby/object:Gem::Requirement
213
+ requirements:
214
+ - - ">="
215
+ - !ruby/object:Gem::Version
216
+ version: '0'
217
+ type: :runtime
218
+ prerelease: false
219
+ version_requirements: !ruby/object:Gem::Requirement
220
+ requirements:
221
+ - - ">="
222
+ - !ruby/object:Gem::Version
223
+ version: '0'
224
+ - !ruby/object:Gem::Dependency
225
+ name: faraday
226
+ requirement: !ruby/object:Gem::Requirement
227
+ requirements:
228
+ - - ">="
229
+ - !ruby/object:Gem::Version
230
+ version: '0'
231
+ type: :runtime
232
+ prerelease: false
233
+ version_requirements: !ruby/object:Gem::Requirement
234
+ requirements:
235
+ - - ">="
236
+ - !ruby/object:Gem::Version
237
+ version: '0'
238
+ description: Accessing REST services in an ActiveRecord style
239
+ email:
240
+ - swlicensing@which.co.uk
241
+ - andy@andyjeffries.co.uk
242
+ executables: []
243
+ extensions: []
244
+ extra_rdoc_files: []
245
+ files:
246
+ - ".gitignore"
247
+ - ".rspec"
248
+ - ".simplecov"
249
+ - ".travis.yml"
250
+ - CHANGELOG.md
251
+ - CONTRIBUTING.md
252
+ - Gemfile
253
+ - Guardfile
254
+ - LICENSE.txt
255
+ - README.md
256
+ - Rakefile
257
+ - doc/ActiveRestClient Internals.graffle
258
+ - doc/ActiveRestClient Internals.png
259
+ - flexirest.gemspec
260
+ - lib/flexirest.rb
261
+ - lib/flexirest/base.rb
262
+ - lib/flexirest/caching.rb
263
+ - lib/flexirest/configuration.rb
264
+ - lib/flexirest/connection.rb
265
+ - lib/flexirest/connection_manager.rb
266
+ - lib/flexirest/headers_list.rb
267
+ - lib/flexirest/instrumentation.rb
268
+ - lib/flexirest/lazy_association_loader.rb
269
+ - lib/flexirest/lazy_loader.rb
270
+ - lib/flexirest/logger.rb
271
+ - lib/flexirest/mapping.rb
272
+ - lib/flexirest/monkey_patching.rb
273
+ - lib/flexirest/proxy_base.rb
274
+ - lib/flexirest/recording.rb
275
+ - lib/flexirest/request.rb
276
+ - lib/flexirest/request_delegator.rb
277
+ - lib/flexirest/request_filtering.rb
278
+ - lib/flexirest/result_iterator.rb
279
+ - lib/flexirest/validation.rb
280
+ - lib/flexirest/version.rb
281
+ - spec/lib/base_spec.rb
282
+ - spec/lib/caching_spec.rb
283
+ - spec/lib/configuration_spec.rb
284
+ - spec/lib/connection_manager_spec.rb
285
+ - spec/lib/connection_spec.rb
286
+ - spec/lib/headers_list_spec.rb
287
+ - spec/lib/instrumentation_spec.rb
288
+ - spec/lib/lazy_association_loader_spec.rb
289
+ - spec/lib/lazy_loader_spec.rb
290
+ - spec/lib/logger_spec.rb
291
+ - spec/lib/mapping_spec.rb
292
+ - spec/lib/proxy_spec.rb
293
+ - spec/lib/recording_spec.rb
294
+ - spec/lib/request_filtering_spec.rb
295
+ - spec/lib/request_spec.rb
296
+ - spec/lib/result_iterator_spec.rb
297
+ - spec/lib/validation_spec.rb
298
+ - spec/lib/xml_spec.rb
299
+ - spec/spec_helper.rb
300
+ homepage: http://whichdigital.github.io/
301
+ licenses:
302
+ - MIT
303
+ metadata: {}
304
+ post_install_message:
305
+ rdoc_options: []
306
+ require_paths:
307
+ - lib
308
+ required_ruby_version: !ruby/object:Gem::Requirement
309
+ requirements:
310
+ - - ">="
311
+ - !ruby/object:Gem::Version
312
+ version: '0'
313
+ required_rubygems_version: !ruby/object:Gem::Requirement
314
+ requirements:
315
+ - - ">="
316
+ - !ruby/object:Gem::Version
317
+ version: '0'
318
+ requirements: []
319
+ rubyforge_project:
320
+ rubygems_version: 2.4.6
321
+ signing_key:
322
+ specification_version: 4
323
+ summary: This gem is for accessing REST services in an ActiveRecord style. ActiveResource
324
+ already exists for this, but it doesn't work where the resource naming doesn't follow
325
+ Rails conventions, it doesn't have in-built caching and it's not as flexible in
326
+ general.
327
+ test_files:
328
+ - spec/lib/base_spec.rb
329
+ - spec/lib/caching_spec.rb
330
+ - spec/lib/configuration_spec.rb
331
+ - spec/lib/connection_manager_spec.rb
332
+ - spec/lib/connection_spec.rb
333
+ - spec/lib/headers_list_spec.rb
334
+ - spec/lib/instrumentation_spec.rb
335
+ - spec/lib/lazy_association_loader_spec.rb
336
+ - spec/lib/lazy_loader_spec.rb
337
+ - spec/lib/logger_spec.rb
338
+ - spec/lib/mapping_spec.rb
339
+ - spec/lib/proxy_spec.rb
340
+ - spec/lib/recording_spec.rb
341
+ - spec/lib/request_filtering_spec.rb
342
+ - spec/lib/request_spec.rb
343
+ - spec/lib/result_iterator_spec.rb
344
+ - spec/lib/validation_spec.rb
345
+ - spec/lib/xml_spec.rb
346
+ - spec/spec_helper.rb
347
+ has_rdoc: