ruby-cli 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +7 -0
  2. data/bin/ruby-cli +21 -0
  3. data/lib/ruby-cli.rb +21 -0
  4. metadata +66 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b1b4ed7e4db0adc58c63488809fc572679448731
4
+ data.tar.gz: 0491341f92f9f64711e8d41fc9159d57b018f2d9
5
+ SHA512:
6
+ metadata.gz: 7746bc3bb1b96ef885e01a954fa166e6421d573090b31dbfe2bfdfdc0f3ac3367bc32304feb4724aa96f2e9418b986bef92fc4508e8467739fab636795a8fc7e
7
+ data.tar.gz: b2e8c0e0dca44e86b9153ea49fadfd5fe3e34b4ee79c9ddf5c22468e54239037428aa15b652519fc2d2f88d255a2c19095cb68cc1bae6e378b4b5c6e30449443
data/bin/ruby-cli ADDED
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require "bundler/setup"
5
+ require 'commander/import'
6
+
7
+ program :name, "Ruby CLI"
8
+ program :version, '1.0.0'
9
+ program :description, 'A simple cli that does nothing'
10
+
11
+ command :extract do |c|
12
+ c.syntax = 'ruby-cli extract foo -bar=123'
13
+ c.description = 'Extract foo and bar'
14
+ c.option '--bar STRING', String, 'Option bar with a string'
15
+ c.action do |args, options|
16
+ options.default :bar => 'BAR'
17
+ puts 'Extracting..'
18
+ puts "Args: #{args}"
19
+ puts "Option Bar: #{options.bar}"
20
+ end
21
+ end
data/lib/ruby-cli.rb ADDED
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require "bundler/setup"
5
+ require 'commander/import'
6
+
7
+ program :name, "Ruby CLI"
8
+ program :version, '1.0.0'
9
+ program :description, 'A simple cli that does nothing'
10
+
11
+ command :extract do |c|
12
+ c.syntax = 'ruby-cli extract foo -bar=123'
13
+ c.description = 'Extract foo and bar'
14
+ c.option '--bar STRING', String, 'Option bar with a string'
15
+ c.action do |args, options|
16
+ options.default :bar => 'BAR'
17
+ puts 'Extracting..'
18
+ puts "Args: #{args}"
19
+ puts "Option Bar: #{options.bar}"
20
+ end
21
+ end
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruby-cli
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - zainal mustofa
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-07-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: commander
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '4.4'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 4.4.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '4.4'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 4.4.0
33
+ description: Our very very simple CLI
34
+ email: zainalmustof@gmail.com
35
+ executables:
36
+ - ruby-cli
37
+ extensions: []
38
+ extra_rdoc_files: []
39
+ files:
40
+ - bin/ruby-cli
41
+ - lib/ruby-cli.rb
42
+ homepage: http://rubygems.org/gems/robery-cli
43
+ licenses:
44
+ - MIT
45
+ metadata: {}
46
+ post_install_message:
47
+ rdoc_options: []
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ requirements: []
61
+ rubyforge_project:
62
+ rubygems_version: 2.4.8
63
+ signing_key:
64
+ specification_version: 4
65
+ summary: Our simple CLI
66
+ test_files: []