nxt_support 0.6.0 → 0.6.1
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/.github/workflows/ci.yml +24 -0
- data/.ruby-version +1 -1
- data/.tool-versions +1 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +0 -4
- data/Gemfile.lock +46 -38
- data/lib/nxt_support/models/duration_attribute_accessor.rb +11 -1
- data/lib/nxt_support/version.rb +1 -1
- metadata +5 -8
- data/.circleci/config.yml +0 -53
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a56ccf2cd98ff0c8f6c75b4e54ff8e89b59aadfc86476ad1b0a91e9ce7c1fef5
|
|
4
|
+
data.tar.gz: d55f9511586bce10860b52f5188460346359c6e352056f1477dbb455595f0946
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ffd4890cb7f2fb0c78e5ae058aa7bfdbc22564dd33c31ae888700083a6b785e573b18defc021b646fe63c7936d73b0c7ba927143394e845e6dac17c53b2d5168
|
|
7
|
+
data.tar.gz: 20e6ddc394861312d81d3be126c835390e0d1240e671e4fad1607a6e8a99f658f2dcff0f8594944d61c2696b680379f8a76fc0ed4f156dc0f20b9d0ea17d1df5
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
tests:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
ruby-version: ["3.3", "3.4", "4.0"]
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v6
|
|
20
|
+
- uses: ruby/setup-ruby@v1
|
|
21
|
+
with:
|
|
22
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
23
|
+
bundler-cache: true
|
|
24
|
+
- run: bundle exec rspec
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4.0.3
|
data/.tool-versions
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ruby 4.0.3
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
nxt_support (0.6.
|
|
4
|
+
nxt_support (0.6.1)
|
|
5
5
|
activerecord
|
|
6
6
|
activesupport
|
|
7
7
|
nxt_init
|
|
@@ -10,65 +10,74 @@ PATH
|
|
|
10
10
|
GEM
|
|
11
11
|
remote: https://rubygems.org/
|
|
12
12
|
specs:
|
|
13
|
-
activemodel (
|
|
14
|
-
activesupport (=
|
|
15
|
-
activerecord (
|
|
16
|
-
activemodel (=
|
|
17
|
-
activesupport (=
|
|
13
|
+
activemodel (8.1.3)
|
|
14
|
+
activesupport (= 8.1.3)
|
|
15
|
+
activerecord (8.1.3)
|
|
16
|
+
activemodel (= 8.1.3)
|
|
17
|
+
activesupport (= 8.1.3)
|
|
18
18
|
timeout (>= 0.4.0)
|
|
19
|
-
activesupport (
|
|
19
|
+
activesupport (8.1.3)
|
|
20
20
|
base64
|
|
21
21
|
bigdecimal
|
|
22
22
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
23
23
|
connection_pool (>= 2.2.5)
|
|
24
24
|
drb
|
|
25
25
|
i18n (>= 1.6, < 2)
|
|
26
|
+
json
|
|
26
27
|
logger (>= 1.4.2)
|
|
27
28
|
minitest (>= 5.1)
|
|
28
29
|
securerandom (>= 0.3)
|
|
29
30
|
tzinfo (~> 2.0, >= 2.0.5)
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
uri (>= 0.13.1)
|
|
32
|
+
base64 (0.3.0)
|
|
33
|
+
bigdecimal (4.1.2)
|
|
32
34
|
coderay (1.1.3)
|
|
33
|
-
concurrent-ruby (1.3.
|
|
34
|
-
connection_pool (
|
|
35
|
-
diff-lcs (1.
|
|
36
|
-
drb (2.2.
|
|
37
|
-
i18n (1.14.
|
|
35
|
+
concurrent-ruby (1.3.6)
|
|
36
|
+
connection_pool (3.0.2)
|
|
37
|
+
diff-lcs (1.6.2)
|
|
38
|
+
drb (2.2.3)
|
|
39
|
+
i18n (1.14.8)
|
|
38
40
|
concurrent-ruby (~> 1.0)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
io-console (0.8.2)
|
|
42
|
+
json (2.19.4)
|
|
43
|
+
logger (1.7.0)
|
|
44
|
+
method_source (1.1.0)
|
|
45
|
+
mini_portile2 (2.8.9)
|
|
46
|
+
minitest (6.0.5)
|
|
47
|
+
drb (~> 2.0)
|
|
48
|
+
prism (~> 1.5)
|
|
43
49
|
nxt_init (0.1.5)
|
|
44
50
|
activesupport
|
|
45
51
|
nxt_registry (0.3.10)
|
|
46
52
|
activesupport
|
|
47
|
-
|
|
53
|
+
prism (1.9.0)
|
|
54
|
+
pry (0.16.0)
|
|
48
55
|
coderay (~> 1.1)
|
|
49
56
|
method_source (~> 1.0)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
rspec-
|
|
57
|
-
|
|
57
|
+
reline (>= 0.6.0)
|
|
58
|
+
rake (13.4.2)
|
|
59
|
+
reline (0.6.3)
|
|
60
|
+
io-console (~> 0.5)
|
|
61
|
+
rspec (3.13.2)
|
|
62
|
+
rspec-core (~> 3.13.0)
|
|
63
|
+
rspec-expectations (~> 3.13.0)
|
|
64
|
+
rspec-mocks (~> 3.13.0)
|
|
65
|
+
rspec-core (3.13.6)
|
|
66
|
+
rspec-support (~> 3.13.0)
|
|
67
|
+
rspec-expectations (3.13.5)
|
|
58
68
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
59
|
-
rspec-support (~> 3.
|
|
60
|
-
rspec-mocks (3.
|
|
69
|
+
rspec-support (~> 3.13.0)
|
|
70
|
+
rspec-mocks (3.13.8)
|
|
61
71
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
62
|
-
rspec-support (~> 3.
|
|
63
|
-
rspec-support (3.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
securerandom (0.3.1)
|
|
67
|
-
sqlite3 (1.6.4)
|
|
72
|
+
rspec-support (~> 3.13.0)
|
|
73
|
+
rspec-support (3.13.7)
|
|
74
|
+
securerandom (0.4.1)
|
|
75
|
+
sqlite3 (2.9.3)
|
|
68
76
|
mini_portile2 (~> 2.8.0)
|
|
69
|
-
timeout (0.
|
|
77
|
+
timeout (0.6.1)
|
|
70
78
|
tzinfo (2.0.6)
|
|
71
79
|
concurrent-ruby (~> 1.0)
|
|
80
|
+
uri (1.1.1)
|
|
72
81
|
|
|
73
82
|
PLATFORMS
|
|
74
83
|
ruby
|
|
@@ -79,8 +88,7 @@ DEPENDENCIES
|
|
|
79
88
|
pry
|
|
80
89
|
rake
|
|
81
90
|
rspec
|
|
82
|
-
rspec_junit_formatter
|
|
83
91
|
sqlite3
|
|
84
92
|
|
|
85
93
|
BUNDLED WITH
|
|
86
|
-
|
|
94
|
+
4.0.8
|
|
@@ -19,6 +19,16 @@ module NxtSupport
|
|
|
19
19
|
define_duration_attribute_writer(attr_name)
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
|
+
|
|
23
|
+
def validates_durations(*attrs, **opts)
|
|
24
|
+
validates_each(*attrs, **opts) do |record, attr, value|
|
|
25
|
+
record.errors.add attr, "is not a valid iso8601 duration." unless record.is_valid_iso8601_duration?(value)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def validates_duration(attr, **opts)
|
|
30
|
+
validates_durations(attr, **opts)
|
|
31
|
+
end
|
|
22
32
|
|
|
23
33
|
private
|
|
24
34
|
|
|
@@ -55,7 +65,7 @@ module NxtSupport
|
|
|
55
65
|
def is_valid_iso8601_duration?(string)
|
|
56
66
|
ActiveSupport::Duration.parse(string)
|
|
57
67
|
true
|
|
58
|
-
rescue ActiveSupport::Duration::ISO8601Parser::ParsingError
|
|
68
|
+
rescue ActiveSupport::Duration::ISO8601Parser::ParsingError, TypeError
|
|
59
69
|
false
|
|
60
70
|
end
|
|
61
71
|
end
|
data/lib/nxt_support/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nxt_support
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nils Sommer
|
|
8
8
|
- Andreas Robecke
|
|
9
9
|
- Nicolai Stoianov
|
|
10
10
|
- Akihiko Ito
|
|
11
|
-
autorequire:
|
|
12
11
|
bindir: exe
|
|
13
12
|
cert_chain: []
|
|
14
|
-
date:
|
|
13
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
15
14
|
dependencies:
|
|
16
15
|
- !ruby/object:Gem::Dependency
|
|
17
16
|
name: activerecord
|
|
@@ -139,7 +138,6 @@ dependencies:
|
|
|
139
138
|
- - ">="
|
|
140
139
|
- !ruby/object:Gem::Version
|
|
141
140
|
version: '0'
|
|
142
|
-
description:
|
|
143
141
|
email:
|
|
144
142
|
- mail@nilssommer.de
|
|
145
143
|
- a.robecke@getsafe.de
|
|
@@ -149,11 +147,12 @@ executables: []
|
|
|
149
147
|
extensions: []
|
|
150
148
|
extra_rdoc_files: []
|
|
151
149
|
files:
|
|
152
|
-
- ".circleci/config.yml"
|
|
153
150
|
- ".editorconfig"
|
|
151
|
+
- ".github/workflows/ci.yml"
|
|
154
152
|
- ".gitignore"
|
|
155
153
|
- ".rspec"
|
|
156
154
|
- ".ruby-version"
|
|
155
|
+
- ".tool-versions"
|
|
157
156
|
- CHANGELOG.md
|
|
158
157
|
- Gemfile
|
|
159
158
|
- Gemfile.lock
|
|
@@ -201,7 +200,6 @@ metadata:
|
|
|
201
200
|
homepage_uri: https://github.com/nxt-insurance/nxt_support
|
|
202
201
|
source_code_uri: https://github.com/nxt-insurance/nxt_support
|
|
203
202
|
changelog_uri: https://github.com/nxt-insurance/nxt_support/CHANGELOG.md
|
|
204
|
-
post_install_message:
|
|
205
203
|
rdoc_options: []
|
|
206
204
|
require_paths:
|
|
207
205
|
- lib
|
|
@@ -216,8 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
216
214
|
- !ruby/object:Gem::Version
|
|
217
215
|
version: '0'
|
|
218
216
|
requirements: []
|
|
219
|
-
rubygems_version:
|
|
220
|
-
signing_key:
|
|
217
|
+
rubygems_version: 4.0.6
|
|
221
218
|
specification_version: 4
|
|
222
219
|
summary: Support through reusable Mixins and Helpers for Ruby on Rails Applications
|
|
223
220
|
test_files: []
|
data/.circleci/config.yml
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# Ruby CircleCI 2.0 configuration file
|
|
2
|
-
#
|
|
3
|
-
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
|
|
4
|
-
#
|
|
5
|
-
version: 2.1
|
|
6
|
-
|
|
7
|
-
workflows:
|
|
8
|
-
build:
|
|
9
|
-
jobs:
|
|
10
|
-
- build:
|
|
11
|
-
matrix:
|
|
12
|
-
parameters:
|
|
13
|
-
ruby-version: ["3.1.3", "3.2.1", "3.2.2"]
|
|
14
|
-
orbs:
|
|
15
|
-
ruby: circleci/ruby@2.0.1
|
|
16
|
-
|
|
17
|
-
jobs:
|
|
18
|
-
build:
|
|
19
|
-
parameters:
|
|
20
|
-
ruby-version:
|
|
21
|
-
type: string
|
|
22
|
-
|
|
23
|
-
docker:
|
|
24
|
-
# specify the version you desire here
|
|
25
|
-
- image: cimg/ruby:<< parameters.ruby-version >>
|
|
26
|
-
|
|
27
|
-
working_directory: ~/repo
|
|
28
|
-
|
|
29
|
-
steps:
|
|
30
|
-
- checkout
|
|
31
|
-
- ruby/install-deps:
|
|
32
|
-
key: gems-v2
|
|
33
|
-
include-branch-in-cache-key: false
|
|
34
|
-
- run:
|
|
35
|
-
name: run tests
|
|
36
|
-
command: |
|
|
37
|
-
mkdir /tmp/test-results
|
|
38
|
-
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | \
|
|
39
|
-
circleci tests split --split-by=timings)"
|
|
40
|
-
|
|
41
|
-
bundle exec rspec \
|
|
42
|
-
--format progress \
|
|
43
|
-
--format RspecJunitFormatter \
|
|
44
|
-
--out /tmp/test-results/rspec.xml \
|
|
45
|
-
--format progress \
|
|
46
|
-
$TEST_FILES
|
|
47
|
-
|
|
48
|
-
# collect reports
|
|
49
|
-
- store_test_results:
|
|
50
|
-
path: /tmp/test-results
|
|
51
|
-
- store_artifacts:
|
|
52
|
-
path: /tmp/test-results
|
|
53
|
-
destination: test-results
|