agilibox 1.8.0 → 1.9.0
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/Rakefile +4 -0
- data/app/controllers/concerns/agilibox/back_url_concern.rb +10 -2
- data/config/cucumber.yml +4 -3
- data/lib/agilibox/cucumber_config.rb +1 -11
- data/lib/agilibox/cucumber_helpers/capybara.rb +1 -1
- data/lib/agilibox/version.rb +1 -1
- metadata +2 -4
- data/lib/agilibox/cucumber_helpers/fix_referrer.rb +0 -9
- data/lib/agilibox/cucumber_helpers/poltergeist.rb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1f9e1e1f46c5f26fe0edd774de3846728c97da48f5c8775c545af68d3006229
|
4
|
+
data.tar.gz: 3e899b4b070824794a6f4aee29f505ed8526b0efe40f444742db8ddb039f8c15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 267b793e760c52549bdae5a0d2f47a1570ad29414caf73ee07764840bfb90b1869e0b7be58c002cbdc2d4e3641ff5c099fdd549f1fb01d7a811e0d3c487b125c
|
7
|
+
data.tar.gz: c8bc95032ce6266d6ec0cc6edb8b61ba052261e9817fa6e9422c5fcbf7bcc96ba4c7ce65e205da181dd585a14d9dc64997caf7926f57b9a849e1ce8a5fb78ba8
|
data/CHANGELOG.md
CHANGED
data/Rakefile
CHANGED
@@ -7,12 +7,20 @@ module Agilibox::BackUrlConcern
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def back_url
|
10
|
-
[
|
10
|
+
url = [
|
11
11
|
params[:back_url],
|
12
12
|
request.referer,
|
13
13
|
default_back_url,
|
14
|
-
main_app.root_path,
|
14
|
+
main_app.try(:root_path),
|
15
15
|
"/",
|
16
16
|
].select(&:present?).first
|
17
|
+
|
18
|
+
uri = URI.parse(url)
|
19
|
+
uri.host = nil
|
20
|
+
uri.port = nil
|
21
|
+
uri.scheme = nil
|
22
|
+
uri.user = nil
|
23
|
+
uri.password = nil
|
24
|
+
uri.to_s
|
17
25
|
end
|
18
26
|
end
|
data/config/cucumber.yml
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
<%
|
2
2
|
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
|
3
|
-
|
4
|
-
|
3
|
+
rerun = rerun.strip.gsub /\s/, ' '
|
4
|
+
rerun_opts = rerun.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
|
5
|
+
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags 'not @wip'"
|
5
6
|
%>
|
6
7
|
default: <%= std_opts %> features
|
7
8
|
wip: --tags @wip:3 --wip features
|
8
|
-
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags
|
9
|
+
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags 'not @wip'
|
@@ -1,12 +1,6 @@
|
|
1
1
|
class << Agilibox::CucumberConfig = Class.new
|
2
2
|
undef new
|
3
3
|
|
4
|
-
attr_writer :phantomjs_version
|
5
|
-
|
6
|
-
def phantomjs_version
|
7
|
-
@phantomjs_version ||= "2.1.1"
|
8
|
-
end
|
9
|
-
|
10
4
|
attr_writer :cuprite_timeout
|
11
5
|
|
12
6
|
def cuprite_timeout
|
@@ -37,14 +31,10 @@ class << Agilibox::CucumberConfig = Class.new
|
|
37
31
|
|
38
32
|
def require_all_helpers!
|
39
33
|
files = Dir.glob Agilibox::Engine.root.join("lib", "agilibox", "cucumber_helpers", "*.rb")
|
40
|
-
files.delete_if { |f| f.match?(/
|
34
|
+
files.delete_if { |f| f.match?(/chrome|cuprite|_steps/) }
|
41
35
|
files.each { |file| require file }
|
42
36
|
end
|
43
37
|
|
44
|
-
def require_poltergeist!
|
45
|
-
require Agilibox::Engine.root.join("lib", "agilibox", "cucumber_helpers", "poltergeist.rb")
|
46
|
-
end
|
47
|
-
|
48
38
|
def require_chrome_headless!
|
49
39
|
require Agilibox::Engine.root.join("lib", "agilibox", "cucumber_helpers", "chrome_headless.rb")
|
50
40
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
Capybara.register_driver :agilibox_no_driver do |_app|
|
2
|
-
raise "You need to add Agilibox::CucumberConfig.
|
2
|
+
raise "You need to add Agilibox::CucumberConfig.require_cuprite! or "\
|
3
3
|
"Agilibox::CucumberConfig.require_chrome_headless! " \
|
4
4
|
"to your features/support/env.rb"
|
5
5
|
end
|
data/lib/agilibox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: agilibox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- agilidée
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails-i18n
|
@@ -206,8 +206,6 @@ files:
|
|
206
206
|
- lib/agilibox/cucumber_helpers/cuprite.rb
|
207
207
|
- lib/agilibox/cucumber_helpers/database_cleaner.rb
|
208
208
|
- lib/agilibox/cucumber_helpers/factory_bot.rb
|
209
|
-
- lib/agilibox/cucumber_helpers/fix_referrer.rb
|
210
|
-
- lib/agilibox/cucumber_helpers/poltergeist.rb
|
211
209
|
- lib/agilibox/cucumber_helpers/rails.rb
|
212
210
|
- lib/agilibox/cucumber_helpers/rspec.rb
|
213
211
|
- lib/agilibox/cucumber_helpers/screenshots.rb
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require "capybara/poltergeist"
|
2
|
-
|
3
|
-
phantomjs_version = Agilibox::CucumberConfig.phantomjs_version
|
4
|
-
phantomjs_binary = `which phantomjs-#{phantomjs_version} phantomjs`.split("\n").first
|
5
|
-
raise "invalid phantomjs version" if `#{phantomjs_binary} -v`.strip != phantomjs_version
|
6
|
-
# You can download phantomjs here : https://bitbucket.org/ariya/phantomjs/downloads/
|
7
|
-
# Semaphore setup commmand : change-phantomjs-version 2.1.1
|
8
|
-
|
9
|
-
Capybara.register_driver :agilibox_poltergeist do |app|
|
10
|
-
Capybara::Poltergeist::Driver.new(app,
|
11
|
-
:debug => false,
|
12
|
-
:window_size => Agilibox::CucumberConfig.window_size,
|
13
|
-
:timeout => 60,
|
14
|
-
:phantomjs => phantomjs_binary,
|
15
|
-
)
|
16
|
-
end
|
17
|
-
|
18
|
-
Capybara.default_driver = :agilibox_poltergeist
|
19
|
-
Capybara.javascript_driver = :agilibox_poltergeist
|
20
|
-
Capybara.current_driver = :agilibox_poltergeist
|