Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix for 1.8.7

  • Loading branch information...
commit e2d926d9e4dc7570b925ddd60ecf3f503515e713 1 parent 131ea58
Jaymes Waters and Brad Grzesiak authored Bendyworks Pair committed
View
1  bwoken.gemspec
@@ -11,6 +11,7 @@ Gem::Specification.new do |gem|
gem.add_dependency 'colorful'
gem.add_dependency 'execjs'
gem.add_dependency 'coffee-script-source'
+ gem.add_dependency 'json_pure' if RUBY_VERSION =~ /^1\.8\./
gem.add_development_dependency 'rspec'
gem.add_development_dependency 'guard-rspec'
View
4 lib/bwoken.rb
@@ -30,7 +30,7 @@ def path_to_automation_template
def build_path
File.join(project_path, 'build').tap do |dir_name|
- FileUtils.mkdir_p(dir_name) unless Dir.exists?(dir_name)
+ FileUtils.mkdir_p(dir_name) unless File.directory?(dir_name)
end
end
@@ -40,7 +40,7 @@ def workspace
def results_path
File.join(project_path, 'automation', 'results').tap do |dir_name|
- FileUtils.mkdir_p(dir_name) unless Dir.exists?(dir_name)
+ FileUtils.mkdir_p(dir_name) unless File.directory?(dir_name)
end
end
View
1  lib/bwoken/coffeescript.rb
@@ -1,5 +1,6 @@
require 'fileutils'
require 'coffee_script/source'
+require 'json' if RUBY_VERSION =~ /^1\.8\./
require 'execjs'
module Bwoken
View
2  lib/bwoken/version.rb
@@ -1,3 +1,3 @@
module Bwoken
- VERSION = "0.0.1"
+ VERSION = "0.0.1" unless defined?(::Bwoken::VERSION)
end
View
2  spec/lib/bwoken/build_spec.rb
@@ -36,7 +36,7 @@
describe '#variables_for_cli' do
it 'formats variables for xcodebuild' do
subject.stub(:env_variables => {'foo' => 'bar', 'baz' => 'qux'})
- subject.variables_for_cli.should == 'foo=bar baz=qux'
+ subject.variables_for_cli.should be_in(['foo=bar baz=qux', 'baz=qux foo=bar'])
end
end
View
4 spec/lib/bwoken/script_spec.rb
@@ -72,7 +72,9 @@ class Simulator; end
it 'preps the variables for cli use' do
subject.path = 'foo'
Bwoken.stub(:results_path => 'bar')
- subject.env_variables_for_cli.should == '-e UIASCRIPT foo -e UIARESULTSPATH bar'
+
+ expected = ['-e UIASCRIPT foo -e UIARESULTSPATH bar', '-e UIARESULTSPATH bar -e UIASCRIPT foo']
+ subject.env_variables_for_cli.should be_in(expected)
end
end
View
6 spec/lib/bwoken_spec.rb
@@ -28,7 +28,7 @@
describe '.path_to_automation_template' do
it 'returns the location of the Automation template', :platform => :osx do
- File.exists?(Bwoken.path_to_automation_template).should be_true
+ File.file?(Bwoken.path_to_automation_template).should be_true
end
end
@@ -38,7 +38,7 @@
stub_proj_path
FileUtils.rm_r("#{proj_path}/build")
Bwoken.build_path
- Dir.exists?("#{proj_path}/build").should be_true
+ File.directory?("#{proj_path}/build").should be_true
end
end
@@ -61,7 +61,7 @@
stub_proj_path
FileUtils.rm_rf("#{proj_path}/automation")
Bwoken.results_path
- Dir.exists?("#{proj_path}/automation/results").should be_true
+ File.directory?("#{proj_path}/automation/results").should be_true
end
end
it 'returns the results path' do
View
7 spec/support/be_in_matcher.rb
@@ -0,0 +1,7 @@
+RSpec::Matchers.define :be_in do |expected|
+
+ match do |actual|
+ expected.include?(actual)
+ end
+
+end
Please sign in to comment.
Something went wrong with that request. Please try again.