motion-calabash 0.9.126 → 0.9.127
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/lib/motion/project/calabash.rb +17 -8
- data/motion-calabash.gemspec +1 -1
- metadata +1 -1
@@ -35,7 +35,11 @@ namespace 'calabash' do
|
|
35
35
|
# Retrieve optional Calabash args.
|
36
36
|
def gather_calabash_env
|
37
37
|
sdk = ENV['sdk'] || ENV['SDK_VERSION'] || "6.0" #Calabash env vars
|
38
|
-
|
38
|
+
major = sdk[0]
|
39
|
+
os = ENV['os'] || ENV['OS']
|
40
|
+
if os.nil?
|
41
|
+
os = "ios#{major}"
|
42
|
+
end
|
39
43
|
device = ENV['device'] || ENV['DEVICE'] || 'iphone' #Calabash env vars
|
40
44
|
{"SDK_VERSION" => sdk, "OS" => os, "DEVICE" => device}
|
41
45
|
end
|
@@ -50,13 +54,17 @@ namespace 'calabash' do
|
|
50
54
|
# Retrieve optional bundle path.
|
51
55
|
bundle_path = ENV['APP_BUNDLE_PATH']
|
52
56
|
unless bundle_path
|
53
|
-
build = "build
|
57
|
+
build = "build"
|
54
58
|
unless File.exist?(build)
|
55
|
-
App.fail "No dir found
|
59
|
+
App.fail "No dir found: #{build}. Please build app first."
|
56
60
|
end
|
57
|
-
|
58
|
-
unless File.
|
59
|
-
App.fail "No
|
61
|
+
sim_dir = Dir.glob("#{build}/*").find {|d| /Simulator-/.match(d)}
|
62
|
+
unless sim_dir and File.directory?(sim_dir)
|
63
|
+
App.fail "No Simulator dir found in #{build}. Please build app for simulator first."
|
64
|
+
end
|
65
|
+
app = Dir.glob("#{sim_dir}/*").find {|d| /\.app$/.match(d)}
|
66
|
+
unless app and File.exist?(app)
|
67
|
+
App.fail "No .app found in #{sim_dir}. Please build app for simulator first."
|
60
68
|
end
|
61
69
|
bundle_path = File.expand_path("#{app}")
|
62
70
|
end
|
@@ -65,8 +73,9 @@ namespace 'calabash' do
|
|
65
73
|
|
66
74
|
calabash_env["APP_BUNDLE_PATH"] = "\"#{bundle_path}\""
|
67
75
|
|
68
|
-
App.info 'Run', "#{calabash_env} cucumber #{args
|
69
|
-
|
76
|
+
App.info 'Run', "#{calabash_env} cucumber #{args}"
|
77
|
+
env_str = calabash_env.map {|envname, envval| "#{envname}=#{envval}"}.join(" ")
|
78
|
+
system("#{env_str} cucumber #{args}")
|
70
79
|
end
|
71
80
|
|
72
81
|
desc "Start Calabash console."
|
data/motion-calabash.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.author = 'Karl Krukow'
|
8
8
|
s.email = 'karl@lesspainful.com'
|
9
9
|
s.homepage = 'http://www.lesspainful.com'
|
10
|
-
s.version = '0.9.
|
10
|
+
s.version = '0.9.127'
|
11
11
|
s.summary = %q{Calabash support for RubyMotion}
|
12
12
|
s.description = %q{This link-in calabash for iOS}
|
13
13
|
s.files = ["lib/framework/libcalabashuni-0.9.126.a"].concat(`git ls-files`.split("\n"))
|