mactag 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.1
1
+ 0.5.4
@@ -58,7 +58,7 @@ module Mactag
58
58
  else
59
59
  gem = dirs.sort.last
60
60
  end
61
- if /-(.+)$/.match(gem)
61
+ if /-([^\/]+)$/.match(gem)
62
62
  $1
63
63
  end
64
64
  end
@@ -102,5 +102,16 @@ describe Mactag::Tag::Gem do
102
102
  Mactag::Tag::Gem.last('devise').should eq('1.1.1')
103
103
  end
104
104
  end
105
+
106
+ context 'when the path contains other version numbers' do
107
+ before do
108
+ Mactag::Tag::Gem.stub(:dirs) { ['/Users/user/.rvm/gems/ree-1.8.7-2011.03@project/gems/simple_form-1.3.1'] }
109
+ end
110
+
111
+ it 'extract correct version' do
112
+ Mactag::Tag::Gem.last('simple_form').should eq('1.3.1')
113
+ end
114
+ end
115
+
105
116
  end
106
117
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mactag
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 3
10
- version: 0.5.3
9
+ - 4
10
+ version: 0.5.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Johan Andersson