9e909d5be3
Update Bundler to 1.0.15. Update Rails to 2.3.12. Update rails_xss plugin. The latter two were the source of a considerable amount of grief, as rails_xss is now MUCH stricter about what string methods can be used. Also made it possible to use rake 0.9.x with Instiki. But you probably REALLY want to use ruby bundle exec rake ... instead of just saying rake ....
54 lines
877 B
Ruby
54 lines
877 B
Ruby
module Spec
|
|
module Platforms
|
|
include Bundler::GemHelpers
|
|
|
|
def rb
|
|
Gem::Platform::RUBY
|
|
end
|
|
|
|
def mac
|
|
Gem::Platform.new('x86-darwin-10')
|
|
end
|
|
|
|
def java
|
|
Gem::Platform.new([nil, "java", nil])
|
|
end
|
|
|
|
def linux
|
|
Gem::Platform.new(['x86', 'linux', nil])
|
|
end
|
|
|
|
def mswin
|
|
Gem::Platform.new(['x86', 'mswin32', nil])
|
|
end
|
|
|
|
def mingw
|
|
Gem::Platform.new(['x86', 'mingw32', nil])
|
|
end
|
|
|
|
def all_platforms
|
|
[rb, java, linux, mswin, mingw]
|
|
end
|
|
|
|
def local
|
|
generic(Gem::Platform.local)
|
|
end
|
|
|
|
def not_local
|
|
all_platforms.find { |p| p != generic(Gem::Platform.local) }
|
|
end
|
|
|
|
def local_tag
|
|
if RUBY_PLATFORM == "java"
|
|
:jruby
|
|
else
|
|
:ruby
|
|
end
|
|
end
|
|
|
|
def not_local_tag
|
|
[:ruby, :jruby].find { |tag| tag != local_tag }
|
|
end
|
|
end
|
|
end
|