rgitflow 0.2.1.pre.alpha.pre.28 → 0.2.1.pre.alpha.pre.32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjkwNWNhODE3YjFkZDlhZTQ1OGZjMTcyZGE3MTMyOWNmNzk5YWE2Mg==
4
+ ZTJkOGFiZjVhNmM1ODE4ZWYxNzY1MjkxYTM3ZTM1NWQ2YmExZjhiNQ==
5
5
  data.tar.gz: !binary |-
6
- NmJjMmQ2NWYwYTE1OWYwMzQ3MmIwMGMzZTg0MzNjNGJkYjAzNTEyNA==
6
+ NDc3NjQxYzJjNDAyYjg3MjBmYjdmNGJlNzAzZmQzMDUyMGRkOGM2MQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- N2ZlMDc2NjAzYzhmOWZjMjY4YTI5OTViOTM1ZmNhMjhlMzZkNjk4Y2U0Mjcw
10
- N2MyYTFkNzk2MjQxMDg5NWE5YWYyMzE4N2VmZmNhOGI5NzdlY2FlYTExOTli
11
- MjY2NTUzOTFlMjE3NmMwODAzYzkyOGE0MDhjMDZkMWYwMGZlN2E=
9
+ NzNmNzlmODFjNTFhOGQ3OTNmOGZlZjUyNDg0NWM2ODEwNTc2NzRiNjFhMzVl
10
+ ZjY2ZDg4ZWRhY2M3ZTcyYTc5ZDk0OTJkZDNiYWM5ZDBlZjNmNjZkZDE5Yzlj
11
+ ODA2ZmJiMDAwYjVmZjU0MWRmZTA0ZWQyZDE0ZmU2ZDYzNWIxYmQ=
12
12
  data.tar.gz: !binary |-
13
- NjQyYmI5MTNlY2I5Nzg4MDAyOTVmY2E4OGM2ZmI5Y2YxOTFkNDBjY2M4Y2E2
14
- NDMwM2QzY2VjZTc4YWY0NTgwYTYxNWNlYTc2NjY4OGEzZDNkNzIzNTEyMGZk
15
- NTY5MzcwNDk4Yjg3MTBmMmNhYjQ2NmJiOTRhY2NmYTVkNDdlND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ieg04cz150/Vt8FRX+uqiJz+SpDiNUcCJcBK61SjVl60b0DehvBP5P/q9bh8DOR2cOBym+MU2SymySp3XCnVvyOPjpp6GV8AqOT3+pAFqSrClmQuNo8v/ikoqogPzrEKrA3XN0x8qLbD3PKbOjEwMgktupTeDqFPWrsH9lawWi3eQn0unWXhzRt51gNxKMLK0xnO3EMSyILVmaT/h5DnMC6UxtWdf5y+MxVU0skR3TgCn4CpoLbd2LJSV+6JYBLO9YfIPHbtQ/aq/VmflGE/oovavthJxEyuCnGeRr7We9B109NsWE4yMTYR/S4U51X4ssNOIoJLkJK2T6ucVGgx30K79u8Zylg5WW3e4sNEgm6cRv9496e1byQYkZ9qQRrqmH1eR8Wnvyrf0cneWJYKcOtknrEZxpcs3X69fca4oL7M2WJeXPVWKyg9oBcPajkQuiiCRo9IR9CkwthIK2GNFkcW8Yn418KR7m381YrFhG7E7ifO8HsX1a/RpzjGYxXm1jxgnU3+4T615EEiKQtzTfBn154QpG7YGXYNTB7cii9EXOzHZA9Hu4g+iuylkXAvveqWQ=
12
12
  gem: rgitflow
13
13
  on:
14
- all_branches: true
14
+ tags: true
15
15
  repo: Nunnery/rgitflow
data/README.md CHANGED
@@ -29,12 +29,19 @@ TODO: Write usage instructions here
29
29
 
30
30
  ## Development
31
31
 
32
- TODO: Write development instructions here
32
+ After checking out the repo, run `bin/setup` to install dependencies and
33
+ regenerate the binstubs as necessary.
33
34
 
34
35
  ## Contributing
35
36
 
36
- Bug reports and pull requests are welcome on GitHub at https://github.com/Nunnery/rgitflow. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
37
+ Bug reports and pull requests are welcome on [GitHub].
38
+ This project is intended to be a safe, welcoming space for collaboration, and
39
+ contributors are expected to adhere to the [Code of Conduct].
37
40
 
38
41
  ## License
39
42
 
40
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
43
+ The gem is available as open source under the terms of the [MIT License].
44
+
45
+ [GitHub]: https://github.com/Nunnery/rgitflow
46
+ [Code of Conduct]: http://contributor-covenant.org
47
+ [MIT License]: http://opensource.org/licenses/MIT
data/Rakefile CHANGED
@@ -26,6 +26,13 @@ RSpec::Core::RakeTask.new
26
26
  task :test => [:spec]
27
27
  task :default => [:spec]
28
28
 
29
+ desc 'Removes the tmp and pkg directories'
30
+ task :clean do
31
+ pwd = Dir.pwd.to_s
32
+ FileUtils.rm_rf Dir["#{pwd}/tmp"]
33
+ FileUtils.rm_rf Dir["#{pwd}/pkg"]
34
+ end
35
+
29
36
  require 'yard'
30
37
  YARD::Rake::YardocTask.new
31
38
  task :doc => [:yard]
data/bin/setup CHANGED
@@ -2,4 +2,5 @@
2
2
  set -euo pipefail
3
3
  IFS=$'\n\t'
4
4
 
5
- bundle install
5
+ bundle install
6
+ gem regenerate_binstubs
data/exe/rgitflow CHANGED
@@ -1,68 +1,76 @@
1
1
  #!/usr/bin/env ruby
2
- require 'thor'
3
2
  require 'rgitflow'
3
+ require 'rgitflow/cli'
4
+ require 'rubygems'
5
+ require 'commander/import'
4
6
 
5
- module RGitFlowCLI
6
- class Feature < Thor
7
- include ::RGitFlow::Console
7
+ program :version, RGitFlow::VERSION.to_s
8
+ program :description, 'Executable wrapper for RGitFlow rake tasks.'
8
9
 
9
- desc 'start <name>', 'starts a feature branch named <name>'
10
- def start(name)
11
- run 'bundle', 'exec', 'rake', 'rgitflow:feature:start', "BRANCH=#{name}"
12
- end
13
-
14
- desc 'finish', 'finishes a feature branch'
15
- def finish(name)
16
- run 'bundle', 'exec', 'rake', 'rgitflow:feature:finish', "BRANCH=#{name}"
17
- end
10
+ command :'release start' do |c|
11
+ c.syntax = 'rgitflow release start'
12
+ c.description = 'Starts a release branch'
13
+ c.action do |args, options|
14
+ RGitFlow::CLI.commandline ['bundle', 'exec', 'rake',
15
+ 'rgitflow:release:start'].join(' ')
18
16
  end
17
+ end
19
18
 
20
- class Release < Thor
21
- include ::RGitFlow::Console
22
-
23
- desc 'start', %Q(starts a release branch named
24
- #{RGitFlow::Config.options[:release]}/#{RGitFlow::VERSION.to_s})
25
- def start(name)
26
- run 'bundle', 'exec', 'rake', 'rgitflow:release:start', "BRANCH=#{name}"
27
- end
28
-
29
- desc 'finish', 'finishes a release branch'
30
- def finish(name)
31
- run 'bundle', 'exec', 'rake', 'rgitflow:release:finish', "BRANCH=#{name}"
32
- end
19
+ command :'release finish' do |c|
20
+ c.syntax = 'rgitflow release finish'
21
+ c.description = 'Finishes a release branch'
22
+ c.action do |args, options|
23
+ RGitFlow::CLI.commandline ['bundle', 'exec', 'rake',
24
+ 'rgitflow:release:finish'].join(' ')
33
25
  end
26
+ end
34
27
 
35
- class Hotfix < Thor
36
- include ::RGitFlow::Console
37
-
38
- desc 'start <name>', 'starts a hotfix branch named <name>'
39
- def start(name)
40
- run 'bundle', 'exec', 'rake', 'rgitflow:hotfix:start', "BRANCH=#{name}"
41
- end
42
-
43
- desc 'finish', 'finishes a hotfix branch'
44
- def finish(name)
45
- run 'bundle', 'exec', 'rake', 'rgitflow:hotfix:finish', "BRANCH=#{name}"
28
+ command :'hotfix start' do |c|
29
+ c.syntax = 'rgitflow hotfix start'
30
+ c.description = 'Starts a hotfix branch'
31
+ c.action do |args, options|
32
+ if args.length == 0
33
+ RGitFlow::CLI.commandline ['bundle', 'exec', 'rake',
34
+ 'rgitflow:hotfix:start'].join(' ')
35
+ else
36
+ RGitFlow::CLI.commandline ['bundle', 'exec', 'rake',
37
+ 'rgitflow:hotfix:start',
38
+ "BRANCH=#{args[0]}"].join(' ')
46
39
  end
47
40
  end
41
+ end
48
42
 
49
- class RGitFlow < Thor
50
- include ::RGitFlow::Console
43
+ command :'hotfix finish' do |c|
44
+ c.syntax = 'rgitflow hotfix finish'
45
+ c.description = 'Finishes a hotfix branch'
46
+ c.action do |args, options|
47
+ RGitFlow::CLI.commandline ['bundle', 'exec', 'rake',
48
+ 'rgitflow:hotfix:finish'].join(' ')
49
+ end
50
+ end
51
51
 
52
- desc 'status', 'prints out information about which files have changed'
53
- def status
54
- run 'bundle', 'exec', 'rake', 'rgitflow:scm:status'
52
+ command :'feature start' do |c|
53
+ c.syntax = 'rgitflow feature start'
54
+ c.description = 'Starts a feature branch'
55
+ c.action do |args, options|
56
+ if args.length == 0
57
+ RGitFlow::CLI.commandline ['bundle', 'exec', 'rake',
58
+ 'rgitflow:feature:start'].join(' ')
59
+ else
60
+ RGitFlow::CLI.commandline ['bundle', 'exec', 'rake',
61
+ 'rgitflow:feature:start',
62
+ "BRANCH=#{args[0]}"].join(' ')
55
63
  end
64
+ end
65
+ end
56
66
 
57
- desc 'feature SUBCOMMAND ...ARGS', 'start or finish a feature branch'
58
- subcommand 'feature', Feature
59
-
60
- desc 'release SUBCOMMAND ...ARGS', 'start or finish a release branch'
61
- subcommand 'release', Release
62
-
63
- desc 'hotfix SUBCOMMAND ...ARGS', 'start or finish a hotfix branch'
64
- subcommand 'hotfix', Hotfix
67
+ command :'feature finish' do |c|
68
+ c.syntax = 'rgitflow feature finish'
69
+ c.description = 'Finishes a feature branch'
70
+ c.action do |args, options|
71
+ RGitFlow::CLI.commandline ['bundle', 'exec', 'rake',
72
+ 'rgitflow:feature:finish'].join(' ')
65
73
  end
66
74
  end
67
75
 
68
- RGitFlowCLI::RGitFlow.start ARGV
76
+ default_command :help
@@ -0,0 +1,19 @@
1
+ require 'rgitflow/console'
2
+ require 'rgitflow/printing'
3
+
4
+ module RGitFlow
5
+ class CLI
6
+ include ::RGitFlow::Printing
7
+ include ::RGitFlow::Console
8
+
9
+ def cli(command)
10
+ execute command
11
+ end
12
+
13
+ class << self
14
+ def commandline(command)
15
+ new.cli command
16
+ end
17
+ end
18
+ end
19
+ end
@@ -5,16 +5,14 @@ module RGitFlow
5
5
 
6
6
  protected
7
7
 
8
- def run(command, *arguments)
9
- show_command = [command, *arguments].join ' '
10
-
8
+ def execute(command)
11
9
  if respond_to? 'debug'
12
- debug show_command
10
+ debug command.to_s
13
11
  end
14
12
 
15
- unless system(command, *arguments)
13
+ unless system(command.to_s)
16
14
  if respond_to? 'error'
17
- error "Command failed: #{show_command}"
15
+ error "Command failed: #{command.to_s}"
18
16
  end
19
17
  abort
20
18
  end
data/rgitflow.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.extra_rdoc_files = `git ls-files -z`.split("\x0").select { |f| f.match(/(.+).(txt|rdoc)/) }
23
23
 
24
24
  spec.add_dependency 'rake', '~> 10.0'
25
- spec.add_dependency 'thor', '~> 0.19'
25
+ spec.add_dependency 'commander', '~> 4.3'
26
26
  spec.add_dependency 'git', '~> 1.2'
27
27
  spec.add_dependency 'ansi', '~> 1.5'
28
28
 
@@ -30,4 +30,5 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency 'rspec', '~> 3.3'
31
31
  spec.add_development_dependency 'yard', '~> 0.8'
32
32
  spec.add_development_dependency 'codeclimate-test-reporter', '~> 0.4'
33
+ spec.add_development_dependency 'rubygems-bundler', '~> 1.4'
33
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rgitflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1.pre.alpha.pre.28
4
+ version: 0.2.1.pre.alpha.pre.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Harrah
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-27 00:00:00.000000000 Z
11
+ date: 2015-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -25,19 +25,19 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '10.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: thor
28
+ name: commander
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: '0.19'
33
+ version: '4.3'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
- version: '0.19'
40
+ version: '4.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: git
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - ~>
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0.4'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rubygems-bundler
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ~>
130
+ - !ruby/object:Gem::Version
131
+ version: '1.4'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ~>
137
+ - !ruby/object:Gem::Version
138
+ version: '1.4'
125
139
  description:
126
140
  email:
127
141
  - topplethenunnery@gmail.com
@@ -150,6 +164,7 @@ files:
150
164
  - exe/rgitflow
151
165
  - lib/rgitflow.rb
152
166
  - lib/rgitflow/autoload.rb
167
+ - lib/rgitflow/cli.rb
153
168
  - lib/rgitflow/config.rb
154
169
  - lib/rgitflow/console.rb
155
170
  - lib/rgitflow/core_ext/object.rb