applenium 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/applenium +26 -3
- data/bin/generate.rb +62 -0
- data/bin/helper.rb +51 -0
- data/lib/applenium/version.rb +1 -1
- data/scaffold/scripts/ci_script +15 -0
- metadata +6 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7279db18f10fe78c5dcf60c5bf4d7afd6e24f5a2
|
4
|
+
data.tar.gz: f1c9eedc1cb921f0cc24e44927d36f392d0ac633
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8614fc7a0ded499ac98e001383d1dccd102efaae220ba6c2c03fd52f1733adfac5c4dc47e5de44794e5cc5d496e0156d132565dfb8b97bf73af032a509ced13
|
7
|
+
data.tar.gz: b1e61972d403b5ae45958256d779e920df8616d6474a5df37f3ee3d33b8cee2fd96f5a3e2db0a142bcea56c9be5b06a2f2b95126b3c53737b0ca11d75e4be9f8
|
data/bin/applenium
CHANGED
@@ -1,9 +1,32 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
require_relative 'generate.rb'
|
3
|
+
require 'applenium/version'
|
4
|
+
require 'fileutils'
|
2
5
|
|
3
6
|
lib_dir = File.expand_path("../lib", File.dirname(__FILE__))
|
4
7
|
$:.unshift lib_dir unless $:.include?(lib_dir)
|
5
|
-
|
6
|
-
@
|
8
|
+
|
9
|
+
# @base_dir = File.join(FileUtils.pwd)
|
10
|
+
@root_dir =File.join(FileUtils.pwd)
|
11
|
+
@root_feature_dir =File.join(@root_dir, "features")
|
12
|
+
@root_lib_dir =File.join(@root_dir, "lib")
|
13
|
+
@root_scripts_dir =File.join(@root_dir, "script")
|
7
14
|
@source_dir = File.join(File.dirname(__FILE__), '..', 'scaffold')
|
15
|
+
@source_feature_dir =File.join(@source_dir, "features")
|
16
|
+
@source_lib_dir =File.join(@source_dir, "lib")
|
17
|
+
@source_scripts_dir =File.join(@source_dir, "scripts")
|
8
18
|
|
9
|
-
|
19
|
+
if (ARGV.length == 0)
|
20
|
+
print_usage
|
21
|
+
else
|
22
|
+
cmd = ARGV.shift
|
23
|
+
if cmd == "help"
|
24
|
+
print_help
|
25
|
+
elsif cmd == "gen"
|
26
|
+
applenium_scaffold
|
27
|
+
elsif cmd == "version"
|
28
|
+
puts Applenium::VERSION
|
29
|
+
else
|
30
|
+
print_usage
|
31
|
+
end
|
32
|
+
end
|
data/bin/generate.rb
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
def applinium_scaffold
|
2
|
+
if File.exists?(@root_feature_dir)
|
3
|
+
puts "There is already features directory. Please remane existing features directory to carry on "
|
4
|
+
exit 1
|
5
|
+
end
|
6
|
+
msg("Question") do
|
7
|
+
puts "creating features directory."
|
8
|
+
puts "It will contain all your project tests."
|
9
|
+
puts "Please hit return to confirm that's what you want."
|
10
|
+
end
|
11
|
+
exit 2 unless STDIN.gets.chomp == ''
|
12
|
+
|
13
|
+
FileUtils.cp_r(@source_feature_dir, @root_feature_dir)
|
14
|
+
|
15
|
+
msg("Info") do
|
16
|
+
puts "features subdirectory created. \n"
|
17
|
+
end
|
18
|
+
|
19
|
+
if File.exists?(@root_lib_dir)
|
20
|
+
puts "There is already lib directory. Please remane existing lib directory to carry on "
|
21
|
+
exit 1
|
22
|
+
end
|
23
|
+
msg("Question") do
|
24
|
+
puts "creating lib directory."
|
25
|
+
puts "It will contain all your project ruby files."
|
26
|
+
puts "Please hit return to confirm that's what you want."
|
27
|
+
end
|
28
|
+
exit 2 unless STDIN.gets.chomp == ''
|
29
|
+
|
30
|
+
FileUtils.cp_r(@source_lib_dir, @root_lib_dir)
|
31
|
+
|
32
|
+
msg("Info") do
|
33
|
+
puts "lib subdirectory created. \n"
|
34
|
+
end
|
35
|
+
|
36
|
+
if File.exists?(@root_scripts_dir)
|
37
|
+
puts "There is already scripts directory. Please remane existing scripts directory to carry on "
|
38
|
+
exit 1
|
39
|
+
end
|
40
|
+
msg("Question") do
|
41
|
+
puts "creating lib directory."
|
42
|
+
puts "It will contain all your project bash scrips files."
|
43
|
+
puts "Please hit return to confirm that's what you want."
|
44
|
+
end
|
45
|
+
exit 2 unless STDIN.gets.chomp == ''
|
46
|
+
|
47
|
+
FileUtils.cp_r(@source_script_dir, @root_script_dir)
|
48
|
+
|
49
|
+
msg("Info") do
|
50
|
+
puts "Scripts subdirectory created. \n"
|
51
|
+
end
|
52
|
+
|
53
|
+
msg("Question") do
|
54
|
+
puts "creating lib directory."
|
55
|
+
puts "It will contain all your project bash scrips files."
|
56
|
+
puts "Please hit return to confirm that's what you want."
|
57
|
+
end
|
58
|
+
exit 2 unless STDIN.gets.chomp == ''
|
59
|
+
|
60
|
+
FileUtils.cp_r(@source_script_dir, @root_script_dir)
|
61
|
+
|
62
|
+
end
|
data/bin/helper.rb
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
equire 'tempfile'
|
2
|
+
require 'json'
|
3
|
+
require "rubygems"
|
4
|
+
|
5
|
+
def msg(title, &block)
|
6
|
+
puts "\n" + "-"*10 + title + "-"*10
|
7
|
+
block.call
|
8
|
+
puts "-"*10 + "-------" + "-"*10 + "\n"
|
9
|
+
end
|
10
|
+
|
11
|
+
def print_usage
|
12
|
+
puts <<EOF
|
13
|
+
|
14
|
+
Usage: applenium <command-name> [parameters] [options]
|
15
|
+
|
16
|
+
<command-name> can be one of
|
17
|
+
help
|
18
|
+
prints more detailed help information.
|
19
|
+
gen
|
20
|
+
generate a features folder structure.
|
21
|
+
version
|
22
|
+
prints the gem version
|
23
|
+
|
24
|
+
<options> can be
|
25
|
+
-v, --verbose Turns on verbose logging
|
26
|
+
EOF
|
27
|
+
end
|
28
|
+
|
29
|
+
def print_help
|
30
|
+
puts <<EOF
|
31
|
+
|
32
|
+
Usage: applenium <command-name> [parameters] [options]
|
33
|
+
|
34
|
+
<command-name> can be one of
|
35
|
+
help
|
36
|
+
gen
|
37
|
+
version
|
38
|
+
|
39
|
+
Commands:
|
40
|
+
help : prints more detailed help information.
|
41
|
+
|
42
|
+
gen : creates a skeleton features dir. This is usually used once when
|
43
|
+
setting up selnium-cucumber to ensure that the features folder contains
|
44
|
+
the right step definitions and environment to run with cucumber.
|
45
|
+
|
46
|
+
version : prints the gem version
|
47
|
+
|
48
|
+
<Options>
|
49
|
+
-v, --verbose Turns on verbose logging
|
50
|
+
EOF
|
51
|
+
end
|
data/lib/applenium/version.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
RAKETASK=$1
|
3
|
+
rm -rf ${WORKSPACE}/target/
|
4
|
+
rm -rf ${WORKSPACE}/.yarddoc/
|
5
|
+
rm -rf ${WORKSPACE}/doc/
|
6
|
+
mkdir -p ${WORKSPACE}/target/
|
7
|
+
bundle install --path vendor/bundle --binstubs
|
8
|
+
bundle exec yard config load_plugins true
|
9
|
+
bundle exec yardoc 'example/**/*.rb' 'example/**/*.feature'
|
10
|
+
bundle exec rake yard
|
11
|
+
cd ${WORKSPACE}/features
|
12
|
+
bundle exec cuke_sniffer --out html ${WORKSPACE}/target/cuke_sniffer.html
|
13
|
+
bundle exec rubocop ${WORKSPACE}/features/ --require rubocop/formatter/checkstyle_formatter --format Rubocop::Formatter::CheckstyleFormatter --no-color --silent --rails --out ${WORKSPACE}/target/checkstyle.xml
|
14
|
+
cd ${WORKSPACE}
|
15
|
+
bundle exec rake "${RAKETASK}"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: applenium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shashikant86
|
@@ -94,6 +94,8 @@ description: Mobile and Web apps automation framework using Appium, Selenium and
|
|
94
94
|
email: shashikant.jagtap@aol.co.uk
|
95
95
|
executables:
|
96
96
|
- applenium
|
97
|
+
- generate.rb
|
98
|
+
- helper.rb
|
97
99
|
extensions: []
|
98
100
|
extra_rdoc_files: []
|
99
101
|
files:
|
@@ -104,6 +106,8 @@ files:
|
|
104
106
|
- README.md
|
105
107
|
- applenium.gemspec
|
106
108
|
- bin/applenium
|
109
|
+
- bin/generate.rb
|
110
|
+
- bin/helper.rb
|
107
111
|
- features/cucumber_template.feature
|
108
112
|
- features/step_definitions/all_steps.rb
|
109
113
|
- features/support/env.rb
|
@@ -142,6 +146,7 @@ files:
|
|
142
146
|
- scaffold/rake_tasks/rspec.rb
|
143
147
|
- scaffold/rake_tasks/rubocop.rb
|
144
148
|
- scaffold/rake_tasks/yard.rb
|
149
|
+
- scaffold/scripts/ci_script
|
145
150
|
- scaffold/spec/spec_helper.rb
|
146
151
|
homepage: ''
|
147
152
|
licenses:
|