appium-rspec-bootstrap 0.0.1
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 +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +12 -0
- data/Rakefile +1 -0
- data/appium-rspec-bootstrap.gemspec +23 -0
- data/bin/appium-rspec-bootstrap +40 -0
- data/lib/appium/rspec/bootstrap.rb +9 -0
- data/lib/appium/rspec/bootstrap/version.rb +7 -0
- data/templates/Gemfile +10 -0
- data/templates/Procfile +2 -0
- data/templates/api_server.rb +7 -0
- data/templates/build-app.tt +8 -0
- data/templates/config.ru +3 -0
- data/templates/spec/spec_helper.rb.tt +34 -0
- data/templates/spec/template_spec.rb +8 -0
- metadata +103 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5ef55866d785e657c8426fbdbbcbcd239f62b8ea
|
4
|
+
data.tar.gz: eaedc3856775350c5a2a327e3f264f93c5904ee9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 50ab6ca05e6589f206cc45ab5ed386e42899df8caa0acdd9d0ce58db1976ece85a2e183b473de072d9579e2943722c04999dee87dd7d4df7f6898aefb694cfc2
|
7
|
+
data.tar.gz: 3d15183d2dbf42daad67e2fd542c0c2ba201ca6d65d4d9f6d2f18f6c0a4fc799ccc8813c8550285f3c70c59ecd97b6ed7526aeba06d57f046ef87288118ee429
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Alex Mishyn
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# Appium Rspec Bootstrap
|
2
|
+
|
3
|
+
This is a collection of scripts to automate testing process with appium and rspec.
|
4
|
+
It includes scripts to build app, mock api server and run alltogether
|
5
|
+
|
6
|
+
|
7
|
+
Getting started
|
8
|
+
===============
|
9
|
+
|
10
|
+
gem install appium-rspec-bootstrap
|
11
|
+
|
12
|
+
appium-rspec-bootstrap projects-test ~/workspace/project-ios/Project.xcworkspace/
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'appium/rspec/bootstrap/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "appium-rspec-bootstrap"
|
8
|
+
spec.version = Appium::Rspec::Bootstrap::VERSION
|
9
|
+
spec.authors = ["Alex Mishyn"]
|
10
|
+
spec.email = ["mishyn@gmail.com"]
|
11
|
+
spec.description = %q{Appium + rspec bootstrap}
|
12
|
+
spec.summary = %q{Appium + rspec bootstrap}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
|
20
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
21
|
+
spec.add_development_dependency "rake"
|
22
|
+
spec.add_runtime_dependency "thor"
|
23
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require "rubygems" # ruby1.9 doesn't "require" it though
|
3
|
+
require "thor"
|
4
|
+
|
5
|
+
class Appium < Thor::Group
|
6
|
+
include Thor::Actions
|
7
|
+
|
8
|
+
desc "create skeleton in directory NAME for project PATH"
|
9
|
+
# Define arguments and options
|
10
|
+
argument :project_name, :desc => 'directory to be generated'
|
11
|
+
argument :path, :desc => 'path to ios project .xcworkspace'
|
12
|
+
|
13
|
+
def name
|
14
|
+
File.basename(path,'.*')
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.source_root
|
18
|
+
File.dirname(__FILE__)
|
19
|
+
end
|
20
|
+
|
21
|
+
def create_folders
|
22
|
+
directory File.join('..', 'templates'), project_name
|
23
|
+
end
|
24
|
+
|
25
|
+
def give_rights
|
26
|
+
chmod "#{project_name}/build-app", 0755
|
27
|
+
end
|
28
|
+
|
29
|
+
def notice
|
30
|
+
puts "Next steps:"
|
31
|
+
puts "$: cd #{project_name}"
|
32
|
+
puts "$: bundle"
|
33
|
+
puts "$: ./build-app"
|
34
|
+
puts "$: bundle exec foreman start"
|
35
|
+
puts "$: bundle exec rspec spec/"
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
|
40
|
+
Appium.start
|
data/templates/Gemfile
ADDED
data/templates/Procfile
ADDED
data/templates/config.ru
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler/setup'
|
3
|
+
|
4
|
+
require 'rspec'
|
5
|
+
require 'selenium-webdriver'
|
6
|
+
|
7
|
+
def absolute_app_path
|
8
|
+
file = File.join(File.dirname(__FILE__), '../app/Applications/<%=name-%>.app')
|
9
|
+
raise "App doesn't exist #{file}" unless File.exist? file
|
10
|
+
file
|
11
|
+
end
|
12
|
+
|
13
|
+
capabilities = {
|
14
|
+
'browserName' => 'iOS',
|
15
|
+
'platform' => 'Mac',
|
16
|
+
'version' => '6.0',
|
17
|
+
'app' => absolute_app_path
|
18
|
+
}
|
19
|
+
|
20
|
+
server_url = "http://127.0.0.1:4723/wd/hub"
|
21
|
+
|
22
|
+
|
23
|
+
RSpec.configure do |config|
|
24
|
+
config.before(:all) do
|
25
|
+
@driver = Selenium::WebDriver.for(:remote,
|
26
|
+
:desired_capabilities => capabilities,
|
27
|
+
:url => server_url)
|
28
|
+
end
|
29
|
+
|
30
|
+
config.after(:all) do
|
31
|
+
@driver.quit
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
metadata
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: appium-rspec-bootstrap
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Alex Mishyn
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-09-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: thor
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Appium + rspec bootstrap
|
56
|
+
email:
|
57
|
+
- mishyn@gmail.com
|
58
|
+
executables:
|
59
|
+
- appium-rspec-bootstrap
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- .gitignore
|
64
|
+
- Gemfile
|
65
|
+
- LICENSE.txt
|
66
|
+
- README.md
|
67
|
+
- Rakefile
|
68
|
+
- appium-rspec-bootstrap.gemspec
|
69
|
+
- bin/appium-rspec-bootstrap
|
70
|
+
- lib/appium/rspec/bootstrap.rb
|
71
|
+
- lib/appium/rspec/bootstrap/version.rb
|
72
|
+
- templates/Gemfile
|
73
|
+
- templates/Procfile
|
74
|
+
- templates/api_server.rb
|
75
|
+
- templates/build-app.tt
|
76
|
+
- templates/config.ru
|
77
|
+
- templates/spec/spec_helper.rb.tt
|
78
|
+
- templates/spec/template_spec.rb
|
79
|
+
homepage: ''
|
80
|
+
licenses:
|
81
|
+
- MIT
|
82
|
+
metadata: {}
|
83
|
+
post_install_message:
|
84
|
+
rdoc_options: []
|
85
|
+
require_paths:
|
86
|
+
- lib
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - '>='
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
requirements: []
|
98
|
+
rubyforge_project:
|
99
|
+
rubygems_version: 2.0.3
|
100
|
+
signing_key:
|
101
|
+
specification_version: 4
|
102
|
+
summary: Appium + rspec bootstrap
|
103
|
+
test_files: []
|