tg_cli 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@ module TechnoGate
2
2
  module TgCli
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 1
5
+ TINY = 2
6
6
  PRE = ''
7
7
 
8
8
  def self.version
@@ -1,15 +1,17 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Base do
3
+ module TgCli
4
+ describe Base do
4
5
 
5
- subject { Base }
6
+ subject { Base }
6
7
 
7
- context "extracting a name from a usage string" do
8
- it "should extract properly" do
9
- subject.send(:extract_name_from_usage, "init").should == "init"
10
- subject.send(:extract_name_from_usage, "init [foo] [bar]").should == "init"
11
- subject.send(:extract_name_from_usage, "init <foo> [bar]").should == "init"
12
- subject.send(:extract_name_from_usage, "ssh-config").should == "ssh-config"
8
+ context "extracting a name from a usage string" do
9
+ it "should extract properly" do
10
+ subject.send(:extract_name_from_usage, "init").should == "init"
11
+ subject.send(:extract_name_from_usage, "init [foo] [bar]").should == "init"
12
+ subject.send(:extract_name_from_usage, "init <foo> [bar]").should == "init"
13
+ subject.send(:extract_name_from_usage, "ssh-config").should == "ssh-config"
14
+ end
13
15
  end
14
16
  end
15
17
  end
@@ -1,6 +1,8 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe GroupBase do
3
+ module TgCli
4
+ describe GroupBase do
4
5
 
5
- subject { GroupBase }
6
+ subject { GroupBase }
7
+ end
6
8
  end
@@ -1,35 +1,37 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Main do
4
- subject { Main }
3
+ module TgCli
4
+ describe Main do
5
+ subject { Main }
5
6
 
6
- context "#registering" do
7
- it {should respond_to :register }
7
+ context "#registering" do
8
+ it {should respond_to :register }
8
9
 
9
- it "should register a base command as a single invokable" do
10
- base = Class.new(Base)
11
- name = "__test_registering_single_subcommand"
12
- subject.register(base, name, name, "A description")
13
- expect { subject.tasks[name] }.should_not raise_error
14
- end
10
+ it "should register a base command as a single invokable" do
11
+ base = Class.new(Base)
12
+ name = "__test_registering_single_subcommand"
13
+ subject.register(base, name, name, "A description")
14
+ expect { subject.tasks[name] }.should_not raise_error
15
+ end
15
16
 
16
- it "should register a group base as a subcommand" do
17
- base = Class.new(GroupBase)
18
- name = "_test_registering_single_group"
19
- subject.register(base, name, name, "A description")
20
- subject.subcommands.should include(name)
21
- end
17
+ it "should register a group base as a subcommand" do
18
+ base = Class.new(GroupBase)
19
+ name = "_test_registering_single_group"
20
+ subject.register(base, name, name, "A description")
21
+ subject.subcommands.should include(name)
22
+ end
22
23
 
23
- it "should alias methods if the alias option is given" do
24
- base = Class.new(Base) do
25
- def execute
26
- true
24
+ it "should alias methods if the alias option is given" do
25
+ base = Class.new(Base) do
26
+ def execute
27
+ true
28
+ end
27
29
  end
28
- end
29
30
 
30
- name = "__test_registering_with_alias"
31
- subject.register(base, name, name, "A description", :alias => "--ALIAS")
32
- subject.start(["--ALIAS"]).should be_true
31
+ name = "__test_registering_with_alias"
32
+ subject.register(base, name, name, "A description", :alias => "--ALIAS")
33
+ subject.start(["--ALIAS"]).should be_true
34
+ end
33
35
  end
34
36
  end
35
37
  end
data/spec/spec_helper.rb CHANGED
@@ -4,7 +4,6 @@ require 'rspec'
4
4
  require 'tg_cli'
5
5
 
6
6
  include TechnoGate
7
- include TgCli
8
7
 
9
8
  RSpec.configure do |config|
10
9
  def config.escaped_path(*parts)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tg_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-11-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
- requirement: &16114980 !ruby/object:Gem::Requirement
16
+ requirement: &6153820 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *16114980
24
+ version_requirements: *6153820
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: thor
27
- requirement: &16502820 !ruby/object:Gem::Requirement
27
+ requirement: &6153100 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.14.6
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *16502820
35
+ version_requirements: *6153100
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: guard
38
- requirement: &16589840 !ruby/object:Gem::Requirement
38
+ requirement: &6151320 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.8.4
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *16589840
46
+ version_requirements: *6151320
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: guard-bundler
49
- requirement: &16587560 !ruby/object:Gem::Requirement
49
+ requirement: &6150840 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 0.1.3
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *16587560
57
+ version_requirements: *6150840
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: guard-rspec
60
- requirement: &16585400 !ruby/object:Gem::Requirement
60
+ requirement: &6150340 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 0.4.5
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *16585400
68
+ version_requirements: *6150340
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: yard
71
- requirement: &16672740 !ruby/object:Gem::Requirement
71
+ requirement: &6149500 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 0.7.2
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *16672740
79
+ version_requirements: *6149500
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rspec
82
- requirement: &16672140 !ruby/object:Gem::Requirement
82
+ requirement: &6129500 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 2.6.0
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *16672140
90
+ version_requirements: *6129500
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: mocha
93
- requirement: &16671620 !ruby/object:Gem::Requirement
93
+ requirement: &6109560 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 0.10.0
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *16671620
101
+ version_requirements: *6109560
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: pry
104
- requirement: &16670940 !ruby/object:Gem::Requirement
104
+ requirement: &6108700 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,7 +109,7 @@ dependencies:
109
109
  version: 0.9.6.2
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *16670940
112
+ version_requirements: *6108700
113
113
  description: Helpers around Thor extracted from the Vagrant gem.
114
114
  email:
115
115
  - wael.nasreddine@gmail.com
@@ -146,18 +146,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
146
146
  - - ! '>='
147
147
  - !ruby/object:Gem::Version
148
148
  version: '0'
149
- segments:
150
- - 0
151
- hash: 4598389211369895346
152
149
  required_rubygems_version: !ruby/object:Gem::Requirement
153
150
  none: false
154
151
  requirements:
155
152
  - - ! '>='
156
153
  - !ruby/object:Gem::Version
157
154
  version: '0'
158
- segments:
159
- - 0
160
- hash: 4598389211369895346
161
155
  requirements: []
162
156
  rubyforge_project:
163
157
  rubygems_version: 1.8.11
@@ -169,4 +163,3 @@ test_files:
169
163
  - spec/lib/tg_cli/group_base_spec.rb
170
164
  - spec/lib/tg_cli/main_spec.rb
171
165
  - spec/spec_helper.rb
172
- has_rdoc: