calabash-cucumber 0.9.67 → 0.9.68
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/bin/cal.xcconfig +1 -1
- data/bin/calabash-ios +3 -0
- data/bin/calabash-ios-build.rb +42 -4
- data/bin/calabash-ios-setup.rb +8 -0
- data/lib/calabash-cucumber/version.rb +1 -1
- metadata +1 -1
data/Gemfile.lock
CHANGED
data/bin/cal.xcconfig
CHANGED
data/bin/calabash-ios
CHANGED
data/bin/calabash-ios-build.rb
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
def ensure_build_dir(options={:build_dir => "Calabash"})
|
2
|
+
if !File.exist?(options[:build_dir])
|
3
|
+
FileUtils.mkdir_p options[:build_dir]
|
4
|
+
end
|
5
|
+
end
|
1
6
|
|
2
7
|
def build(options={:build_dir=>"Calabash",
|
3
8
|
:configuration => "Debug",
|
@@ -6,9 +11,7 @@ def build(options={:build_dir=>"Calabash",
|
|
6
11
|
:wrapper_name => "Calabash.app"})
|
7
12
|
#Follow Pete's .xcconfig-based approach with zero-config
|
8
13
|
|
9
|
-
|
10
|
-
FileUtils.mkdir_p options[:build_dir]
|
11
|
-
end
|
14
|
+
ensure_build_dir(options)
|
12
15
|
|
13
16
|
if !File.exists?("#{options[:build_dir]}/cal.xcconfig")
|
14
17
|
FileUtils.cp(File.join(File.dirname(__FILE__),"cal.xcconfig"),"#{options[:build_dir]}/cal.xcconfig")
|
@@ -32,11 +35,13 @@ def build(options={:build_dir=>"Calabash",
|
|
32
35
|
|
33
36
|
cmd << %Q[WRAPPER_NAME="#{options[:wrapper_name]}"]
|
34
37
|
|
38
|
+
res =nil
|
35
39
|
msg("Calabash Build") do
|
36
40
|
cmd_s = cmd.join(" ")
|
37
41
|
puts cmd_s
|
38
|
-
system(cmd_s)
|
42
|
+
res=system(cmd_s)
|
39
43
|
end
|
44
|
+
res
|
40
45
|
end
|
41
46
|
|
42
47
|
def console(options={:script => "irb_ios5.sh"})
|
@@ -51,3 +56,36 @@ def console(options={:script => "irb_ios5.sh"})
|
|
51
56
|
puts "Running irb with ./.irbrc..."
|
52
57
|
system("./#{options[:script]}")
|
53
58
|
end
|
59
|
+
|
60
|
+
|
61
|
+
def run(options={:build_dir=>"Calabash",
|
62
|
+
:configuration => "Debug",
|
63
|
+
:sdk => "iphonesimulator",
|
64
|
+
:dstroot => "Calabash/build",
|
65
|
+
:wrapper_name => "Calabash.app"})
|
66
|
+
if ENV['NO_DOWNLOAD'] != "1"
|
67
|
+
if !File.directory?("calabash.framework")
|
68
|
+
calabash_download(ARGV)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
if ENV['NO_BUILD'] != "1"
|
73
|
+
if !build(options)
|
74
|
+
msg("Info") do
|
75
|
+
puts "Build failed. Please consult logs. Aborting."
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
if ENV["NO_GEN"] != "1"
|
81
|
+
if !File.directory?("features")
|
82
|
+
calabash_scaffold
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
default_path = "#{options[:dstroot]}/#{options[:wrapper_name]}"
|
87
|
+
cmd = %Q[APP_BUNDLE_PATH="#{ENV['APP_BUNDLE_PATH'] || default_path}" cucumber]
|
88
|
+
puts cmd
|
89
|
+
system(cmd)
|
90
|
+
puts "Done..."
|
91
|
+
end
|
data/bin/calabash-ios-setup.rb
CHANGED
@@ -121,6 +121,7 @@ def download_calabash(project_path)
|
|
121
121
|
else
|
122
122
|
connection = Net::HTTP
|
123
123
|
end
|
124
|
+
begin
|
124
125
|
connection.start(uri.host, uri.port) do |http|
|
125
126
|
request = Net::HTTP::Get.new uri.request_uri
|
126
127
|
|
@@ -139,6 +140,13 @@ def download_calabash(project_path)
|
|
139
140
|
end
|
140
141
|
end
|
141
142
|
end
|
143
|
+
rescue SocketError => e
|
144
|
+
msg("Error") do
|
145
|
+
puts "Exception: #{e}"
|
146
|
+
puts "Unable to download Calabash. Please check connection."
|
147
|
+
end
|
148
|
+
exit 1
|
149
|
+
end
|
142
150
|
if success
|
143
151
|
puts "\nDownload done: #{file}. Unzipping..."
|
144
152
|
if not system("unzip -C -K -o -q -d #{project_path} #{zip_file}")
|