openbeautyfacts 0.6.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -6
  3. data/Rakefile +5 -3
  4. data/lib/openbeautyfacts/additive.rb +9 -39
  5. data/lib/openbeautyfacts/allergen.rb +14 -22
  6. data/lib/openbeautyfacts/brand.rb +14 -22
  7. data/lib/openbeautyfacts/category.rb +14 -22
  8. data/lib/openbeautyfacts/city.rb +14 -22
  9. data/lib/openbeautyfacts/contributor.rb +14 -22
  10. data/lib/openbeautyfacts/country.rb +14 -22
  11. data/lib/openbeautyfacts/entry_date.rb +15 -23
  12. data/lib/openbeautyfacts/faq.rb +16 -41
  13. data/lib/openbeautyfacts/ingredient.rb +14 -22
  14. data/lib/openbeautyfacts/ingredient_that_may_be_from_palm_oil.rb +14 -22
  15. data/lib/openbeautyfacts/label.rb +14 -22
  16. data/lib/openbeautyfacts/last_edit_date.rb +15 -23
  17. data/lib/openbeautyfacts/locale.rb +8 -31
  18. data/lib/openbeautyfacts/manufacturing_place.rb +14 -22
  19. data/lib/openbeautyfacts/mission.rb +16 -63
  20. data/lib/openbeautyfacts/number_of_ingredients.rb +15 -23
  21. data/lib/openbeautyfacts/origin.rb +14 -22
  22. data/lib/openbeautyfacts/packager_code.rb +14 -22
  23. data/lib/openbeautyfacts/packaging.rb +14 -22
  24. data/lib/openbeautyfacts/period_after_opening.rb +14 -22
  25. data/lib/openbeautyfacts/press.rb +16 -47
  26. data/lib/openbeautyfacts/product.rb +18 -164
  27. data/lib/openbeautyfacts/product_state.rb +14 -22
  28. data/lib/openbeautyfacts/purchase_place.rb +14 -22
  29. data/lib/openbeautyfacts/store.rb +14 -22
  30. data/lib/openbeautyfacts/trace.rb +14 -22
  31. data/lib/openbeautyfacts/user.rb +15 -30
  32. data/lib/openbeautyfacts/version.rb +3 -1
  33. data/lib/openbeautyfacts.rb +6 -9
  34. data/test/fixtures/additives.yml +48 -0
  35. data/test/fixtures/brands.yml +48 -0
  36. data/test/fixtures/entry_dates.yml +48 -0
  37. data/test/fixtures/entry_dates_locale.yml +48 -0
  38. data/test/fixtures/faq.yml +48 -0
  39. data/test/fixtures/fetch_product_3600550362626.yml +54 -0
  40. data/test/fixtures/index.yml +48 -0
  41. data/test/fixtures/ingredients.yml +99 -0
  42. data/test/fixtures/ingredients_locale.yml +99 -0
  43. data/test/fixtures/last_edit_dates.yml +48 -0
  44. data/test/fixtures/last_edit_dates_locale.yml +48 -0
  45. data/test/fixtures/login_user.yml +363 -0
  46. data/test/fixtures/mission.yml +48 -0
  47. data/test/fixtures/missions.yml +48 -0
  48. data/test/fixtures/number_of_ingredients_locale.yml +48 -0
  49. data/test/fixtures/numbers_of_ingredients.yml +48 -0
  50. data/test/fixtures/press.yml +48 -0
  51. data/test/fixtures/product_3600550362626.yml +54 -0
  52. data/test/fixtures/product_states.yml +48 -0
  53. data/test/fixtures/product_states_locale.yml +48 -0
  54. data/test/fixtures/products_for_brand.yml +99 -0
  55. data/test/fixtures/products_for_entry_date.yml +99 -0
  56. data/test/fixtures/products_for_ingredient.yml +99 -0
  57. data/test/fixtures/products_for_last_edit_date.yml +99 -0
  58. data/test/fixtures/products_for_number_of_ingredients.yml +99 -0
  59. data/test/fixtures/products_for_period_after_opening.yml +99 -0
  60. data/test/fixtures/products_for_state.yml +99 -0
  61. data/test/fixtures/products_with_additive.yml +99 -0
  62. data/test/fixtures/search_doux.yml +105 -0
  63. data/test/fixtures/search_doux_1_000_000.yml +54 -0
  64. data/test/minitest_helper.rb +5 -3
  65. data/test/test_openbeautyfacts.rb +129 -97
  66. metadata +63 -21
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openbeautyfacts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Leger
8
- autorequire:
8
+ - Pierre Slamich
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-30 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: openfoodfacts
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.10.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.10.0
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: hashie
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -19,7 +33,7 @@ dependencies:
19
33
  version: '3.4'
20
34
  - - "<"
21
35
  - !ruby/object:Gem::Version
22
- version: '5.0'
36
+ version: '6.0'
23
37
  type: :runtime
24
38
  prerelease: false
25
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,21 +43,21 @@ dependencies:
29
43
  version: '3.4'
30
44
  - - "<"
31
45
  - !ruby/object:Gem::Version
32
- version: '5.0'
46
+ version: '6.0'
33
47
  - !ruby/object:Gem::Dependency
34
48
  name: nokogiri
35
49
  requirement: !ruby/object:Gem::Requirement
36
50
  requirements:
37
51
  - - "~>"
38
52
  - !ruby/object:Gem::Version
39
- version: '1.7'
53
+ version: '1.16'
40
54
  type: :runtime
41
55
  prerelease: false
42
56
  version_requirements: !ruby/object:Gem::Requirement
43
57
  requirements:
44
58
  - - "~>"
45
59
  - !ruby/object:Gem::Version
46
- version: '1.7'
60
+ version: '1.16'
47
61
  - !ruby/object:Gem::Dependency
48
62
  name: bundler
49
63
  requirement: !ruby/object:Gem::Requirement
@@ -59,64 +73,64 @@ dependencies:
59
73
  - !ruby/object:Gem::Version
60
74
  version: '2.1'
61
75
  - !ruby/object:Gem::Dependency
62
- name: rake
76
+ name: minitest
63
77
  requirement: !ruby/object:Gem::Requirement
64
78
  requirements:
65
79
  - - "~>"
66
80
  - !ruby/object:Gem::Version
67
- version: '12.0'
81
+ version: '5.25'
68
82
  type: :development
69
83
  prerelease: false
70
84
  version_requirements: !ruby/object:Gem::Requirement
71
85
  requirements:
72
86
  - - "~>"
73
87
  - !ruby/object:Gem::Version
74
- version: '12.0'
88
+ version: '5.25'
75
89
  - !ruby/object:Gem::Dependency
76
- name: minitest
90
+ name: rake
77
91
  requirement: !ruby/object:Gem::Requirement
78
92
  requirements:
79
93
  - - "~>"
80
94
  - !ruby/object:Gem::Version
81
- version: '5.10'
95
+ version: '13.0'
82
96
  type: :development
83
97
  prerelease: false
84
98
  version_requirements: !ruby/object:Gem::Requirement
85
99
  requirements:
86
100
  - - "~>"
87
101
  - !ruby/object:Gem::Version
88
- version: '5.10'
102
+ version: '13.0'
89
103
  - !ruby/object:Gem::Dependency
90
104
  name: vcr
91
105
  requirement: !ruby/object:Gem::Requirement
92
106
  requirements:
93
107
  - - "~>"
94
108
  - !ruby/object:Gem::Version
95
- version: '5.1'
109
+ version: '6.0'
96
110
  type: :development
97
111
  prerelease: false
98
112
  version_requirements: !ruby/object:Gem::Requirement
99
113
  requirements:
100
114
  - - "~>"
101
115
  - !ruby/object:Gem::Version
102
- version: '5.1'
116
+ version: '6.0'
103
117
  - !ruby/object:Gem::Dependency
104
118
  name: webmock
105
119
  requirement: !ruby/object:Gem::Requirement
106
120
  requirements:
107
121
  - - "~>"
108
122
  - !ruby/object:Gem::Version
109
- version: '3.10'
123
+ version: '3.11'
110
124
  type: :development
111
125
  prerelease: false
112
126
  version_requirements: !ruby/object:Gem::Requirement
113
127
  requirements:
114
128
  - - "~>"
115
129
  - !ruby/object:Gem::Version
116
- version: '3.10'
130
+ version: '3.11'
117
131
  description: Open Beauty Facts API Wrapper, the open database about beauty products.
118
132
  email:
119
- - opensource@nleger.com
133
+ - contact@openfoodfacts.org
120
134
  executables: []
121
135
  extensions: []
122
136
  extra_rdoc_files: []
@@ -154,13 +168,42 @@ files:
154
168
  - lib/openbeautyfacts/trace.rb
155
169
  - lib/openbeautyfacts/user.rb
156
170
  - lib/openbeautyfacts/version.rb
171
+ - test/fixtures/additives.yml
172
+ - test/fixtures/brands.yml
173
+ - test/fixtures/entry_dates.yml
174
+ - test/fixtures/entry_dates_locale.yml
175
+ - test/fixtures/faq.yml
176
+ - test/fixtures/fetch_product_3600550362626.yml
177
+ - test/fixtures/index.yml
178
+ - test/fixtures/ingredients.yml
179
+ - test/fixtures/ingredients_locale.yml
180
+ - test/fixtures/last_edit_dates.yml
181
+ - test/fixtures/last_edit_dates_locale.yml
182
+ - test/fixtures/login_user.yml
183
+ - test/fixtures/mission.yml
184
+ - test/fixtures/missions.yml
185
+ - test/fixtures/number_of_ingredients_locale.yml
186
+ - test/fixtures/numbers_of_ingredients.yml
187
+ - test/fixtures/press.yml
188
+ - test/fixtures/product_3600550362626.yml
189
+ - test/fixtures/product_states.yml
190
+ - test/fixtures/product_states_locale.yml
191
+ - test/fixtures/products_for_brand.yml
192
+ - test/fixtures/products_for_entry_date.yml
193
+ - test/fixtures/products_for_ingredient.yml
194
+ - test/fixtures/products_for_last_edit_date.yml
195
+ - test/fixtures/products_for_number_of_ingredients.yml
196
+ - test/fixtures/products_for_period_after_opening.yml
197
+ - test/fixtures/products_for_state.yml
198
+ - test/fixtures/products_with_additive.yml
199
+ - test/fixtures/search_doux.yml
200
+ - test/fixtures/search_doux_1_000_000.yml
157
201
  - test/minitest_helper.rb
158
202
  - test/test_openbeautyfacts.rb
159
203
  homepage: https://github.com/openfoodfacts/openbeautyfacts-ruby
160
204
  licenses:
161
205
  - MIT
162
206
  metadata: {}
163
- post_install_message:
164
207
  rdoc_options: []
165
208
  require_paths:
166
209
  - lib
@@ -175,8 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
218
  - !ruby/object:Gem::Version
176
219
  version: '0'
177
220
  requirements: []
178
- rubygems_version: 3.2.3
179
- signing_key:
221
+ rubygems_version: 3.6.9
180
222
  specification_version: 4
181
223
  summary: Open Beauty Facts API Wrapper
182
224
  test_files: []