Skip to content

Commit

Permalink
Merge pull request appium-boneyard#139 from KazuCocoa/update_ruby_sample
Browse files Browse the repository at this point in the history
update ruby sample a bit
  • Loading branch information
KazuCocoa authored Oct 29, 2017
2 parents 326669e + c52756e commit 227faa4
Show file tree
Hide file tree
Showing 15 changed files with 21 additions and 22 deletions.
Binary file modified sample-code/apps/TestApp/build/release-iphonesimulator/.DS_Store
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion sample-code/examples/ruby/Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://www.rubygems.org'

gem 'appium_lib', '~> 9.4.4'
gem 'appium_lib', '~> 9.7.4'
gem 'rest-client', '~> 2.0.2'
gem 'rspec', '~> 3.6.0'
gem 'cucumber', '~> 2.4.0'
Expand Down
26 changes: 12 additions & 14 deletions sample-code/examples/ruby/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
GEM
remote: https://www.rubygems.org/
specs:
appium_lib (9.4.4)
awesome_print (~> 1.7)
appium_lib (9.7.4)
awesome_print (~> 1.8)
json (>= 1.8)
nokogiri (~> 1.6, >= 1.6.6)
selenium-webdriver (>= 3.0.4, <= 3.4)
selenium-webdriver (~> 3.4, >= 3.4.1)
tomlrb (~> 1.1)
awesome_print (1.7.0)
awesome_print (1.8.0)
builder (3.2.3)
childprocess (0.7.0)
childprocess (0.8.0)
ffi (~> 1.0, >= 1.0.11)
chronic_duration (0.10.6)
numerizer (~> 0.1.1)
Expand All @@ -35,12 +35,12 @@ GEM
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
multi_json (1.12.1)
mini_portile2 (2.3.0)
multi_json (1.12.2)
multi_test (0.1.2)
netrc (0.11.0)
nokogiri (1.7.2)
mini_portile2 (~> 2.1.0)
nokogiri (1.8.1)
mini_portile2 (~> 2.3.0)
numerizer (0.1.1)
rest-client (2.0.2)
http-cookie (>= 1.0.2, < 2.0)
Expand All @@ -63,24 +63,22 @@ GEM
sauce_whisk (0.0.22)
json (>= 1.8)
rest-client (>= 1.8)
selenium-webdriver (3.4.0)
selenium-webdriver (3.6.0)
childprocess (~> 0.5)
rubyzip (~> 1.0)
websocket (~> 1.0)
spec (5.3.4)
chronic_duration (~> 0.10.2)
test-unit (2.5.5)
tomlrb (1.2.4)
tomlrb (1.2.6)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.4)
websocket (1.2.4)

PLATFORMS
ruby

DEPENDENCIES
appium_lib (~> 9.4.4)
appium_lib (~> 9.7.4)
cucumber (~> 2.4.0)
rest-client (~> 2.0.2)
rspec (~> 3.6.0)
Expand Down
2 changes: 1 addition & 1 deletion sample-code/examples/ruby/sauce_example.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# This is the test itself
describe 'Computation' do
before(:each) do
Appium::Driver.new(desired_caps).start_driver
Appium::Driver.new(desired_caps, true).start_driver
Appium.promote_appium_methods RSpec::Core::ExampleGroup
end

Expand Down
11 changes: 6 additions & 5 deletions sample-code/examples/ruby/simple_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,22 @@
APP_PATH = '../../apps/TestApp/build/release-iphonesimulator/TestApp.app'

desired_caps = {
caps: {
caps: {
platformName: 'iOS',
platformVersion: '10.2',
platformVersion: '11.0',
deviceName: 'iPhone 6',
app: APP_PATH,
automationName: "XCUITest"
automationName: 'XCUITest',
},
appium_lib: {
sauce_username: nil, # don't run on Sauce
sauce_access_key: nil
sauce_access_key: nil,
wait: 60
}
}

# Start the driver
Appium::Driver.new(desired_caps).start_driver
Appium::Driver.new(desired_caps, true).start_driver

module Calculator
module IOS
Expand Down
2 changes: 1 addition & 1 deletion sample-code/examples/ruby/xunit_android.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def setup
appPackage: 'com.android.settings' },
appium_lib: { sauce_username: nil,
sauce_access_key: nil } }
driver = Appium::Driver.new(caps)
driver = Appium::Driver.new(caps, true)
Appium.promote_appium_methods self.class
driver.start_driver.manage.timeouts.implicit_wait = 20 # seconds
end
Expand Down

0 comments on commit 227faa4

Please sign in to comment.