her 0.8.2 → 0.10.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -1
- data/.rubocop.yml +1291 -0
- data/.travis.yml +6 -1
- data/README.md +29 -11
- data/her.gemspec +3 -5
- data/lib/her/api.rb +16 -9
- data/lib/her/middleware/json_api_parser.rb +1 -1
- data/lib/her/model/associations/association.rb +32 -5
- data/lib/her/model/associations/association_proxy.rb +1 -1
- data/lib/her/model/associations/belongs_to_association.rb +1 -1
- data/lib/her/model/associations/has_many_association.rb +3 -3
- data/lib/her/model/attributes.rb +105 -75
- data/lib/her/model/http.rb +3 -3
- data/lib/her/model/introspection.rb +1 -1
- data/lib/her/model/orm.rb +96 -19
- data/lib/her/model/parse.rb +27 -17
- data/lib/her/model/relation.rb +46 -2
- data/lib/her/version.rb +1 -1
- data/spec/api_spec.rb +34 -31
- data/spec/collection_spec.rb +25 -10
- data/spec/json_api/model_spec.rb +75 -72
- data/spec/middleware/accept_json_spec.rb +1 -1
- data/spec/middleware/first_level_parse_json_spec.rb +20 -20
- data/spec/middleware/json_api_parser_spec.rb +26 -7
- data/spec/middleware/second_level_parse_json_spec.rb +8 -9
- data/spec/model/associations/association_proxy_spec.rb +2 -5
- data/spec/model/associations_spec.rb +617 -295
- data/spec/model/attributes_spec.rb +114 -107
- data/spec/model/callbacks_spec.rb +59 -27
- data/spec/model/dirty_spec.rb +70 -29
- data/spec/model/http_spec.rb +67 -35
- data/spec/model/introspection_spec.rb +26 -22
- data/spec/model/nested_attributes_spec.rb +31 -31
- data/spec/model/orm_spec.rb +332 -157
- data/spec/model/parse_spec.rb +250 -77
- data/spec/model/paths_spec.rb +109 -109
- data/spec/model/relation_spec.rb +89 -69
- data/spec/model/validations_spec.rb +6 -6
- data/spec/model_spec.rb +17 -17
- data/spec/spec_helper.rb +2 -3
- data/spec/support/macros/model_macros.rb +2 -2
- metadata +36 -63
data/spec/model/relation_spec.rb
CHANGED
@@ -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 :
|
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") {
|
12
|
-
stub.get("/users?admin=1") {
|
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
|
15
|
+
stub.get("/users") do
|
15
16
|
ok! [
|
16
|
-
{ :
|
17
|
-
{ :
|
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(
|
23
|
-
@created_user = { :
|
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.
|
34
|
-
@users = Foo::User.where(:
|
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.
|
39
|
-
@users = Foo::User.where(:
|
40
|
-
@users.
|
41
|
-
@users.size.
|
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(:
|
46
|
-
@user.id.
|
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.
|
51
|
-
Foo::User.create(:
|
52
|
-
Foo::User.all.size.
|
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 :
|
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") {
|
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,
|
74
|
+
scope :page, ->(page) { where(page: page) }
|
67
75
|
end
|
68
76
|
|
69
77
|
class User < Foo::Model; end
|
@@ -71,19 +79,19 @@ describe Her::Model::Relation do
|
|
71
79
|
end
|
72
80
|
|
73
81
|
it "propagates the scopes through its children" do
|
74
|
-
|
75
|
-
|
82
|
+
expect(User.page(2).length).to eq(2)
|
83
|
+
expect(User.scoped.page(2).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 :
|
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! :
|
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(:
|
96
|
-
@user.id.
|
97
|
-
@user.fullname.
|
98
|
-
@user.email.
|
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(:
|
105
|
-
@user.id.
|
106
|
-
@user.fullname.
|
107
|
-
@user.email.
|
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,126 @@ 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(:
|
117
|
-
@new_user.new
|
118
|
-
@new_user.fullname.
|
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 :
|
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") {
|
128
|
-
stub.get("/users?what=2") {
|
129
|
-
stub.get("/users?where=6") {
|
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" }] }
|
138
|
+
stub.get('/bar/users') { ok! [] }
|
130
139
|
end
|
131
140
|
end
|
132
141
|
|
133
|
-
spawn_model
|
134
|
-
scope :foo,
|
135
|
-
scope :bar,
|
136
|
-
scope :baz,
|
142
|
+
spawn_model "Foo::User" do
|
143
|
+
scope :foo, ->(v) { where(what: v) }
|
144
|
+
scope :bar, ->(v) { where(where: v) }
|
145
|
+
scope :baz, -> { bar(6) }
|
146
|
+
end
|
147
|
+
|
148
|
+
spawn_model "Bar::User" do
|
149
|
+
collection_path '/bar/users'
|
150
|
+
scope :baz, -> { where(where: 7) }
|
137
151
|
end
|
138
152
|
end
|
139
153
|
|
140
154
|
it "passes query parameters" do
|
141
155
|
@user = Foo::User.foo(2).first
|
142
|
-
@user.id.
|
156
|
+
expect(@user.id).to eq(2)
|
143
157
|
end
|
144
158
|
|
145
159
|
it "passes multiple query parameters" do
|
146
160
|
@user = Foo::User.foo(4).bar(3).first
|
147
|
-
@user.id.
|
161
|
+
expect(@user.id).to eq(3)
|
148
162
|
end
|
149
163
|
|
150
164
|
it "handles embedded scopes" do
|
151
165
|
@user = Foo::User.baz.first
|
152
|
-
@user.id.
|
166
|
+
expect(@user.id).to eq(4)
|
167
|
+
end
|
168
|
+
|
169
|
+
it "does not share scope with other models" do
|
170
|
+
expect(Bar::User.scoped).not_to respond_to(:foo, :bar)
|
171
|
+
expect(Foo::User.scoped.baz.params[:where]).to eq(6)
|
172
|
+
expect(Bar::User.scoped.baz.params[:where]).to eq(7)
|
153
173
|
end
|
154
174
|
end
|
155
175
|
|
156
176
|
describe :default_scope do
|
157
177
|
context "for new objects" do
|
158
178
|
before do
|
159
|
-
spawn_model
|
160
|
-
default_scope
|
161
|
-
default_scope
|
179
|
+
spawn_model "Foo::User" do
|
180
|
+
default_scope -> { where(active: true) }
|
181
|
+
default_scope -> { where(admin: true) }
|
162
182
|
end
|
163
183
|
end
|
164
184
|
|
165
185
|
it "should apply the scope to the attributes" do
|
166
|
-
Foo::User.new.
|
167
|
-
Foo::User.new.
|
186
|
+
expect(Foo::User.new).to be_active
|
187
|
+
expect(Foo::User.new).to be_admin
|
168
188
|
end
|
169
189
|
end
|
170
190
|
|
171
191
|
context "for fetched resources" do
|
172
192
|
before do
|
173
|
-
Her::API.setup :
|
193
|
+
Her::API.setup url: "https://api.example.com" do |builder|
|
174
194
|
builder.use Her::Middleware::FirstLevelParseJSON
|
175
195
|
builder.use Faraday::Request::UrlEncoded
|
176
196
|
builder.adapter :test do |stub|
|
177
|
-
stub.post("/users") { |env| ok! :
|
197
|
+
stub.post("/users") { |env| ok! id: 3, active: (params(env)[:active] == "true" ? true : false) }
|
178
198
|
end
|
179
199
|
end
|
180
200
|
|
181
|
-
spawn_model
|
182
|
-
default_scope
|
201
|
+
spawn_model "Foo::User" do
|
202
|
+
default_scope -> { where(active: true) }
|
183
203
|
end
|
184
204
|
end
|
185
205
|
|
186
|
-
it("should apply the scope to the request") { Foo::User.create.
|
206
|
+
it("should apply the scope to the request") { expect(Foo::User.create).to be_active }
|
187
207
|
end
|
188
208
|
|
189
209
|
context "for fetched collections" do
|
190
210
|
before do
|
191
|
-
Her::API.setup :
|
211
|
+
Her::API.setup url: "https://api.example.com" do |builder|
|
192
212
|
builder.use Her::Middleware::FirstLevelParseJSON
|
193
213
|
builder.use Faraday::Request::UrlEncoded
|
194
214
|
builder.adapter :test do |stub|
|
195
|
-
stub.get("/users?active=true") { |env| ok! [{ :
|
215
|
+
stub.get("/users?active=true") { |env| ok! [{ id: 3, active: (params(env)[:active] == "true" ? true : false) }] }
|
196
216
|
end
|
197
217
|
end
|
198
218
|
|
199
|
-
spawn_model
|
200
|
-
default_scope
|
219
|
+
spawn_model "Foo::User" do
|
220
|
+
default_scope -> { where(active: true) }
|
201
221
|
end
|
202
222
|
end
|
203
223
|
|
204
|
-
it("should apply the scope to the request") { Foo::User.all.first.
|
224
|
+
it("should apply the scope to the request") { expect(Foo::User.all.first).to be_active }
|
205
225
|
end
|
206
226
|
end
|
207
227
|
|
208
228
|
describe :map do
|
209
229
|
before do
|
210
|
-
Her::API.setup :
|
230
|
+
Her::API.setup url: "https://api.example.com" do |builder|
|
211
231
|
builder.use Her::Middleware::FirstLevelParseJSON
|
212
232
|
builder.adapter :test do |stub|
|
213
|
-
stub.get("/users") do
|
214
|
-
ok! [{ :
|
233
|
+
stub.get("/users") do
|
234
|
+
ok! [{ id: 1, fullname: "Tobias Fünke" }, { id: 2, fullname: "Lindsay Fünke" }]
|
215
235
|
end
|
216
236
|
end
|
217
237
|
end
|
218
238
|
|
219
|
-
spawn_model
|
239
|
+
spawn_model "Foo::User"
|
220
240
|
end
|
221
241
|
|
222
242
|
it "delegates the method to the fetched collection" do
|
223
|
-
Foo::User.all.map(&:fullname).
|
243
|
+
expect(Foo::User.all.map(&:fullname)).to eq(["Tobias Fünke", "Lindsay Fünke"])
|
224
244
|
end
|
225
245
|
end
|
226
246
|
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.
|
17
|
-
user.errors.full_messages.
|
18
|
-
user.errors.full_messages.
|
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.
|
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(:
|
39
|
-
user.errors.
|
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
|
2
|
+
require "spec_helper"
|
3
3
|
|
4
4
|
describe Her::Model do
|
5
5
|
before do
|
6
|
-
Her::API.setup :
|
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") {
|
10
|
-
stub.get("/users/1/comments") {
|
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 {
|
21
|
-
it {
|
22
|
-
it {
|
23
|
-
it {
|
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
|
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
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
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 {
|
41
|
-
specify { subject[:name].
|
42
|
-
specify { subject[:comments].first.body.
|
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
|
-
|
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(
|
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
|
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.
|
4
|
+
version: 0.10.4
|
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:
|
11
|
+
date: 2018-10-18 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: '
|
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: '
|
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
|
-
version:
|
64
|
+
version: 5.2.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
|
-
version:
|
74
|
+
version: 5.2.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
|
-
version:
|
84
|
+
version: 5.2.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
|
-
version:
|
94
|
+
version: 5.2.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
|
-
- .
|
167
|
-
- .
|
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.
|
228
|
+
rubygems_version: 2.4.5.1
|
256
229
|
signing_key:
|
257
230
|
specification_version: 4
|
258
231
|
summary: A simple Representational State Transfer-based Hypertext Transfer Protocol-powered
|