bump 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bump (0.4.1)
4
+ bump (0.4.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,5 +1,5 @@
1
1
  Gem::Specification.new "bump" do |s|
2
- s.version = "0.4.1"
2
+ s.version = "0.4.2"
3
3
  s.author = "Gregory Marcilhacy"
4
4
  s.email = "g.marcilhacy@gmail.com"
5
5
  s.homepage = "https://github.com/gregorym/bump"
@@ -90,7 +90,7 @@ module Bump
90
90
 
91
91
  def self.replace(file, old, new)
92
92
  content = File.read(file)
93
- File.open(file, "w"){|f| f.write(content.gsub(old, new)) }
93
+ File.open(file, "w"){|f| f.write(content.sub(old, new)) }
94
94
  end
95
95
 
96
96
  def self.current_info
@@ -106,6 +106,21 @@ describe Bump do
106
106
  bump("patch").should include("4.2.11")
107
107
  read(gemspec).should include('s.version = "4.2.11"')
108
108
  end
109
+
110
+ it "should not bump multiple versions" do
111
+ version = '"4.2.3"'
112
+ write gemspec, <<-RUBY
113
+ Gem::Specification.new do |s|
114
+ s.name = 'fixture'
115
+ s.version = #{version}
116
+ s.summary = 'Fixture gem'
117
+ s.runtime_dependency 'rake', #{version}
118
+ end
119
+ RUBY
120
+ bump("patch").should include("4.2.4")
121
+ read(gemspec).should include('s.version = "4.2.4"')
122
+ read(gemspec).should include("'rake', #{version}")
123
+ end
109
124
  end
110
125
 
111
126
  context ".version in gemspec within the initializer" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bump
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-10 00:00:00.000000000 Z
12
+ date: 2013-05-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake