rasn1 0.7.1 → 0.8.0

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.
@@ -46,8 +46,8 @@ module RASN1
46
46
  # seqof[0][:int].value # => 12
47
47
  # @author Sylvain Daubert
48
48
  class SequenceOf < Constructed
49
- # SequenceOf tag value
50
- TAG = Sequence::TAG
49
+ # SequenceOf id value
50
+ ID = Sequence::ID
51
51
 
52
52
  # @return [Class, Base]
53
53
  attr_reader :of_type
@@ -147,7 +147,7 @@ module RASN1
147
147
  @value.map(&:to_der).join
148
148
  end
149
149
 
150
- def der_to_value(der, ber:false)
150
+ def der_to_value(der, ber: false)
151
151
  @value = []
152
152
  nb_bytes = 0
153
153
 
@@ -21,8 +21,8 @@ module RASN1
21
21
  # ]
22
22
  # @author Sylvain Daubert
23
23
  class Set < Sequence
24
- # Set tag value
25
- TAG = 0x11
24
+ # Set id value
25
+ ID = 0x11
26
26
  end
27
27
  end
28
28
  end
@@ -5,8 +5,8 @@ module RASN1
5
5
  # ASN.1 SET OF
6
6
  # @author Sylvain Daubert
7
7
  class SetOf < SequenceOf
8
- # SetOf tag value
9
- TAG = Set::TAG
8
+ # SetOf id value
9
+ ID = Set::ID
10
10
 
11
11
  # A SET OF is encoded as a SET.
12
12
  # @return ['SET']
@@ -18,8 +18,8 @@ module RASN1
18
18
  # not.
19
19
  # @author Sylvain Daubert
20
20
  class UtcTime < Primitive
21
- # UtcTime tag value
22
- TAG = 23
21
+ # UtcTime id value
22
+ ID = 23
23
23
 
24
24
  # Get ASN.1 type
25
25
  # @return [String]
@@ -5,8 +5,8 @@ module RASN1
5
5
  # ASN.1 UTF8 String
6
6
  # @author Sylvain Daubert
7
7
  class Utf8String < OctetString
8
- # Utf8String tag value
9
- TAG = 12
8
+ # Utf8String id value
9
+ ID = 12
10
10
 
11
11
  # Get ASN.1 type
12
12
  # @return [String]
@@ -5,8 +5,8 @@ module RASN1
5
5
  # ASN.1 Visible String
6
6
  # @author Sylvain Daubert
7
7
  class VisibleString < IA5String
8
- # VisibleString tag value
9
- TAG = 26
8
+ # VisibleString id value
9
+ ID = 26
10
10
 
11
11
  # Get ASN.1 type
12
12
  # @return [String]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RASN1
4
- VERSION = '0.7.1'
4
+ VERSION = '0.8.0'
5
5
  end
metadata CHANGED
@@ -1,63 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rasn1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvain Daubert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-11 00:00:00.000000000 Z
11
+ date: 2020-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: yard
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '0.9'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '0.9'
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 1.17.3
34
- - - "<"
35
- - !ruby/object:Gem::Version
36
- version: '3'
37
- type: :development
38
- prerelease: false
39
- version_requirements: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: 1.17.3
44
- - - "<"
45
- - !ruby/object:Gem::Version
46
- version: '3'
47
13
  - !ruby/object:Gem::Dependency
48
14
  name: rake
49
15
  requirement: !ruby/object:Gem::Requirement
50
16
  requirements:
51
17
  - - "~>"
52
18
  - !ruby/object:Gem::Version
53
- version: '10.0'
19
+ version: '12.3'
54
20
  type: :development
55
21
  prerelease: false
56
22
  version_requirements: !ruby/object:Gem::Requirement
57
23
  requirements:
58
24
  - - "~>"
59
25
  - !ruby/object:Gem::Version
60
- version: '10.0'
26
+ version: '12.3'
61
27
  - !ruby/object:Gem::Dependency
62
28
  name: rspec
63
29
  requirement: !ruby/object:Gem::Requirement
@@ -73,37 +39,32 @@ dependencies:
73
39
  - !ruby/object:Gem::Version
74
40
  version: '3.0'
75
41
  - !ruby/object:Gem::Dependency
76
- name: simplecov
42
+ name: yard
77
43
  requirement: !ruby/object:Gem::Requirement
78
44
  requirements:
79
45
  - - "~>"
80
46
  - !ruby/object:Gem::Version
81
- version: '0.14'
47
+ version: '0.9'
82
48
  type: :development
83
49
  prerelease: false
84
50
  version_requirements: !ruby/object:Gem::Requirement
85
51
  requirements:
86
52
  - - "~>"
87
53
  - !ruby/object:Gem::Version
88
- version: '0.14'
89
- description: |2
90
-
91
- RASN1 is a pure ruby ASN.1 library. It may encode and decode DER and BER
92
- encodings.
54
+ version: '0.9'
55
+ description: |
56
+ RASN1 is a pure ruby ASN.1 library. It may encode and decode DER and BER
57
+ encodings.
93
58
  email:
94
59
  - sylvain.daubert@laposte.net
95
60
  executables: []
96
61
  extensions: []
97
- extra_rdoc_files: []
62
+ extra_rdoc_files:
63
+ - README.md
64
+ - LICENSE
98
65
  files:
99
- - ".gitignore"
100
- - ".rubocop.yml"
101
- - ".travis.yml"
102
- - Changelog.md
103
- - Gemfile
104
66
  - LICENSE
105
67
  - README.md
106
- - Rakefile
107
68
  - lib/rasn1.rb
108
69
  - lib/rasn1/model.rb
109
70
  - lib/rasn1/types.rb
@@ -131,20 +92,29 @@ files:
131
92
  - lib/rasn1/types/utf8_string.rb
132
93
  - lib/rasn1/types/visible_string.rb
133
94
  - lib/rasn1/version.rb
134
- - rasn1.gemspec
135
95
  homepage: https://github.com/sdaubert/rasn1
136
96
  licenses:
137
97
  - MIT
138
- metadata: {}
98
+ metadata:
99
+ homepage_uri: https://github.com/sdaubert/rasn1
100
+ source_code_uri: https://github.com/sdaubert/rasn1
101
+ bug_tracker_uri: https://github.com/sdaubert/rasn1/issues
102
+ documentation_uri: https://www.rubydoc.info/gems/rasn1
139
103
  post_install_message:
140
- rdoc_options: []
104
+ rdoc_options:
105
+ - "--title"
106
+ - RASN1 - A pure ruby ASN.1 library
107
+ - "--main"
108
+ - README.md
109
+ - "--inline-source"
110
+ - "--quiet"
141
111
  require_paths:
142
112
  - lib
143
113
  required_ruby_version: !ruby/object:Gem::Requirement
144
114
  requirements:
145
115
  - - ">="
146
116
  - !ruby/object:Gem::Version
147
- version: 2.3.0
117
+ version: 2.4.0
148
118
  required_rubygems_version: !ruby/object:Gem::Requirement
149
119
  requirements:
150
120
  - - ">="
data/.gitignore DELETED
@@ -1,11 +0,0 @@
1
- *~
2
- /.bundle/
3
- /.yardoc
4
- /Gemfile.lock
5
- /_yardoc/
6
- /coverage/
7
- /doc/
8
- /pkg/
9
- /spec/reports/
10
- /tmp/
11
- /vendor/
@@ -1,32 +0,0 @@
1
- Layout/SpaceAroundEqualsInParameterDefault:
2
- EnforcedStyle: no_space
3
- Lint/EmptyWhen:
4
- Enabled: false
5
- Lint/Void:
6
- Enabled: false
7
- Metrics:
8
- Enabled: false
9
- Naming/AccessorMethodName:
10
- Enabled: false
11
- Style/AsciiComments:
12
- Enabled: false
13
- Style/Encoding:
14
- Enabled: false
15
- Style/EvalWithLocation:
16
- Enabled: false
17
- Style/FormatString:
18
- EnforcedStyle: percent
19
- Style/FormatStringToken:
20
- EnforcedStyle: unannotated
21
- Style/PerlBackrefs:
22
- Enabled: false
23
- Style/RedundantSelf:
24
- Enabled: false
25
- Style/RegexpLiteral:
26
- EnforcedStyle: slashes
27
- Style/StructInheritance:
28
- Enabled: false
29
- Style/TrailingCommaInArrayLiteral:
30
- Enabled: false
31
- Style/TrailingCommaInHashLiteral:
32
- Enabled: false
@@ -1,11 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.3
4
- - 2.4
5
- - 2.5
6
- - 2.6
7
- install:
8
- # new bundler install needed by ruby2.3 and 2.6(!)
9
- - gem install bundler
10
- - bundle install --path vendor/bundle --jobs=3 --retry=3
11
-
@@ -1,15 +0,0 @@
1
- # Rasn1 Changelog
2
-
3
- ## 0.7.1
4
-
5
- * update bundler dependency: now support bundler 2.0.
6
-
7
- ## 0.7.0
8
-
9
- * add RASN1::Model#value to get value of a (potentially nested) element.
10
- * add RASN1::Types::Sequence#[]. Access to element by index or by name.
11
- * add frozen_string literal on all ruby files.
12
- * optimize RASN1::Types.tag2type.
13
- * refactoring of RASN1::Types::Base and RASN1::Types::Boolean.
14
- * fix bugs:
15
- * RASN1::Types::Base#initialize_copy raises on ruby 2.3 when @value and/or @default were nil, true, false of Integer.
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in rasn1.gemspec
4
- gemspec
data/Rakefile DELETED
@@ -1,12 +0,0 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
3
- require 'yard'
4
-
5
- RSpec::Core::RakeTask.new
6
- YARD::Rake::YardocTask.new do |t|
7
- t.files = ['lib/**/*.rb', '-', 'README.md', 'LICENSE']
8
- t.options = %w(--no-private)
9
- end
10
-
11
- task :default => :spec
12
-
@@ -1,32 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'rasn1/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = 'rasn1'
8
- spec.version = RASN1::VERSION
9
- spec.license = 'MIT'
10
- spec.authors = ['Sylvain Daubert']
11
- spec.email = ['sylvain.daubert@laposte.net']
12
-
13
- spec.summary = %q{Ruby ASN.1 library}
14
- spec.description = %q{
15
- RASN1 is a pure ruby ASN.1 library. It may encode and decode DER and BER
16
- encodings.
17
- }
18
- spec.homepage = 'https://github.com/sdaubert/rasn1'
19
-
20
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
21
- f.match(%r{^(test|spec|features)/})
22
- end
23
- spec.require_paths = ['lib']
24
-
25
- spec.required_ruby_version = '>= 2.3.0'
26
-
27
- spec.add_development_dependency 'yard', '~>0.9'
28
- spec.add_development_dependency 'bundler', '>= 1.17.3', '< 3'
29
- spec.add_development_dependency 'rake', '~> 10.0'
30
- spec.add_development_dependency 'rspec', '~> 3.0'
31
- spec.add_development_dependency 'simplecov', '~> 0.14'
32
- end