agilibox 1.9.7 → 1.9.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c3048bec6f664386b45e3e7270bf1ca3bf97f6913d2655fb36e3dcb52d85ec5a
4
- data.tar.gz: 3d2e836934570fe0139001623c10dffab4c50295353201413d81ff0b5f98633e
3
+ metadata.gz: 30abb8a54ea0a05b2754f7977520e8709ed2d46f126c2a6ee58432e52fb5a2f0
4
+ data.tar.gz: e353109f751bbfb8fde4c71beff88ea84211720a584eb7d585d68c64caacf566
5
5
  SHA512:
6
- metadata.gz: 0d6442cd5c94f530598488a1f246c0ca148a6ac4a2dd78a28fdc9318098153020c1ad300919a4204e7f10f6878c3fd4f748bd62e0e7f7d0506ce51e2c7892ba1
7
- data.tar.gz: 9b02adb2ed7fe9877fa1225803a8c9dc36dbbec11e06bc2a4715adb8c7e142b3c53d3fdedb984ba3fed323e30e0be18b8288a1e44890271d6413aa3b828ba3b7
6
+ metadata.gz: 64aefab9b8873a5f6f0f862e1f05435bf28fa0dd5dbae03a7624328f31d07dedf651f192af8c3b89118d44d157397d9d7cfc8c477d4c95ac8c05863561cc2400
7
+ data.tar.gz: dbfa164bdb05e6be77d21d53455dee070f08426176af20902931bbecf7f47bd016737c45ad85b2a33a4edb4aa296306df062327f89e71e7d2c010161343c3ca2
@@ -2,6 +2,21 @@
2
2
 
3
3
  ## Next version
4
4
 
5
+ ## v1.9.12
6
+ - Fix some Ruby 2.7 warnings
7
+
8
+ ## v1.9.11
9
+ - Fix some Ruby 2.7 warnings
10
+
11
+ ## v1.9.10
12
+ - Fix some Ruby 2.7 warnings
13
+
14
+ ## v1.9.9
15
+ - Add error to ErrorsMiddleware
16
+
17
+ ## v1.9.8
18
+ - Fix `tags` helper
19
+
5
20
  ## v1.9.7
6
21
  - Change XLSX export
7
22
 
@@ -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
@@ -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
@@ -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)
@@ -47,8 +47,8 @@ module Agilibox::TextHelper
47
47
  number_with_precision(n, opts).tr(" ", nbsp)
48
48
  end
49
49
 
50
- def date(d, *args)
51
- I18n.l(d, *args) unless d.nil?
50
+ def date(d, **args)
51
+ I18n.l(d, **args) unless d.nil?
52
52
  end
53
53
 
54
54
  def boolean_icon(bool)
@@ -138,9 +138,9 @@ module Agilibox::TextHelper
138
138
  def tags(object)
139
139
  return "" if object.tag_list.empty?
140
140
 
141
- object.tag_list.map { |tag|
141
+ object.tag_list.map { |tag_name|
142
142
  tag.span(class: "tag label label-primary") {
143
- "#{icon :tag} #{tag}".html_safe
143
+ "#{icon :tag} #{tag_name}".html_safe
144
144
  }
145
145
  }.join(" ").html_safe
146
146
  end
@@ -1,8 +1,14 @@
1
1
  class Agilibox::Service
2
2
  include Agilibox::InitializeWith
3
3
 
4
- def self.call(*args)
5
- new(*args).call
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, *args)
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, *args)
20
+ I18n.t(key, **args)
21
21
  end
22
22
 
23
23
  def sms(data)
@@ -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
@@ -10,6 +10,7 @@ class Agilibox::ErrorsMiddleware
10
10
  "ActionController::UnknownFormat",
11
11
  "ActionController::UnknownHttpMethod",
12
12
  "ActionView::MissingTemplate",
13
+ "Mime::Type::InvalidMimeType",
13
14
  ]
14
15
 
15
16
  def initialize(app)
@@ -1,3 +1,3 @@
1
1
  module Agilibox
2
- VERSION = "1.9.7"
2
+ VERSION = "1.9.12"
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.9.7
4
+ version: 1.9.12
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-10-02 00:00:00.000000000 Z
11
+ date: 2020-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails-i18n
@@ -243,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
243
  - !ruby/object:Gem::Version
244
244
  version: '0'
245
245
  requirements: []
246
- rubygems_version: 3.0.3
246
+ rubygems_version: 3.1.4
247
247
  signing_key:
248
248
  specification_version: 4
249
249
  summary: Agilibox