rgitflow 0.2.0.pre.alpha.pre.20 → 0.2.0.pre.alpha.pre.21

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
- YjVjOTVkMmJhMTZlZDM1Y2VlY2I3MzNmODNkODA0MThiMzkyNWNlYQ==
4
+ NTI5OTVjNzgyZmUwMWI4N2IyYjFhZWY1Njg3YTMwYjNlYTBmODFmNw==
5
5
  data.tar.gz: !binary |-
6
- NGNjNDdhN2QyMzlmNTAyZTFjNmJjNTdkMjBlNjQzYWZmZDc5NzMzMw==
6
+ NzdiNjA5NjlhYTMxNTNhZDdiNDNlNjBiZTFkM2Q1NDdlZGQ2ODNkYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YjFmOTBmZWE5MmY2YzZlOTM4ZTQzYWY3OTRlOGY3OTMxMGIxMTE0MmUyOWI4
10
- ODI2NmI1ZTNjZmU0YTFiYTYxZDEzOTFlNDlkOTAzNDE3OTEwYzhkMzVhMTMy
11
- MmFkZTQ4MTAyYjU3MzA5MjVhMjg5NDY2MzllYjkxZGQzOGM3NTE=
9
+ YmE1NTM0Y2ZlNmE4OWExNWM0YTYyMDg3NTM3NjVkM2FiMGE2NmUxNzFjNWQ2
10
+ ZDM2YWE1ZGI3ZTIzOWIyNTY0NmQwYzJlMDJlODRjYWUzZWJhMGUzNWM2NDRh
11
+ MGQ1MmYwZWNhNWU3NjJiNjgzNWQ0N2U1MmM2NWY1OWU1NmVjNTU=
12
12
  data.tar.gz: !binary |-
13
- MjE1ZmZmZmMxZjMzMjg2ZTFiMjY2ODMyODBmODIzYTNmMmExYWEwZTk3NzM2
14
- YmViNzVjYWFmM2NiYmQ1MWY1MGE1OTY0ODdhY2JmZGVmZWViMzIxYWVjMjc3
15
- ODIyOWE2NjQ1N2MyZDQ3MTkyOThiZDU2YTAyYzUyOWE4ZmM2YmY=
13
+ ODQzNDQ0N2RiMzRjMzgzZmVmMjYyYTliMWVkZGFjYWQ0YmFhNzU4MmFmMjZl
14
+ NmQ0OGFkMGY0YjZhYmQ1NzM0NDQzZWRkMjk2M2QxYTE5MjA5MjE3OTBlOGQy
15
+ MTlhZWE1MTliNDE0NDBkYTdmMWIzZDhjZTkyOWQxNmFhMTFlMGU=
data/exe/rgitflow CHANGED
@@ -1,46 +1,59 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'thor'
3
- require 'rake'
4
3
  require 'rgitflow'
5
4
 
6
5
  module RGitFlowCLI
7
6
  class Feature < Thor
7
+ include ::RGitFlow::Console
8
+
8
9
  desc 'start <name>', 'starts a feature branch named <name>'
9
10
  def start(name)
10
- exec "bundle exec rake rgitflow:feature:start BRANCH=#{name}"
11
+ run 'bundle', 'exec', 'rake', 'rgitflow:feature:start', "BRANCH=#{name}"
11
12
  end
12
13
 
13
14
  desc 'finish', 'finishes a feature branch'
14
15
  def finish
15
- exec "bundle exec rake rgitflow:feature:finish"
16
+ run 'bundle', 'exec', 'rake', 'rgitflow:feature:finish'
16
17
  end
17
18
  end
18
19
 
19
20
  class Release < Thor
20
- desc 'start <name>', 'starts a release branch named <name>'
21
- def start(name)
22
- exec "bundle exec rake rgitflow:release:start BRANCH=#{name}"
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
26
+ run 'bundle', 'exec', 'rake', 'rgitflow:release:start'
23
27
  end
24
28
 
25
29
  desc 'finish', 'finishes a release branch'
26
30
  def finish
27
- exec "bundle exec rake rgitflow:release:finish"
31
+ run 'bundle', 'exec', 'rake', 'rgitflow:release:finish'
28
32
  end
29
33
  end
30
34
 
31
35
  class Hotfix < Thor
36
+ include ::RGitFlow::Console
37
+
32
38
  desc 'start <name>', 'starts a hotfix branch named <name>'
33
39
  def start(name)
34
- exec "bundle exec rake rgitflow:hotfix:start BRANCH=#{name}"
40
+ run 'bundle', 'exec', 'rake', 'rgitflow:hotfix:start', "BRANCH=#{name}"
35
41
  end
36
42
 
37
43
  desc 'finish', 'finishes a hotfix branch'
38
44
  def finish
39
- exec "bundle exec rake rgitflow:hotfix:finish"
45
+ run 'bundle', 'exec', 'rake', 'rgitflow:hotfix:finish'
40
46
  end
41
47
  end
42
48
 
43
49
  class RGitFlow < Thor
50
+ include ::RGitFlow::Console
51
+
52
+ desc 'status', 'prints out information about which files have changed'
53
+ def status
54
+ run 'bundle', 'exec', 'rake', 'rgitflow:scm:status'
55
+ end
56
+
44
57
  desc 'feature SUBCOMMAND ...ARGS', 'start or finish a feature branch'
45
58
  subcommand 'feature', Feature
46
59
 
@@ -3,6 +3,7 @@ def __p(path) File.join(RGitFlow::ROOT, 'rgitflow', *path.split('/')); end
3
3
 
4
4
  module RGitFlow
5
5
  autoload :Config, __p('config')
6
- autoload :Printing, __p('printing')
6
+ autoload :Console, __p('console')
7
7
  autoload :Install, __p('install')
8
+ autoload :Printing, __p('printing')
8
9
  end
@@ -0,0 +1,39 @@
1
+ require 'rake'
2
+
3
+ module RGitFlow
4
+ module Console
5
+
6
+ protected
7
+
8
+ def run(command, *arguments)
9
+ show_command = [command, *arguments].join ' '
10
+
11
+ if respond_to? 'debug'
12
+ debug show_command
13
+ end
14
+
15
+ unless system(command, *arguments)
16
+ if respond_to? 'error'
17
+ error "Command failed: #{show_command}"
18
+ end
19
+ abort
20
+ end
21
+
22
+ nil
23
+ end
24
+
25
+ def invoke(name)
26
+ Rake.application[name].reenable
27
+ Rake.application[name].invoke
28
+ end
29
+
30
+ def task?(name)
31
+ Rake::Task.task_defined? name
32
+ end
33
+
34
+ def multi_task(prefix, names)
35
+ task prefix => names.map { |name| "#{prefix}:#{name}" }
36
+ end
37
+
38
+ end
39
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rgitflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.pre.alpha.pre.20
4
+ version: 0.2.0.pre.alpha.pre.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Harrah
@@ -149,6 +149,7 @@ files:
149
149
  - lib/rgitflow.rb
150
150
  - lib/rgitflow/autoload.rb
151
151
  - lib/rgitflow/config.rb
152
+ - lib/rgitflow/console.rb
152
153
  - lib/rgitflow/core_ext/object.rb
153
154
  - lib/rgitflow/core_ext/symbol_hash.rb
154
155
  - lib/rgitflow/git_ext/base.rb