cosing 0.1.2 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/cosing.gemspec +19 -3
- data/data/annex.II.csv +2419 -1460
- data/data/annex.III.csv +1601 -308
- data/data/annex.IV.csv +168 -153
- data/data/annex.V.csv +123 -62
- data/data/annex.VI.csv +107 -28
- data/data/ingredients.csv +32500 -25670
- data/lib/cosing/annex/base.rb +6 -15
- data/lib/cosing/annex/ii.rb +18 -0
- data/lib/cosing/annex/iii.rb +25 -0
- data/lib/cosing/annex/iv.rb +19 -0
- data/lib/cosing/annex/rule.rb +2 -0
- data/lib/cosing/annex/sccs_opinion.rb +2 -0
- data/lib/cosing/annex/v.rb +25 -0
- data/lib/cosing/annex/vi.rb +25 -0
- data/lib/cosing/annex.rb +15 -123
- data/lib/cosing/database.rb +50 -44
- data/lib/cosing/parser.rb +15 -0
- data/lib/cosing/patterns.rb +7 -0
- data/lib/cosing/version.rb +1 -1
- data/lib/cosing.rb +6 -7
- metadata +20 -8
- data/.rspec +0 -3
- data/.rubocop.yml +0 -6
- data/CHANGELOG.md +0 -13
- data/Rakefile +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a4f9de533dc31dcaa85e01feccbb3a35886d3c959dfd6697f67ea94ed561b3f
|
4
|
+
data.tar.gz: a6c8187f8bd7a59c86689de05eda1992fb5b49332d196bd2146e56a0379dea15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78a9a8991ee470d72523a28fe0c2eb1cd892bb8cc6fecddbd7930bac9f7e0daf7bd090ac8ddd4ace3999f5b1710cae7d09bcf66efcbc43239eac5541031ed7a6
|
7
|
+
data.tar.gz: 81f9b11df117af0f01cb156bc3d685fee608a7cc4fcfc06e2ee2db7bc4ae55de9a84def9bc7825ee3448a816aa0bc4c9e7552848cff49d3b0989e8fc0ffbb05c
|
data/README.md
CHANGED
@@ -20,7 +20,7 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
20
20
|
```ruby
|
21
21
|
database = Cosing.load
|
22
22
|
database.ingredients #=> Hash<ID, Ingredient>
|
23
|
-
database.ingredients.sample(2)
|
23
|
+
database.ingredients.values.sample(2)
|
24
24
|
database.save("output.json", pretty: true) # Will save the whole database to a json file
|
25
25
|
```
|
26
26
|
|
data/cosing.gemspec
CHANGED
@@ -12,18 +12,33 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = spec.summary
|
13
13
|
spec.homepage = "https://github.com/inhouse-work/cosing"
|
14
14
|
spec.license = "MIT"
|
15
|
-
spec.required_ruby_version = ">= 3"
|
15
|
+
spec.required_ruby_version = ">= 3.1"
|
16
16
|
|
17
17
|
spec.metadata["homepage_uri"] = spec.homepage
|
18
18
|
spec.metadata["source_code_uri"] = spec.homepage
|
19
19
|
spec.metadata["changelog_uri"] = spec.homepage
|
20
20
|
|
21
21
|
# Specify which files should be added to the gem when it is released.
|
22
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added
|
22
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added
|
23
|
+
# into git.
|
23
24
|
spec.files = Dir.chdir(__dir__) do
|
24
25
|
`git ls-files -z`.split("\x0").reject do |f|
|
25
26
|
(File.expand_path(f) == __FILE__) ||
|
26
|
-
f.start_with?(
|
27
|
+
f.start_with?(
|
28
|
+
*%w[
|
29
|
+
bin/
|
30
|
+
test/
|
31
|
+
spec/
|
32
|
+
features/
|
33
|
+
.git
|
34
|
+
appveyor
|
35
|
+
Gemfile
|
36
|
+
CHANGELOG.md
|
37
|
+
Rakefile
|
38
|
+
.rubocop.yml
|
39
|
+
.rspec
|
40
|
+
]
|
41
|
+
)
|
27
42
|
end
|
28
43
|
end
|
29
44
|
spec.bindir = "exe"
|
@@ -31,6 +46,7 @@ Gem::Specification.new do |spec|
|
|
31
46
|
spec.require_paths = ["lib"]
|
32
47
|
|
33
48
|
# Uncomment to register a new dependency of your gem
|
49
|
+
spec.add_dependency "csv", "~> 3.2"
|
34
50
|
spec.add_dependency "dry-struct", "~> 1.6"
|
35
51
|
spec.add_dependency "dry-types", "~> 1.7"
|
36
52
|
|