relaton 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +9 -4
- data/.github/workflows/ubuntu.yml +9 -4
- data/.github/workflows/windows.yml +9 -4
- data/lib/relaton/db_cache.rb +2 -2
- data/lib/relaton/version.rb +1 -1
- data/relaton.gemspec +8 -8
- data/spec/relaton/config_spec.rb +3 -1
- data/spec/relaton_spec.rb +23 -13
- metadata +18 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d5cff734da00b1585ab38ae5b3f776cb40064832141a6bf98b092c6273b2d17
|
4
|
+
data.tar.gz: df83c65654caf6cf8aa94bc4d3c4720792d66c29337fe1d5ccac3df14d206855
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 766aad0800d04f7561d570688fe27768ee2110590ba7a561071458125c1e8a35c0cb81978d0d5e00c5662a23e05a7988d234524367b87052dd225c8b893f21c7
|
7
|
+
data.tar.gz: a210092bfec36f80fbc1993e1cb79ffd999877fe8dc7c12145196ffb9cfb114d8f19f9b9ea515481e002553de16b4f29bea7ebfda508c785f7ea2969e6c1b01e
|
data/.github/workflows/macos.yml
CHANGED
@@ -1,14 +1,19 @@
|
|
1
|
-
# Auto-generated
|
2
|
-
#
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
3
3
|
name: macos
|
4
4
|
|
5
|
-
on:
|
5
|
+
on:
|
6
|
+
push:
|
7
|
+
branches: [ master ]
|
8
|
+
pull_request:
|
9
|
+
branches: [ '**' ]
|
6
10
|
|
7
11
|
jobs:
|
8
12
|
test-macos:
|
9
13
|
name: Test on Ruby ${{ matrix.ruby }} macOS
|
10
14
|
runs-on: macos-latest
|
11
15
|
strategy:
|
16
|
+
fail-fast: false
|
12
17
|
matrix:
|
13
18
|
ruby: [ '2.6', '2.5', '2.4' ]
|
14
19
|
steps:
|
@@ -20,7 +25,7 @@ jobs:
|
|
20
25
|
architecture: 'x64'
|
21
26
|
- name: Update gems
|
22
27
|
run: |
|
23
|
-
sudo gem install bundler
|
28
|
+
sudo gem install bundler --force
|
24
29
|
bundle install --jobs 4 --retry 3
|
25
30
|
- name: Run specs
|
26
31
|
run: |
|
@@ -1,14 +1,19 @@
|
|
1
|
-
# Auto-generated
|
2
|
-
#
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
3
3
|
name: ubuntu
|
4
4
|
|
5
|
-
on:
|
5
|
+
on:
|
6
|
+
push:
|
7
|
+
branches: [ master ]
|
8
|
+
pull_request:
|
9
|
+
branches: [ '**' ]
|
6
10
|
|
7
11
|
jobs:
|
8
12
|
test-linux:
|
9
13
|
name: Test on Ruby ${{ matrix.ruby }} Ubuntu
|
10
14
|
runs-on: ubuntu-latest
|
11
15
|
strategy:
|
16
|
+
fail-fast: false
|
12
17
|
matrix:
|
13
18
|
ruby: [ '2.6', '2.5', '2.4' ]
|
14
19
|
steps:
|
@@ -20,7 +25,7 @@ jobs:
|
|
20
25
|
architecture: 'x64'
|
21
26
|
- name: Update gems
|
22
27
|
run: |
|
23
|
-
gem install bundler
|
28
|
+
gem install bundler
|
24
29
|
bundle install --jobs 4 --retry 3
|
25
30
|
- name: Run specs
|
26
31
|
run: |
|
@@ -1,14 +1,19 @@
|
|
1
|
-
# Auto-generated
|
2
|
-
#
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
3
3
|
name: windows
|
4
4
|
|
5
|
-
on:
|
5
|
+
on:
|
6
|
+
push:
|
7
|
+
branches: [ master ]
|
8
|
+
pull_request:
|
9
|
+
branches: [ '**' ]
|
6
10
|
|
7
11
|
jobs:
|
8
12
|
test-windows:
|
9
13
|
name: Test on Ruby ${{ matrix.ruby }} Windows
|
10
14
|
runs-on: windows-latest
|
11
15
|
strategy:
|
16
|
+
fail-fast: false
|
12
17
|
matrix:
|
13
18
|
ruby: [ '2.6', '2.5', '2.4' ]
|
14
19
|
steps:
|
@@ -21,7 +26,7 @@ jobs:
|
|
21
26
|
- name: Update gems
|
22
27
|
shell: pwsh
|
23
28
|
run: |
|
24
|
-
gem install bundler
|
29
|
+
gem install bundler
|
25
30
|
bundle config --local path vendor/bundle
|
26
31
|
bundle update
|
27
32
|
bundle install --jobs 4 --retry 3
|
data/lib/relaton/db_cache.rb
CHANGED
@@ -212,8 +212,8 @@ module Relaton
|
|
212
212
|
localname = local_bibliocache_name(opts[:local_cache])
|
213
213
|
localname = "relaton" if localname&.empty?
|
214
214
|
if opts[:flush_caches]
|
215
|
-
FileUtils.
|
216
|
-
FileUtils.
|
215
|
+
FileUtils.rm_rf globalname unless globalname.nil?
|
216
|
+
FileUtils.rm_rf localname unless localname.nil?
|
217
217
|
end
|
218
218
|
Relaton::Db.new(globalname, localname)
|
219
219
|
end
|
data/lib/relaton/version.rb
CHANGED
data/relaton.gemspec
CHANGED
@@ -29,14 +29,14 @@ model.
|
|
29
29
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
30
30
|
|
31
31
|
# spec.add_dependency "algoliasearch"
|
32
|
-
spec.add_dependency "relaton-calconnect", "~> 0.
|
33
|
-
spec.add_dependency "relaton-gb", "~> 0.
|
34
|
-
spec.add_dependency "relaton-iec", "~> 0.
|
35
|
-
spec.add_dependency "relaton-ietf", "~> 0.
|
36
|
-
spec.add_dependency "relaton-iso", "~> 0.
|
37
|
-
spec.add_dependency "relaton-itu", "~> 0.
|
38
|
-
spec.add_dependency "relaton-nist", "~> 0.
|
39
|
-
spec.add_dependency "relaton-ogc", "~> 0.
|
32
|
+
spec.add_dependency "relaton-calconnect", "~> 0.4.0"
|
33
|
+
spec.add_dependency "relaton-gb", "~> 0.9.0"
|
34
|
+
spec.add_dependency "relaton-iec", "~> 0.7.0"
|
35
|
+
spec.add_dependency "relaton-ietf", "~> 0.9.0"
|
36
|
+
spec.add_dependency "relaton-iso", "~> 0.9.0"
|
37
|
+
spec.add_dependency "relaton-itu", "~> 0.6.0"
|
38
|
+
spec.add_dependency "relaton-nist", "~> 0.6.0"
|
39
|
+
spec.add_dependency "relaton-ogc", "~> 0.4.0"
|
40
40
|
|
41
41
|
spec.add_development_dependency "byebug", "~> 10.0"
|
42
42
|
spec.add_development_dependency "debase"
|
data/spec/relaton/config_spec.rb
CHANGED
@@ -8,7 +8,9 @@ RSpec.describe Relaton::Config do
|
|
8
8
|
it "allows user to set custom configuration" do
|
9
9
|
log_types = ["info", :warning, :error]
|
10
10
|
|
11
|
-
Relaton.
|
11
|
+
Relaton.configure do |config|
|
12
|
+
config.logs = log_types
|
13
|
+
end
|
12
14
|
|
13
15
|
expect(Relaton.configuration.logs).to eq(log_types)
|
14
16
|
end
|
data/spec/relaton_spec.rb
CHANGED
@@ -172,18 +172,28 @@ RSpec.describe Relaton::Db do
|
|
172
172
|
end
|
173
173
|
end
|
174
174
|
|
175
|
-
|
176
|
-
@db.save_entry "iso(test_key)", value: "test_value"
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
175
|
+
context "version control" do
|
176
|
+
before(:each) { @db.save_entry "iso(test_key)", value: "test_value" }
|
177
|
+
|
178
|
+
it "shoudn't clear cacho if version isn't changed" do
|
179
|
+
db = Relaton::Db.new "testcache", "testcache2"
|
180
|
+
testcache = db.instance_variable_get :@db
|
181
|
+
expect(testcache.all).to be_any
|
182
|
+
testcache = db.instance_variable_get :@local_db
|
183
|
+
expect(testcache.all).to be_any
|
184
|
+
end
|
185
|
+
|
186
|
+
it "should clear cache if version is changed" do
|
187
|
+
expect(File.exist?("testcache")).to be true
|
188
|
+
expect(File.exist?("testcache2")).to be true
|
189
|
+
processor = double
|
190
|
+
expect(processor).to receive(:grammar_hash).and_return("new_version").exactly(2).times
|
191
|
+
expect(Relaton::Registry.instance).to receive(:by_type).and_return(processor).exactly(2).times
|
192
|
+
db = Relaton::Db.new "testcache", "testcache2"
|
193
|
+
testcache = db.instance_variable_get :@db
|
194
|
+
expect(testcache.all).not_to be_any
|
195
|
+
testcache = db.instance_variable_get :@local_db
|
196
|
+
expect(testcache.all).not_to be_any
|
197
|
+
end
|
188
198
|
end
|
189
199
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: relaton-calconnect
|
@@ -16,112 +16,112 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.4.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.4.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: relaton-gb
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.9.0
|
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: 0.9.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: relaton-iec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.7.0
|
48
48
|
type: :runtime
|
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: 0.7.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: relaton-ietf
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.9.0
|
62
62
|
type: :runtime
|
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: 0.
|
68
|
+
version: 0.9.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: relaton-iso
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.9.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.9.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: relaton-itu
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: 0.6.0
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.
|
96
|
+
version: 0.6.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: relaton-nist
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
103
|
+
version: 0.6.0
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
110
|
+
version: 0.6.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: relaton-ogc
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
117
|
+
version: 0.4.0
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
124
|
+
version: 0.4.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: byebug
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|