her 0.8.2 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +1 -1
  3. data/.rubocop.yml +1291 -0
  4. data/.travis.yml +2 -0
  5. data/README.md +23 -3
  6. data/her.gemspec +1 -3
  7. data/lib/her/middleware/json_api_parser.rb +1 -1
  8. data/lib/her/model/associations/association.rb +31 -0
  9. data/lib/her/model/associations/association_proxy.rb +1 -1
  10. data/lib/her/model/attributes.rb +2 -0
  11. data/lib/her/model/orm.rb +79 -6
  12. data/lib/her/model/parse.rb +8 -12
  13. data/lib/her/model/relation.rb +45 -1
  14. data/lib/her/version.rb +1 -1
  15. data/spec/api_spec.rb +34 -31
  16. data/spec/collection_spec.rb +25 -10
  17. data/spec/json_api/model_spec.rb +75 -72
  18. data/spec/middleware/accept_json_spec.rb +1 -1
  19. data/spec/middleware/first_level_parse_json_spec.rb +20 -20
  20. data/spec/middleware/json_api_parser_spec.rb +26 -7
  21. data/spec/middleware/second_level_parse_json_spec.rb +8 -9
  22. data/spec/model/associations/association_proxy_spec.rb +2 -5
  23. data/spec/model/associations_spec.rb +248 -161
  24. data/spec/model/attributes_spec.rb +106 -99
  25. data/spec/model/callbacks_spec.rb +58 -26
  26. data/spec/model/dirty_spec.rb +30 -29
  27. data/spec/model/http_spec.rb +67 -35
  28. data/spec/model/introspection_spec.rb +26 -22
  29. data/spec/model/nested_attributes_spec.rb +31 -31
  30. data/spec/model/orm_spec.rb +312 -155
  31. data/spec/model/parse_spec.rb +77 -77
  32. data/spec/model/paths_spec.rb +109 -109
  33. data/spec/model/relation_spec.rb +76 -68
  34. data/spec/model/validations_spec.rb +6 -6
  35. data/spec/model_spec.rb +17 -17
  36. data/spec/spec_helper.rb +2 -3
  37. data/spec/support/macros/model_macros.rb +2 -2
  38. metadata +32 -59
@@ -5,22 +5,23 @@ describe Her::Model::Relation do
5
5
  describe :where do
6
6
  context "for base classes" do
7
7
  before do
8
- Her::API.setup :url => "https://api.example.com" do |builder|
8
+ Her::API.setup url: "https://api.example.com" do |builder|
9
9
  builder.use Her::Middleware::FirstLevelParseJSON
10
10
  builder.adapter :test do |stub|
11
- stub.get("/users?foo=1&bar=2") { |env| ok! [{ :id => 2, :fullname => "Tobias Fünke" }] }
12
- stub.get("/users?admin=1") { |env| ok! [{ :id => 1, :fullname => "Tobias Fünke" }] }
11
+ stub.get("/users?foo=1&bar=2") { ok! [{ id: 2, fullname: "Tobias Fünke" }] }
12
+ stub.get("/users?admin=1") { ok! [{ id: 1, fullname: "Tobias Fünke" }] }
13
+ stub.get("/users?id=3&foo=2") { ok! [{ id: 3, fullname: "Tobias Fünke" }] }
13
14
 
14
- stub.get("/users") do |env|
15
+ stub.get("/users") do
15
16
  ok! [
16
- { :id => 1, :fullname => "Tobias Fünke" },
17
- { :id => 2, :fullname => "Lindsay Fünke" },
18
- @created_user,
17
+ { id: 1, fullname: "Tobias Fünke" },
18
+ { id: 2, fullname: "Lindsay Fünke" },
19
+ @created_user
19
20
  ].compact
20
21
  end
21
22
 
22
- stub.post('/users') do |env|
23
- @created_user = { :id => 3, :fullname => 'George Michael Bluth' }
23
+ stub.post("/users") do
24
+ @created_user = { id: 3, fullname: "George Michael Bluth" }
24
25
  ok! @created_user
25
26
  end
26
27
  end
@@ -30,40 +31,47 @@ describe Her::Model::Relation do
30
31
  end
31
32
 
32
33
  it "doesn't fetch the data immediatly" do
33
- Foo::User.should_receive(:request).never
34
- @users = Foo::User.where(:admin => 1)
34
+ expect(Foo::User).to receive(:request).never
35
+ @users = Foo::User.where(admin: 1)
35
36
  end
36
37
 
37
38
  it "fetches the data and passes query parameters" do
38
- Foo::User.should_receive(:request).once.and_call_original
39
- @users = Foo::User.where(:admin => 1)
40
- @users.should respond_to(:length)
41
- @users.size.should eql 1
39
+ expect(Foo::User).to receive(:request).once.and_call_original
40
+ @users = Foo::User.where(admin: 1)
41
+ expect(@users).to respond_to(:length)
42
+ expect(@users.size).to eql 1
43
+ end
44
+
45
+ it "fetches the data by parameters including primary_key" do
46
+ expect(Foo::User).to receive(:request).once.and_call_original
47
+ @users = Foo::User.where(id: 3, foo: 2)
48
+ expect(@users).to respond_to(:length)
49
+ expect(@users.size).to eql 1
42
50
  end
43
51
 
44
52
  it "chains multiple where statements" do
45
- @user = Foo::User.where(:foo => 1).where(:bar => 2).first
46
- @user.id.should == 2
53
+ @user = Foo::User.where(foo: 1).where(bar: 2).first
54
+ expect(@user.id).to eq(2)
47
55
  end
48
56
 
49
57
  it "does not reuse relations" do
50
- Foo::User.all.size.should eql 2
51
- Foo::User.create(:fullname => 'George Michael Bluth').id.should == 3
52
- Foo::User.all.size.should eql 3
58
+ expect(Foo::User.all.size).to eql 2
59
+ expect(Foo::User.create(fullname: "George Michael Bluth").id).to eq(3)
60
+ expect(Foo::User.all.size).to eql 3
53
61
  end
54
62
  end
55
63
 
56
64
  context "for parent class" do
57
65
  before do
58
- Her::API.setup :url => "https://api.example.com" do |builder|
66
+ Her::API.setup url: "https://api.example.com" do |builder|
59
67
  builder.use Her::Middleware::FirstLevelParseJSON
60
68
  builder.adapter :test do |stub|
61
- stub.get("/users?page=2") { |env| ok! [{ :id => 1, :fullname => "Tobias Fünke" }, { :id => 2, :fullname => "Lindsay Fünke" }] }
69
+ stub.get("/users?page=2") { ok! [{ id: 1, fullname: "Tobias Fünke" }, { id: 2, fullname: "Lindsay Fünke" }] }
62
70
  end
63
71
  end
64
72
 
65
73
  spawn_model("Foo::Model") do
66
- scope :page, lambda { |page| where(:page => page) }
74
+ scope :page, ->(page) { where(page: page) }
67
75
  end
68
76
 
69
77
  class User < Foo::Model; end
@@ -72,18 +80,18 @@ describe Her::Model::Relation do
72
80
 
73
81
  it "propagates the scopes through its children" do
74
82
  @users = User.page(2)
75
- @users.length.should == 2
83
+ expect(@users.length).to eq(2)
76
84
  end
77
85
  end
78
86
  end
79
87
 
80
88
  describe :create do
81
89
  before do
82
- Her::API.setup :url => "https://api.example.com" do |builder|
90
+ Her::API.setup url: "https://api.example.com" do |builder|
83
91
  builder.use Her::Middleware::FirstLevelParseJSON
84
92
  builder.use Faraday::Request::UrlEncoded
85
93
  builder.adapter :test do |stub|
86
- stub.post("/users") { |env| ok! :id => 1, :fullname => params(env)[:fullname], :email => params(env)[:email] }
94
+ stub.post("/users") { |env| ok! id: 1, fullname: params(env)[:fullname], email: params(env)[:email] }
87
95
  end
88
96
  end
89
97
 
@@ -92,19 +100,19 @@ describe Her::Model::Relation do
92
100
 
93
101
  context "with a single where call" do
94
102
  it "creates a resource and passes the query parameters" do
95
- @user = Foo::User.where(:fullname => "Tobias Fünke", :email => "tobias@bluth.com").create
96
- @user.id.should == 1
97
- @user.fullname.should == "Tobias Fünke"
98
- @user.email.should == "tobias@bluth.com"
103
+ @user = Foo::User.where(fullname: "Tobias Fünke", email: "tobias@bluth.com").create
104
+ expect(@user.id).to eq(1)
105
+ expect(@user.fullname).to eq("Tobias Fünke")
106
+ expect(@user.email).to eq("tobias@bluth.com")
99
107
  end
100
108
  end
101
109
 
102
110
  context "with multiple where calls" do
103
111
  it "creates a resource and passes the query parameters" do
104
- @user = Foo::User.where(:fullname => "Tobias Fünke").create(:email => "tobias@bluth.com")
105
- @user.id.should == 1
106
- @user.fullname.should == "Tobias Fünke"
107
- @user.email.should == "tobias@bluth.com"
112
+ @user = Foo::User.where(fullname: "Tobias Fünke").create(email: "tobias@bluth.com")
113
+ expect(@user.id).to eq(1)
114
+ expect(@user.fullname).to eq("Tobias Fünke")
115
+ expect(@user.email).to eq("tobias@bluth.com")
108
116
  end
109
117
  end
110
118
  end
@@ -113,114 +121,114 @@ describe Her::Model::Relation do
113
121
  before { spawn_model "Foo::User" }
114
122
 
115
123
  it "handles new resource with build" do
116
- @new_user = Foo::User.where(:fullname => "Tobias Fünke").build
117
- @new_user.new?.should be_truthy
118
- @new_user.fullname.should == "Tobias Fünke"
124
+ @new_user = Foo::User.where(fullname: "Tobias Fünke").build
125
+ expect(@new_user.new?).to be_truthy
126
+ expect(@new_user.fullname).to eq("Tobias Fünke")
119
127
  end
120
128
  end
121
129
 
122
130
  describe :scope do
123
131
  before do
124
- Her::API.setup :url => "https://api.example.com" do |builder|
132
+ Her::API.setup url: "https://api.example.com" do |builder|
125
133
  builder.use Her::Middleware::FirstLevelParseJSON
126
134
  builder.adapter :test do |stub|
127
- stub.get("/users?what=4&where=3") { |env| ok! [{ :id => 3, :fullname => "Maeby Fünke" }] }
128
- stub.get("/users?what=2") { |env| ok! [{ :id => 2, :fullname => "Lindsay Fünke" }] }
129
- stub.get("/users?where=6") { |env| ok! [{ :id => 4, :fullname => "Tobias Fünke" }] }
135
+ stub.get("/users?what=4&where=3") { ok! [{ id: 3, fullname: "Maeby Fünke" }] }
136
+ stub.get("/users?what=2") { ok! [{ id: 2, fullname: "Lindsay Fünke" }] }
137
+ stub.get("/users?where=6") { ok! [{ id: 4, fullname: "Tobias Fünke" }] }
130
138
  end
131
139
  end
132
140
 
133
- spawn_model 'Foo::User' do
134
- scope :foo, lambda { |v| where(:what => v) }
135
- scope :bar, lambda { |v| where(:where => v) }
136
- scope :baz, lambda { bar(6) }
141
+ spawn_model "Foo::User" do
142
+ scope :foo, ->(v) { where(what: v) }
143
+ scope :bar, ->(v) { where(where: v) }
144
+ scope :baz, -> { bar(6) }
137
145
  end
138
146
  end
139
147
 
140
148
  it "passes query parameters" do
141
149
  @user = Foo::User.foo(2).first
142
- @user.id.should == 2
150
+ expect(@user.id).to eq(2)
143
151
  end
144
152
 
145
153
  it "passes multiple query parameters" do
146
154
  @user = Foo::User.foo(4).bar(3).first
147
- @user.id.should == 3
155
+ expect(@user.id).to eq(3)
148
156
  end
149
157
 
150
158
  it "handles embedded scopes" do
151
159
  @user = Foo::User.baz.first
152
- @user.id.should == 4
160
+ expect(@user.id).to eq(4)
153
161
  end
154
162
  end
155
163
 
156
164
  describe :default_scope do
157
165
  context "for new objects" do
158
166
  before do
159
- spawn_model 'Foo::User' do
160
- default_scope lambda { where(:active => true) }
161
- default_scope lambda { where(:admin => true) }
167
+ spawn_model "Foo::User" do
168
+ default_scope -> { where(active: true) }
169
+ default_scope -> { where(admin: true) }
162
170
  end
163
171
  end
164
172
 
165
173
  it "should apply the scope to the attributes" do
166
- Foo::User.new.should be_active
167
- Foo::User.new.should be_admin
174
+ expect(Foo::User.new).to be_active
175
+ expect(Foo::User.new).to be_admin
168
176
  end
169
177
  end
170
178
 
171
179
  context "for fetched resources" do
172
180
  before do
173
- Her::API.setup :url => "https://api.example.com" do |builder|
181
+ Her::API.setup url: "https://api.example.com" do |builder|
174
182
  builder.use Her::Middleware::FirstLevelParseJSON
175
183
  builder.use Faraday::Request::UrlEncoded
176
184
  builder.adapter :test do |stub|
177
- stub.post("/users") { |env| ok! :id => 3, :active => (params(env)[:active] == "true" ? true : false) }
185
+ stub.post("/users") { |env| ok! id: 3, active: (params(env)[:active] == "true" ? true : false) }
178
186
  end
179
187
  end
180
188
 
181
- spawn_model 'Foo::User' do
182
- default_scope lambda { where(:active => true) }
189
+ spawn_model "Foo::User" do
190
+ default_scope -> { where(active: true) }
183
191
  end
184
192
  end
185
193
 
186
- it("should apply the scope to the request") { Foo::User.create.should be_active }
194
+ it("should apply the scope to the request") { expect(Foo::User.create).to be_active }
187
195
  end
188
196
 
189
197
  context "for fetched collections" do
190
198
  before do
191
- Her::API.setup :url => "https://api.example.com" do |builder|
199
+ Her::API.setup url: "https://api.example.com" do |builder|
192
200
  builder.use Her::Middleware::FirstLevelParseJSON
193
201
  builder.use Faraday::Request::UrlEncoded
194
202
  builder.adapter :test do |stub|
195
- stub.get("/users?active=true") { |env| ok! [{ :id => 3, :active => (params(env)[:active] == "true" ? true : false) }] }
203
+ stub.get("/users?active=true") { |env| ok! [{ id: 3, active: (params(env)[:active] == "true" ? true : false) }] }
196
204
  end
197
205
  end
198
206
 
199
- spawn_model 'Foo::User' do
200
- default_scope lambda { where(:active => true) }
207
+ spawn_model "Foo::User" do
208
+ default_scope -> { where(active: true) }
201
209
  end
202
210
  end
203
211
 
204
- it("should apply the scope to the request") { Foo::User.all.first.should be_active }
212
+ it("should apply the scope to the request") { expect(Foo::User.all.first).to be_active }
205
213
  end
206
214
  end
207
215
 
208
216
  describe :map do
209
217
  before do
210
- Her::API.setup :url => "https://api.example.com" do |builder|
218
+ Her::API.setup url: "https://api.example.com" do |builder|
211
219
  builder.use Her::Middleware::FirstLevelParseJSON
212
220
  builder.adapter :test do |stub|
213
- stub.get("/users") do |env|
214
- ok! [{ :id => 1, :fullname => "Tobias Fünke" }, { :id => 2, :fullname => "Lindsay Fünke" }]
221
+ stub.get("/users") do
222
+ ok! [{ id: 1, fullname: "Tobias Fünke" }, { id: 2, fullname: "Lindsay Fünke" }]
215
223
  end
216
224
  end
217
225
  end
218
226
 
219
- spawn_model 'Foo::User'
227
+ spawn_model "Foo::User"
220
228
  end
221
229
 
222
230
  it "delegates the method to the fetched collection" do
223
- Foo::User.all.map(&:fullname).should == ["Tobias Fünke", "Lindsay Fünke"]
231
+ expect(Foo::User.all.map(&:fullname)).to eq(["Tobias Fünke", "Lindsay Fünke"])
224
232
  end
225
233
  end
226
234
  end
@@ -13,12 +13,12 @@ describe "Her::Model and ActiveModel::Validations" do
13
13
 
14
14
  it "validates attributes when calling #valid?" do
15
15
  user = Foo::User.new
16
- user.should_not be_valid
17
- user.errors.full_messages.should include("Fullname can't be blank")
18
- user.errors.full_messages.should include("Email can't be blank")
16
+ expect(user).not_to be_valid
17
+ expect(user.errors.full_messages).to include("Fullname can't be blank")
18
+ expect(user.errors.full_messages).to include("Email can't be blank")
19
19
  user.fullname = "Tobias Fünke"
20
20
  user.email = "tobias@bluthcompany.com"
21
- user.should be_valid
21
+ expect(user).to be_valid
22
22
  end
23
23
  end
24
24
 
@@ -35,8 +35,8 @@ describe "Her::Model and ActiveModel::Validations" do
35
35
  end
36
36
 
37
37
  it "validates attributes when calling #valid?" do
38
- user = User.new(:_errors => ["Email cannot be blank"])
39
- user.errors.should include("Email cannot be blank")
38
+ user = User.new(_errors: ["Email cannot be blank"])
39
+ expect(user.errors).to include("Email cannot be blank")
40
40
  end
41
41
  end
42
42
  end
data/spec/model_spec.rb CHANGED
@@ -1,13 +1,13 @@
1
1
  # encoding: utf-8
2
- require 'spec_helper'
2
+ require "spec_helper"
3
3
 
4
4
  describe Her::Model do
5
5
  before do
6
- Her::API.setup :url => "https://api.example.com" do |connection|
6
+ Her::API.setup url: "https://api.example.com" do |connection|
7
7
  connection.use Her::Middleware::FirstLevelParseJSON
8
8
  connection.adapter :test do |stub|
9
- stub.get("/users/1") { |env| [200, {}, { :id => 1, :name => "Tobias Fünke" }.to_json] }
10
- stub.get("/users/1/comments") { |env| [200, {}, [{ :id => 4, :body => "They're having a FIRESALE?" }].to_json] }
9
+ stub.get("/users/1") { [200, {}, { id: 1, name: "Tobias Fünke" }.to_json] }
10
+ stub.get("/users/1/comments") { [200, {}, [{ id: 4, body: "They're having a FIRESALE?" }].to_json] }
11
11
  end
12
12
  end
13
13
 
@@ -17,28 +17,28 @@ describe Her::Model do
17
17
  subject { Foo::User.find(1) }
18
18
 
19
19
  describe :has_key? do
20
- it { should_not have_key(:unknown_method_for_a_user) }
21
- it { should_not have_key(:unknown_method_for_a_user) }
22
- it { should have_key(:name) }
23
- it { should have_key(:comments) }
20
+ it { is_expected.not_to have_key(:unknown_method_for_a_user) }
21
+ it { is_expected.not_to have_key(:unknown_method_for_a_user) }
22
+ it { is_expected.to have_key(:name) }
23
+ it { is_expected.to have_key(:comments) }
24
24
  end
25
25
 
26
26
  describe :serialization do
27
- it 'should be serialized without an error' do
27
+ it "should be serialized without an error" do
28
28
  expect { Marshal.dump(subject.comments) }.not_to raise_error
29
29
  end
30
30
 
31
- it 'should correctly load serialized object' do
32
- serialized_comments = Marshal.load(Marshal.dump(subject.comments))
33
- subject.comments.size.should eq(serialized_comments.size)
34
- subject.comments.first.id.should eq(serialized_comments.first.id)
35
- subject.comments.first.body.should eq(serialized_comments.first.body)
31
+ it "should correctly load serialized object" do
32
+ serialized_comments = Marshal.load(Marshal.dump(subject.comments))
33
+ expect(subject.comments.size).to eq(serialized_comments.size)
34
+ expect(subject.comments.first.id).to eq(serialized_comments.first.id)
35
+ expect(subject.comments.first.body).to eq(serialized_comments.first.body)
36
36
  end
37
37
  end
38
38
 
39
39
  describe :[] do
40
- it { should_not have_key(:unknown_method_for_a_user) }
41
- specify { subject[:name].should == "Tobias Fünke" }
42
- specify { subject[:comments].first.body.should == "They're having a FIRESALE?" }
40
+ it { is_expected.not_to have_key(:unknown_method_for_a_user) }
41
+ specify { expect(subject[:name]).to eq("Tobias Fünke") }
42
+ specify { expect(subject[:comments].first.body).to eq("They're having a FIRESALE?") }
43
43
  end
44
44
  end
data/spec/spec_helper.rb CHANGED
@@ -1,11 +1,10 @@
1
- $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
1
+ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), "..", "lib")
2
2
 
3
3
  require "rspec"
4
- require "rspec/its"
5
4
  require "her"
6
5
 
7
6
  # Require everything in `spec/support`
8
- Dir[File.expand_path('../../spec/support/**/*.rb', __FILE__)].map(&method(:require))
7
+ Dir[File.expand_path("../../spec/support/**/*.rb", __FILE__)].map(&method(:require))
9
8
 
10
9
  # Remove ActiveModel deprecation message
11
10
  I18n.enforce_available_locales = false
@@ -3,7 +3,7 @@ module Her
3
3
  module Macros
4
4
  module ModelMacros
5
5
  # Create a class and automatically inject Her::Model into it
6
- def spawn_model(klass, options={}, &block)
6
+ def spawn_model(klass, options = {}, &block)
7
7
  super_class = options[:super_class]
8
8
  model_type = options[:type] || Her::Model
9
9
  new_class = if super_class
@@ -12,7 +12,7 @@ module Her
12
12
  Class.new
13
13
  end
14
14
  if klass =~ /::/
15
- base, submodel = klass.split(/::/).map{ |s| s.to_sym }
15
+ base, submodel = klass.split(/::/).map(&:to_sym)
16
16
  Object.const_set(base, Module.new) unless Object.const_defined?(base)
17
17
  Object.const_get(base).module_eval do
18
18
  remove_const submodel if constants.map(&:to_sym).include?(submodel)
metadata CHANGED
@@ -1,157 +1,129 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: her
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rémi Prévost
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-29 00:00:00.000000000 Z
11
+ date: 2017-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '10.0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '10.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '2.13'
33
+ version: '3.5'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '2.13'
41
- - !ruby/object:Gem::Dependency
42
- name: rspec-its
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ~>
46
- - !ruby/object:Gem::Version
47
- version: '1.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ~>
53
- - !ruby/object:Gem::Version
54
- version: '1.0'
55
- - !ruby/object:Gem::Dependency
56
- name: fivemat
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ~>
60
- - !ruby/object:Gem::Version
61
- version: '1.2'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ~>
67
- - !ruby/object:Gem::Version
68
- version: '1.2'
40
+ version: '3.5'
69
41
  - !ruby/object:Gem::Dependency
70
42
  name: json
71
43
  requirement: !ruby/object:Gem::Requirement
72
44
  requirements:
73
- - - ~>
45
+ - - "~>"
74
46
  - !ruby/object:Gem::Version
75
47
  version: '1.8'
76
48
  type: :development
77
49
  prerelease: false
78
50
  version_requirements: !ruby/object:Gem::Requirement
79
51
  requirements:
80
- - - ~>
52
+ - - "~>"
81
53
  - !ruby/object:Gem::Version
82
54
  version: '1.8'
83
55
  - !ruby/object:Gem::Dependency
84
56
  name: activemodel
85
57
  requirement: !ruby/object:Gem::Requirement
86
58
  requirements:
87
- - - '>='
59
+ - - ">="
88
60
  - !ruby/object:Gem::Version
89
61
  version: 3.0.0
90
- - - <=
62
+ - - "<="
91
63
  - !ruby/object:Gem::Version
92
64
  version: 6.0.0
93
65
  type: :runtime
94
66
  prerelease: false
95
67
  version_requirements: !ruby/object:Gem::Requirement
96
68
  requirements:
97
- - - '>='
69
+ - - ">="
98
70
  - !ruby/object:Gem::Version
99
71
  version: 3.0.0
100
- - - <=
72
+ - - "<="
101
73
  - !ruby/object:Gem::Version
102
74
  version: 6.0.0
103
75
  - !ruby/object:Gem::Dependency
104
76
  name: activesupport
105
77
  requirement: !ruby/object:Gem::Requirement
106
78
  requirements:
107
- - - '>='
79
+ - - ">="
108
80
  - !ruby/object:Gem::Version
109
81
  version: 3.0.0
110
- - - <=
82
+ - - "<="
111
83
  - !ruby/object:Gem::Version
112
84
  version: 6.0.0
113
85
  type: :runtime
114
86
  prerelease: false
115
87
  version_requirements: !ruby/object:Gem::Requirement
116
88
  requirements:
117
- - - '>='
89
+ - - ">="
118
90
  - !ruby/object:Gem::Version
119
91
  version: 3.0.0
120
- - - <=
92
+ - - "<="
121
93
  - !ruby/object:Gem::Version
122
94
  version: 6.0.0
123
95
  - !ruby/object:Gem::Dependency
124
96
  name: faraday
125
97
  requirement: !ruby/object:Gem::Requirement
126
98
  requirements:
127
- - - '>='
99
+ - - ">="
128
100
  - !ruby/object:Gem::Version
129
101
  version: '0.8'
130
- - - <
102
+ - - "<"
131
103
  - !ruby/object:Gem::Version
132
104
  version: '1.0'
133
105
  type: :runtime
134
106
  prerelease: false
135
107
  version_requirements: !ruby/object:Gem::Requirement
136
108
  requirements:
137
- - - '>='
109
+ - - ">="
138
110
  - !ruby/object:Gem::Version
139
111
  version: '0.8'
140
- - - <
112
+ - - "<"
141
113
  - !ruby/object:Gem::Version
142
114
  version: '1.0'
143
115
  - !ruby/object:Gem::Dependency
144
116
  name: multi_json
145
117
  requirement: !ruby/object:Gem::Requirement
146
118
  requirements:
147
- - - ~>
119
+ - - "~>"
148
120
  - !ruby/object:Gem::Version
149
121
  version: '1.7'
150
122
  type: :runtime
151
123
  prerelease: false
152
124
  version_requirements: !ruby/object:Gem::Requirement
153
125
  requirements:
154
- - - ~>
126
+ - - "~>"
155
127
  - !ruby/object:Gem::Version
156
128
  version: '1.7'
157
129
  description: Her is an ORM that maps REST resources and collections to Ruby objects
@@ -161,10 +133,11 @@ executables: []
161
133
  extensions: []
162
134
  extra_rdoc_files: []
163
135
  files:
164
- - .gitignore
165
- - .rspec
166
- - .travis.yml
167
- - .yardopts
136
+ - ".gitignore"
137
+ - ".rspec"
138
+ - ".rubocop.yml"
139
+ - ".travis.yml"
140
+ - ".yardopts"
168
141
  - CONTRIBUTING.md
169
142
  - Gemfile
170
143
  - LICENSE
@@ -242,17 +215,17 @@ require_paths:
242
215
  - lib
243
216
  required_ruby_version: !ruby/object:Gem::Requirement
244
217
  requirements:
245
- - - '>='
218
+ - - ">="
246
219
  - !ruby/object:Gem::Version
247
220
  version: '0'
248
221
  required_rubygems_version: !ruby/object:Gem::Requirement
249
222
  requirements:
250
- - - '>='
223
+ - - ">="
251
224
  - !ruby/object:Gem::Version
252
225
  version: '0'
253
226
  requirements: []
254
227
  rubyforge_project:
255
- rubygems_version: 2.2.2
228
+ rubygems_version: 2.5.1
256
229
  signing_key:
257
230
  specification_version: 4
258
231
  summary: A simple Representational State Transfer-based Hypertext Transfer Protocol-powered