mactag 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/mactag/tag/gem.rb +1 -1
- data/lib/mactag/tag/rails.rb +9 -1
- data/test/mactag/tag/rails_test.rb +16 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
data/lib/mactag/tag/gem.rb
CHANGED
data/lib/mactag/tag/rails.rb
CHANGED
@@ -62,7 +62,7 @@ module Mactag
|
|
62
62
|
result = []
|
63
63
|
packages.each do |package|
|
64
64
|
if PACKAGES.include?(package)
|
65
|
-
result << Gem.new(package.to_s,
|
65
|
+
result << Gem.new(package.to_s, version).tag
|
66
66
|
end
|
67
67
|
end
|
68
68
|
result
|
@@ -100,6 +100,14 @@ module Mactag
|
|
100
100
|
"#{pkg}".gsub(/[^a-z]/, '').to_sym
|
101
101
|
end
|
102
102
|
end
|
103
|
+
|
104
|
+
##
|
105
|
+
#
|
106
|
+
# Returns what Rails version to use.
|
107
|
+
#
|
108
|
+
def version
|
109
|
+
@options[:version] || ::Rails.version
|
110
|
+
end
|
103
111
|
end
|
104
112
|
end
|
105
113
|
end
|
@@ -86,4 +86,20 @@ class RailsTest < ActiveSupport::TestCase
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
end
|
89
|
+
|
90
|
+
context '#version' do
|
91
|
+
should 'pick specified version if given' do
|
92
|
+
@rails = Mactag::Tag::Rails.new({ :version => '3.0.0.rc' })
|
93
|
+
|
94
|
+
assert_equal '3.0.0.rc', @rails.send(:version)
|
95
|
+
end
|
96
|
+
|
97
|
+
should 'pick same rails version as application if not specified version' do
|
98
|
+
Rails.stubs(:version).returns('3.0.0.beta3')
|
99
|
+
|
100
|
+
@rails = Mactag::Tag::Rails.new({})
|
101
|
+
|
102
|
+
assert_equal '3.0.0.beta3', @rails.send(:version)
|
103
|
+
end
|
104
|
+
end
|
89
105
|
end
|