briar 0.1.3.b8 → 0.1.3.b9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d41c3feb1feec357d18d6bf4309999c248b8d664
4
- data.tar.gz: 83235a9761d72557bfe0527f6c10741fd1c0bd9c
3
+ metadata.gz: f58ae106a8c40129f0cef30699924663e6f72004
4
+ data.tar.gz: 01bdb24c369c0ddf73a0abead78565dae0df966f
5
5
  SHA512:
6
- metadata.gz: 021631be2fb7f87bd3128da2990acecbae0cd4b56535dd9702483772e3fc719f3fb271a37311ba5fa5aab9673cfd62a9f579a53b3e4fb16fb59c838f7fec9800
7
- data.tar.gz: 62a149922a64cf8e2ac6912cb2ef84b8152eaef9017389e1c3558c055189f613e31746389a2e8c9ef4d584810aa508693e3b677342ced1067e2b4da1f881fe18
6
+ metadata.gz: 6ca2d7b17d4cc050a378092b89ab07aeb8487073038362e0113f57b0d743cf0cd0e98a5123f3398a0ef4b9d0378a83292b35a3cdbab9c57a4e5016589c2923f9
7
+ data.tar.gz: a16f0dc9d6f5f34858e7fcfaa0cad1455b8f0f7fbab55a4515ffe3bc2a3b48f37ff872197a185aceb329d1c7c74e177b988663ce434a630b25a70ac07a07c66a
data/briar.gemspec CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |gem|
26
26
  gem.required_ruby_version = '>= 1.8.7'
27
27
 
28
28
  gem.add_runtime_dependency 'rbx-require-relative', '~> 0.0.9'
29
- gem.add_runtime_dependency 'calabash-cucumber', '>= 0.9.164'
29
+ gem.add_runtime_dependency 'calabash-cucumber', '>= 0.9.166pre4'
30
30
  gem.add_runtime_dependency 'rake', '~>10.1'
31
31
  # downgrading to 1.0.0 from 1.2.0
32
32
  # https://trello.com/c/YKREVfCX/630-lesspainfulformatter-should-depend-on-syntax-1-2-0
@@ -221,6 +221,23 @@ module Briar
221
221
  device
222
222
  end
223
223
 
224
+ def error_no_rescue(msg)
225
+ if RUBY_VERSION < '2.0'
226
+ stack = Kernel.caller()[1..6].join("\n")
227
+ else
228
+ stack = Kernel.caller(0, 6)[1..-1].join("\n")
229
+ end
230
+
231
+ msg = "ERROR: '#{msg}'\n#{stack}"
232
+
233
+ # todo error_no_rescue function does not output on a new line when called within cucumber
234
+ begin
235
+ warn "\033[31m\n#{msg}\033[0m"
236
+ rescue
237
+ warn "\n#{msg}"
238
+ end
239
+ end
240
+
224
241
  end
225
242
  end
226
243
 
@@ -26,11 +26,8 @@ module Briar
26
26
  args = briar_args_for_slider_set_value(options)
27
27
  query_str = "slider marked:'#{slider_id}'"
28
28
  views_touched = map(query_str, :changeSlider, value_str, *args)
29
- if views_touched.empty? or views_touched.member? '<VOID>'
30
- screenshot_and_raise "could not slider marked '#{slider_id}' to '#{value}' using query '#{query_str}' with options '#{options}'"
31
- end
32
-
33
- views_touched
29
+ msg = "could not slider marked '#{slider_id}' to '#{value}' using query '#{query_str}' with options '#{options}'"
30
+ assert_map_results(views_touched, msg)
34
31
  end
35
32
 
36
33
 
data/lib/briar/irbrc.rb CHANGED
@@ -25,15 +25,21 @@ IRB.conf[:SAVE_HISTORY] = 50
25
25
  # Store results in home directory with specified file name
26
26
  IRB.conf[:HISTORY_FILE] = '.irb-history'
27
27
 
28
+
29
+ #noinspection RubyResolve
28
30
  require 'calabash-cucumber'
31
+ #noinspection RubyResolve
29
32
  require 'calabash-cucumber/operations'
33
+ #noinspection RubyResolve
30
34
  require 'calabash-cucumber/launch/simulator_helper'
35
+ #noinspection RubyResolve
31
36
  require 'calabash-cucumber/launcher'
32
37
 
33
38
  SIM=Calabash::Cucumber::SimulatorHelper
34
39
 
35
40
  extend Calabash::Cucumber::Operations
36
41
 
42
+ #noinspection RubyUnusedLocalVariable
37
43
  def embed(x,y=nil,z=nil)
38
44
  puts "Screenshot at #{x}"
39
45
  end
@@ -195,5 +201,5 @@ def briar_message_of_the_day
195
201
  'What is a calabash anyway?', 'Smile! You are on camera!', 'Let op! Wild Rooster!',
196
202
  "Don't touch that button!", "I'm gonna take this to 11.", 'Console. Engaged.',
197
203
  'Your wish is my command.', 'This console session was created just for you.']
198
- puts "#{motd.sample}"
204
+ puts "#{motd.shuffle().first}"
199
205
  end
@@ -165,9 +165,8 @@ module Briar
165
165
 
166
166
  views_touched = map(query_str, :changeDatePickerDate, target_str, fmt_str, *args)
167
167
 
168
- if views_touched.empty? or views_touched.member? '<VOID>'
169
- screenshot_and_raise "could not change date on picker to '#{target_dt}' using query '#{query_str}' with options '#{options}'"
170
- end
168
+ msg = "could not change date on picker to '#{target_dt}' using query '#{query_str}' with options '#{options}'"
169
+ views_touched = assert_map_results(views_touched, msg)
171
170
 
172
171
  set_briar_date_picker_variables target_dt, options
173
172
 
data/lib/briar/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Briar
2
- VERSION = '0.1.3.b8'
2
+ VERSION = '0.1.3.b9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: briar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3.b8
4
+ version: 0.1.3.b9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Moody
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-21 00:00:00.000000000 Z
11
+ date: 2014-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbx-require-relative
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '>='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.9.164
33
+ version: 0.9.166pre4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '>='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.9.164
40
+ version: 0.9.166pre4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -162,6 +162,6 @@ rubyforge_project:
162
162
  rubygems_version: 2.2.1
163
163
  signing_key:
164
164
  specification_version: 4
165
- summary: briar-0.1.3.b8
165
+ summary: briar-0.1.3.b9
166
166
  test_files:
167
167
  - spec/spec_helper.rb