pkm_level2_converter 0.2.0 → 0.3.1

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: 97c43176a6dc371c0603050b13f197d0ba563aa1cc0259a9fc9749db2b7f9a56
4
- data.tar.gz: 7e01836579a624c1066cac0e0e49710fff71f8910f5da1155965e4be18ba70a1
3
+ metadata.gz: c0e7cdd1a8e931f81609cb5a491c2965dc7f41f832d8deeef05a9e376a51823e
4
+ data.tar.gz: 14bb0a173065b8ec5ad70d31fa08cd51277ec43a1db4aa55a668f8f56ea81918
5
5
  SHA512:
6
- metadata.gz: 826a1cf5808b3ce435128532809e26555a4dee14e62fc54921dddce269eef0bc2c06759a606d64ac1c737d1c0660135ffeeaf40138b56e11bd471b98bd8143d6
7
- data.tar.gz: f5b359813d967af6db08445b308cd59227edfb022fc5270e36121e00a5b683001adabb8b715225d5a3d0aca1d91eaa5c6f005ffcfaa85d168154baf0d8453fa9
6
+ metadata.gz: 0a7aee378ff844b47471c3bed0a3be3540cd18e67bdf3c9834ad35c086f97ece16465fcd5a12ded5dbed7f516af2048ad8e50f70f0f48fcde949944667eaf7f1
7
+ data.tar.gz: 8702a37edb2b599454c29af373cae770e6ffbccce6c8f998c0b20c352841f29623486332709593c276ff16eec614c77aa6e38413aa76520b288f557dcb8e1d9f
data/.gitignore CHANGED
@@ -1,8 +1,56 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ # Ignore Byebug command history file.
17
+ .byebug_history
18
+
19
+ ## Specific to RubyMotion:
20
+ .dat*
21
+ .repl_history
22
+ build/
23
+ *.bridgesupport
24
+ build-iPhoneOS/
25
+ build-iPhoneSimulator/
26
+
27
+ ## Specific to RubyMotion (use of CocoaPods):
28
+ #
29
+ # We recommend against adding the Pods directory to your .gitignore. However
30
+ # you should judge for yourself, the pros and cons are mentioned at:
31
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
32
+ #
33
+ # vendor/Pods/
34
+
35
+ ## Documentation cache and generated files:
36
+ /.yardoc/
37
+ /_yardoc/
38
+ /doc/
39
+ /rdoc/
40
+
41
+ ## Environment normalization:
42
+ /.bundle/
43
+ /vendor/bundle
44
+ /lib/bundler/man/
45
+
46
+ # for a library or gem, you might want to ignore these files since the code is
47
+ # intended to run in multiple environments; otherwise, check them in:
48
+ # Gemfile.lock
49
+ # .ruby-version
50
+ # .ruby-gemset
51
+
52
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
53
+ .rvmrc
54
+
55
+ # Used by RuboCop. Remote config files pulled in from inherit_from directive.
56
+ # .rubocop-https?--*
data/.rspec CHANGED
@@ -1,3 +1,3 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rspec_status CHANGED
@@ -1,5 +1,5 @@
1
- example_id | status | run_time |
2
- ------------------------------------------ | ------ | --------------- |
3
- ./spec/pkm_level2_converter_spec.rb[1:1] | passed | 0.00408 seconds |
4
- ./spec/pkm_level2_converter_spec.rb[1:2:1] | passed | 0.00323 seconds |
5
- ./spec/pkm_level2_converter_spec.rb[1:3:1] | passed | 0.0001 seconds |
1
+ example_id | status | run_time |
2
+ ------------------------------------------ | ------ | --------------- |
3
+ ./spec/pkm_level2_converter_spec.rb[1:1] | passed | 0.00408 seconds |
4
+ ./spec/pkm_level2_converter_spec.rb[1:2:1] | passed | 0.00323 seconds |
5
+ ./spec/pkm_level2_converter_spec.rb[1:3:1] | passed | 0.0001 seconds |
data/.rubocop.yml ADDED
@@ -0,0 +1,6 @@
1
+ Metrics/MethodLength:
2
+ Max: 1000
3
+ Metrics/ClassLength:
4
+ Max: 1000
5
+ AllCops:
6
+ NewCops: enable
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.2.2
data/Gemfile CHANGED
@@ -1,9 +1,15 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- # Specify your gem's dependencies in pkm_level2_converter.gemspec
6
- gemspec
7
-
8
- gem "rake", "~> 13.0"
9
- #gem "rspec", "~> 3.0"
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify your gem's dependencies in pkm_level2_converter.gemspec
6
+ gemspec
7
+
8
+ gem 'nokogiri'
9
+
10
+ group :development do
11
+ gem 'pry'
12
+ gem 'rake', '~> 13.0'
13
+ gem 'rspec'
14
+ gem 'rubocop', require: false
15
+ end
data/Gemfile.lock CHANGED
@@ -1,39 +1,76 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pkm_level2_converter (0.2.0)
5
- nokogiri (~> 1.10.4)
4
+ pkm_level2_converter (0.3.0)
6
5
 
7
6
  GEM
8
7
  remote: https://rubygems.org/
9
8
  specs:
9
+ ast (2.4.2)
10
+ coderay (1.1.3)
10
11
  diff-lcs (1.5.0)
11
- mini_portile2 (2.4.0)
12
- nokogiri (1.10.10)
13
- mini_portile2 (~> 2.4.0)
12
+ json (2.6.3)
13
+ language_server-protocol (3.17.0.3)
14
+ method_source (1.0.0)
15
+ mini_portile2 (2.8.2)
16
+ nokogiri (1.15.3)
17
+ mini_portile2 (~> 2.8.2)
18
+ racc (~> 1.4)
19
+ parallel (1.23.0)
20
+ parser (3.2.2.3)
21
+ ast (~> 2.4.1)
22
+ racc
23
+ pry (0.14.2)
24
+ coderay (~> 1.1)
25
+ method_source (~> 1.0)
26
+ racc (1.7.1)
27
+ rainbow (3.1.1)
14
28
  rake (13.0.6)
29
+ regexp_parser (2.8.1)
30
+ rexml (3.2.5)
15
31
  rspec (3.12.0)
16
32
  rspec-core (~> 3.12.0)
17
33
  rspec-expectations (~> 3.12.0)
18
34
  rspec-mocks (~> 3.12.0)
19
- rspec-core (3.12.0)
35
+ rspec-core (3.12.2)
20
36
  rspec-support (~> 3.12.0)
21
- rspec-expectations (3.12.2)
37
+ rspec-expectations (3.12.3)
22
38
  diff-lcs (>= 1.2.0, < 2.0)
23
39
  rspec-support (~> 3.12.0)
24
- rspec-mocks (3.12.3)
40
+ rspec-mocks (3.12.5)
25
41
  diff-lcs (>= 1.2.0, < 2.0)
26
42
  rspec-support (~> 3.12.0)
27
- rspec-support (3.12.0)
43
+ rspec-support (3.12.1)
44
+ rubocop (1.54.1)
45
+ json (~> 2.3)
46
+ language_server-protocol (>= 3.17.0)
47
+ parallel (~> 1.10)
48
+ parser (>= 3.2.2.3)
49
+ rainbow (>= 2.2.2, < 4.0)
50
+ regexp_parser (>= 1.8, < 3.0)
51
+ rexml (>= 3.2.5, < 4.0)
52
+ rubocop-ast (>= 1.28.0, < 2.0)
53
+ ruby-progressbar (~> 1.7)
54
+ unicode-display_width (>= 2.4.0, < 3.0)
55
+ rubocop-ast (1.29.0)
56
+ parser (>= 3.2.1.0)
57
+ ruby-progressbar (1.13.0)
58
+ unicode-display_width (2.4.2)
28
59
 
29
60
  PLATFORMS
30
- x64-mingw-ucrt
31
61
  x64-mingw32
62
+ x64-unknown
63
+ x86_64-darwin
64
+ x86_64-darwin-21
65
+ x86_64-linux
32
66
 
33
67
  DEPENDENCIES
68
+ nokogiri
34
69
  pkm_level2_converter!
70
+ pry
35
71
  rake (~> 13.0)
36
- rspec (~> 3.2)
72
+ rspec
73
+ rubocop
37
74
 
38
75
  BUNDLED WITH
39
- 2.2.20
76
+ 2.4.16
data/LICENSE.txt CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2021 Francis Doege
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 Francis Doege
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1,27 +1,27 @@
1
- # PkmLevel2Converter
2
-
3
- ## Installation
4
-
5
- Install it yourself as:
6
- ```bash
7
- $ gem install pkm_level2_converter
8
- ```
9
-
10
- ## Usage
11
- ```bash
12
- $ pkmlevel2 DLKM_1234_G210801_0000_E1_1_1.3_SuperVU.xml
13
- ```
14
-
15
- ## Development
16
-
17
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
18
-
19
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
20
-
21
- ## Contributing
22
-
23
- Bug reports and pull requests are welcome on GitHub at https://github.com/justusjonas74/pkm_level2_converter.
24
-
25
- ## License
26
-
27
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
1
+ # PkmLevel2Converter
2
+
3
+ ## Installation
4
+
5
+ Install it yourself as:
6
+ ```bash
7
+ $ gem install pkm_level2_converter
8
+ ```
9
+
10
+ ## Usage
11
+ ```bash
12
+ $ pkmlevel2 DLKM_1234_G210801_0000_E1_1_1.3_SuperVU.xml
13
+ ```
14
+
15
+ ## Development
16
+
17
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
18
+
19
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
20
+
21
+ ## Contributing
22
+
23
+ Bug reports and pull requests are welcome on GitHub at https://github.com/justusjonas74/pkm_level2_converter.
24
+
25
+ ## License
26
+
27
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile CHANGED
@@ -1,8 +1,8 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "rspec/core/rake_task"
5
-
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- task default: :spec
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
data/bin/console CHANGED
@@ -1,15 +1,15 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "bundler/setup"
5
- require "pkm_level2_converter"
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require "irb"
15
- IRB.start(__FILE__)
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'bundler/setup'
5
+ require 'pkm_level2_converter'
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require 'irb'
15
+ IRB.start(__FILE__)
data/bin/setup CHANGED
@@ -1,8 +1,8 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/exe/pkmlevel2 CHANGED
@@ -1,22 +1,21 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'pkm_level2_converter'
4
-
5
- if ARGV.first
6
- orig_file_name = ARGV.first
7
- converter = PkmLevel2Converter::Converter.new(orig_file_name)
8
- converter.convert_pkm()
9
- else
10
- arr_of_local_xml = Dir["*.xml"]
11
- if arr_of_local_xml.empty?
12
- puts "Error: No .xml file found."
13
- puts "Usage \"pkmlevel2 filename.xml\""
14
- else
15
- arr_of_local_xml.each do |xml_file|
16
- converter = PkmLevel2Converter::Converter.new(orig_file_name)
17
- converter.convert_pkm()
18
- end
19
- end
20
- puts "Press ENTER to close."
21
- gets
22
- end
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'pkm_level2_converter'
5
+
6
+ if ARGV.first
7
+ PkmLevel2Converter::PKMXml.new(ARGV.first).save_as_level2
8
+
9
+ else
10
+ arr_of_local_xml = Dir['*.xml']
11
+ if arr_of_local_xml.empty?
12
+ puts 'Error: No .xml file found.'
13
+ puts 'Usage "pkmlevel2 filename.xml"'
14
+ else
15
+ arr_of_local_xml.each do |xml_file|
16
+ PkmLevel2Converter::PKMXml.new(xml_file).save_as_level2
17
+ end
18
+ end
19
+ puts 'Press ENTER to close.'
20
+ gets
21
+ end