zucchini-ios 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +29 -5
  2. data/lib/feature.rb +3 -1
  3. data/lib/version.rb +1 -1
  4. metadata +2 -2
data/README.md CHANGED
@@ -28,20 +28,44 @@ Create a feature scaffold for your first feature:
28
28
  zucchini generate --feature /path/to/my_project/features/my_feature
29
29
  ```
30
30
 
31
- Add your device to features/support/config.yml.
32
-
33
- The [udidetect](https://github.com/vaskas/udidetect) utility comes in handy if you plan to add devices from time to time: `udidetect -z`.
34
-
35
31
  Start hacking by modifying features/my_feature/feature.zucchini and features/support/screens/welcome.coffee.
36
32
 
37
33
  Alternatively, check out the [zucchini-demo](https://github.com/rajbeniwal/zucchini-demo) project featuring an easy to explore Zucchini setup around Apple's CoreDataBooks sample.
38
34
 
39
- Running a feature on the device
35
+ Running on the device
40
36
  --------------------------------
37
+ Add your device to features/support/config.yml.
38
+
39
+ The [udidetect](https://github.com/vaskas/udidetect) utility comes in handy if you plan to add devices from time to time: `udidetect -z`.
40
+
41
41
  ```
42
42
  ZUCCHINI_DEVICE="My Device" zucchini run /path/to/my_feature
43
43
  ```
44
44
 
45
+ Running on the iOS Simulator
46
+ -------------------------------
47
+ We strongly encourage you to run your Zucchini features on real hardware. However, you can run them on the iOS Simulator if you must.
48
+
49
+ First off, modify your features/support/config.yml to include a full path to your compiled app, e.g.
50
+
51
+ ```
52
+ app: /Users/vaskas/Library/Developer/Xcode/DerivedData/CoreDataBooks-ebeqiuqksrwwoscupvxuzjzrdfjz/Build/Products/Debug-iphonesimulator/CoreDataBooks.app
53
+ ```
54
+
55
+ Secondly, add an 'iOS Simulator' entry to the devices section (no UDID needed) and make sure you provide the actual value for 'screen' based on your iOS Simulator settings:
56
+
57
+ ```
58
+ devices:
59
+ iOS Simulator:
60
+ screen: low_ios5
61
+ ```
62
+
63
+ Run it as usual:
64
+
65
+ ```
66
+ ZUCCHINI_DEVICE="iOS Simulator" zucchini run /path/to/my_feature
67
+ ```
68
+
45
69
  See also
46
70
  ---------
47
71
  ```
data/lib/feature.rb CHANGED
@@ -55,8 +55,10 @@ class Zucchini::Feature
55
55
  `rm -rf #{run_data_path}/*`
56
56
  compile_js
57
57
 
58
+ device_params = (@device[:name] == "iOS Simulator") ? "" : "-w #{@device[:udid]}"
59
+
58
60
  begin
59
- out = `instruments -w #{@device[:udid]} -t #{Zucchini::Config.template} #{Zucchini::Config.app} -e UIASCRIPT #{run_data_path}/feature.js -e UIARESULTSPATH #{run_data_path} 2>&1`
61
+ out = `instruments #{device_params} -t #{Zucchini::Config.template} #{Zucchini::Config.app} -e UIASCRIPT #{run_data_path}/feature.js -e UIARESULTSPATH #{run_data_path} 2>&1`
60
62
  puts out
61
63
  # Hack. Instruments don't issue error return codes when JS exceptions occur
62
64
  raise "Instruments run error" if (out.match /JavaScript error/) || (out.match /Instruments\ .{0,5}\ Error\ :/ )
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Zucchini
2
- VERSION = "0.5.3"
2
+ VERSION = "0.5.4"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: zucchini-ios
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.5.3
5
+ version: 0.5.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Vasily Mikhaylichenko
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2011-12-22 00:00:00 Z
15
+ date: 2011-12-28 00:00:00 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: clamp