agilibox 1.9.11 → 1.9.16
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 +15 -0
- data/app/assets/javascripts/agilibox/modals.coffee +1 -0
- data/app/controllers/concerns/agilibox/api_controller_concern.rb +2 -1
- data/app/filters/agilibox/small_data/filter_strategy_by_date_or_datetime_period.rb +1 -1
- data/app/filters/agilibox/small_data/filter_strategy_by_key_values.rb +1 -1
- data/app/helpers/agilibox/bootstrap_helper.rb +4 -4
- data/app/helpers/agilibox/font_awesome_helper.rb +2 -2
- data/app/helpers/agilibox/form_helper.rb +2 -2
- data/app/services/agilibox/service.rb +2 -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/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a0f7613e747e5db21a6008d5e946e8f3240bb26fe50b19d6cc6b4a78204874d
|
4
|
+
data.tar.gz: 0a6c1534eecbb1be12e5ee323b74f26d885222e9340ece137c404a22c0f270a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cee94567f5d2360f048433dbe3e04efbf15019f90f7fe82ec5d4ab5535d0d3374eeae1c1227f3cb9f5ea6053e719d7006b5671a9a93e180b42bc2dea7027c1c9
|
7
|
+
data.tar.gz: 54e18963bb24b2455ec5032444412aa700cd3c491fbbc1b2fd388c96715cef2581429531eb0ca44bab3f0fa00ce5cccad7eb3a7b55a27ecebf3e4fbb0c8c197f
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,21 @@
|
|
2
2
|
|
3
3
|
## Next version
|
4
4
|
|
5
|
+
## v1.9.16
|
6
|
+
- Fix Rails 6.1 warnings
|
7
|
+
|
8
|
+
## v1.9.15
|
9
|
+
- Add `modal:before-close` event
|
10
|
+
|
11
|
+
## v1.9.14
|
12
|
+
- Fix syntax error on Ruby < 2.7
|
13
|
+
|
14
|
+
## v1.9.13
|
15
|
+
- Add apparition capybara driver
|
16
|
+
|
17
|
+
## v1.9.12
|
18
|
+
- Fix some Ruby 2.7 warnings
|
19
|
+
|
5
20
|
## v1.9.11
|
6
21
|
- Fix some Ruby 2.7 warnings
|
7
22
|
|
@@ -31,7 +31,8 @@ module Agilibox::ApiControllerConcern
|
|
31
31
|
|
32
32
|
def json_errors_hash_for_model(object)
|
33
33
|
object.errors
|
34
|
-
.
|
34
|
+
.to_hash
|
35
|
+
.map { |a, m| [a, message: m.first, full_message: object.errors.full_message(a, m.first)] }
|
35
36
|
.uniq(&:first)
|
36
37
|
.to_h
|
37
38
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class Agilibox::SmallData::FilterStrategyByDateOrDatetimePeriod < ::Agilibox::SmallData::FilterStrategyByKeyValue
|
2
2
|
def initialize(*)
|
3
|
-
if
|
3
|
+
if instance_of?(Agilibox::SmallData::FilterStrategyByDateOrDatetimePeriod)
|
4
4
|
raise "please use FilterStrategyByDatePeriod or FilterStrategyByDatetimePeriod"
|
5
5
|
end
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class Agilibox::SmallData::FilterStrategyByKeyValues < ::Agilibox::SmallData::FilterStrategyByKeyValue
|
2
2
|
def apply(query, value)
|
3
|
-
value = value.split
|
3
|
+
value = value.split if value.is_a?(String)
|
4
4
|
value = value.select(&:present?)
|
5
5
|
column = column_for(query)
|
6
6
|
|
@@ -35,10 +35,10 @@ module Agilibox::BootstrapHelper
|
|
35
35
|
&block
|
36
36
|
)
|
37
37
|
global_classes = Agilibox::BootstrapHelper.card_classes
|
38
|
-
card_classes = ([global_classes[:card]] + card_class.to_s.split
|
39
|
-
header_classes = ([global_classes[:header]] + header_class.to_s.split
|
40
|
-
body_classes = ([global_classes[:body]] + body_class.to_s.split
|
41
|
-
footer_classes = ([global_classes[:footer]] + footer_class.to_s.split
|
38
|
+
card_classes = ([global_classes[:card]] + card_class.to_s.split).compact.sort
|
39
|
+
header_classes = ([global_classes[:header]] + header_class.to_s.split).compact.sort
|
40
|
+
body_classes = ([global_classes[:body]] + body_class.to_s.split).compact.sort
|
41
|
+
footer_classes = ([global_classes[:footer]] + footer_class.to_s.split).compact.sort
|
42
42
|
|
43
43
|
if header
|
44
44
|
header_html = content_tag(header_tag, class: header_classes) { header }
|
@@ -6,7 +6,7 @@ module Agilibox::FontAwesomeHelper
|
|
6
6
|
fa_style = Agilibox::FontAwesomeHelper.default_fa_style_for_id(id)
|
7
7
|
end
|
8
8
|
|
9
|
-
css_classes = options.delete(:class).to_s.split
|
9
|
+
css_classes = options.delete(:class).to_s.split
|
10
10
|
css_classes << "icon"
|
11
11
|
css_classes << "fa-#{id}"
|
12
12
|
css_classes << "fa#{fa_style.to_s[0]}"
|
@@ -15,7 +15,7 @@ module Agilibox::FontAwesomeHelper
|
|
15
15
|
|
16
16
|
attributes = options.merge(class: css_classes.sort.join(" ")).sort.to_h
|
17
17
|
|
18
|
-
tag.span(**attributes)
|
18
|
+
tag.span(**attributes)
|
19
19
|
end
|
20
20
|
|
21
21
|
class << self
|
@@ -23,11 +23,11 @@ module Agilibox::FormHelper
|
|
23
23
|
|
24
24
|
tag.div(class: "actions form-actions") do
|
25
25
|
submit = tag.button(type: :submit, class: "btn btn-sm btn-success form-submit") do
|
26
|
-
tag.span(class: "fa fa-save")
|
26
|
+
tag.span(class: "fa fa-save") + " " + ta(submit_action)
|
27
27
|
end
|
28
28
|
|
29
29
|
cancel = tag.a(href: back_url, class: "btn btn-primary btn-sm form-cancel") do
|
30
|
-
tag.span(class: "fa fa-times")
|
30
|
+
tag.span(class: "fa fa-times") + " " + ta(:cancel)
|
31
31
|
end
|
32
32
|
|
33
33
|
cancel = "" if back_url == false
|
@@ -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
|
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.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- agilidée
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-13 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
|