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 +1 -1
- data/lib/muck_engine/tasks.rb +20 -11
- data/muck-engine.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.12
|
data/lib/muck_engine/tasks.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
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