arstotzka 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +1 -0
  3. data/.gitignore +2 -1
  4. data/.rubocop.yml +11 -0
  5. data/.rubocop_todo.yml +20 -0
  6. data/Gemfile +3 -2
  7. data/Guardfile +3 -2
  8. data/README.md +24 -5
  9. data/Rakefile +5 -3
  10. data/arstotzka.gemspec +18 -15
  11. data/arstotzka.jpg +0 -0
  12. data/lib/arstotzka.rb +2 -0
  13. data/lib/arstotzka/builder.rb +109 -47
  14. data/lib/arstotzka/class_methods.rb +34 -0
  15. data/lib/arstotzka/crawler.rb +86 -11
  16. data/lib/arstotzka/exception.rb +7 -2
  17. data/lib/arstotzka/fetcher.rb +93 -36
  18. data/lib/arstotzka/reader.rb +59 -11
  19. data/lib/arstotzka/type_cast.rb +24 -10
  20. data/lib/arstotzka/version.rb +3 -1
  21. data/lib/arstotzka/wrapper.rb +59 -34
  22. data/spec/integration/readme/default_spec.rb +2 -0
  23. data/spec/integration/readme/my_parser_spec.rb +2 -0
  24. data/spec/integration/yard/arstotzka/builder_spec.rb +63 -0
  25. data/spec/integration/yard/arstotzka/class_methods_spec.rb +49 -0
  26. data/spec/integration/yard/arstotzka/crawler_spec.rb +77 -0
  27. data/spec/integration/yard/arstotzka/fetcher_spec.rb +51 -0
  28. data/spec/integration/yard/arstotzka/reader_spec.rb +77 -0
  29. data/spec/integration/yard/arstotzka/wrapper_spec.rb +29 -0
  30. data/spec/lib/arstotzka/builder_spec.rb +6 -4
  31. data/spec/lib/arstotzka/crawler_spec.rb +30 -17
  32. data/spec/lib/arstotzka/fetcher_spec.rb +4 -2
  33. data/spec/lib/arstotzka/reader_spec.rb +13 -11
  34. data/spec/lib/arstotzka/wrapper_spec.rb +10 -10
  35. data/spec/lib/arstotzka_spec.rb +12 -8
  36. data/spec/spec_helper.rb +6 -2
  37. data/spec/support/fixture_helpers.rb +4 -2
  38. data/spec/support/models.rb +4 -3
  39. data/spec/support/models/account.rb +9 -0
  40. data/spec/support/models/arstotzka/dummy.rb +21 -17
  41. data/spec/support/models/arstotzka/fetcher/dummy.rb +7 -2
  42. data/spec/support/models/arstotzka/type_cast.rb +7 -4
  43. data/spec/support/models/arstotzka/wrapper/dummy.rb +10 -5
  44. data/spec/support/models/game.rb +2 -0
  45. data/spec/support/models/house.rb +2 -0
  46. data/spec/support/models/my_model.rb +9 -0
  47. data/spec/support/models/my_parser.rb +6 -5
  48. data/spec/support/models/person.rb +7 -1
  49. data/spec/support/models/star.rb +2 -0
  50. data/spec/support/models/star_gazer.rb +3 -2
  51. data/spec/support/models/transaction.rb +19 -0
  52. data/spec/support/shared_examples/wrapper.rb +6 -5
  53. metadata +64 -15
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  shared_context 'a result that is type cast' do |types|
2
4
  types.each do |type, clazz|
3
5
  context "with #{type} type" do
@@ -11,9 +13,8 @@ shared_context 'a result that is type cast' do |types|
11
13
  end
12
14
 
13
15
  shared_context 'casts basic types' do
14
- it_behaves_like 'a result that is type cast', {
15
- integer: Integer,
16
- float: Float,
17
- string: String
18
- }
16
+ it_behaves_like 'a result that is type cast',
17
+ integer: Integer,
18
+ float: Float,
19
+ string: String
19
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arstotzka
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darthjee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-07 00:00:00.000000000 Z
11
+ date: 2018-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -30,42 +30,42 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 1.1.1
34
34
  type: :runtime
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: '0'
40
+ version: 1.1.1
41
41
  - !ruby/object:Gem::Dependency
42
- name: safe_attribute_assignment
42
+ name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '1.6'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '1.6'
55
55
  - !ruby/object:Gem::Dependency
56
- name: bundler
56
+ name: pry-nav
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '1.6'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '1.6'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -94,6 +94,34 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '3.7'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: safe_attribute_assignment
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
97
125
  - !ruby/object:Gem::Dependency
98
126
  name: simplecov
99
127
  requirement: !ruby/object:Gem::Requirement
@@ -109,7 +137,7 @@ dependencies:
109
137
  - !ruby/object:Gem::Version
110
138
  version: '0'
111
139
  - !ruby/object:Gem::Dependency
112
- name: pry-nav
140
+ name: yard
113
141
  requirement: !ruby/object:Gem::Requirement
114
142
  requirements:
115
143
  - - ">="
@@ -132,12 +160,15 @@ files:
132
160
  - ".circleci/config.yml"
133
161
  - ".gitignore"
134
162
  - ".rspec"
163
+ - ".rubocop.yml"
164
+ - ".rubocop_todo.yml"
135
165
  - Gemfile
136
166
  - Guardfile
137
167
  - LICENSE
138
168
  - README.md
139
169
  - Rakefile
140
170
  - arstotzka.gemspec
171
+ - arstotzka.jpg
141
172
  - docker-compose.yml
142
173
  - lib/arstotzka.rb
143
174
  - lib/arstotzka/builder.rb
@@ -156,6 +187,12 @@ files:
156
187
  - spec/fixtures/person.json
157
188
  - spec/integration/readme/default_spec.rb
158
189
  - spec/integration/readme/my_parser_spec.rb
190
+ - spec/integration/yard/arstotzka/builder_spec.rb
191
+ - spec/integration/yard/arstotzka/class_methods_spec.rb
192
+ - spec/integration/yard/arstotzka/crawler_spec.rb
193
+ - spec/integration/yard/arstotzka/fetcher_spec.rb
194
+ - spec/integration/yard/arstotzka/reader_spec.rb
195
+ - spec/integration/yard/arstotzka/wrapper_spec.rb
159
196
  - spec/lib/arstotzka/builder_spec.rb
160
197
  - spec/lib/arstotzka/crawler_spec.rb
161
198
  - spec/lib/arstotzka/fetcher_spec.rb
@@ -165,16 +202,19 @@ files:
165
202
  - spec/spec_helper.rb
166
203
  - spec/support/fixture_helpers.rb
167
204
  - spec/support/models.rb
205
+ - spec/support/models/account.rb
168
206
  - spec/support/models/arstotzka/dummy.rb
169
207
  - spec/support/models/arstotzka/fetcher/dummy.rb
170
208
  - spec/support/models/arstotzka/type_cast.rb
171
209
  - spec/support/models/arstotzka/wrapper/dummy.rb
172
210
  - spec/support/models/game.rb
173
211
  - spec/support/models/house.rb
212
+ - spec/support/models/my_model.rb
174
213
  - spec/support/models/my_parser.rb
175
214
  - spec/support/models/person.rb
176
215
  - spec/support/models/star.rb
177
216
  - spec/support/models/star_gazer.rb
217
+ - spec/support/models/transaction.rb
178
218
  - spec/support/shared_examples/wrapper.rb
179
219
  homepage: https://github.com/darthjee/arstotzka
180
220
  licenses: []
@@ -207,6 +247,12 @@ test_files:
207
247
  - spec/fixtures/person.json
208
248
  - spec/integration/readme/default_spec.rb
209
249
  - spec/integration/readme/my_parser_spec.rb
250
+ - spec/integration/yard/arstotzka/builder_spec.rb
251
+ - spec/integration/yard/arstotzka/class_methods_spec.rb
252
+ - spec/integration/yard/arstotzka/crawler_spec.rb
253
+ - spec/integration/yard/arstotzka/fetcher_spec.rb
254
+ - spec/integration/yard/arstotzka/reader_spec.rb
255
+ - spec/integration/yard/arstotzka/wrapper_spec.rb
210
256
  - spec/lib/arstotzka/builder_spec.rb
211
257
  - spec/lib/arstotzka/crawler_spec.rb
212
258
  - spec/lib/arstotzka/fetcher_spec.rb
@@ -216,14 +262,17 @@ test_files:
216
262
  - spec/spec_helper.rb
217
263
  - spec/support/fixture_helpers.rb
218
264
  - spec/support/models.rb
265
+ - spec/support/models/account.rb
219
266
  - spec/support/models/arstotzka/dummy.rb
220
267
  - spec/support/models/arstotzka/fetcher/dummy.rb
221
268
  - spec/support/models/arstotzka/type_cast.rb
222
269
  - spec/support/models/arstotzka/wrapper/dummy.rb
223
270
  - spec/support/models/game.rb
224
271
  - spec/support/models/house.rb
272
+ - spec/support/models/my_model.rb
225
273
  - spec/support/models/my_parser.rb
226
274
  - spec/support/models/person.rb
227
275
  - spec/support/models/star.rb
228
276
  - spec/support/models/star_gazer.rb
277
+ - spec/support/models/transaction.rb
229
278
  - spec/support/shared_examples/wrapper.rb