acceptance_test2 0.9.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,16 @@
1
+ {
2
+ "node": {
3
+ "domain": "22.22.22.22", // remote host
4
+ "port": "22", // default ssh port
5
+ "user": "vagrant", // vagrant user name
6
+ "password": "vagrant", // vagrant user password
7
+ "home": "/home/vagrant",
8
+ "remote": true
9
+ },
10
+
11
+ "project": {
12
+ "home": "/vagrant",
13
+ "ruby_version": "2.2.3",
14
+ "gemset": "acceptance_test2"
15
+ }
16
+ }
@@ -0,0 +1,61 @@
1
+ $: << File.expand_path(File.dirname(__FILE__) + '/../lib')
2
+
3
+ require 'script_executor/base_provision'
4
+
5
+ class Project < Thor
6
+ include Executable
7
+
8
+ BaseProvision.new("thor/project.conf.json", [
9
+ "thor/system_provision.sh",
10
+ "thor/extra_provision.sh",
11
+ "thor/project_provision.sh"
12
+ ]).create_thor_methods(self)
13
+
14
+ desc "cp_key", "cp_key"
15
+ def cp_key
16
+ system "thor ssh:cp_key vagrant 22.22.22.22"
17
+ #execute { "thor ssh:cp_key vagrant 22.22.22.22" }
18
+ end
19
+
20
+ desc "ssh", "ssh"
21
+ def ssh
22
+ system "ssh vagrant@22.22.22.22"
23
+ #execute { "ssh vagrant@22.22.22.22" }
24
+ end
25
+
26
+ desc "ubuntu_update", "ubuntu_update"
27
+ def ubuntu_update
28
+ invoke :ubuntu_update
29
+ end
30
+
31
+ desc "sys", "Installs system packages"
32
+ def sys
33
+ invoke :ubuntu_update
34
+ invoke :required_packages
35
+ invoke :gpg
36
+
37
+ invoke :rvm
38
+ invoke :ruby
39
+ end
40
+
41
+ desc "extra", "Installs extra packages"
42
+ def extra
43
+ invoke :chrome
44
+ invoke :chromedriver
45
+ invoke :ffmpeg
46
+ invoke :firefox
47
+ invoke :phantomjs
48
+
49
+ # invoke :imagemagick
50
+ # invoke :apache
51
+ # invoke :node
52
+ # invoke :rbenv
53
+ end
54
+
55
+ desc "prg", "Installs project related packages"
56
+ def prg
57
+ invoke :init
58
+ invoke :update
59
+ end
60
+
61
+ end
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env bash
2
+
3
+ ##############################
4
+ # [init]
5
+ # Initializes project
6
+
7
+ sudo sh -c 'echo "source /usr/local/rvm/scripts/rvm" >> ~/.bash_login'
8
+ sudo sh -c 'echo "cd /vagrant" >> ~/.bash_login'
9
+ sudo sh -c 'echo "rvm use #{project.ruby_version}@#{project.gemset}" >> ~/.bash_login'
10
+
11
+ source /usr/local/rvm/scripts/rvm
12
+
13
+ rvm use #{project.ruby_version}@#{project.gemset} --create
14
+
15
+ gem install --no-rdoc --no-ri bundler
16
+ gem install --no-rdoc --no-ri rake
17
+
18
+
19
+ ##############################
20
+ # [update]
21
+ # Updates project
22
+
23
+ cd "#{project.home}"
24
+
25
+ source /usr/local/rvm/scripts/rvm
26
+
27
+ rvm use #{project.ruby_version}@#{project.gemset}
28
+
29
+ bundle update
30
+
31
+
32
+ ##############################
33
+ # [start]
34
+ # Starts tests
35
+
36
+ cd #{project.home}
37
+
38
+ source /usr/local/rvm/scripts/rvm
39
+
40
+ rvm use #{project.ruby_version}@#{project.gemset}
41
+
42
+ HEADLESS=1 VIDEO=1 rake
43
+
44
+
45
+ ##############################
46
+ # [exec]
47
+ # Executes arbitrary command
48
+
49
+ cd #{project.home}
50
+
51
+ source /usr/local/rvm/scripts/rvm
52
+
53
+ rvm use #{project.ruby_version}@#{project.gemset}
54
+
55
+ #{ARGV}
@@ -0,0 +1,54 @@
1
+ require "highline/import"
2
+ require 'script_executor/executable'
3
+ require 'script_executor/script_locator'
4
+ require 'file_utils/file_utils'
5
+
6
+ class Ssh < Thor
7
+ include Executable, ScriptLocator, FileUtils
8
+
9
+ desc "gen_key", "Generates ssh key"
10
+ def gen_key
11
+ scripts = scripts(__FILE__)
12
+
13
+ execute { evaluate_script_body(scripts[:gen_key][:code], binding) }
14
+ end
15
+
16
+ desc "cp_key <user> <host>", "Copies public key to remote host"
17
+ def cp_key(user, host)
18
+ scripts = scripts(__FILE__)
19
+
20
+ execute {
21
+ evaluate_script_body(scripts[:cp_key1][:code], binding, :erb)
22
+ }
23
+
24
+ execute(:remote => true, :domain => host, :user => user) do
25
+ evaluate_script_body(scripts[:cp_key2][:code], binding)
26
+ end
27
+ end
28
+ end
29
+
30
+ __END__
31
+
32
+ [gen_key]
33
+
34
+ echo "Generating ssh key..."
35
+
36
+ cd ~/.ssh
37
+ ssh-keygen
38
+
39
+ [cp_key1]
40
+
41
+ echo "Copying public key to remote server..."
42
+
43
+ echo <%= user %>
44
+ echo <%= host %>
45
+
46
+ scp ~/.ssh/id_rsa.pub <%= user %>@<%= host %>:~/pubkey.txt
47
+
48
+ [cp_key2]
49
+
50
+ mkdir -p ~/.ssh
51
+ chmod 700 .ssh
52
+ cat pubkey.txt >> ~/.ssh/authorized_keys
53
+ rm ~/pubkey.txt
54
+ chmod 600 ~/.ssh/*
@@ -0,0 +1,77 @@
1
+ #!/usr/bin/env bash
2
+
3
+ #######################################
4
+ # [ubuntu_update]
5
+ # Updates linux core packages
6
+
7
+ sudo apt-get update
8
+
9
+
10
+ #######################################
11
+ # [required_packages]
12
+ # Updates linux core packages
13
+
14
+ sudo apt-get update
15
+
16
+ sudo apt-get install -y curl
17
+ sudo apt-get install -y g++
18
+ sudo apt-get install -y subversion
19
+ sudo apt-get install -y git
20
+
21
+ # to support rvm
22
+
23
+ sudo apt-get install -y libreadline6-dev
24
+ sudo apt-get install -y zlib1g-dev
25
+ sudo apt-get install -y libssl-dev
26
+ sudo apt-get install -y libyaml-dev
27
+ sudo apt-get install -y libsqlite3-dev
28
+ sudo apt-get install -y sqlite3
29
+ sudo apt-get install -y autoconf
30
+ sudo apt-get install -y libgdbm-dev
31
+ sudo apt-get install -y libncurses5-dev
32
+ sudo apt-get install -y automake
33
+ sudo apt-get install -y libtool
34
+ sudo apt-get install -y bison
35
+ sudo apt-get install -y pkg-config
36
+ sudo apt-get install -y libffi-dev
37
+
38
+ # to support nokogiri
39
+ sudo apt-get install -y libgmp-dev
40
+
41
+ # to support capybara-webkit
42
+ sudo apt-get install -y libqtwebkit-dev
43
+ sudo apt-get install -y qt4-qmake
44
+
45
+ # to support headless
46
+ sudo apt-get install -y xvfb
47
+
48
+
49
+ #######################################
50
+ # [gpg]
51
+ # Installs gpg
52
+
53
+ sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
54
+
55
+
56
+ #######################################
57
+ # [rvm]
58
+ # Installs rvm
59
+
60
+ curl -sSL https://get.rvm.io | bash
61
+
62
+
63
+ #######################################
64
+ # [ruby]
65
+ # Installs ruby
66
+
67
+ PATH=/usr/local/rvm/bin:$PATH
68
+
69
+ rvm install 2.2.3
70
+
71
+
72
+ #######################################
73
+ # [ch_rights]
74
+ # Change rights for /usr/local
75
+
76
+ sudo chown -R vagrant /usr/local
77
+
metadata CHANGED
@@ -1,183 +1,169 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acceptance_test2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Shvets
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-29 00:00:00.000000000 Z
11
+ date: 2016-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: minitest
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: 5.8.1
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: 5.8.1
27
- - !ruby/object:Gem::Dependency
28
- name: minitest-capybara
14
+ name: thor
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
17
  - - "~>"
32
18
  - !ruby/object:Gem::Version
33
- version: 0.7.2
19
+ version: 0.19.1
34
20
  type: :runtime
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
24
  - - "~>"
39
25
  - !ruby/object:Gem::Version
40
- version: 0.7.2
26
+ version: 0.19.1
41
27
  - !ruby/object:Gem::Dependency
42
- name: minitest-metadata
28
+ name: script_executor
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: 0.6.0
33
+ version: 1.7.7
48
34
  type: :runtime
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - "~>"
53
39
  - !ruby/object:Gem::Version
54
- version: 0.6.0
40
+ version: 1.7.7
55
41
  - !ruby/object:Gem::Dependency
56
- name: minitest-reporters
42
+ name: parallel_tests
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
45
  - - "~>"
60
46
  - !ruby/object:Gem::Version
61
- version: 1.1.2
47
+ version: 2.6.0
62
48
  type: :runtime
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
52
  - - "~>"
67
53
  - !ruby/object:Gem::Version
68
- version: 1.1.2
54
+ version: 2.6.0
69
55
  - !ruby/object:Gem::Dependency
70
- name: capybara
56
+ name: minitest
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
59
  - - "~>"
74
60
  - !ruby/object:Gem::Version
75
- version: 2.5.0
61
+ version: 5.9.0
76
62
  type: :runtime
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
66
  - - "~>"
81
67
  - !ruby/object:Gem::Version
82
- version: 2.5.0
68
+ version: 5.9.0
83
69
  - !ruby/object:Gem::Dependency
84
- name: capybara-extensions
70
+ name: minitest-capybara
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
73
  - - "~>"
88
74
  - !ruby/object:Gem::Version
89
- version: 0.4.1
75
+ version: 0.8.2
90
76
  type: :runtime
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
80
  - - "~>"
95
81
  - !ruby/object:Gem::Version
96
- version: 0.4.1
82
+ version: 0.8.2
97
83
  - !ruby/object:Gem::Dependency
98
- name: selenium-webdriver
84
+ name: minitest-metadata
99
85
  requirement: !ruby/object:Gem::Requirement
100
86
  requirements:
101
87
  - - "~>"
102
88
  - !ruby/object:Gem::Version
103
- version: 2.47.1
89
+ version: 0.6.0
104
90
  type: :runtime
105
91
  prerelease: false
106
92
  version_requirements: !ruby/object:Gem::Requirement
107
93
  requirements:
108
94
  - - "~>"
109
95
  - !ruby/object:Gem::Version
110
- version: 2.47.1
96
+ version: 0.6.0
111
97
  - !ruby/object:Gem::Dependency
112
- name: capybara-webkit
98
+ name: minitest-reporters
113
99
  requirement: !ruby/object:Gem::Requirement
114
100
  requirements:
115
101
  - - "~>"
116
102
  - !ruby/object:Gem::Version
117
- version: 1.7.1
103
+ version: 1.1.9
118
104
  type: :runtime
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
108
  - - "~>"
123
109
  - !ruby/object:Gem::Version
124
- version: 1.7.1
110
+ version: 1.1.9
125
111
  - !ruby/object:Gem::Dependency
126
- name: rspec
112
+ name: capybara
127
113
  requirement: !ruby/object:Gem::Requirement
128
114
  requirements:
129
115
  - - "~>"
130
116
  - !ruby/object:Gem::Version
131
- version: 3.3.0
117
+ version: 2.7.1
132
118
  type: :runtime
133
119
  prerelease: false
134
120
  version_requirements: !ruby/object:Gem::Requirement
135
121
  requirements:
136
122
  - - "~>"
137
123
  - !ruby/object:Gem::Version
138
- version: 3.3.0
124
+ version: 2.7.1
139
125
  - !ruby/object:Gem::Dependency
140
- name: turnip
126
+ name: capybara-extensions
141
127
  requirement: !ruby/object:Gem::Requirement
142
128
  requirements:
143
129
  - - "~>"
144
130
  - !ruby/object:Gem::Version
145
- version: 1.3.1
131
+ version: 0.4.1
146
132
  type: :runtime
147
133
  prerelease: false
148
134
  version_requirements: !ruby/object:Gem::Requirement
149
135
  requirements:
150
136
  - - "~>"
151
137
  - !ruby/object:Gem::Version
152
- version: 1.3.1
138
+ version: 0.4.1
153
139
  - !ruby/object:Gem::Dependency
154
- name: turnip_formatter
140
+ name: selenium-webdriver
155
141
  requirement: !ruby/object:Gem::Requirement
156
142
  requirements:
157
143
  - - "~>"
158
144
  - !ruby/object:Gem::Version
159
- version: 0.3.4
145
+ version: 2.53.3
160
146
  type: :runtime
161
147
  prerelease: false
162
148
  version_requirements: !ruby/object:Gem::Requirement
163
149
  requirements:
164
150
  - - "~>"
165
151
  - !ruby/object:Gem::Version
166
- version: 0.3.4
152
+ version: 2.53.3
167
153
  - !ruby/object:Gem::Dependency
168
- name: gnawrnip
154
+ name: rspec
169
155
  requirement: !ruby/object:Gem::Requirement
170
156
  requirements:
171
157
  - - "~>"
172
158
  - !ruby/object:Gem::Version
173
- version: 0.3.2
159
+ version: 3.4.0
174
160
  type: :runtime
175
161
  prerelease: false
176
162
  version_requirements: !ruby/object:Gem::Requirement
177
163
  requirements:
178
164
  - - "~>"
179
165
  - !ruby/object:Gem::Version
180
- version: 0.3.2
166
+ version: 3.4.0
181
167
  - !ruby/object:Gem::Dependency
182
168
  name: gemspec_deps_gen
183
169
  requirement: !ruby/object:Gem::Requirement
@@ -216,20 +202,29 @@ files:
216
202
  - ".ruby-gemset"
217
203
  - ".ruby-version"
218
204
  - CHANGES
205
+ - Dockerfile
219
206
  - Gemfile
220
207
  - LICENSE
221
208
  - README.md
222
209
  - Rakefile
210
+ - Thorfile
211
+ - Vagrantfile
212
+ - acceptance_test2.gemspec
223
213
  - acceptance_test2.gemspec.erb
224
214
  - lib/acceptance_test/capybara/capybara_helper.rb
225
215
  - lib/acceptance_test/minitest/acceptance_spec.rb
226
216
  - lib/acceptance_test/rspec/rspec_helper.rb
227
217
  - lib/acceptance_test/turnip/turnip_helper.rb
228
218
  - lib/acceptance_test/version.rb
219
+ - package.json
220
+ - protractor.conf.js
229
221
  - spec/features/search_with_drivers.feature
230
222
  - spec/features/search_with_pages.feature
231
223
  - spec/features/search_with_scenario_outline1.feature
232
224
  - spec/features/search_with_table.feature
225
+ - spec/js/angularSiteSpec.js
226
+ - spec/js/support/env.js
227
+ - spec/js/support/extend.js
233
228
  - spec/minitest_helper.rb
234
229
  - spec/rspec_helper.rb
235
230
  - spec/support/features/steps/common_steps.rb
@@ -242,6 +237,12 @@ files:
242
237
  - spec/unit/google_search_test.rb
243
238
  - spec/unit/wikipedia_search_spec.rb
244
239
  - spec/unit/wikipedia_search_test.rb
240
+ - thor/extra_provision.sh
241
+ - thor/project.conf.json
242
+ - thor/project.thor
243
+ - thor/project_provision.sh
244
+ - thor/ssh.thor
245
+ - thor/system_provision.sh
245
246
  homepage: http://github.com/shvets/acceptance_test2
246
247
  licenses:
247
248
  - MIT
@@ -271,6 +272,9 @@ test_files:
271
272
  - spec/features/search_with_pages.feature
272
273
  - spec/features/search_with_scenario_outline1.feature
273
274
  - spec/features/search_with_table.feature
275
+ - spec/js/angularSiteSpec.js
276
+ - spec/js/support/env.js
277
+ - spec/js/support/extend.js
274
278
  - spec/minitest_helper.rb
275
279
  - spec/rspec_helper.rb
276
280
  - spec/support/features/steps/common_steps.rb