runcoderun-gem_sync 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/gem_sync.gemspec +1 -1
- data/lib/rcr/gem_sync.rb +5 -2
- data/spec/gem_sync_spec.rb +4 -0
- metadata +1 -1
data/gem_sync.gemspec
CHANGED
data/lib/rcr/gem_sync.rb
CHANGED
@@ -2,7 +2,7 @@ require 'ostruct'
|
|
2
2
|
|
3
3
|
module Rcr
|
4
4
|
class GemSync
|
5
|
-
VERSION = '0.2.
|
5
|
+
VERSION = '0.2.6'
|
6
6
|
GITHUB = "http://gems.github.com"
|
7
7
|
RCR_GEM_LIST = File.expand_path(File.join(File.dirname(__FILE__), *%w[.. runcoderun_gems.txt]))
|
8
8
|
|
@@ -44,7 +44,10 @@ module Rcr
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def self.parse_versions(string)
|
47
|
-
string.scan(
|
47
|
+
output = string.scan(/\((.*?)\)/).flatten
|
48
|
+
output = output.map {|s| s.split(",") }.flatten
|
49
|
+
output = output.map {|s| s.strip }
|
50
|
+
output
|
48
51
|
end
|
49
52
|
|
50
53
|
def self.gem_installed?(name, version)
|
data/spec/gem_sync_spec.rb
CHANGED
@@ -41,6 +41,10 @@ ZenTest (3.10.0, 3.9.2, 3.9.1, 3.8.0, 3.6.0)]
|
|
41
41
|
versions[0].should == "1.0.10"
|
42
42
|
versions[1].should == "1.0.11"
|
43
43
|
end
|
44
|
+
|
45
|
+
it "parses gems with numbers in the name" do
|
46
|
+
Rcr::GemSync.parse_versions("open4 (0.9.6)")[0].should == "0.9.6"
|
47
|
+
end
|
44
48
|
end
|
45
49
|
|
46
50
|
describe "parsing gem names" do
|