frank-cucumber 1.1.6 → 1.1.7
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/Rakefile +20 -0
- data/frank-skeleton/frankify.xcconfig.tt +3 -2
- data/frank-skeleton/libCocoaAsyncSocket.a +0 -0
- data/frank-skeleton/libCocoaAsyncSocketMac.a +0 -0
- data/frank-skeleton/libCocoaHTTPServer.a +0 -0
- data/frank-skeleton/libCocoaHTTPServerMac.a +0 -0
- data/frank-skeleton/libCocoaLumberjack.a +0 -0
- data/frank-skeleton/libCocoaLumberjackMac.a +0 -0
- data/frank-skeleton/libFrank.a +0 -0
- data/frank-skeleton/libFrankMac.a +0 -0
- data/frank-skeleton/libShelley.a +0 -0
- data/lib/frank-cucumber/cli.rb +36 -10
- data/lib/frank-cucumber/frank_helper.rb +1 -0
- data/lib/frank-cucumber/frank_mac_helper.rb +2 -2
- data/lib/frank-cucumber/version.rb +1 -1
- metadata +6 -2
data/Rakefile
CHANGED
@@ -2,6 +2,26 @@ require 'bundler'
|
|
2
2
|
require 'rake/testtask'
|
3
3
|
Bundler::GemHelper.install_tasks
|
4
4
|
|
5
|
+
desc 'check that the static libraries shipping with the gem have the same version number as the gem itself'
|
6
|
+
task :check_lib_versions do
|
7
|
+
lib_path = File.expand_path( '../frank-skeleton/libFrank.a', __FILE__)
|
8
|
+
lib_version = `what #{lib_path}`.chomp.split("\n").last.split(" ").last
|
9
|
+
puts "LIBRARY VERSION: #{lib_version}"
|
10
|
+
puts "GEM VERSION: #{Frank::Cucumber::VERSION}"
|
11
|
+
unless lib_version == Frank::Cucumber::VERSION
|
12
|
+
raise <<-EOS
|
13
|
+
|
14
|
+
RUH ROH.
|
15
|
+
static lib version doesn't match gem version.
|
16
|
+
|
17
|
+
to fix this:
|
18
|
+
(cd .. && rake build_for_release)
|
19
|
+
EOS
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
task :build => :check_lib_versions
|
24
|
+
|
5
25
|
desc 'open up version.rb'
|
6
26
|
task :edit_version do
|
7
27
|
exec "vim #{File.dirname(__FILE__)}/lib/frank-cucumber/version.rb"
|
@@ -1,5 +1,6 @@
|
|
1
1
|
INSTALL_PATH = /./
|
2
2
|
|
3
|
-
FRANK_LDFLAGS = -all_load -ObjC -framework CFNetwork -framework Security -lShelley <%= @
|
4
|
-
FRANK_MAC_LDFLAGS = -all_load -ObjC -framework CFNetwork -framework Security -lShelleyMac <%= @
|
3
|
+
FRANK_LDFLAGS = -all_load -ObjC -framework CFNetwork -framework Security -lShelley -lFrank <%= @libs.map { |lib| "-l#{lib}" }.join(' ') %>
|
4
|
+
FRANK_MAC_LDFLAGS = -all_load -ObjC -framework CFNetwork -framework Security -lShelleyMac -lFrankMac <%= @libsMac.map { |lib| "-l#{lib}" }.join(' ') %>
|
5
|
+
|
5
6
|
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = FRANKIFIED
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/frank-skeleton/libFrank.a
CHANGED
Binary file
|
Binary file
|
data/frank-skeleton/libShelley.a
CHANGED
Binary file
|
data/lib/frank-cucumber/cli.rb
CHANGED
@@ -24,11 +24,22 @@ module Frank
|
|
24
24
|
end
|
25
25
|
|
26
26
|
WITHOUT_SERVER = "without-cocoa-http-server"
|
27
|
+
WITHOUT_ASYNC_SOCKET = "without-cocoa-async-socket"
|
28
|
+
WITHOUT_LUMBERJACK = "without-cocoa-lumberjack"
|
27
29
|
desc "setup", "set up your iOS app by adding a Frank subdirectory containing everything Frank needs"
|
28
30
|
method_option WITHOUT_SERVER, :type => :boolean
|
31
|
+
method_option WITHOUT_ASYNC_SOCKET, :type => :boolean
|
32
|
+
method_option WITHOUT_LUMBERJACK, :type => :boolean
|
29
33
|
method_option :build_configuration, :aliases=>'--conf', :type=>:string, :default => 'Debug'
|
30
34
|
def setup
|
31
|
-
@
|
35
|
+
@libs = %w(Shelley CocoaAsyncSocket CocoaLumberjack CocoaHTTPServer Frank)
|
36
|
+
@libsMac = %w(CocoaAsyncSocketMac CocoaLumberjackMac CocoaHTTPServerMac FrankMac)
|
37
|
+
@libs -= %w(CocoaHTTPServer) if options[WITHOUT_SERVER]
|
38
|
+
@libsMac -= %w(CocoaHTTPServerMac) if options[WITHOUT_SERVER]
|
39
|
+
@libs -= %w(CocoaAsyncSocket) if options[WITHOUT_ASYNC_SOCKET]
|
40
|
+
@libsMac -= %w(CocoaAsyncSocketMac) if options[WITHOUT_ASYNC_SOCKET]
|
41
|
+
@libs -= %w(CocoaLumberjack) if options[WITHOUT_LUMBERJACK]
|
42
|
+
@libsMac -= %w(CocoaLumberjackMac) if options[WITHOUT_LUMBERJACK]
|
32
43
|
directory ".", "Frank"
|
33
44
|
|
34
45
|
Frankifier.frankify!( File.expand_path('.'), :build_config => options[:build_configuration] )
|
@@ -37,13 +48,13 @@ module Frank
|
|
37
48
|
desc "update", "updates the frank server components inside your Frank directory"
|
38
49
|
long_desc "This updates the parts of Frank that are embedded inside your app (e.g. libFrank.a and frank_static_resources.bundle)"
|
39
50
|
def update
|
40
|
-
%w{libFrank.a libCocoaHTTPServer.a libShelley.a libFrankMac.a
|
51
|
+
%w{libFrank.a libCocoaAsyncSocket.a libCocoaLumberjack.a libCocoaHTTPServer.a libShelley.a libFrankMac.a libShelleyMac libCocoaAsyncSocketMac.a libCocoaLumberjackMac.a libCocoaHTTPServerMac.a}.each do |f|
|
41
52
|
copy_file f, File.join( 'Frank', f ), :force => true
|
42
53
|
end
|
43
54
|
directory( 'frank_static_resources.bundle', 'Frank/frank_static_resources.bundle', :force => true )
|
44
55
|
end
|
45
56
|
|
46
|
-
XCODEBUILD_OPTIONS = %w{workspace scheme target}
|
57
|
+
XCODEBUILD_OPTIONS = %w{workspace scheme target configuration}
|
47
58
|
desc "build", "builds a Frankified version of your native app"
|
48
59
|
XCODEBUILD_OPTIONS.each do |option|
|
49
60
|
method_option option
|
@@ -79,12 +90,20 @@ module Frank
|
|
79
90
|
|
80
91
|
extra_opts = XCODEBUILD_OPTIONS.map{ |o| "-#{o} \"#{options[o]}\"" if options[o] }.compact.join(' ')
|
81
92
|
|
93
|
+
# If there is a scheme specified we don't want to inject the default configuration
|
94
|
+
# If there is a configuration specified, we also do not want to inject the default configuration
|
95
|
+
if options['scheme'] || options['configuration']
|
96
|
+
separate_configuration_option = ""
|
97
|
+
else
|
98
|
+
separate_configuration_option = "-configuration Debug"
|
99
|
+
end
|
100
|
+
|
82
101
|
if options['mac']
|
83
|
-
run %Q|xcodebuild -xcconfig Frank/frankify.xcconfig #{build_steps} #{extra_opts}
|
102
|
+
run %Q|xcodebuild -xcconfig Frank/frankify.xcconfig #{build_steps} #{extra_opts} #{separate_configuration_option} DEPLOYMENT_LOCATION=YES DSTROOT="#{build_output_dir}" FRANK_LIBRARY_SEARCH_PATHS="\\"#{frank_lib_directory}\\""|
|
84
103
|
else
|
85
104
|
extra_opts += " -arch #{options['arch']}"
|
86
105
|
|
87
|
-
run %Q|xcodebuild -xcconfig Frank/frankify.xcconfig #{build_steps} #{extra_opts}
|
106
|
+
run %Q|xcodebuild -xcconfig Frank/frankify.xcconfig #{build_steps} #{extra_opts} #{separate_configuration_option} -sdk iphonesimulator DEPLOYMENT_LOCATION=YES DSTROOT="#{build_output_dir}" FRANK_LIBRARY_SEARCH_PATHS="\\"#{frank_lib_directory}\\""|
|
88
107
|
end
|
89
108
|
|
90
109
|
app = Dir.glob("#{build_output_dir}/*.app").delete_if { |x| x =~ /\/#{app_bundle_name}$/ }
|
@@ -118,7 +137,7 @@ module Frank
|
|
118
137
|
|
119
138
|
desc "launch", "open the Frankified app in the simulator"
|
120
139
|
method_option :debug, :type => :boolean, :default => false
|
121
|
-
method_option :idiom, :banner => 'iphone|ipad
|
140
|
+
method_option :idiom, :banner => 'iphone|ipad', :type => :string, :default => (ENV['FRANK_SIM_IDIOM'] || 'iphone')
|
122
141
|
def launch
|
123
142
|
$DEBUG = options[:debug]
|
124
143
|
launcher = case options[:idiom].downcase
|
@@ -126,10 +145,8 @@ module Frank
|
|
126
145
|
SimLauncher::DirectClient.for_iphone_app( frankified_app_dir )
|
127
146
|
when 'ipad'
|
128
147
|
SimLauncher::DirectClient.for_ipad_app( frankified_app_dir )
|
129
|
-
when 'mac'
|
130
|
-
Frank::MacLauncher.new( frankified_app_dir )
|
131
148
|
else
|
132
|
-
say "idiom must be either iphone
|
149
|
+
say "idiom must be either iphone or ipad. You supplied '#{options[:idiom]}'", :red
|
133
150
|
exit 10
|
134
151
|
end
|
135
152
|
|
@@ -140,7 +157,12 @@ module Frank
|
|
140
157
|
invoke :build
|
141
158
|
end
|
142
159
|
|
143
|
-
|
160
|
+
if built_product_is_mac_app( frankified_app_dir )
|
161
|
+
launcher = Frank::MacLauncher.new( frankified_app_dir )
|
162
|
+
say "LAUNCHING APP..."
|
163
|
+
else
|
164
|
+
say "LAUNCHING IN THE SIMULATOR..."
|
165
|
+
end
|
144
166
|
|
145
167
|
launcher.relaunch
|
146
168
|
end
|
@@ -194,6 +216,10 @@ module Frank
|
|
194
216
|
File.join( build_output_dir, app_bundle_name )
|
195
217
|
end
|
196
218
|
|
219
|
+
def built_product_is_mac_app ( app_dir )
|
220
|
+
return File.exists? File.join( app_dir, "Contents", "MacOS" )
|
221
|
+
end
|
222
|
+
|
197
223
|
def fix_frankified_apps_bundle_identifier
|
198
224
|
# as of iOS 6 the iOS Simulator locks up with a black screen if you try and launch an app which has the same
|
199
225
|
# bundle identifier as a previously installed app but which is in fact a different app. This impacts us because our
|
@@ -85,6 +85,7 @@ module FrankHelper
|
|
85
85
|
touch_successes = frankly_map( selector, 'touch' )
|
86
86
|
raise "could not find anything matching [#{selector}] to touch" if touch_successes.empty?
|
87
87
|
raise "some views could not be touched (probably because they are not within the current viewport)" if touch_successes.include?(false)
|
88
|
+
touch_successes
|
88
89
|
end
|
89
90
|
|
90
91
|
# Indicate whether there are any views in the current view heirarchy which match the specified selector.
|
@@ -4,8 +4,8 @@ module Frank module Cucumber
|
|
4
4
|
|
5
5
|
module FrankHelper
|
6
6
|
|
7
|
-
def
|
8
|
-
touch_successes = frankly_map( selector, '
|
7
|
+
def simulate_click( selector )
|
8
|
+
touch_successes = frankly_map( selector, 'FEX_simulateClick' )
|
9
9
|
raise "could not find anything matching [#{selector}] to press" if touch_successes == nil or touch_successes.empty?
|
10
10
|
raise "some objects do not support the press action" if touch_successes.include?(false)
|
11
11
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frank-cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-02-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: cucumber
|
@@ -239,8 +239,12 @@ files:
|
|
239
239
|
- frank-skeleton/features/step_definitions/launch_steps.rb
|
240
240
|
- frank-skeleton/features/support/env.rb
|
241
241
|
- frank-skeleton/frankify.xcconfig.tt
|
242
|
+
- frank-skeleton/libCocoaAsyncSocket.a
|
243
|
+
- frank-skeleton/libCocoaAsyncSocketMac.a
|
242
244
|
- frank-skeleton/libCocoaHTTPServer.a
|
243
245
|
- frank-skeleton/libCocoaHTTPServerMac.a
|
246
|
+
- frank-skeleton/libCocoaLumberjack.a
|
247
|
+
- frank-skeleton/libCocoaLumberjackMac.a
|
244
248
|
- frank-skeleton/libFrank.a
|
245
249
|
- frank-skeleton/libFrankMac.a
|
246
250
|
- frank-skeleton/libShelley.a
|