agilibox 1.10.0 → 1.11.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 +4 -4
- data/CHANGELOG.md +19 -0
- data/app/controllers/concerns/agilibox/api_controller_concern.rb +1 -1
- data/app/filters/agilibox/small_data/filter.rb +7 -1
- data/app/filters/agilibox/small_data/filter_strategy_by_date_begin.rb +1 -1
- data/app/filters/agilibox/small_data/filter_strategy_by_date_end.rb +1 -1
- data/app/helpers/agilibox/form_helper.rb +10 -0
- data/app/views/agilibox/search/_form_bs3.html.slim +1 -0
- data/app/views/agilibox/search/_form_bs4.html.slim +1 -0
- data/app/views/agilibox/search/_form_bs5.html.slim +1 -0
- data/lib/agilibox/cucumber_helpers/capybara.rb +2 -1
- data/lib/agilibox/errors_middleware.rb +2 -0
- data/lib/agilibox/version.rb +1 -1
- metadata +16 -3
- data/app/filters/agilibox/small_data/filter_strategy_by_time_period.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73e2e45e1fed7a2e0cec02d337dc0afa3bf0112e4b26ec3168d8b62e0f64c961
|
4
|
+
data.tar.gz: 9a79efe0583a84370cc71d57468e6083b77032053c59ae702c9c557a3cac3dd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80764451b386701e1e0033ed885589c1e95bff2bd973cc022dc706ce828fc86f1ac8c947c8bbe5b6f394e395fa5c1e9f933b45fb0173fe03d7ef3c088bc2eed2
|
7
|
+
data.tar.gz: 727f23e415b4aa280e2d96bc91d3016636e2e8f76a8a197218b9a8ef93797e638fb9637f880603293476c0ad6960fcd6d1974f74a1669184f20624f4b8169222
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,25 @@
|
|
2
2
|
|
3
3
|
## Next version
|
4
4
|
|
5
|
+
## v1.11.0
|
6
|
+
- Add ActionDispatch::Http::MimeNegotiation::InvalidType to errors middleware
|
7
|
+
- Fix inverted forbidden/unauthorized
|
8
|
+
|
9
|
+
## v1.10.5
|
10
|
+
- Fix hidden_inputs_for_get_form again
|
11
|
+
|
12
|
+
## v1.10.4
|
13
|
+
- Fix hidden_inputs_for_get_form
|
14
|
+
|
15
|
+
## v1.10.3
|
16
|
+
- Fix search forms to preserve GET params
|
17
|
+
|
18
|
+
## v1.10.2
|
19
|
+
- Filters improvements
|
20
|
+
|
21
|
+
## v1.10.1
|
22
|
+
- Fix date filters
|
23
|
+
|
5
24
|
## v1.10.0
|
6
25
|
- Add date support to XLSX serializer
|
7
26
|
- Remove AXLSX serializer
|
@@ -1,4 +1,6 @@
|
|
1
1
|
class Agilibox::SmallData::Filter
|
2
|
+
include ActiveModel::Model
|
3
|
+
|
2
4
|
STRATEGIES = {}
|
3
5
|
|
4
6
|
attr_reader :jar
|
@@ -60,8 +62,12 @@ class Agilibox::SmallData::Filter
|
|
60
62
|
write read.merge(new_filters)
|
61
63
|
end
|
62
64
|
|
65
|
+
def actives_count
|
66
|
+
read.count { |k, v| strategies.key?(k.to_s) && v.present? }
|
67
|
+
end
|
68
|
+
|
63
69
|
def any?
|
64
|
-
|
70
|
+
actives_count.positive?
|
65
71
|
end
|
66
72
|
|
67
73
|
def empty?
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class Agilibox::SmallData::FilterStrategyByDateBegin < ::Agilibox::SmallData::FilterStrategyByKeyValue
|
2
2
|
def apply(query, value)
|
3
|
-
value =
|
3
|
+
value = Date.parse(value)
|
4
4
|
column = column_for(query)
|
5
5
|
query.where("#{column} >= ?", value)
|
6
6
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class Agilibox::SmallData::FilterStrategyByDateEnd < ::Agilibox::SmallData::FilterStrategyByKeyValue
|
2
2
|
def apply(query, value)
|
3
|
-
value =
|
3
|
+
value = Date.parse(value)
|
4
4
|
column = column_for(query)
|
5
5
|
query.where("#{column} <= ?", value)
|
6
6
|
end
|
@@ -59,4 +59,14 @@ module Agilibox::FormHelper
|
|
59
59
|
:label => label,
|
60
60
|
)
|
61
61
|
end
|
62
|
+
|
63
|
+
def hidden_inputs_for_get_form(url, except: [])
|
64
|
+
query_values = Addressable::URI.parse(url).query_values.to_h
|
65
|
+
.with_indifferent_access
|
66
|
+
.except(*except)
|
67
|
+
|
68
|
+
return if query_values.empty?
|
69
|
+
|
70
|
+
query_values.sum { |k, v| tag.input(type: "hidden", name: k, value: v) }
|
71
|
+
end
|
62
72
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
Capybara.register_driver :agilibox_no_driver do |_app|
|
2
|
-
raise
|
2
|
+
raise \
|
3
|
+
"You need to add Agilibox::CucumberConfig.require_cuprite! or " \
|
3
4
|
"Agilibox::CucumberConfig.require_chrome_headless! " \
|
4
5
|
"to your features/support/env.rb"
|
5
6
|
end
|
@@ -9,6 +9,8 @@ class Agilibox::ErrorsMiddleware
|
|
9
9
|
"ActionController::BadRequest",
|
10
10
|
"ActionController::UnknownFormat",
|
11
11
|
"ActionController::UnknownHttpMethod",
|
12
|
+
"ActionDispatch::Cookies::CookieOverflow",
|
13
|
+
"ActionDispatch::Http::MimeNegotiation::InvalidType",
|
12
14
|
"ActionView::MissingTemplate",
|
13
15
|
"Mime::Type::InvalidMimeType",
|
14
16
|
]
|
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.
|
4
|
+
version: 1.11.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: 2021-
|
11
|
+
date: 2021-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails-i18n
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: addressable
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
description: Agilibox
|
84
98
|
email:
|
85
99
|
- contact@agilidee.com
|
@@ -125,7 +139,6 @@ files:
|
|
125
139
|
- app/filters/agilibox/small_data/filter_strategy_by_key_value.rb
|
126
140
|
- app/filters/agilibox/small_data/filter_strategy_by_key_values.rb
|
127
141
|
- app/filters/agilibox/small_data/filter_strategy_by_tags.rb
|
128
|
-
- app/filters/agilibox/small_data/filter_strategy_by_time_period.rb
|
129
142
|
- app/forms/agilibox/mini_form_object.rb
|
130
143
|
- app/helpers/agilibox/all_helpers.rb
|
131
144
|
- app/helpers/agilibox/bootstrap_helper.rb
|