onsi 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +6 -6
- data/.gitignore +1 -0
- data/lib/onsi/params.rb +7 -0
- data/lib/onsi/version.rb +1 -1
- metadata +3 -5
- data/.travis.yml +0 -5
- data/Gemfile.lock +0 -168
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 94fc907d0596232a5b1887ca45501685688f2589
|
4
|
+
data.tar.gz: f0dde3db9f4427caf83c0dbec973adc8c79d2c6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a75e6341474d6b4f0ce9ab96478455f91268fba1d86a14b4f52e0ef32382fe6d52910662cad050a33f58cb8c40134cfd82a5a00985666e86a13bef8bb71a4882
|
7
|
+
data.tar.gz: c5561a0006ebe969907206a29445bd9ad320e061110cc7a15714d8adcb9a362f9846895e990d9b998edf43f9aa0c4bbaf7566745ce342c1b954f321af75160f6
|
data/.circleci/config.yml
CHANGED
@@ -53,11 +53,11 @@ jobs:
|
|
53
53
|
- run:
|
54
54
|
name: install gems
|
55
55
|
command: |
|
56
|
-
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
56
|
+
bundle install --jobs=4 --retry=3 --path vendor/bundle-2_5
|
57
57
|
- save_cache:
|
58
58
|
key: v1-gems-build_2_5-{{ checksum "onsi.gemspec" }}
|
59
59
|
paths:
|
60
|
-
- ./vendor/bundle
|
60
|
+
- ./vendor/bundle-2_5
|
61
61
|
- run:
|
62
62
|
name: Run Specs
|
63
63
|
command: bundle exec rspec spec/**/*.rb
|
@@ -75,11 +75,11 @@ jobs:
|
|
75
75
|
- run:
|
76
76
|
name: install gems
|
77
77
|
command: |
|
78
|
-
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
78
|
+
bundle install --jobs=4 --retry=3 --path vendor/bundle-2_4
|
79
79
|
- save_cache:
|
80
80
|
key: v1-gems-build_2_4-{{ checksum "onsi.gemspec" }}
|
81
81
|
paths:
|
82
|
-
- ./vendor/bundle
|
82
|
+
- ./vendor/bundle-2_4
|
83
83
|
- run:
|
84
84
|
name: Run Specs
|
85
85
|
command: bundle exec rspec spec/**/*.rb
|
@@ -97,11 +97,11 @@ jobs:
|
|
97
97
|
- run:
|
98
98
|
name: install gems
|
99
99
|
command: |
|
100
|
-
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
100
|
+
bundle install --jobs=4 --retry=3 --path vendor/bundle-2_3
|
101
101
|
- save_cache:
|
102
102
|
key: v1-gems-build_2_3-{{ checksum "onsi.gemspec" }}
|
103
103
|
paths:
|
104
|
-
- ./vendor/bundle
|
104
|
+
- ./vendor/bundle-2_3
|
105
105
|
- run:
|
106
106
|
name: Run Specs
|
107
107
|
command: bundle exec rspec spec/**/*.rb
|
data/.gitignore
CHANGED
data/lib/onsi/params.rb
CHANGED
@@ -39,6 +39,13 @@ module Onsi
|
|
39
39
|
new(attrs, relas)
|
40
40
|
end
|
41
41
|
|
42
|
+
def parse_json(body, attributes = [], relationships = [])
|
43
|
+
content = body.respond_to?(:read) ? body.read : body
|
44
|
+
json = JSON.parse(content)
|
45
|
+
params = ActionController::Parameters.new(json)
|
46
|
+
parse(params, attributes, relationships)
|
47
|
+
end
|
48
|
+
|
42
49
|
private
|
43
50
|
|
44
51
|
def permit_attributes(data, attributes)
|
data/lib/onsi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onsi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Skylar Schipper
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08
|
11
|
+
date: 2018-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -154,9 +154,7 @@ files:
|
|
154
154
|
- ".gitignore"
|
155
155
|
- ".rspec"
|
156
156
|
- ".rubocop.yml"
|
157
|
-
- ".travis.yml"
|
158
157
|
- Gemfile
|
159
|
-
- Gemfile.lock
|
160
158
|
- LICENSE.txt
|
161
159
|
- README.md
|
162
160
|
- Rakefile
|
@@ -192,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
190
|
version: '0'
|
193
191
|
requirements: []
|
194
192
|
rubyforge_project:
|
195
|
-
rubygems_version: 2.
|
193
|
+
rubygems_version: 2.5.2.3
|
196
194
|
signing_key:
|
197
195
|
specification_version: 4
|
198
196
|
summary: Format JSON API Responses
|
data/.travis.yml
DELETED
data/Gemfile.lock
DELETED
@@ -1,168 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
onsi (0.4.0)
|
5
|
-
rails (>= 5.0, < 6.0)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
actioncable (5.2.0)
|
11
|
-
actionpack (= 5.2.0)
|
12
|
-
nio4r (~> 2.0)
|
13
|
-
websocket-driver (>= 0.6.1)
|
14
|
-
actionmailer (5.2.0)
|
15
|
-
actionpack (= 5.2.0)
|
16
|
-
actionview (= 5.2.0)
|
17
|
-
activejob (= 5.2.0)
|
18
|
-
mail (~> 2.5, >= 2.5.4)
|
19
|
-
rails-dom-testing (~> 2.0)
|
20
|
-
actionpack (5.2.0)
|
21
|
-
actionview (= 5.2.0)
|
22
|
-
activesupport (= 5.2.0)
|
23
|
-
rack (~> 2.0)
|
24
|
-
rack-test (>= 0.6.3)
|
25
|
-
rails-dom-testing (~> 2.0)
|
26
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
27
|
-
actionview (5.2.0)
|
28
|
-
activesupport (= 5.2.0)
|
29
|
-
builder (~> 3.1)
|
30
|
-
erubi (~> 1.4)
|
31
|
-
rails-dom-testing (~> 2.0)
|
32
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
33
|
-
activejob (5.2.0)
|
34
|
-
activesupport (= 5.2.0)
|
35
|
-
globalid (>= 0.3.6)
|
36
|
-
activemodel (5.2.0)
|
37
|
-
activesupport (= 5.2.0)
|
38
|
-
activerecord (5.2.0)
|
39
|
-
activemodel (= 5.2.0)
|
40
|
-
activesupport (= 5.2.0)
|
41
|
-
arel (>= 9.0)
|
42
|
-
activestorage (5.2.0)
|
43
|
-
actionpack (= 5.2.0)
|
44
|
-
activerecord (= 5.2.0)
|
45
|
-
marcel (~> 0.3.1)
|
46
|
-
activesupport (5.2.0)
|
47
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
48
|
-
i18n (>= 0.7, < 2)
|
49
|
-
minitest (~> 5.1)
|
50
|
-
tzinfo (~> 1.1)
|
51
|
-
appraisal (2.1.0)
|
52
|
-
bundler
|
53
|
-
rake
|
54
|
-
thor (>= 0.14.0)
|
55
|
-
arel (9.0.0)
|
56
|
-
builder (3.2.3)
|
57
|
-
coderay (1.1.2)
|
58
|
-
concurrent-ruby (1.0.5)
|
59
|
-
crass (1.0.4)
|
60
|
-
database_cleaner (1.7.0)
|
61
|
-
diff-lcs (1.3)
|
62
|
-
docile (1.3.0)
|
63
|
-
erubi (1.7.1)
|
64
|
-
globalid (0.4.1)
|
65
|
-
activesupport (>= 4.2.0)
|
66
|
-
i18n (1.0.1)
|
67
|
-
concurrent-ruby (~> 1.0)
|
68
|
-
json (2.1.0)
|
69
|
-
loofah (2.2.2)
|
70
|
-
crass (~> 1.0.2)
|
71
|
-
nokogiri (>= 1.5.9)
|
72
|
-
mail (2.7.0)
|
73
|
-
mini_mime (>= 0.1.1)
|
74
|
-
marcel (0.3.2)
|
75
|
-
mimemagic (~> 0.3.2)
|
76
|
-
method_source (0.9.0)
|
77
|
-
mimemagic (0.3.2)
|
78
|
-
mini_mime (1.0.0)
|
79
|
-
mini_portile2 (2.3.0)
|
80
|
-
minitest (5.11.3)
|
81
|
-
nio4r (2.3.1)
|
82
|
-
nokogiri (1.8.2)
|
83
|
-
mini_portile2 (~> 2.3.0)
|
84
|
-
pry (0.11.3)
|
85
|
-
coderay (~> 1.1.0)
|
86
|
-
method_source (~> 0.9.0)
|
87
|
-
rack (2.0.5)
|
88
|
-
rack-test (1.0.0)
|
89
|
-
rack (>= 1.0, < 3)
|
90
|
-
rails (5.2.0)
|
91
|
-
actioncable (= 5.2.0)
|
92
|
-
actionmailer (= 5.2.0)
|
93
|
-
actionpack (= 5.2.0)
|
94
|
-
actionview (= 5.2.0)
|
95
|
-
activejob (= 5.2.0)
|
96
|
-
activemodel (= 5.2.0)
|
97
|
-
activerecord (= 5.2.0)
|
98
|
-
activestorage (= 5.2.0)
|
99
|
-
activesupport (= 5.2.0)
|
100
|
-
bundler (>= 1.3.0)
|
101
|
-
railties (= 5.2.0)
|
102
|
-
sprockets-rails (>= 2.0.0)
|
103
|
-
rails-dom-testing (2.0.3)
|
104
|
-
activesupport (>= 4.2.0)
|
105
|
-
nokogiri (>= 1.6)
|
106
|
-
rails-html-sanitizer (1.0.4)
|
107
|
-
loofah (~> 2.2, >= 2.2.2)
|
108
|
-
railties (5.2.0)
|
109
|
-
actionpack (= 5.2.0)
|
110
|
-
activesupport (= 5.2.0)
|
111
|
-
method_source
|
112
|
-
rake (>= 0.8.7)
|
113
|
-
thor (>= 0.18.1, < 2.0)
|
114
|
-
rake (10.5.0)
|
115
|
-
rspec-core (3.7.1)
|
116
|
-
rspec-support (~> 3.7.0)
|
117
|
-
rspec-expectations (3.7.0)
|
118
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
119
|
-
rspec-support (~> 3.7.0)
|
120
|
-
rspec-mocks (3.7.0)
|
121
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
122
|
-
rspec-support (~> 3.7.0)
|
123
|
-
rspec-rails (3.7.2)
|
124
|
-
actionpack (>= 3.0)
|
125
|
-
activesupport (>= 3.0)
|
126
|
-
railties (>= 3.0)
|
127
|
-
rspec-core (~> 3.7.0)
|
128
|
-
rspec-expectations (~> 3.7.0)
|
129
|
-
rspec-mocks (~> 3.7.0)
|
130
|
-
rspec-support (~> 3.7.0)
|
131
|
-
rspec-support (3.7.1)
|
132
|
-
simplecov (0.16.1)
|
133
|
-
docile (~> 1.1)
|
134
|
-
json (>= 1.8, < 3)
|
135
|
-
simplecov-html (~> 0.10.0)
|
136
|
-
simplecov-html (0.10.2)
|
137
|
-
sprockets (3.7.1)
|
138
|
-
concurrent-ruby (~> 1.0)
|
139
|
-
rack (> 1, < 3)
|
140
|
-
sprockets-rails (3.2.1)
|
141
|
-
actionpack (>= 4.0)
|
142
|
-
activesupport (>= 4.0)
|
143
|
-
sprockets (>= 3.0.0)
|
144
|
-
sqlite3 (1.3.13)
|
145
|
-
thor (0.20.0)
|
146
|
-
thread_safe (0.3.6)
|
147
|
-
tzinfo (1.2.5)
|
148
|
-
thread_safe (~> 0.1)
|
149
|
-
websocket-driver (0.7.0)
|
150
|
-
websocket-extensions (>= 0.1.0)
|
151
|
-
websocket-extensions (0.1.3)
|
152
|
-
|
153
|
-
PLATFORMS
|
154
|
-
ruby
|
155
|
-
|
156
|
-
DEPENDENCIES
|
157
|
-
appraisal (~> 2.1.0)
|
158
|
-
bundler (~> 1.16)
|
159
|
-
database_cleaner (~> 1.7.0)
|
160
|
-
onsi!
|
161
|
-
pry (~> 0.11.3)
|
162
|
-
rake (~> 10.0)
|
163
|
-
rspec-rails (~> 3.7.2)
|
164
|
-
simplecov (~> 0.15)
|
165
|
-
sqlite3 (~> 1.3.10)
|
166
|
-
|
167
|
-
BUNDLED WITH
|
168
|
-
1.16.1
|