arstotzka 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +13 -0
  3. data/.gitignore +3 -0
  4. data/.rspec +1 -0
  5. data/Gemfile +8 -0
  6. data/Guardfile +13 -0
  7. data/LICENSE +21 -0
  8. data/README.md +179 -0
  9. data/Rakefile +7 -0
  10. data/arstotzka.gemspec +29 -0
  11. data/docker-compose.yml +18 -0
  12. data/lib/arstotzka.rb +16 -0
  13. data/lib/arstotzka/builder.rb +73 -0
  14. data/lib/arstotzka/class_methods.rb +7 -0
  15. data/lib/arstotzka/crawler.rb +45 -0
  16. data/lib/arstotzka/exception.rb +3 -0
  17. data/lib/arstotzka/fetcher.rb +50 -0
  18. data/lib/arstotzka/reader.rb +44 -0
  19. data/lib/arstotzka/type_cast.rb +15 -0
  20. data/lib/arstotzka/version.rb +3 -0
  21. data/lib/arstotzka/wrapper.rb +36 -0
  22. data/spec/fixtures/accounts.json +27 -0
  23. data/spec/fixtures/accounts_missing.json +23 -0
  24. data/spec/fixtures/arstotzka.json +38 -0
  25. data/spec/fixtures/complete_person.json +9 -0
  26. data/spec/fixtures/person.json +5 -0
  27. data/spec/integration/readme/default_spec.rb +37 -0
  28. data/spec/integration/readme/my_parser_spec.rb +86 -0
  29. data/spec/lib/arstotzka/builder_spec.rb +100 -0
  30. data/spec/lib/arstotzka/crawler_spec.rb +276 -0
  31. data/spec/lib/arstotzka/fetcher_spec.rb +96 -0
  32. data/spec/lib/arstotzka/reader_spec.rb +120 -0
  33. data/spec/lib/arstotzka/wrapper_spec.rb +121 -0
  34. data/spec/lib/arstotzka_spec.rb +129 -0
  35. data/spec/spec_helper.rb +23 -0
  36. data/spec/support/fixture_helpers.rb +19 -0
  37. data/spec/support/models.rb +5 -0
  38. data/spec/support/models/arstotzka/dummy.rb +23 -0
  39. data/spec/support/models/arstotzka/fetcher/dummy.rb +3 -0
  40. data/spec/support/models/arstotzka/type_cast.rb +6 -0
  41. data/spec/support/models/arstotzka/wrapper/dummy.rb +7 -0
  42. data/spec/support/models/game.rb +11 -0
  43. data/spec/support/models/house.rb +11 -0
  44. data/spec/support/models/my_parser.rb +28 -0
  45. data/spec/support/models/person.rb +8 -0
  46. data/spec/support/models/star.rb +7 -0
  47. data/spec/support/models/star_gazer.rb +13 -0
  48. data/spec/support/shared_examples/wrapper.rb +19 -0
  49. metadata +229 -0
metadata ADDED
@@ -0,0 +1,229 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: arstotzka
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Bidu Dev's Team
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-06-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 5.x
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 5.x
27
+ - !ruby/object:Gem::Dependency
28
+ name: sinclair
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: safe_attribute_assignment
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.6'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.6'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 12.3.1
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 12.3.1
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '3.7'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '3.7'
97
+ - !ruby/object:Gem::Dependency
98
+ name: simplecov
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: pry-nav
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'
125
+ description: ''
126
+ email:
127
+ - dev@bidu.com.br
128
+ executables: []
129
+ extensions: []
130
+ extra_rdoc_files: []
131
+ files:
132
+ - ".circleci/config.yml"
133
+ - ".gitignore"
134
+ - ".rspec"
135
+ - Gemfile
136
+ - Guardfile
137
+ - LICENSE
138
+ - README.md
139
+ - Rakefile
140
+ - arstotzka.gemspec
141
+ - docker-compose.yml
142
+ - lib/arstotzka.rb
143
+ - lib/arstotzka/builder.rb
144
+ - lib/arstotzka/class_methods.rb
145
+ - lib/arstotzka/crawler.rb
146
+ - lib/arstotzka/exception.rb
147
+ - lib/arstotzka/fetcher.rb
148
+ - lib/arstotzka/reader.rb
149
+ - lib/arstotzka/type_cast.rb
150
+ - lib/arstotzka/version.rb
151
+ - lib/arstotzka/wrapper.rb
152
+ - spec/fixtures/accounts.json
153
+ - spec/fixtures/accounts_missing.json
154
+ - spec/fixtures/arstotzka.json
155
+ - spec/fixtures/complete_person.json
156
+ - spec/fixtures/person.json
157
+ - spec/integration/readme/default_spec.rb
158
+ - spec/integration/readme/my_parser_spec.rb
159
+ - spec/lib/arstotzka/builder_spec.rb
160
+ - spec/lib/arstotzka/crawler_spec.rb
161
+ - spec/lib/arstotzka/fetcher_spec.rb
162
+ - spec/lib/arstotzka/reader_spec.rb
163
+ - spec/lib/arstotzka/wrapper_spec.rb
164
+ - spec/lib/arstotzka_spec.rb
165
+ - spec/spec_helper.rb
166
+ - spec/support/fixture_helpers.rb
167
+ - spec/support/models.rb
168
+ - spec/support/models/arstotzka/dummy.rb
169
+ - spec/support/models/arstotzka/fetcher/dummy.rb
170
+ - spec/support/models/arstotzka/type_cast.rb
171
+ - spec/support/models/arstotzka/wrapper/dummy.rb
172
+ - spec/support/models/game.rb
173
+ - spec/support/models/house.rb
174
+ - spec/support/models/my_parser.rb
175
+ - spec/support/models/person.rb
176
+ - spec/support/models/star.rb
177
+ - spec/support/models/star_gazer.rb
178
+ - spec/support/shared_examples/wrapper.rb
179
+ homepage: https://github.com/Bidu/arstotzka
180
+ licenses: []
181
+ metadata: {}
182
+ post_install_message:
183
+ rdoc_options: []
184
+ require_paths:
185
+ - lib
186
+ required_ruby_version: !ruby/object:Gem::Requirement
187
+ requirements:
188
+ - - ">="
189
+ - !ruby/object:Gem::Version
190
+ version: '0'
191
+ required_rubygems_version: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ version: '0'
196
+ requirements: []
197
+ rubyforge_project:
198
+ rubygems_version: 2.6.11
199
+ signing_key:
200
+ specification_version: 4
201
+ summary: Json Parser
202
+ test_files:
203
+ - spec/fixtures/accounts.json
204
+ - spec/fixtures/accounts_missing.json
205
+ - spec/fixtures/arstotzka.json
206
+ - spec/fixtures/complete_person.json
207
+ - spec/fixtures/person.json
208
+ - spec/integration/readme/default_spec.rb
209
+ - spec/integration/readme/my_parser_spec.rb
210
+ - spec/lib/arstotzka/builder_spec.rb
211
+ - spec/lib/arstotzka/crawler_spec.rb
212
+ - spec/lib/arstotzka/fetcher_spec.rb
213
+ - spec/lib/arstotzka/reader_spec.rb
214
+ - spec/lib/arstotzka/wrapper_spec.rb
215
+ - spec/lib/arstotzka_spec.rb
216
+ - spec/spec_helper.rb
217
+ - spec/support/fixture_helpers.rb
218
+ - spec/support/models.rb
219
+ - spec/support/models/arstotzka/dummy.rb
220
+ - spec/support/models/arstotzka/fetcher/dummy.rb
221
+ - spec/support/models/arstotzka/type_cast.rb
222
+ - spec/support/models/arstotzka/wrapper/dummy.rb
223
+ - spec/support/models/game.rb
224
+ - spec/support/models/house.rb
225
+ - spec/support/models/my_parser.rb
226
+ - spec/support/models/person.rb
227
+ - spec/support/models/star.rb
228
+ - spec/support/models/star_gazer.rb
229
+ - spec/support/shared_examples/wrapper.rb