motion-calabash 0.0.1 → 0.9.108

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,75 +1,36 @@
1
- = motion-testflight
1
+ = motion-calabash
2
2
 
3
- motion-testflight allows RubyMotion projects to easily embed the TestFlight
4
- SDK and be submitted to the TestFlight platform.
3
+ Allows RubyMotion projects to easily use Calabash iOS for automated acceptance
4
+ testing.
5
+
6
+ For Calabash see: http://calaba.sh
5
7
 
6
8
  == Requirements
7
9
 
8
10
  * RubyMotion 1.0 or greater (see http://www.rubymotion.com).
9
- * A TestFlight account, can be obtained for free at http://testflightapp.com.
10
11
 
11
12
  == Installation
12
13
 
13
- $ sudo gem install motion-testflight
14
+ $ (sudo) gem install motion-calabash
14
15
 
15
16
  == Setup
16
17
 
17
- 1. Download the TestFlight SDK package from https://testflightapp.com/sdk/download/ and unpack it into the +vendor/TestFlightSDK+ directory of your RubyMotion project. Create the +vendor+ directory if it does not exist. You should have something like this.
18
-
19
- $ ls vendor/TestFlightSDK
20
- README.txt libTestFlight.a
21
- TestFlight.h release_notes.txt
22
-
23
- 2. Edit the +Rakefile+ of your RubyMotion project and add the following require lines.
18
+ 1. Edit the +Rakefile+ of your RubyMotion project and add the following require lines.
24
19
 
25
20
  require 'rubygems'
26
- require 'motion-testflight'
27
-
28
- 3. Still in the +Rakefile+, set up the +sdk+, +api_token+ and +team_token+ variables in your application configuration block.
29
-
30
- Motion::Project::App.setup do |app|
31
- # ...
32
- app.testflight.sdk = 'vendor/TestFlight'
33
- app.testflight.api_token = '<insert your API token here>'
34
- app.testflight.team_token = '<insert your team token here>'
35
- end
36
-
37
- You can retrieve the values for +api_token+ and +team_token+ in your TestFlight account page.
38
-
39
- 4. (Optional) You can also set up distribution lists, if needed.
40
-
41
- Motion::Project::App.setup do |app|
42
- # ...
43
- app.testflight.distribution_lists = ['CoolKids']
44
- end
21
+ require 'motion-calabash'
45
22
 
46
23
  == Usage
47
24
 
48
- motion-testflight introduces a +testflight+ Rake task to your project, which can be used to submit a development build. The +notes+ parameter must be provided, and its content will be used as the submission release notes.
49
-
50
- $ rake testflight notes="zomg!"
51
-
52
- == License
53
-
54
- Copyright (c) 2012, Laurent Sansonetti <lrz@hipbyte.com>
55
- All rights reserved.
56
-
57
- Redistribution and use in source and binary forms, with or without
58
- modification, are permitted provided that the following conditions are met:
59
-
60
- 1. Redistributions of source code must retain the above copyright notice, this
61
- list of conditions and the following disclaimer.
62
- 2. Redistributions in binary form must reproduce the above copyright notice,
63
- this list of conditions and the following disclaimer in the documentation
64
- and/or other materials provided with the distribution.
65
-
66
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
67
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
68
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
69
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
70
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
71
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
72
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
73
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
74
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
75
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
+ motion-calabash introduces a +calabash+ Rake-task namespace to your project.
26
+ The namespace currently contains two tasks: +run+ and +console+.
27
+ The +run+ task can be used to run your suite of Calabash tests on your development build.
28
+ You can supply the following parameters +sdk+, +device+, +os+.
29
+ You can also run +console+ to start the Calabash console
30
+ (+device+ and +os+ params apply too).
31
+
32
+ $ rake calabash:run
33
+ $ rake calabash:run sdk=5.1
34
+ $ rake calabash:run sdk=6.0 device=ipad
35
+ $ rake calabash:run args="features/my_first.feature --tags @a"
36
+ $ rake calabash:console
@@ -24,4 +24,56 @@
24
24
 
25
25
  Motion::Project::App.setup do |app|
26
26
  app.vendor_project File.join(File.dirname(__FILE__),"..",'..','framework'), :static
27
- end
27
+ end
28
+
29
+
30
+ namespace 'calabash' do
31
+ desc "Run Calabash tests. Params are passed to cucumber"
32
+
33
+ # Retrieve optional Calabash args.
34
+ def gather_calabash_env
35
+ sdk = ENV['sdk'] || ENV['SDK_VERSION'] || "6.0" #Calabash env vars
36
+ os = ENV['os'] || ENV['OS'] || 'ios5' #Calabash env vars
37
+ device = ENV['device'] || ENV['DEVICE'] || 'iphone' #Calabash env vars
38
+ {:sdk => sdk, :os => os, :device => device, :str => "SDK_VERSION=#{sdk} OS=#{os} DEVICE=#{device}"}
39
+ end
40
+
41
+
42
+ task :run do
43
+ # Retrieve optional args to pass to cucumber.
44
+ args = ENV["args"] || ""
45
+
46
+ calabash_env = gather_calabash_env
47
+
48
+ # Retrieve optional bundle path.
49
+ bundle_path = ENV['APP_BUNDLE_PATH']
50
+ unless bundle_path
51
+ build = "build/iPhoneSimulator-#{calabash_env[:sdk]}-Development"
52
+ unless File.exist?(build)
53
+ App.fail "No dir found in #{build}. Please build app first."
54
+ end
55
+ app = Dir.glob("#{build}/*").find {|d| /\.app$/.match(d)}
56
+ unless File.exist?(app)
57
+ App.fail "No .app found in #{build}. Please build app first."
58
+ end
59
+ bundle_path = File.expand_path("#{app}")
60
+ end
61
+
62
+ App.fail "No app found in #{bundle_path} (APP_BUNDLE_PATH)" unless File.exist?(bundle_path)
63
+
64
+ cmd = "#{calabash_env[:str]} APP_BUNDLE_PATH=\"#{bundle_path}\" cucumber #{args}"
65
+ App.info 'Run', cmd
66
+ system(cmd)
67
+ end
68
+
69
+ desc "Start Calabash console."
70
+ task :console do
71
+ # Retrieve configuration settings.
72
+ calabash_env = gather_calabash_env
73
+ cmd = "#{calabash_env[:str]} calabash-ios console"
74
+ App.info 'Run', cmd
75
+ system(cmd)
76
+ end
77
+
78
+ end
79
+
@@ -7,12 +7,12 @@ 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.0.1'
10
+ s.version = '0.9.108'
11
11
  s.summary = %q{Calabash support for RubyMotion}
12
12
  s.description = %q{This will download and link-in calabash}
13
13
  s.files = `git ls-files`.split("\n")
14
14
  s.require_paths = ["lib"]
15
15
 
16
- s.add_dependency("calabash-cucumber", "0.9.107")
16
+ s.add_dependency("calabash-cucumber", "0.9.108")
17
17
 
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-calabash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.9.108
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-04 00:00:00.000000000 Z
12
+ date: 2012-10-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: calabash-cucumber
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.9.107
21
+ version: 0.9.108
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 0.9.107
29
+ version: 0.9.108
30
30
  description: This will download and link-in calabash
31
31
  email: karl@lesspainful.com
32
32
  executables: []
@@ -37,7 +37,7 @@ files:
37
37
  - LICENSE
38
38
  - README.rdoc
39
39
  - Rakefile
40
- - lib/framework/libcalabashuni-0.9.107.a
40
+ - lib/framework/libcalabashuni-0.9.108.a
41
41
  - lib/motion-calabash.rb
42
42
  - lib/motion/project/calabash.rb
43
43
  - motion-calabash.gemspec