agilibox 1.9.8 → 1.9.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/app/helpers/agilibox/filters_helper.rb +2 -2
- data/app/helpers/agilibox/font_awesome_helper.rb +1 -1
- data/app/helpers/agilibox/pagination_helper.rb +1 -1
- data/app/helpers/agilibox/text_helper.rb +2 -2
- data/app/services/agilibox/service.rb +8 -2
- data/app/sms/agilibox/sms/application_sms.rb +2 -2
- data/lib/agilibox/cucumber_config.rb +5 -1
- data/lib/agilibox/cucumber_helpers/apparition.rb +18 -0
- data/lib/agilibox/cucumber_helpers/capybara_selectors.rb +1 -1
- data/lib/agilibox/errors_middleware.rb +1 -0
- data/lib/agilibox/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 577884f829d930ff72448f21529d3f05b836ff3a72414ca020a52a9d39fe7adf
|
4
|
+
data.tar.gz: 54ab04e77e1b7982dfa861731c568b07a81ac8885d9dddbb5ed7251ab3806cff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df3afc115ae89d1ac41ab0913ddc89e9ff53836625b864f8fe3a81516074113e8bae9154926676d4a2db60e8d362d3ecd88d273065e0931fe519787779e714d1
|
7
|
+
data.tar.gz: 0ab62749bbfbbcbdb5b8e0f05c05225d6d4aa0c880a19841a4c5de5c4930d708ef344f1f3723589e3f36275e8232191e9ce85ff75de454dd5db446710f26d37f
|
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,22 @@
|
|
2
2
|
|
3
3
|
## Next version
|
4
4
|
|
5
|
+
## v1.9.13
|
6
|
+
- Add apparition capybara driver
|
7
|
+
|
8
|
+
## v1.9.12
|
9
|
+
- Fix some Ruby 2.7 warnings
|
10
|
+
|
11
|
+
## v1.9.11
|
12
|
+
- Fix some Ruby 2.7 warnings
|
13
|
+
|
14
|
+
## v1.9.10
|
15
|
+
- Fix some Ruby 2.7 warnings
|
16
|
+
|
5
17
|
## v1.9.9
|
18
|
+
- Add error to ErrorsMiddleware
|
19
|
+
|
20
|
+
## v1.9.8
|
6
21
|
- Fix `tags` helper
|
7
22
|
|
8
23
|
## v1.9.7
|
@@ -7,7 +7,7 @@ module Agilibox::FiltersHelper
|
|
7
7
|
text = options.delete(:text) || t("actions.filter")
|
8
8
|
icon = options.delete(:icon) || :filter
|
9
9
|
|
10
|
-
tag.button(options) do
|
10
|
+
tag.button(**options) do
|
11
11
|
icon(icon) + " " + text
|
12
12
|
end
|
13
13
|
end
|
@@ -20,7 +20,7 @@ module Agilibox::FiltersHelper
|
|
20
20
|
text = options.delete(:text) || t("actions.reset")
|
21
21
|
icon = options.delete(:icon) || :undo
|
22
22
|
|
23
|
-
tag.button(options) do
|
23
|
+
tag.button(**options) do
|
24
24
|
icon(icon) + " " + text
|
25
25
|
end
|
26
26
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Agilibox::PaginationHelper
|
2
2
|
def paginate(objects, options = {})
|
3
3
|
options = {theme: "twitter-bootstrap-3"}.merge(options)
|
4
|
-
super(objects, options).gsub(/>(\s+)</, "><").html_safe
|
4
|
+
super(objects, **options).gsub(/>(\s+)</, "><").html_safe
|
5
5
|
end
|
6
6
|
|
7
7
|
def pagination_infos(collection)
|
@@ -1,8 +1,14 @@
|
|
1
1
|
class Agilibox::Service
|
2
2
|
include Agilibox::InitializeWith
|
3
3
|
|
4
|
-
|
5
|
-
|
4
|
+
if RUBY_VERSION >= "2.7.0"
|
5
|
+
def self.call(...)
|
6
|
+
new(...).call
|
7
|
+
end
|
8
|
+
else
|
9
|
+
def self.call(*args)
|
10
|
+
new(*args).call
|
11
|
+
end
|
6
12
|
end
|
7
13
|
|
8
14
|
def call(*)
|
@@ -11,13 +11,13 @@ class Agilibox::SMS::ApplicationSMS
|
|
11
11
|
options[:action_name]
|
12
12
|
end
|
13
13
|
|
14
|
-
def t(key,
|
14
|
+
def t(key, **args)
|
15
15
|
if key.start_with?(".")
|
16
16
|
path = self.class.to_s.underscore.tr("/", ".")
|
17
17
|
key = "#{path}.#{action_name}#{key}"
|
18
18
|
end
|
19
19
|
|
20
|
-
I18n.t(key,
|
20
|
+
I18n.t(key, **args)
|
21
21
|
end
|
22
22
|
|
23
23
|
def sms(data)
|
@@ -31,10 +31,14 @@ class << Agilibox::CucumberConfig = Class.new
|
|
31
31
|
|
32
32
|
def require_all_helpers!
|
33
33
|
files = Dir.glob Agilibox::Engine.root.join("lib", "agilibox", "cucumber_helpers", "*.rb")
|
34
|
-
files.delete_if { |f| f.match?(/chrome|cuprite|_steps/) }
|
34
|
+
files.delete_if { |f| f.match?(/apparition|chrome|cuprite|_steps/) }
|
35
35
|
files.each { |file| require file }
|
36
36
|
end
|
37
37
|
|
38
|
+
def require_apparition!
|
39
|
+
require Agilibox::Engine.root.join("lib", "agilibox", "cucumber_helpers", "apparition.rb")
|
40
|
+
end
|
41
|
+
|
38
42
|
def require_chrome_headless!
|
39
43
|
require Agilibox::Engine.root.join("lib", "agilibox", "cucumber_helpers", "chrome_headless.rb")
|
40
44
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require "capybara/apparition"
|
2
|
+
|
3
|
+
Capybara.register_driver :agilibox_apparition do |app|
|
4
|
+
Capybara::Apparition::Driver.new(app,
|
5
|
+
:browser_options => {
|
6
|
+
:"disable-gpu" => true,
|
7
|
+
:"no-sandbox" => nil,
|
8
|
+
},
|
9
|
+
:headless => (ENV["CHROME_HEADLESS"].to_s != "false"),
|
10
|
+
:inspector => true,
|
11
|
+
:js_errors => true,
|
12
|
+
:window_size => Agilibox::CucumberConfig.window_size,
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
Capybara.default_driver = :agilibox_apparition
|
17
|
+
Capybara.current_driver = :agilibox_apparition
|
18
|
+
Capybara.javascript_driver = :agilibox_apparition
|
@@ -2,7 +2,7 @@ Capybara.add_selector(:agilibox_clickable) do
|
|
2
2
|
xpath do |locator, **options|
|
3
3
|
self.class.all
|
4
4
|
.values_at(:link, :button, :label)
|
5
|
-
.map { |selector| instance_exec(locator, options, &selector.xpath) }
|
5
|
+
.map { |selector| instance_exec(locator, **options, &selector.xpath) }
|
6
6
|
.reduce(:union)
|
7
7
|
end
|
8
8
|
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.9.
|
4
|
+
version: 1.9.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- agilidée
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails-i18n
|
@@ -199,6 +199,7 @@ files:
|
|
199
199
|
- lib/agilibox/cucumber_config.rb
|
200
200
|
- lib/agilibox/cucumber_helpers/agilibox.rb
|
201
201
|
- lib/agilibox/cucumber_helpers/ajax.rb
|
202
|
+
- lib/agilibox/cucumber_helpers/apparition.rb
|
202
203
|
- lib/agilibox/cucumber_helpers/capybara.rb
|
203
204
|
- lib/agilibox/cucumber_helpers/capybara_selectors.rb
|
204
205
|
- lib/agilibox/cucumber_helpers/chrome_headless.rb
|
@@ -243,7 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
243
244
|
- !ruby/object:Gem::Version
|
244
245
|
version: '0'
|
245
246
|
requirements: []
|
246
|
-
rubygems_version: 3.
|
247
|
+
rubygems_version: 3.1.4
|
247
248
|
signing_key:
|
248
249
|
specification_version: 4
|
249
250
|
summary: Agilibox
|