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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 32ae9547194bc24867f080fd2d519d8c5121f0bd29c5f04a77ef3a0cc73ab193
4
- data.tar.gz: b3842b9bcaf9a53cabe3ff70e35397f24486848b5b4b63ba718eeac3197149fc
3
+ metadata.gz: e1f9e1e1f46c5f26fe0edd774de3846728c97da48f5c8775c545af68d3006229
4
+ data.tar.gz: 3e899b4b070824794a6f4aee29f505ed8526b0efe40f444742db8ddb039f8c15
5
5
  SHA512:
6
- metadata.gz: 57219afef63509df9ecef5d62e889f163808acb127634d869b644de4a6510a419880ccbd2bc655e8a892a69cebf29048a0afd2b24efecb72d7cb6f54f2ddf30a
7
- data.tar.gz: 74850c8fd415e42e1cd1580ab02f55b5b8b5e2ed557f7b70bb7b036c3b801dfa1c38befe388e78dd8428cf15707ad58591b52ec4b8e698257e1cd83c1d51b671
6
+ metadata.gz: 267b793e760c52549bdae5a0d2f47a1570ad29414caf73ee07764840bfb90b1869e0b7be58c002cbdc2d4e3641ff5c099fdd549f1fb01d7a811e0d3c487b125c
7
+ data.tar.gz: c8bc95032ce6266d6ec0cc6edb8b61ba052261e9817fa6e9422c5fcbf7bcc96ba4c7ce65e205da181dd585a14d9dc64997caf7926f57b9a849e1ce8a5fb78ba8
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Next version
4
4
 
5
+ ## 1.9.0
6
+ - Remove phantomjs/poltergeist support
7
+ - BackUrlConcern transforms absolute URLs to relative
8
+
5
9
  ## 1.8.0
6
10
  - SMS improvements
7
11
  - Replace TapMethods by Tapenade gem
data/Rakefile CHANGED
@@ -35,3 +35,7 @@ end
35
35
 
36
36
 
37
37
  task default: :test
38
+
39
+ task "assets:precompile" do
40
+ Rake::Task["app:assets:precompile"].invoke
41
+ end
@@ -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
@@ -1,8 +1,9 @@
1
1
  <%
2
2
  rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
3
- rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
4
- std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
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 ~@wip
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?(/poltergeist|chrome|cuprite|_steps/) }
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.require_poltergeist! or "\
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
@@ -1,3 +1,3 @@
1
1
  module Agilibox
2
- VERSION = "1.8.0"
2
+ VERSION = "1.9.0"
3
3
  end
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.8.0
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-10-09 00:00:00.000000000 Z
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,9 +0,0 @@
1
- # https://github.com/ariya/phantomjs/issues/13677
2
-
3
- module RackETagDisable
4
- def call(env)
5
- @app.call(env)
6
- end
7
- end
8
-
9
- Rack::ETag.send(:prepend, RackETagDisable)
@@ -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