ruby-mobile-appium-template 1.0.7 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruby_appium.rb +60 -58
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0152d4b0a4ed5cb1bd17dbcefa23913a81e2b9153fc29b245e9fb563fd42bf89
|
4
|
+
data.tar.gz: 2a0c32c2745a16f64a27cb846996a3691ad4dcd72ea7a171b18ca9c0631fb7c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '095af323928046a9fce3b3a0e9f305a672e18a830eb58f7a240f8e9920cd9fca7ae7f51ca0cd3f8dc37601ce2047e29328dc6719877e925423dfca2719ea0d28'
|
7
|
+
data.tar.gz: f7584ccbccaaf73c7f4ed29d3bc4ee42d10a550dc6ff6bcd6553dcd064ac50b139061984cda1fc78bf68f2ac4479900c25950ba238c584246b38c07f685843df
|
data/lib/ruby_appium.rb
CHANGED
@@ -1,20 +1,23 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
1
|
+
require "thor"
|
2
|
+
require "thor/group"
|
3
|
+
require "fileutils"
|
4
4
|
|
5
5
|
class RubyAppium < Thor::Group
|
6
6
|
include Thor::Actions
|
7
7
|
|
8
|
-
VERSION = "1.0
|
8
|
+
VERSION = "1.1.0"
|
9
9
|
|
10
10
|
argument :dir_name
|
11
11
|
|
12
12
|
def self.source_root
|
13
|
-
File.join(File.dirname(__FILE__),
|
13
|
+
File.join(File.dirname(__FILE__), "..", "templates")
|
14
|
+
|
14
15
|
end
|
15
16
|
|
16
17
|
def create_new_cucumber_directory
|
17
|
-
self.destination_root = File.expand_path(dir_name
|
18
|
+
self.destination_root = File.expand_path(dir_name)
|
19
|
+
puts destination_root
|
20
|
+
puts self.destination_root
|
18
21
|
make_empty_directory
|
19
22
|
FileUtils.cd(destination_root)
|
20
23
|
gemfile_rakefile_cukeyml
|
@@ -25,90 +28,89 @@ class RubyAppium < Thor::Group
|
|
25
28
|
protected
|
26
29
|
|
27
30
|
def make_empty_directory
|
28
|
-
empty_directory
|
31
|
+
empty_directory "."
|
29
32
|
end
|
30
33
|
|
31
34
|
def create_folders
|
32
|
-
empty_directory
|
33
|
-
empty_directory
|
34
|
-
empty_directory
|
35
|
+
empty_directory "app"
|
36
|
+
empty_directory "config"
|
37
|
+
empty_directory "features"
|
35
38
|
|
36
|
-
inside
|
37
|
-
empty_directory
|
38
|
-
empty_directory
|
39
|
+
inside "app" do
|
40
|
+
empty_directory "ios"
|
41
|
+
empty_directory "android"
|
39
42
|
end
|
40
43
|
|
41
|
-
inside
|
42
|
-
empty_directory
|
43
|
-
empty_directory
|
44
|
+
inside "config" do
|
45
|
+
empty_directory "ios"
|
46
|
+
empty_directory "android"
|
44
47
|
end
|
45
48
|
|
46
|
-
inside
|
47
|
-
empty_directory
|
48
|
-
empty_directory
|
49
|
+
inside "features" do
|
50
|
+
empty_directory "login"
|
51
|
+
empty_directory "support"
|
49
52
|
end
|
50
53
|
|
51
|
-
inside
|
52
|
-
empty_directory
|
53
|
-
empty_directory
|
54
|
-
empty_directory
|
55
|
-
empty_directory
|
56
|
-
empty_directory
|
54
|
+
inside "features/login" do
|
55
|
+
empty_directory "features"
|
56
|
+
empty_directory "data"
|
57
|
+
empty_directory "elements"
|
58
|
+
empty_directory "pageobjects"
|
59
|
+
empty_directory "steps"
|
57
60
|
end
|
58
61
|
end
|
59
62
|
|
60
|
-
|
61
|
-
inside
|
62
|
-
template
|
63
|
-
template
|
63
|
+
def create_files
|
64
|
+
inside "#{destination_root}/config/ios" do
|
65
|
+
template "#{destination_root}/config/ios/appium.txt", "appium.txt"
|
66
|
+
template "#{destination_root}/config/ios/appium_farm.txt", "appium_farm.txt"
|
64
67
|
end
|
65
68
|
|
66
|
-
inside
|
67
|
-
template
|
68
|
-
template
|
69
|
+
inside "#{destination_root}/config/android" do
|
70
|
+
template "#{destination_root}/config/android/appium.txt", "appium.txt"
|
71
|
+
template "#{destination_root}/config/android/appium_farm.txt", "appium_farm.txt"
|
69
72
|
end
|
70
73
|
|
71
|
-
inside
|
72
|
-
template
|
73
|
-
template
|
74
|
-
template
|
75
|
-
template
|
74
|
+
inside "#{destination_root}/features/support" do
|
75
|
+
template "#{destination_root}/features/support/env.rb", "env.rb"
|
76
|
+
template "#{destination_root}/features/support/hooks.rb", "hooks.rb"
|
77
|
+
template "#{destination_root}/eatures/support/utils.rb", "utils.rb"
|
78
|
+
template "#{destination_root}/features/support/appium_custom.rb", "appium_custom.rb"
|
76
79
|
end
|
77
80
|
|
78
|
-
inside
|
79
|
-
template
|
81
|
+
inside "#{destination_root}/features/login/features" do
|
82
|
+
template "#{destination_root}/eatures/login/features/login.feature", "login.feature"
|
80
83
|
end
|
81
84
|
|
82
|
-
inside
|
83
|
-
template
|
85
|
+
inside "#{destination_root}/features/login/data" do
|
86
|
+
template "#{destination_root}/features/login/data/login.yaml","data/login.yaml"
|
84
87
|
end
|
85
88
|
|
86
|
-
inside
|
87
|
-
template
|
88
|
-
template
|
89
|
-
template
|
90
|
-
template
|
89
|
+
inside "#{destination_root}/features/login/elements" do
|
90
|
+
template "#{destination_root}/features/login/elements/screen_mappings_home.yaml","screen_mappings_home.yaml"
|
91
|
+
template "#{destination_root}/features/login/elements/screen_mappings_login.yaml","screen_mappings_login.yaml"
|
92
|
+
template "#{destination_root}/features/login/elements/screen_mappings_organizadorhome.yaml","screen_mappings_organizadorhome.yaml"
|
93
|
+
template "#{destination_root}/features/login/elements/screen_mappings_token.yaml","screen_mappings_token.yaml"
|
91
94
|
end
|
92
95
|
|
93
|
-
inside
|
94
|
-
template
|
95
|
-
template
|
96
|
-
template
|
97
|
-
template
|
98
|
-
template
|
96
|
+
inside "#{destination_root}/features/login/pageobjects" do
|
97
|
+
template "#{destination_root}/features/login/pageobjects/home.rb","home.rb"
|
98
|
+
template "#{destination_root}/features/login/pageobjects/login.rb","login.rb"
|
99
|
+
template "#{destination_root}/features/login/pageobjects/loginPages.rb","loginPages.rb"
|
100
|
+
template "#{destination_root}/features/login/pageobjects/organizadorHome.rb","organizadorHome.rb"
|
101
|
+
template "#{destination_root}/features/login/pageobjects/token.rb","token.rb"
|
99
102
|
end
|
100
103
|
|
101
|
-
inside
|
102
|
-
template
|
104
|
+
inside "#{destination_root}/features/login/steps" do
|
105
|
+
template "#{destination_root}/features/login/steps/login_steps.rb","login_steps.rb"
|
103
106
|
end
|
104
107
|
end
|
105
108
|
|
106
|
-
|
107
109
|
def gemfile_rakefile_cukeyml
|
108
110
|
inside destination_root do
|
109
|
-
template
|
110
|
-
template
|
111
|
-
template
|
111
|
+
template "Gemfile"
|
112
|
+
template "Rakefile"
|
113
|
+
template "cucumber.yml"
|
112
114
|
end
|
113
115
|
end
|
114
116
|
|