applenium 0.0.5 → 0.0.6

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: 7279db18f10fe78c5dcf60c5bf4d7afd6e24f5a2
4
- data.tar.gz: f1c9eedc1cb921f0cc24e44927d36f392d0ac633
3
+ metadata.gz: fa7a81db902b379cc7bb55f394cb4e1425c0a2fa
4
+ data.tar.gz: 23bbb183f000af6b7f1eb2cc59f3d4ca02fd5581
5
5
  SHA512:
6
- metadata.gz: f8614fc7a0ded499ac98e001383d1dccd102efaae220ba6c2c03fd52f1733adfac5c4dc47e5de44794e5cc5d496e0156d132565dfb8b97bf73af032a509ced13
7
- data.tar.gz: b1e61972d403b5ae45958256d779e920df8616d6474a5df37f3ee3d33b8cee2fd96f5a3e2db0a142bcea56c9be5b06a2f2b95126b3c53737b0ca11d75e4be9f8
6
+ metadata.gz: 21094cb7c0b475d826b046288e0f4fc59b4dcd18a61980009d537778006f158d550aaece16295f7f4b69e6e40f44dcf1d382d25dbc445d9fba65821377581d18
7
+ data.tar.gz: 0871352cdefa0f24048a97ccd153dc83f8b8c2f49b05cac334dba463e8f4be9aa16834ec92ac0c3da46bc408e66d7766a4f5690453b27ab1e954f75644b1b425
data/bin/applenium CHANGED
@@ -1,13 +1,15 @@
1
1
  #!/usr/bin/env ruby
2
- require_relative 'generate.rb'
3
2
  require 'applenium/version'
4
3
  require 'fileutils'
4
+ require 'tempfile'
5
+ require 'json'
6
+ require "rubygems"
5
7
 
6
8
  lib_dir = File.expand_path("../lib", File.dirname(__FILE__))
7
9
  $:.unshift lib_dir unless $:.include?(lib_dir)
8
10
 
9
11
  # @base_dir = File.join(FileUtils.pwd)
10
- @root_dir =File.join(FileUtils.pwd)
12
+ @root_dir =File.join(FileUtils.pwd, "cucumber")
11
13
  @root_feature_dir =File.join(@root_dir, "features")
12
14
  @root_lib_dir =File.join(@root_dir, "lib")
13
15
  @root_scripts_dir =File.join(@root_dir, "script")
@@ -15,6 +17,123 @@ $:.unshift lib_dir unless $:.include?(lib_dir)
15
17
  @source_feature_dir =File.join(@source_dir, "features")
16
18
  @source_lib_dir =File.join(@source_dir, "lib")
17
19
  @source_scripts_dir =File.join(@source_dir, "scripts")
20
+ @source_config_dir =File.join(@source_dir, "config_files")
21
+
22
+ def applinium_scaffold
23
+ msg("Question") do
24
+ puts "copying all confile files"
25
+ puts "It will contain Gemfile, rakefile, package.json, cucumber.yml etc etc"
26
+ puts "Please hit return to create"
27
+ end
28
+ exit 2 unless STDIN.gets.chomp == ''
29
+
30
+ FileUtils.cp_r(@source_config_dir, @root_dir)
31
+
32
+ msg("Info") do
33
+ puts "Config files created. \n"
34
+ end
35
+
36
+ if File.exists?(@root_feature_dir)
37
+ puts "There is already features directory. Please remane existing features directory to carry on "
38
+ exit 1
39
+ end
40
+ msg("Question") do
41
+ puts "creating features directory."
42
+ puts "It will contain all your project tests and support and tep definitions directory for cucumber."
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_feature_dir, @root_feature_dir)
48
+
49
+ msg("Info") do
50
+ puts "features subdirectory created. \n"
51
+ end
52
+
53
+ if File.exists?(@root_lib_dir)
54
+ puts "There is already lib directory. Please remane existing lib directory to carry on "
55
+ exit 1
56
+ end
57
+ msg("Question") do
58
+ puts "creating lib directory."
59
+ puts "It will contain all your project ruby files."
60
+ puts "Please hit return to confirm that's what you want."
61
+ end
62
+ exit 2 unless STDIN.gets.chomp == ''
63
+
64
+ FileUtils.cp_r(@source_lib_dir, @root_lib_dir)
65
+
66
+ msg("Info") do
67
+ puts "lib subdirectory created. \n"
68
+ end
69
+
70
+ if File.exists?(@root_scripts_dir)
71
+ puts "There is already scripts directory. Please remane existing scripts directory to carry on "
72
+ exit 1
73
+ end
74
+ msg("Question") do
75
+ puts "creating scripts directory."
76
+ puts "It will contain all your project bash scrips files."
77
+ puts "Please hit return to confirm that's what you want."
78
+ end
79
+ exit 2 unless STDIN.gets.chomp == ''
80
+
81
+ FileUtils.cp_r(@source_scripts_dir, @root_scripts_dir)
82
+
83
+ msg("Info") do
84
+ puts "Scripts subdirectory created. \n"
85
+ end
86
+
87
+
88
+
89
+ def msg(title, &block)
90
+ puts "\n" + "-"*10 + title + "-"*10
91
+ block.call
92
+ puts "-"*10 + "-------" + "-"*10 + "\n"
93
+ end
94
+
95
+ def print_usage
96
+ puts <<EOF
97
+
98
+ Usage: applenium <command-name> [parameters] [options]
99
+
100
+ <command-name> can be one of
101
+ help
102
+ prints more detailed help information.
103
+ gen
104
+ generate a features folder structure.
105
+ version
106
+ prints the gem version
107
+
108
+ <options> can be
109
+ -v, --verbose Turns on verbose logging
110
+ EOF
111
+ end
112
+
113
+ def print_help
114
+ puts <<EOF
115
+
116
+ Usage: applenium <command-name> [parameters] [options]
117
+
118
+ <command-name> can be one of
119
+ help
120
+ gen
121
+ version
122
+
123
+ Commands:
124
+ help : prints more detailed help information.
125
+
126
+ gen : creates a skeleton features dir. This is usually used once when
127
+ setting up selnium-cucumber to ensure that the features folder contains
128
+ the right step definitions and environment to run with cucumber.
129
+
130
+ version : prints the gem version
131
+
132
+ <Options>
133
+ -v, --verbose Turns on verbose logging
134
+ EOF
135
+ end
136
+
18
137
 
19
138
  if (ARGV.length == 0)
20
139
  print_usage
@@ -22,8 +141,8 @@ else
22
141
  cmd = ARGV.shift
23
142
  if cmd == "help"
24
143
  print_help
25
- elsif cmd == "gen"
26
- applenium_scaffold
144
+ elsif cmd == "setup"
145
+ applinium_scaffold
27
146
  elsif cmd == "version"
28
147
  puts Applenium::VERSION
29
148
  else
@@ -1,3 +1,3 @@
1
1
  module Applenium
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
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.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shashikant86
@@ -94,8 +94,6 @@ 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
99
97
  extensions: []
100
98
  extra_rdoc_files: []
101
99
  files:
@@ -106,8 +104,6 @@ files:
106
104
  - README.md
107
105
  - applenium.gemspec
108
106
  - bin/applenium
109
- - bin/generate.rb
110
- - bin/helper.rb
111
107
  - features/cucumber_template.feature
112
108
  - features/step_definitions/all_steps.rb
113
109
  - features/support/env.rb
@@ -120,16 +116,17 @@ files:
120
116
  - lib/applenium/web/required_files.rb
121
117
  - lib/applenium/web/web_methods.rb
122
118
  - lib/applenium/web_steps.rb
123
- - scaffold/.relish
124
- - scaffold/.rubocop.yml
125
- - scaffold/.ruby-version
126
- - scaffold/.travis.yml
127
- - scaffold/.yard.yml
128
- - scaffold/Gemfile
129
- - scaffold/README.md
130
- - scaffold/browser.json
131
- - scaffold/ci_script
132
- - scaffold/cucumber.yml
119
+ - scaffold/config_files/.relish
120
+ - scaffold/config_files/.rubocop.yml
121
+ - scaffold/config_files/.ruby-version
122
+ - scaffold/config_files/.travis.yml
123
+ - scaffold/config_files/.yard.yml
124
+ - scaffold/config_files/Gemfile
125
+ - scaffold/config_files/README.md
126
+ - scaffold/config_files/browser.json
127
+ - scaffold/config_files/ci_script
128
+ - scaffold/config_files/cucumber.yml
129
+ - scaffold/config_files/package.json
133
130
  - scaffold/features/google.feature
134
131
  - scaffold/features/pages/Abstract.rb
135
132
  - scaffold/features/pages/HomePage.rb
@@ -140,7 +137,6 @@ files:
140
137
  - scaffold/features/support/responsive.rb
141
138
  - scaffold/lib/project.erb
142
139
  - scaffold/lib/project/version.erb
143
- - scaffold/package.json
144
140
  - scaffold/rake_tasks/cucumber.rb
145
141
  - scaffold/rake_tasks/cuke_sniffer.rb
146
142
  - scaffold/rake_tasks/rspec.rb
data/bin/generate.rb DELETED
@@ -1,62 +0,0 @@
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 DELETED
@@ -1,51 +0,0 @@
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