runcoderun-gem_sync 0.2.5 → 0.2.6

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.
data/gem_sync.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{gem_sync}
3
- s.version = "0.2.5"
3
+ s.version = "0.2.6"
4
4
 
5
5
  s.required_rubygems_version = Gem::Requirement.new("= 1.2") if s.respond_to? :required_rubygems_version=
6
6
  s.authors = ["Rob Sanheim @ Relevance"]
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'
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(/([\d\.]+)/).flatten
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)
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runcoderun-gem_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Sanheim @ Relevance