cnccs 0.1.5 → 0.1.6
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 +16 -4
- data/.github/workflows/ubuntu.yml +30 -4
- data/.github/workflows/windows.yml +16 -5
- data/Gemfile.lock +5 -5
- data/README.adoc +5 -1
- data/cnccs.gemspec +2 -2
- data/lib/cnccs/ccs.rb +1 -1
- data/lib/cnccs/version.rb +1 -1
- metadata +9 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fdce9dc33d6dfe444346aaa7779a6fec2389d7a1d2f8173642ca1af23ce4e4d
|
4
|
+
data.tar.gz: 2d0f018fab5db2bf4f1b67aa528dcac12a6a9e645e9bbbc6d8b669988c61cf3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 132f13b49169fc4ac73cc91b4ef3d7fe78b015361563393c159b47d023c6e1208e833cef5adbe02f6967ec4c39d7e54e85214ec9a644f6b332e97b57b5b39dd4
|
7
|
+
data.tar.gz: da42aeb8630c8dbc856efbe813eb675f4dd5fdaf1e4a523f0abdf699d871592c307f4d1c708f97d229d0d09c44d3eeec35533ebd7fc09a1a6b2cb73abc999ece
|
data/.github/workflows/macos.yml
CHANGED
@@ -1,16 +1,28 @@
|
|
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
|
+
paths-ignore:
|
10
|
+
- .github/workflows/ubuntu.yml
|
11
|
+
- .github/workflows/windows.yml
|
6
12
|
|
7
13
|
jobs:
|
8
14
|
test-macos:
|
9
15
|
name: Test on Ruby ${{ matrix.ruby }} macOS
|
10
16
|
runs-on: macos-latest
|
17
|
+
continue-on-error: ${{ matrix.experimental }}
|
11
18
|
strategy:
|
19
|
+
fail-fast: false
|
12
20
|
matrix:
|
13
21
|
ruby: [ '2.6', '2.5', '2.4' ]
|
22
|
+
experimental: [false]
|
23
|
+
include:
|
24
|
+
- ruby: '2.7'
|
25
|
+
experimental: true
|
14
26
|
steps:
|
15
27
|
- uses: actions/checkout@master
|
16
28
|
- name: Use Ruby
|
@@ -20,7 +32,7 @@ jobs:
|
|
20
32
|
architecture: 'x64'
|
21
33
|
- name: Update gems
|
22
34
|
run: |
|
23
|
-
sudo gem install bundler
|
35
|
+
sudo gem install bundler --force
|
24
36
|
bundle install --jobs 4 --retry 3
|
25
37
|
- name: Run specs
|
26
38
|
run: |
|
@@ -1,16 +1,30 @@
|
|
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
|
+
tags:
|
9
|
+
- '*'
|
10
|
+
pull_request:
|
11
|
+
paths-ignore:
|
12
|
+
- .github/workflows/macos.yml
|
13
|
+
- .github/workflows/windows.yml
|
6
14
|
|
7
15
|
jobs:
|
8
16
|
test-linux:
|
9
17
|
name: Test on Ruby ${{ matrix.ruby }} Ubuntu
|
10
18
|
runs-on: ubuntu-latest
|
19
|
+
continue-on-error: ${{ matrix.experimental }}
|
11
20
|
strategy:
|
21
|
+
fail-fast: false
|
12
22
|
matrix:
|
13
23
|
ruby: [ '2.6', '2.5', '2.4' ]
|
24
|
+
experimental: [false]
|
25
|
+
include:
|
26
|
+
- ruby: '2.7'
|
27
|
+
experimental: true
|
14
28
|
steps:
|
15
29
|
- uses: actions/checkout@master
|
16
30
|
- name: Use Ruby
|
@@ -20,8 +34,20 @@ jobs:
|
|
20
34
|
architecture: 'x64'
|
21
35
|
- name: Update gems
|
22
36
|
run: |
|
23
|
-
gem install bundler
|
37
|
+
gem install bundler
|
24
38
|
bundle install --jobs 4 --retry 3
|
25
39
|
- name: Run specs
|
26
40
|
run: |
|
27
41
|
bundle exec rake
|
42
|
+
- name: Trigger dependent repositories
|
43
|
+
if: github.ref == 'refs/heads/master' && matrix.ruby == '2.6'
|
44
|
+
env:
|
45
|
+
GH_USERNAME: ${{ secrets.PAT_USERNAME }}
|
46
|
+
GH_ACCESS_TOKEN: ${{ secrets.PAT_TOKEN }}
|
47
|
+
run: |
|
48
|
+
curl -LO --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/trigger-gh-actions.sh
|
49
|
+
[[ -f ".github/workflows/dependent_repos.env" ]] && source .github/workflows/dependent_repos.env
|
50
|
+
for repo in $DEPENDENT_REPOS
|
51
|
+
do
|
52
|
+
sh trigger-gh-actions.sh $ORGANISATION $repo $GH_USERNAME $GH_ACCESS_TOKEN $GITHUB_REPOSITORY "{ \"ref\": \"${GITHUB_REF}\" }"
|
53
|
+
done
|
@@ -1,16 +1,28 @@
|
|
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
|
+
paths-ignore:
|
10
|
+
- .github/workflows/macos.yml
|
11
|
+
- .github/workflows/ubuntu.yml
|
6
12
|
|
7
13
|
jobs:
|
8
14
|
test-windows:
|
9
15
|
name: Test on Ruby ${{ matrix.ruby }} Windows
|
10
16
|
runs-on: windows-latest
|
17
|
+
continue-on-error: ${{ matrix.experimental }}
|
11
18
|
strategy:
|
19
|
+
fail-fast: false
|
12
20
|
matrix:
|
13
21
|
ruby: [ '2.6', '2.5', '2.4' ]
|
22
|
+
experimental: [false]
|
23
|
+
include:
|
24
|
+
- ruby: '2.7'
|
25
|
+
experimental: true
|
14
26
|
steps:
|
15
27
|
- uses: actions/checkout@master
|
16
28
|
- name: Use Ruby
|
@@ -21,9 +33,8 @@ jobs:
|
|
21
33
|
- name: Update gems
|
22
34
|
shell: pwsh
|
23
35
|
run: |
|
24
|
-
gem install bundler
|
36
|
+
gem install bundler
|
25
37
|
bundle config --local path vendor/bundle
|
26
|
-
bundle update
|
27
38
|
bundle install --jobs 4 --retry 3
|
28
39
|
- name: Run specs
|
29
40
|
run: |
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cnccs (0.1.
|
4
|
+
cnccs (0.1.5)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -10,7 +10,7 @@ GEM
|
|
10
10
|
coderay (1.1.2)
|
11
11
|
diff-lcs (1.3)
|
12
12
|
docile (1.3.2)
|
13
|
-
json (2.
|
13
|
+
json (2.3.0)
|
14
14
|
method_source (0.9.2)
|
15
15
|
pry (0.12.2)
|
16
16
|
coderay (~> 1.1.0)
|
@@ -18,7 +18,7 @@ GEM
|
|
18
18
|
pry-byebug (3.7.0)
|
19
19
|
byebug (~> 11.0)
|
20
20
|
pry (~> 0.10)
|
21
|
-
rake (
|
21
|
+
rake (13.0.1)
|
22
22
|
rspec (3.9.0)
|
23
23
|
rspec-core (~> 3.9.0)
|
24
24
|
rspec-expectations (~> 3.9.0)
|
@@ -42,10 +42,10 @@ PLATFORMS
|
|
42
42
|
ruby
|
43
43
|
|
44
44
|
DEPENDENCIES
|
45
|
-
bundler
|
45
|
+
bundler
|
46
46
|
cnccs!
|
47
47
|
pry-byebug
|
48
|
-
rake (~>
|
48
|
+
rake (~> 13.0)
|
49
49
|
rspec (~> 3.0)
|
50
50
|
simplecov
|
51
51
|
|
data/README.adoc
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
= CnCcs: Ruby gem for using CCS codes
|
2
2
|
|
3
3
|
image:https://img.shields.io/gem/v/cnccs.svg["Gem Version", link="https://rubygems.org/gems/cnccs"]
|
4
|
-
image:https://
|
4
|
+
image:https://github.com/metanorma/cnccs/workflows/ubuntu/badge.svg["Ubuntu Build Status", link="https://github.com/metanorma/cnccs/actions?query=workflow%3Aubuntu"]
|
5
|
+
image:https://github.com/metanorma/cnccs/workflows/macos/badge.svg["OSX Build Status", link="https://github.com/metanorma/cnccs/actions?query=workflow%3Amacos"]
|
6
|
+
image:https://github.com/metanorma/cnccs/workflows/windows/badge.svg["Windows Build Status", link="https://github.com/metanorma/cnccs/actions?query=workflow%3Awindows"]
|
5
7
|
image:https://codeclimate.com/github/metanorma/cnccs/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/cnccs"]
|
8
|
+
image:https://img.shields.io/github/issues-pr-raw/metanorma/cnccs.svg["Pull Requests", link="https://github.com/metanorma/cnccs/pulls"]
|
9
|
+
image:https://img.shields.io/github/commits-since/metanorma/cnccs/latest.svg["Commits since latest",link="https://github.com/metanorma/cnccs/releases"]
|
6
10
|
|
7
11
|
|
8
12
|
The categories used in the Classification of Chinese Standards ("CCS")
|
data/cnccs.gemspec
CHANGED
@@ -22,8 +22,8 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
24
24
|
|
25
|
-
spec.add_development_dependency "bundler"
|
26
|
-
spec.add_development_dependency "rake", "~>
|
25
|
+
spec.add_development_dependency "bundler"
|
26
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
27
27
|
spec.add_development_dependency "rspec", "~> 3.0"
|
28
28
|
spec.add_development_dependency "simplecov"
|
29
29
|
spec.add_development_dependency "pry-byebug"
|
data/lib/cnccs/ccs.rb
CHANGED
@@ -79,7 +79,7 @@ module Cnccs
|
|
79
79
|
# @param match [String]
|
80
80
|
# @return [Array<String, Array>]
|
81
81
|
def fetch_data(level, match)
|
82
|
-
csv = CSV.read "#{__dir__}/../../cn-ccs-codes/cat-level#{level}.csv", "
|
82
|
+
csv = CSV.read "#{__dir__}/../../cn-ccs-codes/cat-level#{level}.csv", encoding: "UTF-8", headers: true
|
83
83
|
row = csv.find { |r| r[0] == match }
|
84
84
|
row.map(&:last)
|
85
85
|
end
|
data/lib/cnccs/version.rb
CHANGED
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cnccs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
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:
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
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: '
|
40
|
+
version: '13.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -129,8 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
|
-
|
133
|
-
rubygems_version: 2.7.6
|
132
|
+
rubygems_version: 3.0.3
|
134
133
|
signing_key:
|
135
134
|
specification_version: 4
|
136
135
|
summary: Classification of Chinese Standards ("CCS") are accessible via this gem.
|