genebrand 0.1.1 → 0.2.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.
- checksums.yaml +4 -4
- data/Rakefile +16 -8
- data/exe/genebrand +0 -12
- data/genebrand.gemspec +3 -2
- data/lib/data/pos100k.json +1 -0
- data/lib/data/pos10k.json +1 -0
- data/lib/data/posinfo.json +1 -1
- data/lib/genebrand/commands/new.rb +10 -2
- data/lib/genebrand/generator.rb +2 -2
- data/lib/genebrand/posparser.rb +80 -4
- data/lib/genebrand/version.rb +1 -1
- metadata +4 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df886dded27853f7233c3e615615ae61b24b4409
|
4
|
+
data.tar.gz: d27b850978b442777f453213b6e9126982d4d001
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8751baa6020403a0dfc32677ed3d913f58befc55589989018880265ee307917084a4ae9d42fcca3226596ccdeac15d2bc8d0e755fdea638311232055d9be230b
|
7
|
+
data.tar.gz: 211b885c81cfbeaabaa7a85bc326d1d256f412ab7a751b96c55723e1e4c8ac332e1dd24bc93b9856a96e5b22265e2e399e66ad86d67802c6be66281d6529e428
|
data/Rakefile
CHANGED
@@ -1,11 +1,6 @@
|
|
1
1
|
require 'bundler/gem_tasks'
|
2
|
-
require 'rspec/core/rake_task'
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
task default: :spec
|
7
|
-
|
8
|
-
task :buildgem do
|
3
|
+
task :default do
|
9
4
|
require './lib/genebrand/version'
|
10
5
|
|
11
6
|
`gem uninstall genebrand -x`
|
@@ -14,9 +9,22 @@ task :buildgem do
|
|
14
9
|
`gem install ./genebrand-#{Genebrand::VERSION}.gem`
|
15
10
|
end
|
16
11
|
|
17
|
-
task :
|
12
|
+
task :preseed do
|
18
13
|
require './lib/genebrand/posparser.rb'
|
14
|
+
parser = Genebrand::PosParser.new
|
15
|
+
parser.parseandsave_preseed('seed/pos.txt', 'seed/preseed.txt')
|
16
|
+
end
|
19
17
|
|
18
|
+
task :seed do
|
19
|
+
require './lib/genebrand/posparser.rb'
|
20
|
+
puts "May (and will) take a while"
|
21
|
+
puts "Parsing all data"
|
20
22
|
parser = Genebrand::PosParser.new
|
21
|
-
parser.parseandsave('lib/data/
|
23
|
+
parser.parseandsave('seed/preseed.txt', 'lib/data/posinfo.json')
|
24
|
+
|
25
|
+
puts "Parsing with top 100k"
|
26
|
+
parser.parseandsave_top('seed/preseed.txt', 'seed/100k.txt', 'lib/data/pos100k.json')
|
27
|
+
|
28
|
+
puts "Parsing with top 10k"
|
29
|
+
parser.parseandsave_top('seed/preseed.txt', 'seed/10k.txt', 'lib/data/pos10k.json')
|
22
30
|
end
|
data/exe/genebrand
CHANGED
@@ -13,17 +13,5 @@ Mercenary.program(:genebrand) do |p|
|
|
13
13
|
p.description 'Genebrand is a small brands generator'
|
14
14
|
p.syntax 'genebrand <subcommand> [options]'
|
15
15
|
|
16
|
-
p.action do |args, _options|
|
17
|
-
if args.empty?
|
18
|
-
Genebrand::Logger.error 'A subcommand is required. Use --help for more information'
|
19
|
-
abort
|
20
|
-
else
|
21
|
-
unless p.has_command?(args.first)
|
22
|
-
Genebrand::Logger.hint 'Invalid command. Use --help for more information'
|
23
|
-
abort
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
16
|
Genebrand::Command.subclasses.each { |c| c.load_command(p) }
|
29
17
|
end
|
data/genebrand.gemspec
CHANGED
@@ -22,17 +22,18 @@ Gem::Specification.new do |spec|
|
|
22
22
|
fail 'RubyGems 2.0 or newer is required to protect against public gem pushes.'
|
23
23
|
end
|
24
24
|
|
25
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|seed)/}) } - %w(.gitignore
|
25
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|seed)/}) } - %w(.gitignore)
|
26
26
|
spec.bindir = 'exe'
|
27
27
|
# spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
spec.executables = ['genebrand']
|
29
29
|
spec.require_paths = ['lib']
|
30
30
|
|
31
|
+
spec.required_ruby_version = '>= 1.9.3'
|
32
|
+
|
31
33
|
spec.add_runtime_dependency 'colorator', '~> 0.1'
|
32
34
|
spec.add_runtime_dependency 'mercenary', '~> 0.3'
|
33
35
|
spec.add_runtime_dependency 'highline', '~> 1.7'
|
34
36
|
|
35
37
|
spec.add_development_dependency 'bundler', '~> 1.10'
|
36
38
|
spec.add_development_dependency 'rake', '~> 10.0'
|
37
|
-
spec.add_development_dependency 'rspec', '~> 3.2'
|
38
39
|
end
|