ibo_ipsum 0.0.1 → 0.0.2

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
  !binary "U0hBMQ==":
3
- metadata.gz: e82c441be79e67ab811edeb121341ce38b26251b
4
- data.tar.gz: 364fb972568c5b61b67b3173762aa7652bacee11
3
+ metadata.gz: a2b9de6c28d751b85144c29a49e73c45b79b0f60
4
+ data.tar.gz: 9206ac5a070aec9828ad0e5accfc71a2ecd4dc96
5
5
  SHA512:
6
- metadata.gz: 8597416783c83db4c696f994158eb02cd4fd2eeb658145a43b1b2d69ae3a9758493cd679bbf08526e134f08d48ae1adc806c9f56057bf6d04a8f99add529d9c3
7
- data.tar.gz: 96e77f902cc2c134928e7b8d64490bd1aadcf6cb9e2bf9e4eafe9fb3eed3e70bf828a5d658427f2efc0c2cd136e024c230ba0387681a2d30696dbca26f47aeb2
6
+ metadata.gz: 50b7d76879b4111725415066594c4665628592091d0cb677f2cba56337ec0216923eaf253239da5f685b26c9fcc5cdce148461f2f814d5fa7e341c99f82ce7f5
7
+ data.tar.gz: 7ddf381a3a8811a184de71e37ddb15d6c5db18e621dcd1e322cca4195cbd4d3423b6bd4563c3966f5371eb01a29083cd8e01eb11e546c5950716330c386bdb07
data/bin/ibo CHANGED
@@ -2,22 +2,29 @@
2
2
  require 'ibo_ipsum'
3
3
  require 'optparse'
4
4
  require 'cgi'
5
+ require 'thor'
5
6
 
6
- def happy(text)
7
- puts CGI.unescapeHTML("\033[35m#{text}\033[0m")
8
- end
7
+ class IboCli < Thor
8
+ desc "ipsum SIZE", "Generate Ibo Ipsum"
9
+ def ipsum(size=10)
10
+ color IboIpsum::Ibo.new.ipsum(size)
11
+ end
9
12
 
10
- option_parser = OptionParser.new do |opts|
11
- opts.on('-i', '--ipsum [size]', 'Generate Ibo Ipsum') do |size|
12
- happy IboIpsum::Ibo.new.ipsum(size)
13
+ desc "cite", "Print random Ibo cite"
14
+ def cite
15
+ color IboIpsum::Ibo.new.cite
13
16
  end
14
17
 
15
- opts.separator ''
16
- opts.on('-v', '--version', 'Show current version') { puts "Ibo Ipsum #{IboIpsum::VERSION}" }
17
- opts.on_tail('-h', '--help', 'Display this screen') { puts opts.help }
18
- end
18
+ desc "version", "Show current version"
19
+ def version
20
+ puts "Ibo Ipsum #{IboIpsum::VERSION}"
21
+ end
19
22
 
20
- happy IboIpsum::Ibo.new.cite if ARGV.empty?
21
- option_parser.parse!
23
+ private
24
+
25
+ def color(text)
26
+ puts CGI.unescapeHTML("\033[35m#{text}\033[0m")
27
+ end
28
+ end
22
29
 
23
- exit
30
+ IboCli.start
data/ibo_ipsum.gemspec CHANGED
@@ -18,6 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
+ spec.add_dependency "thor", "~> 0.18.1"
21
22
  spec.add_development_dependency "bundler", "~> 1.5"
22
23
  spec.add_development_dependency "rake"
23
24
  spec.add_development_dependency "pry"
@@ -1,3 +1,3 @@
1
1
  module IboIpsum
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ibo_ipsum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Schaden
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-24 00:00:00.000000000 Z
11
+ date: 2014-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: thor
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 0.18.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 0.18.1
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement