gemo 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 5ed4cd0d3020c2b62b04796aa5a82b2919ecc4a1a8194be3dc708a487e9f0c4b
4
+ data.tar.gz: a34f7eaa140c475d7904df37b01a31c20cce2ce4bc77ea9ea448b53ad9b78ef6
5
+ SHA512:
6
+ metadata.gz: bbdef2acc98e9f3ef30c0b63da242ebc26bb1c7c10a38b0c0178888a1328b69e9e2c20297fb19cab988fb21f213c25331770ca2ce0181fd9b8dd8e571153488b
7
+ data.tar.gz: 5727d390e793636a24903a98b9d7740df8531e7b0c82fa9899a9ed68585a28cebc2b174455ab9ba7c125aa8814267aa61d6be3beb0a51f14131fc11857d55958
data/.gitignore ADDED
@@ -0,0 +1,68 @@
1
+ # files without extensions except directories
2
+ #*
3
+ #!/**/
4
+ #!?*.*
5
+
6
+ # directories (these will ignore .keep)
7
+ /.bundle/
8
+ /_yardoc/
9
+ /coverage/
10
+ /doc/
11
+ /pkg/
12
+ /spec/reports/
13
+ /vendor/
14
+ /node_modules/
15
+
16
+ # directory contents (these will not ignore .keep)
17
+ /cache/*
18
+ /tmp/*
19
+ /pid/*
20
+ /log/*
21
+ /public/*
22
+ /db/*
23
+
24
+ # files
25
+ *.dump
26
+ *.log
27
+ *.mod
28
+ *.o
29
+ *~
30
+ .*.swp
31
+ .DS_Store
32
+ .byebug
33
+ .idea
34
+ .project
35
+ .rake*
36
+ .rake*
37
+ .ruby-*
38
+ .rvmrc
39
+ .rubocop*
40
+ .secret
41
+ .yardoc
42
+ TODO.md
43
+ core.*
44
+ cscope.out
45
+ secrets.yml
46
+ .tags
47
+ NOTES*
48
+ MEETING*
49
+ *.jar
50
+
51
+ # don't ignore
52
+ !.gitignore
53
+ !.keep
54
+ !Capfile
55
+ !Cheffile
56
+ !Gemfile
57
+ ![MR]akefile
58
+ !bin/**/[^.]*
59
+ !exe/**/[^.]*
60
+
61
+ /.bundle/
62
+ /.yardoc
63
+ /_yardoc/
64
+ /coverage/
65
+ /doc/
66
+ /pkg/
67
+ /spec/reports/
68
+ /tmp/
data/CHANGELOG ADDED
@@ -0,0 +1,2 @@
1
+ 0.1.0 Oct 31 2021
2
+ - Initial release
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in gemo.gemspec
6
+ gemspec
7
+
8
+
data/LICENSE.txt ADDED
@@ -0,0 +1,8 @@
1
+
2
+ Copyright (c) 2021 Sergio Romero
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5
+
6
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # Gemo
2
+
3
+ Gemologist: An expert in gemology. A specialist in gems, specifically, one who appraises gems.
4
+
5
+ Gemology: The art and science of gems.
data/Rakefile ADDED
@@ -0,0 +1,15 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+ require 'rake/clean'
4
+
5
+ CLEAN.include ['**/.*.sw?', '**/*.gem', 'test/test.log']
6
+
7
+ task default: %i[test package]
8
+ task package: :clean
9
+
10
+ Rake::TestTask.new do |t|
11
+ t.libs << 'lib' << 'test'
12
+ t.test_files = FileList['test/**/*_test.rb']
13
+ t.warning = false
14
+ t.verbose = false
15
+ end
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "gemo"
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 ADDED
@@ -0,0 +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
data/exe/gemo ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
4
+
5
+ require "gemo"
data/gemo.gemspec ADDED
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/gemo/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "gemo"
7
+ spec.version = Gemo::VERSION
8
+ spec.authors = ["Sergio Romero"]
9
+ spec.email = ["yo@sergioro.com"]
10
+
11
+ spec.summary = "GUI for zBar"
12
+ spec.description = "GUI for zBar"
13
+ spec.homepage = "https://dev.bosqueapp.com"
14
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
15
+
16
+ #spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
17
+
18
+ #spec.metadata["homepage_uri"] = spec.homepage
19
+ #spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
20
+ #spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
21
+
22
+ # Specify which files should be added to the gem when it is released.
23
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
25
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
26
+ end
27
+ spec.bindir = "exe"
28
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
+ spec.require_paths = ["lib"]
30
+
31
+ # Uncomment to register a new dependency of your gem
32
+ # spec.add_dependency "example-gem", "~> 1.0"
33
+
34
+ # For more information and examples about making a new gem, checkout our
35
+ # guide at: https://bundler.io/guides/creating_gem.html
36
+
37
+ #spec.add_development_dependency "benchmark-ips", ">= 0"
38
+ spec.add_development_dependency "byebug", "~> 11.0.1"
39
+ spec.add_development_dependency "minitest", "~> 5.0"
40
+ spec.add_development_dependency "minitest-sprint"
41
+ spec.add_development_dependency "minitest-reporters"
42
+ spec.add_development_dependency "minitest-english"
43
+ spec.add_development_dependency "minitest-hooks"
44
+ spec.add_development_dependency "minitest-fail-fast"
45
+ spec.add_development_dependency "minitest-global_expectations"
46
+ spec.add_development_dependency "rake"
47
+ spec.add_development_dependency "ronn"
48
+ #spec.add_development_dependency "ruby-prof"
49
+
50
+ #spec.add_runtime_dependency "SOME_GEM", "~> VERSION"
51
+ end
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env -S ruby -W0
2
+
3
+ # stdlib
4
+ require 'ostruct'
5
+ require 'json'
6
+ require 'yaml'
7
+
8
+ # 3rd party
9
+ require 'active_support' # Prevent ActiveSupport::JSON error
10
+ require 'active_support/core_ext' # Load Hash.from_xml
11
+
12
+ class Hash
13
+ def to_openstruct
14
+ JSON.parse to_json, object_class: OpenStruct
15
+ end
16
+ end
17
+
18
+
19
+ h = Hash.from_xml(DATA.read)
20
+ obj = h.to_openstruct
21
+ pp obj.index.symbol.to_h
22
+ pp h.class
23
+
24
+ __END__
25
+ <index num='425'>
26
+ <symbol type='QR-Code' quality='1' orientation='UP'><data><![CDATA[https://bosqueapp.com/s/the-legend-of-zelda-skyward-sword---nintendo-wii#comment-157]]></data></symbol>
27
+ </index>
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gemo
4
+ VERSION = "0.1.0"
5
+ end
data/lib/gemo.rb ADDED
@@ -0,0 +1,44 @@
1
+ $LOAD_PATH.unshift __dir__
2
+
3
+ require "xyz/version"
4
+ require 'optparse'
5
+
6
+ module Gemo
7
+ class Error < StandardError; end
8
+
9
+ def self.run(args)
10
+ options = Options.parse(args)
11
+ end
12
+
13
+ class Options
14
+ def self.parse(args)
15
+ options = {}
16
+
17
+ OptionParser.new do |opts|
18
+ opts.program_name = File.basename(bash)
19
+ opts.banner = "Usage: #{opts.program_name} [options]"
20
+
21
+ opts.separator ""
22
+ opts.separator "Options:"
23
+
24
+ opts.on("-oNAME", "--output=NAME", "Specify output file name") do |v|
25
+ options[:output] = v
26
+ end
27
+
28
+ opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
29
+ options[:verbose] = v
30
+ end
31
+
32
+ opts.on_tail("-h", "--help", "Print help", "something else") do |v|
33
+ abort opts.to_s
34
+ end
35
+
36
+ opts.on_tail("-V", "--version", "Print version") do |v|
37
+ abort "#{opts.program_name} #{VERSION}"
38
+ end
39
+ end.parse!(args)
40
+
41
+ options
42
+ end
43
+ end
44
+ end
metadata ADDED
@@ -0,0 +1,196 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gemo
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Sergio Romero
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-10-31 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: byebug
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 11.0.1
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 11.0.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '5.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '5.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest-sprint
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: minitest-reporters
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: minitest-english
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: minitest-hooks
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: minitest-fail-fast
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: minitest-global_expectations
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rake
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: ronn
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ description: GUI for zBar
154
+ email:
155
+ - yo@sergioro.com
156
+ executables:
157
+ - gemo
158
+ extensions: []
159
+ extra_rdoc_files: []
160
+ files:
161
+ - ".gitignore"
162
+ - CHANGELOG
163
+ - Gemfile
164
+ - LICENSE.txt
165
+ - README.md
166
+ - Rakefile
167
+ - bin/console
168
+ - bin/setup
169
+ - exe/gemo
170
+ - gemo.gemspec
171
+ - lib/gemo.rb
172
+ - lib/gemo/scan_parser.rb
173
+ - lib/gemo/version.rb
174
+ homepage: https://dev.bosqueapp.com
175
+ licenses: []
176
+ metadata: {}
177
+ post_install_message:
178
+ rdoc_options: []
179
+ require_paths:
180
+ - lib
181
+ required_ruby_version: !ruby/object:Gem::Requirement
182
+ requirements:
183
+ - - ">="
184
+ - !ruby/object:Gem::Version
185
+ version: 2.4.0
186
+ required_rubygems_version: !ruby/object:Gem::Requirement
187
+ requirements:
188
+ - - ">="
189
+ - !ruby/object:Gem::Version
190
+ version: '0'
191
+ requirements: []
192
+ rubygems_version: 3.1.2
193
+ signing_key:
194
+ specification_version: 4
195
+ summary: GUI for zBar
196
+ test_files: []