bwoken 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/bwoken/build.rb CHANGED
@@ -24,18 +24,21 @@ module Bwoken
24
24
  if Bwoken::Device.connected?
25
25
  'iphoneos'
26
26
  else
27
- 'iphonesimulator5.1'
27
+ 'iphonesimulator'
28
28
  end
29
29
  end
30
30
 
31
31
  def configuration_build_dir
32
32
  File.join(build_path, sdk)
33
33
  end
34
+
35
+ def xcconfig
36
+ File.join(File.dirname(__FILE__), 'configs', 'bwoken.xcconfig')
37
+ end
34
38
 
35
39
  def env_variables
36
40
  {
37
- 'GCC_PREPROCESSOR_DEFINITIONS' => 'TEST_MODE=1',
38
- 'CONFIGURATION_BUILD_DIR' => configuration_build_dir
41
+ 'BWOKEN_CONFIGURATION_BUILD_DIR' => configuration_build_dir
39
42
  }
40
43
  end
41
44
 
@@ -49,6 +52,7 @@ module Bwoken
49
52
  #{"-scheme #{scheme}" if Bwoken.xcworkspace} \
50
53
  -configuration #{configuration} \
51
54
  -sdk #{sdk} \
55
+ -xcconfig #{xcconfig} \
52
56
  #{variables_for_cli} \
53
57
  clean build"
54
58
  end
@@ -0,0 +1,2 @@
1
+ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) TEST_MODE=1
2
+ CONFIGURATION_BUILD_DIR = $(BWOKEN_CONFIGURATION_BUILD_DIR)
@@ -67,5 +67,9 @@ module Bwoken
67
67
  puts error_log
68
68
  puts 'Build failed!'.red
69
69
  end
70
+
71
+ on :other do |line|
72
+ nil
73
+ end
70
74
  end
71
75
  end
@@ -64,7 +64,7 @@ CLOBBER.include('integration/tmp')
64
64
 
65
65
 
66
66
  desc 'Compile the workspace'
67
- task :build do
67
+ task :compile do
68
68
  exit_status = Bwoken::Build.new.compile
69
69
  raise unless exit_status == 0
70
70
  end
@@ -100,4 +100,4 @@ task :test do
100
100
  end
101
101
  end
102
102
 
103
- task :default => [:build, :test]
103
+ task :default => [:compile, :test]
@@ -1,3 +1,3 @@
1
1
  module Bwoken
2
- VERSION = "1.1.0" unless defined?(::Bwoken::VERSION)
2
+ VERSION = "1.1.1" unless defined?(::Bwoken::VERSION)
3
3
  end
data/lib/bwoken.rb CHANGED
@@ -33,9 +33,19 @@ module Bwoken
33
33
  def test_suite_path
34
34
  File.join(tmp_path, 'javascript')
35
35
  end
36
+
37
+ def path_to_developer_dir
38
+ `xcode-select -print-path`.strip
39
+ end
36
40
 
37
41
  def path_to_automation_template
38
- '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate'
42
+ template = nil
43
+ `xcrun instruments -s 2>&1 | grep Automation.tracetemplate`.split("\n").each do |path|
44
+ path = path.gsub(/^\s*"|",\s*$/, "")
45
+ template = path if File.exists?(path)
46
+ break if template
47
+ end
48
+ template
39
49
  end
40
50
 
41
51
  %w(xcworkspace xcodeproj).each do |xcode_root|
@@ -48,12 +58,12 @@ module Bwoken
48
58
 
49
59
  def workspace_or_project
50
60
  ws = xcworkspace
51
- File.exists?(ws) ? ws : xcodeproj
61
+ ws && File.exists?(ws) ? ws : xcodeproj
52
62
  end
53
63
 
54
64
  def workspace_or_project_flag
55
65
  ws = xcworkspace
56
- if File.exists?(ws)
66
+ if ws && File.exists?(ws)
57
67
  "-workspace #{ws}"
58
68
  else
59
69
  "-project #{xcodeproj}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bwoken
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-07-05 00:00:00.000000000 Z
13
+ date: 2012-09-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: coffee-script-source
17
- requirement: &70362206841360 !ruby/object:Gem::Requirement
17
+ requirement: !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,15 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70362206841360
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: '0'
26
31
  - !ruby/object:Gem::Dependency
27
32
  name: colorful
28
- requirement: &70362206840320 !ruby/object:Gem::Requirement
33
+ requirement: !ruby/object:Gem::Requirement
29
34
  none: false
30
35
  requirements:
31
36
  - - ! '>='
@@ -33,10 +38,15 @@ dependencies:
33
38
  version: '0'
34
39
  type: :runtime
35
40
  prerelease: false
36
- version_requirements: *70362206840320
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
37
47
  - !ruby/object:Gem::Dependency
38
48
  name: execjs
39
- requirement: &70362206839820 !ruby/object:Gem::Requirement
49
+ requirement: !ruby/object:Gem::Requirement
40
50
  none: false
41
51
  requirements:
42
52
  - - ! '>='
@@ -44,10 +54,15 @@ dependencies:
44
54
  version: '0'
45
55
  type: :runtime
46
56
  prerelease: false
47
- version_requirements: *70362206839820
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
48
63
  - !ruby/object:Gem::Dependency
49
64
  name: rake
50
- requirement: &70362206839180 !ruby/object:Gem::Requirement
65
+ requirement: !ruby/object:Gem::Requirement
51
66
  none: false
52
67
  requirements:
53
68
  - - ! '>='
@@ -55,10 +70,15 @@ dependencies:
55
70
  version: '0'
56
71
  type: :runtime
57
72
  prerelease: false
58
- version_requirements: *70362206839180
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
59
79
  - !ruby/object:Gem::Dependency
60
80
  name: rspec
61
- requirement: &70362206838380 !ruby/object:Gem::Requirement
81
+ requirement: !ruby/object:Gem::Requirement
62
82
  none: false
63
83
  requirements:
64
84
  - - ! '>='
@@ -66,10 +86,15 @@ dependencies:
66
86
  version: '0'
67
87
  type: :development
68
88
  prerelease: false
69
- version_requirements: *70362206838380
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
70
95
  - !ruby/object:Gem::Dependency
71
96
  name: guard-rspec
72
- requirement: &70362206837680 !ruby/object:Gem::Requirement
97
+ requirement: !ruby/object:Gem::Requirement
73
98
  none: false
74
99
  requirements:
75
100
  - - ! '>='
@@ -77,7 +102,12 @@ dependencies:
77
102
  version: '0'
78
103
  type: :development
79
104
  prerelease: false
80
- version_requirements: *70362206837680
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
81
111
  description: iOS UIAutomation Test Runner
82
112
  email:
83
113
  - brad@bendyworks.com
@@ -92,6 +122,7 @@ files:
92
122
  - bin/unix_instruments.sh
93
123
  - lib/bwoken/build.rb
94
124
  - lib/bwoken/coffeescript.rb
125
+ - lib/bwoken/configs/bwoken.xcconfig
95
126
  - lib/bwoken/device.rb
96
127
  - lib/bwoken/formatter.rb
97
128
  - lib/bwoken/formatters/colorful_formatter.rb
@@ -115,7 +146,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
115
146
  version: '0'
116
147
  segments:
117
148
  - 0
118
- hash: 3024521227927811859
149
+ hash: -4146561164984030990
119
150
  required_rubygems_version: !ruby/object:Gem::Requirement
120
151
  none: false
121
152
  requirements:
@@ -124,10 +155,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
155
  version: '0'
125
156
  segments:
126
157
  - 0
127
- hash: 3024521227927811859
158
+ hash: -4146561164984030990
128
159
  requirements: []
129
160
  rubyforge_project:
130
- rubygems_version: 1.8.17
161
+ rubygems_version: 1.8.24
131
162
  signing_key:
132
163
  specification_version: 3
133
164
  summary: Runs your UIAutomation tests from the command line for both iPhone and iPad;