muck-engine 0.2.11 → 0.2.12

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.11
1
+ 0.2.12
@@ -114,20 +114,29 @@ class MuckEngine
114
114
  env_file = File.join(RAILS_ROOT, 'config', 'environment.rb')
115
115
  version = IO.read(File.join(gem_path, 'VERSION')).strip
116
116
  environment = IO.read(env_file)
117
+
117
118
  search = Regexp.new(/\:lib\s*=>\s*['"]#{gem_lib}['"],\s*\:version\s*=>\s*['"][ <>=~]*\d+\.\d+\.\d+['"]/)
118
- if environment.gsub!(search, ":lib => '#{gem_lib}', :version => '>=#{version}'").nil?
119
+ failure = environment.gsub!(search, ":lib => '#{gem_lib}', :version => '>=#{version}'").nil?
120
+
121
+ if failure
119
122
  search = Regexp.new(/config.gem\s*['"]#{gem_name}['"],\s*\:version\s*=>\s*['"][ <>=~]*\d+\.\d+\.\d+['"]/)
120
- if environment.gsub!(search, "config.gem '#{gem_name}', :version => '>=#{version}'").nil?
121
- require 'ruby-debug'
122
- debugger
123
- t = 0
124
- search = Regexp.new(/config.gem\s*['"]#{gem_name}['"]/)
125
- if environment.gsub!(search, "config.gem '#{gem_name}', :version => '>=#{version}'").nil?
126
- puts "Could not update version for #{gem_name}"
127
- end
128
- end
123
+ failure = environment.gsub!(search, "config.gem '#{gem_name}', :version => '>=#{version}'").nil?
124
+ end
125
+
126
+ if failure
127
+ search = Regexp.new(/config.gem\s*['"]#{gem_name}['"],\s*\:lib\s*=>\s*['"]#{gem_lib}['"]/)
128
+ failure = environment.gsub!(search, "config.gem '#{gem_name}', :lib => '#{gem_lib}', :version => '>=#{version}'").nil?
129
129
  end
130
-
130
+
131
+ if failure
132
+ search = Regexp.new(/config.gem\s*['"]#{gem_name}['"]/)
133
+ failure = environment.gsub!(search, "config.gem '#{gem_name}', :version => '>=#{version}'").nil?
134
+ end
135
+
136
+ if failure
137
+ puts "Could not update version for #{gem_name}"
138
+ end
139
+
131
140
  File.open(env_file, 'w') { |f| f.write(environment) }
132
141
  end
133
142
 
data/muck-engine.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{muck-engine}
8
- s.version = "0.2.11"
8
+ s.version = "0.2.12"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Ball"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Ball