stencil 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/gemspec.rb +1 -1
  2. data/lib/stencil/merge.rb +12 -9
  3. data/require.rb +1 -1
  4. metadata +6 -5
data/gemspec.rb CHANGED
@@ -14,5 +14,5 @@ GEM_SPEC = Gem::Specification.new do |s|
14
14
  s.name = GEM_NAME
15
15
  s.platform = Gem::Platform::RUBY
16
16
  s.require_path = "lib"
17
- s.version = "0.1.3"
17
+ s.version = "0.1.5"
18
18
  end
data/lib/stencil/merge.rb CHANGED
@@ -84,17 +84,20 @@ class Stencil
84
84
  def progressive(path, branches, push)
85
85
  merger = branches.shift
86
86
  mergee = branches.first
87
- if merger && mergee
88
- unless merger.empty? || mergee.empty?
89
- output = Cmd.run path, "git checkout #{mergee}"
90
- Msg.error(output) if output.downcase.include?('error')
91
- Msg.merging_x_into_y merger, mergee
92
- output = Cmd.run path, "git merge #{merger}"
93
- Msg.error(output) if output.downcase.include?('conflict')
94
- Cmd.run(path, "git push origin #{mergee}") if push
87
+ branches.each do |mergee|
88
+ if merger && mergee
89
+ ok = mergee[0..merger.length-1] == merger || merger == 'master'
90
+ unless merger.empty? || mergee.empty? || !ok
91
+ output = Cmd.run path, "git checkout #{mergee}"
92
+ Msg.error(output) if output.downcase.include?('error')
93
+ Msg.merging_x_into_y merger, mergee
94
+ output = Cmd.run path, "git merge #{merger}"
95
+ Msg.error(output) if output.downcase.include?('conflict')
96
+ Cmd.run(path, "git push origin #{mergee}") if push
97
+ end
95
98
  end
96
- progressive(path, branches, push)
97
99
  end
100
+ progressive(path, branches, push) unless branches.empty?
98
101
  end
99
102
  end
100
103
  end
data/require.rb CHANGED
@@ -13,7 +13,7 @@ Require do
13
13
  name 'stencil'
14
14
  homepage "http://github.com/winton/#{name}"
15
15
  summary "Project template manager"
16
- version '0.1.4'
16
+ version '0.1.5'
17
17
  end
18
18
 
19
19
  rakefile do
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stencil
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ prerelease:
5
+ version: 0.1.5
5
6
  platform: ruby
6
7
  authors:
7
8
  - Winton Welsh
@@ -9,7 +10,7 @@ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
12
 
12
- date: 2010-05-28 00:00:00 -07:00
13
+ date: 2011-08-18 00:00:00 -07:00
13
14
  default_executable:
14
15
  dependencies: []
15
16
 
@@ -46,21 +47,21 @@ rdoc_options: []
46
47
  require_paths:
47
48
  - lib
48
49
  required_ruby_version: !ruby/object:Gem::Requirement
50
+ none: false
49
51
  requirements:
50
52
  - - ">="
51
53
  - !ruby/object:Gem::Version
52
54
  version: "0"
53
- version:
54
55
  required_rubygems_version: !ruby/object:Gem::Requirement
56
+ none: false
55
57
  requirements:
56
58
  - - ">="
57
59
  - !ruby/object:Gem::Version
58
60
  version: "0"
59
- version:
60
61
  requirements: []
61
62
 
62
63
  rubyforge_project:
63
- rubygems_version: 1.3.5
64
+ rubygems_version: 1.6.1
64
65
  signing_key:
65
66
  specification_version: 3
66
67
  summary: Project template manager