pubid-ccsds 0.1.2 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 193f9b9e47d7c18988db0a3443b52cee6dd5afedfeb9977119ef8b8ba02d4b93
4
- data.tar.gz: 9776b5d64ff1baf0649038a95f20f61efe3c66c05eabaf6fb7b5d9b012442818
3
+ metadata.gz: d916c8d3cd03a61df50721d14001c46e6a010a2f6cfd19823b88285372c87502
4
+ data.tar.gz: e350aff921b6736aa1690b1e5c1b0b659886777bca0bbe671006a3f53070da44
5
5
  SHA512:
6
- metadata.gz: 32de5a456214ee004c4f94c7a803f31d7b5405c1963f1c1cd3a3fa5547e5e9f0484fc3aa7c7c024882dd9a66732e4594b3a4fc397bbd467e5c3c04cd6b88744a
7
- data.tar.gz: 7aa1a35efe5c5eac4fb39d1e85f1317cd373fc5ae2e0b78b815579aa94ea1c46fcccf0eb32a9992d71fd2614a5333d4f8d097b57044a4def850a463e45ae4a00
6
+ metadata.gz: 48c23184d7445d76d705ebd2fdecdbc48c28155a34d9885a70c9249db3991850a20ed2367da02c1f3fb5d47f0fc74312256d544ae70ad3c6e0e8d56fa593865d
7
+ data.tar.gz: 346d7e253db7a99bf6575c0cef24b2d75bea250288a7c551835fdd8c0a28cb2783143491c2eebcdc2bc9723ebda7600c78a0a0e3bad282ef30c64b770277ce84
data/README.adoc CHANGED
@@ -1,4 +1,4 @@
1
- = JIS publication identifiers ("CCSDS PubID")
1
+ = CCSDS publication identifiers ("CCSDS PubID")
2
2
 
3
3
  == Purpose
4
4
 
@@ -12,12 +12,13 @@ module Pubid::Ccsds
12
12
  end
13
13
 
14
14
  def initialize(publisher: "CCSDS", book_color: nil, part: nil,
15
- series: nil, retired: nil, **opts)
15
+ series: nil, retired: nil, edition: nil, **opts)
16
16
  super(**opts.merge(publisher: publisher))
17
17
  @book_color = book_color
18
18
  @part = part || 0
19
19
  @series = series
20
20
  @retired = retired
21
+ @edition = edition
21
22
  end
22
23
 
23
24
  class << self
@@ -49,6 +50,10 @@ module Pubid::Ccsds
49
50
  def get_renderer_class
50
51
  Renderer::Base
51
52
  end
53
+
54
+ def get_update_codes
55
+ UPDATE_CODES
56
+ end
52
57
  end
53
58
  end
54
59
  end
@@ -2,11 +2,11 @@ module Pubid::Ccsds
2
2
  class Parser < Pubid::Core::Parser
3
3
 
4
4
  rule(:book_color) do
5
- dash >> match["BGMYO"].as(:book_color)
5
+ dash >> match["BGMYOR"].as(:book_color)
6
6
  end
7
7
 
8
8
  rule(:edition) do
9
- dash >> digits.as(:edition)
9
+ dash >> (digits >> (dot >> digits).maybe).as(:edition)
10
10
  end
11
11
 
12
12
  rule(:part) do
@@ -31,7 +31,7 @@ module Pubid::Ccsds
31
31
 
32
32
  rule(:identifier) do
33
33
  str("CCSDS") >> space >> series.maybe >> digits.as(:number) >> part >>
34
- book_color >> edition >> retired.maybe >> corrigendum.maybe >> language.maybe
34
+ book_color >> edition.maybe >> retired.maybe >> corrigendum.maybe >> language.maybe
35
35
  end
36
36
 
37
37
  rule(:root) { identifier }
@@ -1,5 +1,5 @@
1
1
  module Pubid
2
2
  module Ccsds
3
- VERSION = "0.1.2".freeze
3
+ VERSION = "0.1.4".freeze
4
4
  end
5
5
  end
data/lib/pubid/ccsds.rb CHANGED
@@ -1,10 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "parslet"
4
+ require "yaml"
4
5
 
5
6
  module Pubid
7
+ module Ccsds
8
+ UPDATE_CODES = YAML.load_file(File.join(File.dirname(__FILE__), "../../update_codes.yaml"))
9
+ end
6
10
  end
7
11
 
12
+
8
13
  require "pubid-core"
9
14
 
10
15
  require_relative "ccsds/identifier/base"
data/update_codes.yaml ADDED
@@ -0,0 +1 @@
1
+ CCSDS 320.0-B-1-S Corrigendum 1: CCSDS 320.0-B-1-S Cor. 1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pubid-ccsds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-19 00:00:00.000000000 Z
11
+ date: 2024-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.8.6
61
+ version: 1.12.6
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: 1.8.6
68
+ version: 1.12.6
69
69
  description: Library to generate, parse and manipulate CCSDS PubID.
70
70
  email:
71
71
  - open.source@ribose.com
@@ -86,6 +86,7 @@ files:
86
86
  - lib/pubid/ccsds/renderer/base.rb
87
87
  - lib/pubid/ccsds/renderer/corrigendum.rb
88
88
  - lib/pubid/ccsds/version.rb
89
+ - update_codes.yaml
89
90
  homepage: https://github.com/metanorma/pubid-jis
90
91
  licenses:
91
92
  - BSD-2-Clause
@@ -105,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
106
  - !ruby/object:Gem::Version
106
107
  version: '0'
107
108
  requirements: []
108
- rubygems_version: 3.3.26
109
+ rubygems_version: 3.3.27
109
110
  signing_key:
110
111
  specification_version: 4
111
112
  summary: Library to generate, parse and manipulate CCSDS PubID.