rspec_piccolo 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -5,3 +5,4 @@ gemspec
5
5
  gem "rspec", "~> 2.14.1"
6
6
  gem "activesupport", "~> 4.0.1"
7
7
  gem "simplecov", "~> 0.8.2"
8
+ gem "thor", "~> 0.18.1"
data/README.md CHANGED
@@ -21,7 +21,7 @@ You have to execute these commands in your project root directory.
21
21
 
22
22
  ### Case only class_name, class_place
23
23
  ~~~
24
- piccolo SomeClass some_class_place
24
+ piccolo execute SomeClass some_class_place
25
25
  ~~~
26
26
 
27
27
  Result, spec/some_class_place
@@ -37,7 +37,7 @@ end
37
37
 
38
38
  ### Case module_name + class_name, directory_name + class_place
39
39
  ~~~
40
- piccolo SomeModule::SomeClass some_directory/some_class_place
40
+ piccolo execute SomeModule::SomeClass some_directory/some_class_place
41
41
  ~~~
42
42
 
43
43
  Result, spec/some_directory/some_class_place
@@ -53,7 +53,7 @@ end
53
53
 
54
54
  ### Case class_name, class_place, method_names
55
55
  ~~~
56
- piccolo SomeClass some_class_place method1 method2
56
+ piccolo execute SomeClass some_class_place method1 method2
57
57
  ~~~
58
58
 
59
59
  Result, spec/some_class_place
@@ -181,7 +181,7 @@ rspec --init
181
181
 
182
182
  You generate concrete spec by piccolo.
183
183
  ~~~
184
- piccolo FizzBuzz fizz_buzz fizz_buzz
184
+ piccolo execute FizzBuzz fizz_buzz fizz_buzz
185
185
  ~~~
186
186
 
187
187
  Generated spec is ...
data/bin/piccolo CHANGED
@@ -1,7 +1,29 @@
1
1
  #!/usr/bin/env ruby
2
-
2
+ require 'rspec_piccolo/version'
3
3
  require 'rspec_piccolo'
4
- class_name = $*[0]
5
- class_path = $*[1]
6
- method_names = $*[2..-1] if $*.size > 2
7
- RSpecPiccolo::Core.new.generate class_name, class_path, method_names
4
+ require "thor"
5
+
6
+ module RSpecPiccolo
7
+ #= RSpecPiccolo CLI
8
+ class CLI < Thor
9
+ class_option :help, :type => :boolean, :aliases => '-h', :desc => 'help message.'
10
+ class_option :version, :type => :boolean, :desc => 'version'
11
+ default_task :execute
12
+
13
+ desc "execute", "show dialog with title, message"
14
+ def execute(*args)
15
+ class_name = args[0]
16
+ class_path = args[1]
17
+ method_names = args[2..-1] if args.size > 2
18
+
19
+ RSpecPiccolo::Core.new.generate class_name, class_path, method_names
20
+ end
21
+
22
+ desc "version", "version"
23
+ def version
24
+ p RSpecPiccolo::VERSION
25
+ end
26
+ end
27
+ end
28
+
29
+ RSpecPiccolo::CLI.start(ARGV)
@@ -1,3 +1,3 @@
1
- module RspecPiccolo
2
- VERSION = "0.0.1"
1
+ module RSpecPiccolo
2
+ VERSION = "0.0.2"
3
3
  end
@@ -5,7 +5,7 @@ require 'rspec_piccolo/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "rspec_piccolo"
8
- spec.version = RspecPiccolo::VERSION
8
+ spec.version = RSpecPiccolo::VERSION
9
9
  spec.authors = ["tbpgr"]
10
10
  spec.email = ["tbpgr@tbpgr.jp"]
11
11
  spec.description = %q{generate rspec spec_file with list_cases}
@@ -19,6 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_runtime_dependency "activesupport", "~> 4.0.1"
22
+ spec.add_runtime_dependency "thor", "~> 0.18.1"
22
23
 
23
24
  spec.add_development_dependency "bundler", "~> 1.3"
24
25
  spec.add_development_dependency "rake"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec_piccolo
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:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-23 00:00:00.000000000 Z
12
+ date: 2013-11-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &29224284 !ruby/object:Gem::Requirement
16
+ requirement: &28611324 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,21 @@ dependencies:
21
21
  version: 4.0.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *29224284
24
+ version_requirements: *28611324
25
+ - !ruby/object:Gem::Dependency
26
+ name: thor
27
+ requirement: &28611024 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: 0.18.1
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *28611024
25
36
  - !ruby/object:Gem::Dependency
26
37
  name: bundler
27
- requirement: &29223984 !ruby/object:Gem::Requirement
38
+ requirement: &28610748 !ruby/object:Gem::Requirement
28
39
  none: false
29
40
  requirements:
30
41
  - - ~>
@@ -32,10 +43,10 @@ dependencies:
32
43
  version: '1.3'
33
44
  type: :development
34
45
  prerelease: false
35
- version_requirements: *29223984
46
+ version_requirements: *28610748
36
47
  - !ruby/object:Gem::Dependency
37
48
  name: rake
38
- requirement: &29223756 !ruby/object:Gem::Requirement
49
+ requirement: &28610520 !ruby/object:Gem::Requirement
39
50
  none: false
40
51
  requirements:
41
52
  - - ! '>='
@@ -43,10 +54,10 @@ dependencies:
43
54
  version: '0'
44
55
  type: :development
45
56
  prerelease: false
46
- version_requirements: *29223756
57
+ version_requirements: *28610520
47
58
  - !ruby/object:Gem::Dependency
48
59
  name: rspec
49
- requirement: &29223432 !ruby/object:Gem::Requirement
60
+ requirement: &28610196 !ruby/object:Gem::Requirement
50
61
  none: false
51
62
  requirements:
52
63
  - - ~>
@@ -54,10 +65,10 @@ dependencies:
54
65
  version: 2.14.1
55
66
  type: :development
56
67
  prerelease: false
57
- version_requirements: *29223432
68
+ version_requirements: *28610196
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: simplecov
60
- requirement: &29223132 !ruby/object:Gem::Requirement
71
+ requirement: &28609896 !ruby/object:Gem::Requirement
61
72
  none: false
62
73
  requirements:
63
74
  - - ~>
@@ -65,7 +76,7 @@ dependencies:
65
76
  version: 0.8.2
66
77
  type: :development
67
78
  prerelease: false
68
- version_requirements: *29223132
79
+ version_requirements: *28609896
69
80
  description: generate rspec spec_file with list_cases
70
81
  email:
71
82
  - tbpgr@tbpgr.jp