briar 0.1.3.b3 → 0.1.3.b4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 512528d4fa2a1d45ded34cc521654f7f562b6179
4
- data.tar.gz: 94345455689bbe7fb6b67d3bdeb4e6f780ada03f
3
+ metadata.gz: ba56773bf8fafac50e0a6cda6bd3937469a00c58
4
+ data.tar.gz: 35b2ab49686b4449d22980b88978738e9f25a924
5
5
  SHA512:
6
- metadata.gz: 9d96364adc048ea8b503f3ada1d3e05b87430056ea33c0b1027a7777dd95f8f9735dfc63577ebd8699203ce48174bf6f9948cc388b688df45f0de99b2e1d371b
7
- data.tar.gz: 3b81e8ae7d62a14d880aa14b38956cbfd03d1ab06635cb834f7aa006bcba9c092d3868badc347f43bd738dfb62fe49e68cfca4b60eda3e1efd8bcd203e05b930
6
+ metadata.gz: 3d98468461361d5a17a3b5aeef32c91aa4b28dc4011ef21155d37d261cfc10eb667f0849703ab51734d9b336b33d4374c87563943b6001f58076b5eb3cb3bac0
7
+ data.tar.gz: 063c9190bcb096fe7b7b52d7fee8e5c6371fadc22195e4d1ceb6c3a2e3b7e526540b84f3e6b3dac1305e7af64d7e254d71c883fb7a3d2b1245f47649e1253cab
data/Rakefile CHANGED
@@ -1,13 +1,2 @@
1
1
  require 'bundler/gem_tasks'
2
- require './lib/briar/version.rb'
3
- task :show_simulator do
4
- sh "/usr/bin/osascript -e 'tell application \"iPhone Simulator\" to activate'"
5
- sh "/usr/bin/osascript -e 'tell application \"RubyMine\" to activate'"
6
- end
7
-
8
- # let us try to use gem_tasks
9
- #$ rake -T
10
- #rake build # Build briar-0.0.7.gem into the pkg directory.
11
- #rake install # Build and install briar-0.0.7.gem into system gems.
12
- #rake release # Create tag v0.0.7 and build and push briar-0.0.7.gem to Rubygems
13
2
 
@@ -72,29 +72,16 @@ require 'briar/text_field'
72
72
  require 'briar/text_view'
73
73
 
74
74
 
75
- #noinspection RubyDefParenthesesInspection
76
- def device ()
77
- url = URI.parse(ENV['DEVICE_ENDPOINT']|| 'http://localhost:37265/')
78
- http = Net::HTTP.new(url.host, url.port)
79
- res = http.start do |sess|
80
- sess.request Net::HTTP::Get.new(ENV['CALABASH_VERSION_PATH'] || 'version')
81
- end
82
- status = res.code
83
-
84
- #noinspection RubyUnusedLocalVariable
85
- begin
86
- http.finish if http and http.started?
87
- rescue Exception => e
88
- # ignored
89
- end
75
+ def device
76
+ deprecated('0.1.3', "use the calabash function 'default_device' instead", :warn)
77
+ @device = default_device()
78
+ end
90
79
 
91
- if status=='200'
92
- version_body = JSON.parse(res.body)
93
- Calabash::Cucumber::Device.new(url, version_body)
94
- end
80
+ def xamarin_test_cloud?
81
+ ENV['XAMARIN_TEST_CLOUD'] == '1'
95
82
  end
96
83
 
97
- # todo deprecated function needs file + line numbers
84
+
98
85
  # todo deprecated function does not output on a new line when called within cucumber
99
86
  def deprecated(version, msg, type)
100
87
  allowed = [:pending, :warn]
@@ -102,7 +89,9 @@ def deprecated(version, msg, type)
102
89
  screenshot_and_raise "type '#{type}' must be on of '#{allowed}'"
103
90
  end
104
91
 
105
- msg = "deprecated '#{version}' - '#{msg}'"
92
+ info = Kernel.caller.first
93
+
94
+ msg = "deprecated '#{version}' - '#{msg}'\n#{info}"
106
95
 
107
96
  if type.eql?(:pending)
108
97
  pending(msg)
@@ -2,35 +2,6 @@ require 'calabash-cucumber'
2
2
 
3
3
  module Briar
4
4
  module UIAKeyboard
5
- def uia_keyboard_visible?
6
- res = uia('UIATarget.localTarget().frontMostApp().keyboard()')['value']
7
- not res.eql?(':nil')
8
- end
9
5
 
10
- def uia_await_keyboard(opts={})
11
- default_opts = {:timeout => BRIAR_WAIT_TIMEOUT,
12
- :retry_frequency => BRIAR_WAIT_RETRY_FREQ,
13
- :post_timeout => BRIAR_WAIT_STEP_PAUSE}
14
- opts = default_opts.merge(opts)
15
- unless opts[:timeout_message]
16
- msg = "waited for '#{opts[:timeout]}' for keyboard"
17
- opts[:timeout_message] = msg
18
- end
19
-
20
- wait_for(opts) do
21
- uia_keyboard_visible?
22
- end
23
- end
24
-
25
- def dismiss_ipad_keyboard
26
- screenshot_and_raise 'cannot dismiss keyboard on iphone' if iphone?
27
- screenshot_and_raise 'cannot dismiss keyboard without launching with instruments' unless uia_available?
28
- send_uia_command command: "uia.keyboard().buttons()['Hide keyboard'].tap()"
29
- step_pause
30
- end
31
6
  end
32
7
  end
33
-
34
-
35
-
36
-
@@ -1,3 +1,5 @@
1
+ # encoding: UTF-8
2
+
1
3
  require 'calabash-cucumber'
2
4
 
3
5
  module Briar
@@ -3,15 +3,6 @@ require 'calabash-cucumber'
3
3
  module Briar
4
4
  module UIA
5
5
 
6
- def uia_available?
7
- # proxy for testing if run_loop exists
8
- not uia_not_available?
9
- end
10
-
11
- def uia_not_available?
12
- default_device.nil?
13
- end
14
-
15
6
  def uia_handle_target_command(cmd, *query_args)
16
7
  args = query_args.map do |part|
17
8
  if part.is_a?(String)
@@ -1,3 +1,3 @@
1
1
  module Briar
2
- VERSION = '0.1.3.b3'
2
+ VERSION = '0.1.3.b4'
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.b3
4
+ version: 0.1.3.b4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Moody
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-15 00:00:00.000000000 Z
11
+ date: 2013-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: calabash-cucumber
@@ -148,7 +148,7 @@ rubyforge_project:
148
148
  rubygems_version: 2.1.11
149
149
  signing_key:
150
150
  specification_version: 4
151
- summary: briar-0.1.3.b3
151
+ summary: briar-0.1.3.b4
152
152
  test_files:
153
153
  - features/step_definitions/alerts_and_sheets/action_sheet_steps.rb
154
154
  - features/step_definitions/alerts_and_sheets/alert_view_steps.rb