agilibox 1.9.6 → 1.9.11

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: 910653d569b2435173e10da0415be0a35356421d5e6fcd112b8653c0b39f2854
4
- data.tar.gz: 2d67a98fe71852d8746be01fe140826183eaf12d42a6099ce5175bfac15e296d
3
+ metadata.gz: d6f250ec4f6f4ef77fdd8b97e3e3a108af27d14d5bfcf1e0a259ff275da29c79
4
+ data.tar.gz: 689226f654268890df31149735f9fa74dd6c3ff722dbf9293b1a3969bf951961
5
5
  SHA512:
6
- metadata.gz: 2b5db5518d98aa662b3bef973bce64adb438beff835276b02d679aa9cba8714f71178fa3510792589b602439fd162f26f161679b2c5063ebd375b3b72a2618ce
7
- data.tar.gz: 37e954d5f9c4e1a767c91e999327ac32b64f9a984153c1cccf4273423d6b1818e89b3dcab08a056889decd6e72abd84672bfd94bb05c1b2207cc7a640efa44de
6
+ metadata.gz: 3748848e759e9c0a3b9c366112418e8e5d61717a8c3ee6ce8f7b6998d3dcd3c6c1bc5c2a75f23f469ee48b37825824336985175a3c782ec5d12ea0948651610b
7
+ data.tar.gz: 0b662af2891d5370e167e17561a096f2af1614fa24a1f44f3cbf2167bdfc075a6cb6a02b157b821bac9d9de7ca2de68954eb9f8e58cc3c10c60514b0f6bbae39
@@ -2,6 +2,21 @@
2
2
 
3
3
  ## Next version
4
4
 
5
+ ## v1.9.11
6
+ - Fix some Ruby 2.7 warnings
7
+
8
+ ## v1.9.10
9
+ - Fix some Ruby 2.7 warnings
10
+
11
+ ## v1.9.9
12
+ - Add error to ErrorsMiddleware
13
+
14
+ ## v1.9.8
15
+ - Fix `tags` helper
16
+
17
+ ## v1.9.7
18
+ - Change XLSX export
19
+
5
20
  ## v1.9.6
6
21
  - Fix info helper with false
7
22
  - Update Rubocop + fix offences
@@ -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,6 +1,7 @@
1
1
  class Agilibox::Serializers::XLSX < Agilibox::Serializers::Base
2
2
  def render_inline
3
- SpreadsheetArchitect.to_xlsx(data: formatted_data)
3
+ headers, *data = formatted_data
4
+ SpreadsheetArchitect.to_xlsx(headers: headers, data: data, freeze_headers: true)
4
5
  end
5
6
 
6
7
  def render_file(file_path)
@@ -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(*)
@@ -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.6"
2
+ VERSION = "1.9.11"
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.6
4
+ version: 1.9.11
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-09-29 00:00:00.000000000 Z
11
+ date: 2020-12-07 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