isoics 0.1.9 → 0.1.10

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 887d32940857187224d102ddee2e733308b6da5393fe43604fe0ed8714ff91cb
4
- data.tar.gz: c413f4bf17e69850883299a459189e59f3ba7ccf3bd48df6d84212ea4cd7905d
3
+ metadata.gz: 742f971108cfc21a41f55929b766fa96e50fd0971733537b307e8a86a9b88ccc
4
+ data.tar.gz: 27885e766058334c4ddd135107ab7aa53566f1f024398b61cf559ec7d0ed1f97
5
5
  SHA512:
6
- metadata.gz: adcc74e313c553a61f96c0e42def10e179c890a4b19ff07af49ca8e5881170724bbde8cd2c84d0e6abb3e0d71cd78e87a072ec7cb658fbcfcf468d5585d7cea7
7
- data.tar.gz: 1f5ca2f87ba394ac0a4c93484f8976a4f548869e5751183246f6bbab4f41aba477359ba43f0752feaa34ee18db2c8bb9a148d51ac04446883952c409cae808b7
6
+ metadata.gz: 3230819d6a387b093480d3c891d45b5ad0c5589c462900742fe5d1a3113bb4240f8655b6c00bfe3604b0aaceb5d914c1c5985b372e502aaf8888793e8e134d7b
7
+ data.tar.gz: 84e1978e0e5b0ce9689c6cf35325809fea59716c01e21918d2dc60c1e2c3c4d47c684156529b054f99dd0f54b6e4681b0ff0275ea81b0eca4c0466be2400bec6
@@ -0,0 +1,32 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ name: rake
4
+
5
+ on:
6
+ push:
7
+ branches: [ master, main ]
8
+ tags: [ v* ]
9
+ pull_request:
10
+
11
+ jobs:
12
+ rake:
13
+ name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
14
+ runs-on: ${{ matrix.os }}
15
+ continue-on-error: ${{ matrix.experimental }}
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ ruby: [ '3.0', '2.7', '2.6', '2.5' ]
20
+ os: [ ubuntu-latest, windows-latest, macos-latest ]
21
+ experimental: [ false ]
22
+ steps:
23
+ - uses: actions/checkout@v2
24
+ with:
25
+ submodules: true
26
+
27
+ - uses: ruby/setup-ruby@v1
28
+ with:
29
+ ruby-version: ${{ matrix.ruby }}
30
+ bundler-cache: true
31
+
32
+ - run: bundle exec rake
data/.hound.yml CHANGED
@@ -1,3 +1,5 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
1
3
  ruby:
2
- Enabled: true
4
+ enabled: true
3
5
  config_file: .rubocop.yml
data/.rubocop.yml CHANGED
@@ -1,10 +1,10 @@
1
- # This project follows the Ribose OSS style guide.
2
- # https://github.com/riboseinc/oss-guides
3
- # All project-specific additions and overrides should be specified in this file.
4
-
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
5
3
  inherit_from:
6
4
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
5
+
6
+ # local repo-specific modifications
7
+ # ...
8
+
7
9
  AllCops:
8
- TargetRubyVersion: 2.3
9
- Rails:
10
- Enabled: true
10
+ TargetRubyVersion: 2.5
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
3
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
5
  # Specify your gem's dependencies in isoics.gemspec
6
6
  gemspec
data/README.adoc CHANGED
@@ -1,9 +1,7 @@
1
1
  = IsoIcs
2
2
 
3
3
  image:https://img.shields.io/gem/v/isoics.svg["Gem Version", link="https://rubygems.org/gems/isoics"]
4
- image:https://github.com/metanorma/isoics/workflows/ubuntu/badge.svg["Ubuntu Build Status", link="https://github.com/metanorma/isoics/actions?query=workflow%3Aubuntu"]
5
- image:https://github.com/metanorma/isoics/workflows/macos/badge.svg["OSX Build Status", link="https://github.com/metanorma/isoics/actions?query=workflow%3Amacos"]
6
- image:https://github.com/metanorma/isoics/workflows/windows/badge.svg["Windows Build Status", link="https://github.com/metanorma/isoics/actions?query=workflow%3Awindows"]
4
+ image:https://github.com/metanorma/isoics/workflows/rake/badge.svg["Build Status", link="https://github.com/metanorma/isoics/actions?workflow=rake"]
7
5
  image:https://codeclimate.com/github/metanorma/isoics/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/isoics"]
8
6
  image:https://img.shields.io/github/issues-pr-raw/metanorma/isoics.svg["Pull Requests", link="https://github.com/metanorma/isoics/pulls"]
9
7
  image:https://img.shields.io/github/commits-since/metanorma/isoics/latest.svg["Commits since latest",link="https://github.com/metanorma/isoics/releases"]
data/Rakefile CHANGED
@@ -3,4 +3,4 @@ require "rspec/core/rake_task"
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
- task :default => :spec
6
+ task default: :spec
data/isoics.gemspec CHANGED
@@ -1,4 +1,4 @@
1
- lib = File.expand_path("../lib", __FILE__)
1
+ lib = File.expand_path("lib", __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require "isoics/version"
4
4
 
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["Ribose Inc."]
9
9
  spec.email = ["open.source@ribose.com"]
10
10
 
11
- spec.summary = %q{ISO ICS (International Classification for Standards) data accessible in a convenient package.}
11
+ spec.summary = "ISO ICS (International Classification for Standards) data accessible in a convenient package."
12
12
  spec.homepage = "https://github.com/metanorma/isoics"
13
13
  spec.license = "BSD-2-Clause"
14
14
 
@@ -18,12 +18,11 @@ Gem::Specification.new do |spec|
18
18
  spec.bindir = "exe"
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
- spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
22
-
21
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
23
22
 
24
23
  spec.add_development_dependency "bundler"
25
- spec.add_development_dependency "rake", "~> 13.0"
24
+ spec.add_development_dependency "byebug"
25
+ spec.add_development_dependency "rake", "~> 12.0"
26
26
  spec.add_development_dependency "rspec", "~> 3.0"
27
27
  spec.add_development_dependency "simplecov"
28
- spec.add_development_dependency "byebug"
29
28
  end
data/lib/isoics.rb CHANGED
@@ -4,7 +4,6 @@ require "isoics/ics"
4
4
 
5
5
  module Isoics
6
6
  class << self
7
-
8
7
  # Fetch ICS data by code.
9
8
  # @param code [String]
10
9
  # @param fieldcode [String]
@@ -13,14 +12,16 @@ module Isoics
13
12
  # @return [Isoics::ICS]
14
13
  def fetch(code = nil, fieldcode: nil, groupcode: nil, subgroupcode: nil)
15
14
  unless code || fieldcode
16
- raise ArgumentError, "wrong arguments (should be string or { fieldcode: [String] }"
15
+ raise(ArgumentError,
16
+ "wrong arguments (should be string or { fieldcode: [String] }")
17
17
  end
18
18
 
19
19
  if code
20
20
  fieldcode, groupcode, subgroupcode = code.split "."
21
21
  end
22
22
 
23
- ICS.new fieldcode: fieldcode, groupcode: groupcode, subgroupcode: subgroupcode
23
+ ICS.new(fieldcode: fieldcode, groupcode: groupcode,
24
+ subgroupcode: subgroupcode)
24
25
  end
25
26
  end
26
27
  end
data/lib/isoics/ics.rb CHANGED
@@ -17,30 +17,31 @@ module Isoics
17
17
 
18
18
  class ICS
19
19
  # @return [String]
20
- attr_reader :code, :fieldcode, :groupcode, :subgroupcode, :description,
21
- :description_full
20
+ attr_reader(:code, :fieldcode, :groupcode, :subgroupcode, :description,
21
+ :description_full)
22
22
 
23
23
  # @return [Array<Isoics::Note>]
24
24
  attr_reader :notes
25
25
 
26
26
  # @param ics_data [Hash]
27
27
  def initialize(fieldcode:, groupcode: nil, subgroupcode: nil)
28
- file_name = "#{__dir__}/../../ics/#{fieldcode.to_s}"
28
+ file_name = "#{__dir__}/../../ics/#{fieldcode}"
29
29
  file_name << "_#{groupcode}" if groupcode
30
- file_name << "_#{subgroupcode}" if subgroupcode
30
+ file_name << "_#{subgroupcode}" if subgroupcode
31
31
  file_name << ".json"
32
32
  ics_data = JSON.parse File.read(file_name), symbolize_names: true
33
33
 
34
34
  @code, @fieldcode, @groupcode, @subgroupcode, @description,
35
- @description_full = ics_data.values_at(
36
- :code, :fieldcode, :groupcode, :subgroupcode, :description, :descriptionFull
37
- )
35
+ @description_full = ics_data.values_at(
36
+ :code, :fieldcode, :groupcode, :subgroupcode, :description,
37
+ :descriptionFull
38
+ )
38
39
 
39
40
  @notes = if ics_data[:notes]
40
- ics_data[:notes].map { |n| Note.new n }
41
- else
42
- []
43
- end
41
+ ics_data[:notes].map { |n| Note.new n }
42
+ else
43
+ []
44
+ end
44
45
  end
45
46
  end
46
- end
47
+ end
@@ -1,3 +1,3 @@
1
1
  module Isoics
2
- VERSION = "0.1.9"
2
+ VERSION = "0.1.10".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isoics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-23 00:00:00.000000000 Z
11
+ date: 2021-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -25,49 +25,49 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
28
+ name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '13.0'
33
+ version: '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: '13.0'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rspec
42
+ name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.0'
47
+ version: '12.0'
48
48
  type: :development
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: '3.0'
54
+ version: '12.0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: simplecov
56
+ name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '3.0'
62
62
  type: :development
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: '3.0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: byebug
70
+ name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -87,9 +87,7 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
- - ".github/workflows/macos.yml"
91
- - ".github/workflows/ubuntu.yml"
92
- - ".github/workflows/windows.yml"
90
+ - ".github/workflows/rake.yml"
93
91
  - ".gitignore"
94
92
  - ".hound.yml"
95
93
  - ".rspec"
@@ -97,7 +95,6 @@ files:
97
95
  - ".rubocop.tb.yml"
98
96
  - ".rubocop.yml"
99
97
  - Gemfile
100
- - Gemfile.lock
101
98
  - LICENSE.txt
102
99
  - README.adoc
103
100
  - Rakefile
@@ -1500,14 +1497,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
1500
1497
  requirements:
1501
1498
  - - ">="
1502
1499
  - !ruby/object:Gem::Version
1503
- version: 2.4.0
1500
+ version: 2.5.0
1504
1501
  required_rubygems_version: !ruby/object:Gem::Requirement
1505
1502
  requirements:
1506
1503
  - - ">="
1507
1504
  - !ruby/object:Gem::Version
1508
1505
  version: '0'
1509
1506
  requirements: []
1510
- rubygems_version: 3.0.3
1507
+ rubygems_version: 3.1.4
1511
1508
  signing_key:
1512
1509
  specification_version: 4
1513
1510
  summary: ISO ICS (International Classification for Standards) data accessible in a
@@ -1,38 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: macos
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- paths-ignore:
10
- - .github/workflows/ubuntu.yml
11
- - .github/workflows/windows.yml
12
-
13
- jobs:
14
- test-macos:
15
- name: Test on Ruby ${{ matrix.ruby }} macOS
16
- runs-on: macos-latest
17
- continue-on-error: ${{ matrix.experimental }}
18
- strategy:
19
- fail-fast: false
20
- matrix:
21
- ruby: [ '2.6', '2.5', '2.4' ]
22
- experimental: [false]
23
- include:
24
- - ruby: '2.7'
25
- experimental: true
26
- steps:
27
- - uses: actions/checkout@master
28
- - name: Use Ruby
29
- uses: actions/setup-ruby@v1
30
- with:
31
- ruby-version: ${{ matrix.ruby }}
32
- - name: Update gems
33
- run: |
34
- sudo gem install bundler --force
35
- bundle install --jobs 4 --retry 3
36
- - name: Run specs
37
- run: |
38
- bundle exec rake
@@ -1,56 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: ubuntu
4
-
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
14
-
15
- jobs:
16
- test-linux:
17
- name: Test on Ruby ${{ matrix.ruby }} Ubuntu
18
- runs-on: ubuntu-latest
19
- continue-on-error: ${{ matrix.experimental }}
20
- strategy:
21
- fail-fast: false
22
- matrix:
23
- ruby: [ '2.6', '2.5', '2.4' ]
24
- experimental: [false]
25
- include:
26
- - ruby: '2.7'
27
- experimental: true
28
- steps:
29
- - uses: actions/checkout@master
30
- - name: Use Ruby
31
- uses: actions/setup-ruby@v1
32
- with:
33
- ruby-version: ${{ matrix.ruby }}
34
- - name: Update gems
35
- run: |
36
- gem install bundler
37
- bundle install --jobs 4 --retry 3
38
- - name: Run specs
39
- run: |
40
- bundle exec rake
41
- - name: Trigger repositories
42
- if: matrix.ruby == '2.6'
43
- env:
44
- GH_USERNAME: metanorma-ci
45
- GH_ACCESS_TOKEN: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
46
- run: |
47
- curl -LO --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/trigger-gh-actions.sh
48
- [[ -f ".github/workflows/dependent_repos.env" ]] && source .github/workflows/dependent_repos.env
49
- CLIENT_PAYLOAD=$(cat <<EOF
50
- "{ "ref": "${GITHUB_REF}", "repo": "${GITHUB_REPOSITORY}" }"
51
- EOF
52
- )
53
- for repo in $REPOS
54
- do
55
- sh trigger-gh-actions.sh $ORGANISATION $repo $GH_USERNAME $GH_ACCESS_TOKEN $GITHUB_REPOSITORY "$CLIENT_PAYLOAD"
56
- done
@@ -1,40 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: windows
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- paths-ignore:
10
- - .github/workflows/macos.yml
11
- - .github/workflows/ubuntu.yml
12
-
13
- jobs:
14
- test-windows:
15
- name: Test on Ruby ${{ matrix.ruby }} Windows
16
- runs-on: windows-latest
17
- continue-on-error: ${{ matrix.experimental }}
18
- strategy:
19
- fail-fast: false
20
- matrix:
21
- ruby: [ '2.6', '2.5', '2.4' ]
22
- experimental: [false]
23
- include:
24
- - ruby: '2.7'
25
- experimental: true
26
- steps:
27
- - uses: actions/checkout@master
28
- - name: Use Ruby
29
- uses: actions/setup-ruby@v1
30
- with:
31
- ruby-version: ${{ matrix.ruby }}
32
- - name: Update gems
33
- shell: pwsh
34
- run: |
35
- gem install bundler
36
- bundle config --local path vendor/bundle
37
- bundle install --jobs 4 --retry 3
38
- - name: Run specs
39
- run: |
40
- bundle exec rake
data/Gemfile.lock DELETED
@@ -1,43 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- isoics (0.1.9)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- byebug (11.1.3)
10
- diff-lcs (1.4.4)
11
- docile (1.3.2)
12
- rake (13.0.1)
13
- rspec (3.9.0)
14
- rspec-core (~> 3.9.0)
15
- rspec-expectations (~> 3.9.0)
16
- rspec-mocks (~> 3.9.0)
17
- rspec-core (3.9.2)
18
- rspec-support (~> 3.9.3)
19
- rspec-expectations (3.9.2)
20
- diff-lcs (>= 1.2.0, < 2.0)
21
- rspec-support (~> 3.9.0)
22
- rspec-mocks (3.9.1)
23
- diff-lcs (>= 1.2.0, < 2.0)
24
- rspec-support (~> 3.9.0)
25
- rspec-support (3.9.3)
26
- simplecov (0.18.5)
27
- docile (~> 1.1)
28
- simplecov-html (~> 0.11)
29
- simplecov-html (0.12.2)
30
-
31
- PLATFORMS
32
- ruby
33
-
34
- DEPENDENCIES
35
- bundler
36
- byebug
37
- isoics!
38
- rake (~> 13.0)
39
- rspec (~> 3.0)
40
- simplecov
41
-
42
- BUNDLED WITH
43
- 2.1.4