auxilium 3.0.24 → 3.0.31
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/gem-push.yml +11 -0
- data/Gemfile +0 -4
- data/Rakefile +0 -1
- data/auxilium.gemspec +8 -9
- data/lib/auxilium/concerns/metadata.rb +4 -0
- data/lib/auxilium/concerns/sidekiq_callbacks.rb +63 -0
- data/lib/auxilium/easy_crypt.rb +11 -1
- data/lib/auxilium/responders/continue_responder.rb +2 -2
- data/lib/auxilium/responders/responder.rb +3 -0
- data/lib/auxilium/responders/signum_responder.rb +1 -1
- data/lib/auxilium/version.rb +1 -1
- data/lib/auxilium.rb +1 -0
- metadata +33 -33
- data/Gemfile.lock +0 -152
- data/lib/tasks/semver.rake +0 -68
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a9c18c098ed5c373bc8aaa1ef9f840b288448dae2d001c0c14a729e850f85d0d
|
|
4
|
+
data.tar.gz: 4ace966e96460b8ff75aa4d676e72b42e2e15236a23a2c107168df3eb8afbe57
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 45b322146de66d6c4f13f0c5be0abe0ee6a9d53432ac00a0e57a2956bfb5b6be536d3b8e0caaf0d9c809daaf54b3fa1f66f141604c7a1ae2dda5912ea6e3fc9a
|
|
7
|
+
data.tar.gz: d5357f0dea28bf2a32e15181398c10cb57953034a016b5973f79c069e75a55cf79d4d637e72996466df24ffa73f276256c5b0d6b287534cb148ef944f0eef669
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/auxilium.gemspec
CHANGED
|
@@ -13,8 +13,7 @@ Gem::Specification.new do |spec|
|
|
|
13
13
|
# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
|
14
14
|
|
|
15
15
|
spec.metadata['homepage_uri'] = spec.homepage
|
|
16
|
-
spec.metadata['source_code_uri'] = 'https://
|
|
17
|
-
# spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
|
|
16
|
+
spec.metadata['source_code_uri'] = 'https://github.com/entdec/auxilium'
|
|
18
17
|
|
|
19
18
|
# Specify which files should be added to the gem when it is released.
|
|
20
19
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
@@ -25,14 +24,14 @@ Gem::Specification.new do |spec|
|
|
|
25
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
26
25
|
spec.require_paths = ['lib']
|
|
27
26
|
|
|
28
|
-
spec.add_dependency 'actionpack', '
|
|
29
|
-
spec.add_dependency 'activemodel', '
|
|
30
|
-
spec.add_dependency 'activesupport', '
|
|
31
|
-
spec.add_dependency 'pundit', '
|
|
32
|
-
spec.add_dependency 'responders', '
|
|
33
|
-
spec.add_dependency 'rolify', '
|
|
27
|
+
spec.add_dependency 'actionpack', '~> 7'
|
|
28
|
+
spec.add_dependency 'activemodel', '>= 7'
|
|
29
|
+
spec.add_dependency 'activesupport', '>= 7'
|
|
30
|
+
spec.add_dependency 'pundit', '>= 2'
|
|
31
|
+
spec.add_dependency 'responders', '>= 3.1'
|
|
32
|
+
spec.add_dependency 'rolify', '>= 6'
|
|
34
33
|
|
|
35
34
|
spec.add_development_dependency 'minitest', '> 5.0'
|
|
36
35
|
spec.add_development_dependency 'pry'
|
|
37
|
-
spec.add_development_dependency 'rake', '~>
|
|
36
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
|
38
37
|
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
require "active_support/callbacks"
|
|
2
|
+
|
|
3
|
+
# Following approach used by ActiveJob
|
|
4
|
+
# https://github.com/rails/rails/blob/93c9534c9871d4adad4bc33b5edc355672b59c61/activejob/lib/active_job/callbacks.rb
|
|
5
|
+
module Auxilium
|
|
6
|
+
module Concerns
|
|
7
|
+
module SidekiqCallbacks
|
|
8
|
+
extend ActiveSupport::Concern
|
|
9
|
+
|
|
10
|
+
def self.prepended(base)
|
|
11
|
+
base.include(ActiveSupport::Callbacks)
|
|
12
|
+
|
|
13
|
+
# Check to see if we already have any callbacks for :perform
|
|
14
|
+
# Prevents overwriting callbacks if we already included this module (and defined callbacks)
|
|
15
|
+
base.define_callbacks :perform unless base.respond_to?(:_perform_callbacks) && base._perform_callbacks.present?
|
|
16
|
+
base.define_callbacks :enqueue unless base.respond_to?(:_enqueue_callbacks) && base._enqueue_callbacks.present?
|
|
17
|
+
|
|
18
|
+
class << base
|
|
19
|
+
prepend ClassMethods
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def perform(*args)
|
|
24
|
+
if respond_to?(:run_callbacks)
|
|
25
|
+
run_callbacks :perform do
|
|
26
|
+
super(*args)
|
|
27
|
+
end
|
|
28
|
+
else
|
|
29
|
+
super(*args)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def enqueue(*args)
|
|
34
|
+
if respond_to?(:run_callbacks)
|
|
35
|
+
run_callbacks :enqueue do
|
|
36
|
+
super(*args)
|
|
37
|
+
end
|
|
38
|
+
else
|
|
39
|
+
super(*args)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
module ClassMethods
|
|
44
|
+
def around_perform(*filters, &blk)
|
|
45
|
+
set_callback(:perform, :around, *filters, &blk)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def before_enqueue(*filters, &blk)
|
|
49
|
+
set_callback(:enqueue, :before, *filters, &blk)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def around_enqueue(*filters, &blk)
|
|
53
|
+
set_callback(:enqueue, :around, *filters, &blk)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def before_perform(*filters, &blk)
|
|
57
|
+
set_callback(:perform, :before, *filters, &blk)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
end
|
|
63
|
+
end
|
data/lib/auxilium/easy_crypt.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module Auxilium
|
|
2
2
|
class EasyCrypt
|
|
3
3
|
# When no digest is given, the default Rails digest is used.
|
|
4
|
-
# Digest can be something like OpenSSL::Digest::SHA1 or OpenSSL::Digest::SHA256
|
|
4
|
+
# Digest can be something like OpenSSL::Digest::SHA1 or OpenSSL::Digest::SHA256
|
|
5
5
|
def initialize(key_base, digest: OpenSSL::Digest::SHA1)
|
|
6
6
|
@key_base = key_base
|
|
7
7
|
@digest = digest
|
|
@@ -52,5 +52,15 @@ module Auxilium
|
|
|
52
52
|
def crypted?(text)
|
|
53
53
|
text =~ /^EasyCrypt@[0-9a-f]+\$\$[^-]+--[^-]+--[^-]+/
|
|
54
54
|
end
|
|
55
|
+
|
|
56
|
+
class << self
|
|
57
|
+
def dump(text)
|
|
58
|
+
new(Rails.application.credentials.secret_key_base).encrypt(text)
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def load(text)
|
|
62
|
+
new(Rails.application.credentials.secret_key_base).decrypt(text)
|
|
63
|
+
end
|
|
64
|
+
end
|
|
55
65
|
end
|
|
56
66
|
end
|
|
@@ -7,9 +7,9 @@ module Auxilium
|
|
|
7
7
|
protected
|
|
8
8
|
|
|
9
9
|
def navigation_location
|
|
10
|
-
return options[:location] if options[:location] && (controller.is_a?(Devise::SessionsController) || controller.is_a?(Devise::PasswordsController))
|
|
10
|
+
return options[:location] if options[:location] && (defined?(Devise) && (controller.is_a?(Devise::SessionsController) || controller.is_a?(Devise::PasswordsController)))
|
|
11
11
|
return options[:location] if controller.params[:commit] == 'continue' && options[:location]
|
|
12
|
-
return options[:collection_location].call if %w[save commit].include?(controller.params[:commit]) && options[:collection_location]
|
|
12
|
+
return options[:collection_location].call if %w[save commit delete].include?(controller.params[:commit]) && options[:collection_location]
|
|
13
13
|
return resource_location if controller.params[:commit] == 'continue'
|
|
14
14
|
|
|
15
15
|
klass = resources.last.class
|
data/lib/auxilium/version.rb
CHANGED
data/lib/auxilium.rb
CHANGED
|
@@ -19,6 +19,7 @@ require 'auxilium/concerns/authenticated'
|
|
|
19
19
|
require 'auxilium/concerns/metadata'
|
|
20
20
|
require 'auxilium/concerns/metadata_scoped'
|
|
21
21
|
require 'auxilium/concerns/model_name_shortcuts'
|
|
22
|
+
require 'auxilium/concerns/sidekiq_callbacks'
|
|
22
23
|
require 'auxilium/responders/continue_responder'
|
|
23
24
|
require 'auxilium/responders/signum_responder'
|
|
24
25
|
require 'auxilium/responders/responder'
|
metadata
CHANGED
|
@@ -1,99 +1,99 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: auxilium
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.31
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andre Meij
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-03-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: actionpack
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - "
|
|
17
|
+
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
19
|
+
version: '7'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- - "
|
|
24
|
+
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '
|
|
26
|
+
version: '7'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: activemodel
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- - "
|
|
31
|
+
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '
|
|
33
|
+
version: '7'
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- - "
|
|
38
|
+
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '
|
|
40
|
+
version: '7'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: activesupport
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
|
-
- - "
|
|
45
|
+
- - ">="
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: '
|
|
47
|
+
version: '7'
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
|
-
- - "
|
|
52
|
+
- - ">="
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: '
|
|
54
|
+
version: '7'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: pundit
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
|
-
- - "
|
|
59
|
+
- - ">="
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
61
|
version: '2'
|
|
62
62
|
type: :runtime
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
|
-
- - "
|
|
66
|
+
- - ">="
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '2'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: responders
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
|
-
- - "
|
|
73
|
+
- - ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: '3'
|
|
75
|
+
version: '3.1'
|
|
76
76
|
type: :runtime
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
|
-
- - "
|
|
80
|
+
- - ">="
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: '3'
|
|
82
|
+
version: '3.1'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
84
|
name: rolify
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
|
-
- - "
|
|
87
|
+
- - ">="
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: '
|
|
89
|
+
version: '6'
|
|
90
90
|
type: :runtime
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
|
-
- - "
|
|
94
|
+
- - ">="
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: '
|
|
96
|
+
version: '6'
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
98
|
name: minitest
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -128,14 +128,14 @@ dependencies:
|
|
|
128
128
|
requirements:
|
|
129
129
|
- - "~>"
|
|
130
130
|
- !ruby/object:Gem::Version
|
|
131
|
-
version: '
|
|
131
|
+
version: '13.0'
|
|
132
132
|
type: :development
|
|
133
133
|
prerelease: false
|
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
|
135
135
|
requirements:
|
|
136
136
|
- - "~>"
|
|
137
137
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: '
|
|
138
|
+
version: '13.0'
|
|
139
139
|
description: Utility classes that are to small to warrant a own gem for now.
|
|
140
140
|
email:
|
|
141
141
|
- andre@itsmeij.com
|
|
@@ -143,10 +143,10 @@ executables: []
|
|
|
143
143
|
extensions: []
|
|
144
144
|
extra_rdoc_files: []
|
|
145
145
|
files:
|
|
146
|
+
- ".github/workflows/gem-push.yml"
|
|
146
147
|
- ".gitignore"
|
|
147
148
|
- ".travis.yml"
|
|
148
149
|
- Gemfile
|
|
149
|
-
- Gemfile.lock
|
|
150
150
|
- LICENSE
|
|
151
151
|
- README.md
|
|
152
152
|
- Rakefile
|
|
@@ -160,6 +160,7 @@ files:
|
|
|
160
160
|
- lib/auxilium/concerns/metadata.rb
|
|
161
161
|
- lib/auxilium/concerns/metadata_scoped.rb
|
|
162
162
|
- lib/auxilium/concerns/model_name_shortcuts.rb
|
|
163
|
+
- lib/auxilium/concerns/sidekiq_callbacks.rb
|
|
163
164
|
- lib/auxilium/easy_crypt.rb
|
|
164
165
|
- lib/auxilium/grape.rb
|
|
165
166
|
- lib/auxilium/grape/parameter_filter.rb
|
|
@@ -174,13 +175,12 @@ files:
|
|
|
174
175
|
- lib/auxilium/validators/yaml_validator.rb
|
|
175
176
|
- lib/auxilium/version.rb
|
|
176
177
|
- lib/core_ext/string.rb
|
|
177
|
-
- lib/tasks/semver.rake
|
|
178
178
|
homepage: https://code.entropydecelerator.com/components/auxilium
|
|
179
179
|
licenses: []
|
|
180
180
|
metadata:
|
|
181
181
|
homepage_uri: https://code.entropydecelerator.com/components/auxilium
|
|
182
|
-
source_code_uri: https://
|
|
183
|
-
post_install_message:
|
|
182
|
+
source_code_uri: https://github.com/entdec/auxilium
|
|
183
|
+
post_install_message:
|
|
184
184
|
rdoc_options: []
|
|
185
185
|
require_paths:
|
|
186
186
|
- lib
|
|
@@ -195,8 +195,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
195
195
|
- !ruby/object:Gem::Version
|
|
196
196
|
version: '0'
|
|
197
197
|
requirements: []
|
|
198
|
-
rubygems_version: 3.
|
|
199
|
-
signing_key:
|
|
198
|
+
rubygems_version: 3.4.10
|
|
199
|
+
signing_key:
|
|
200
200
|
specification_version: 4
|
|
201
201
|
summary: Random utilities.
|
|
202
202
|
test_files: []
|
data/Gemfile.lock
DELETED
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
GIT
|
|
2
|
-
remote: https://github.com/heartcombo/responders.git
|
|
3
|
-
revision: 161f205b649489d740821425560eecd355fa02be
|
|
4
|
-
branch: main
|
|
5
|
-
specs:
|
|
6
|
-
responders (3.0.1)
|
|
7
|
-
actionpack (>= 5.2)
|
|
8
|
-
railties (>= 5.2)
|
|
9
|
-
|
|
10
|
-
PATH
|
|
11
|
-
remote: .
|
|
12
|
-
specs:
|
|
13
|
-
auxilium (3.0.24)
|
|
14
|
-
actionpack (> 5.1)
|
|
15
|
-
activemodel (> 5.1)
|
|
16
|
-
activesupport (> 5.1)
|
|
17
|
-
pundit (> 2)
|
|
18
|
-
responders (> 3)
|
|
19
|
-
rolify (> 5)
|
|
20
|
-
|
|
21
|
-
GEM
|
|
22
|
-
remote: https://rubygems.org/
|
|
23
|
-
specs:
|
|
24
|
-
actionpack (7.0.3.1)
|
|
25
|
-
actionview (= 7.0.3.1)
|
|
26
|
-
activesupport (= 7.0.3.1)
|
|
27
|
-
rack (~> 2.0, >= 2.2.0)
|
|
28
|
-
rack-test (>= 0.6.3)
|
|
29
|
-
rails-dom-testing (~> 2.0)
|
|
30
|
-
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
31
|
-
actionview (7.0.3.1)
|
|
32
|
-
activesupport (= 7.0.3.1)
|
|
33
|
-
builder (~> 3.1)
|
|
34
|
-
erubi (~> 1.4)
|
|
35
|
-
rails-dom-testing (~> 2.0)
|
|
36
|
-
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
|
37
|
-
activemodel (7.0.3.1)
|
|
38
|
-
activesupport (= 7.0.3.1)
|
|
39
|
-
activesupport (7.0.3.1)
|
|
40
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
41
|
-
i18n (>= 1.6, < 2)
|
|
42
|
-
minitest (>= 5.1)
|
|
43
|
-
tzinfo (~> 2.0)
|
|
44
|
-
ast (2.4.2)
|
|
45
|
-
backport (1.2.0)
|
|
46
|
-
benchmark (0.2.0)
|
|
47
|
-
builder (3.2.4)
|
|
48
|
-
coderay (1.1.3)
|
|
49
|
-
concurrent-ruby (1.1.10)
|
|
50
|
-
crass (1.0.6)
|
|
51
|
-
diff-lcs (1.5.0)
|
|
52
|
-
e2mmap (0.1.0)
|
|
53
|
-
erubi (1.10.0)
|
|
54
|
-
i18n (1.12.0)
|
|
55
|
-
concurrent-ruby (~> 1.0)
|
|
56
|
-
jaro_winkler (1.5.4)
|
|
57
|
-
json (2.6.2)
|
|
58
|
-
kramdown (2.4.0)
|
|
59
|
-
rexml
|
|
60
|
-
kramdown-parser-gfm (1.1.0)
|
|
61
|
-
kramdown (~> 2.0)
|
|
62
|
-
loofah (2.18.0)
|
|
63
|
-
crass (~> 1.0.2)
|
|
64
|
-
nokogiri (>= 1.5.9)
|
|
65
|
-
method_source (1.0.0)
|
|
66
|
-
mini_portile2 (2.8.0)
|
|
67
|
-
minitest (5.16.2)
|
|
68
|
-
nokogiri (1.13.8)
|
|
69
|
-
mini_portile2 (~> 2.8.0)
|
|
70
|
-
racc (~> 1.4)
|
|
71
|
-
parallel (1.22.1)
|
|
72
|
-
parser (3.1.2.1)
|
|
73
|
-
ast (~> 2.4.1)
|
|
74
|
-
pry (0.14.1)
|
|
75
|
-
coderay (~> 1.1)
|
|
76
|
-
method_source (~> 1.0)
|
|
77
|
-
pundit (2.2.0)
|
|
78
|
-
activesupport (>= 3.0.0)
|
|
79
|
-
racc (1.6.0)
|
|
80
|
-
rack (2.2.4)
|
|
81
|
-
rack-test (2.0.2)
|
|
82
|
-
rack (>= 1.3)
|
|
83
|
-
rails-dom-testing (2.0.3)
|
|
84
|
-
activesupport (>= 4.2.0)
|
|
85
|
-
nokogiri (>= 1.6)
|
|
86
|
-
rails-html-sanitizer (1.4.3)
|
|
87
|
-
loofah (~> 2.3)
|
|
88
|
-
railties (7.0.3.1)
|
|
89
|
-
actionpack (= 7.0.3.1)
|
|
90
|
-
activesupport (= 7.0.3.1)
|
|
91
|
-
method_source
|
|
92
|
-
rake (>= 12.2)
|
|
93
|
-
thor (~> 1.0)
|
|
94
|
-
zeitwerk (~> 2.5)
|
|
95
|
-
rainbow (3.1.1)
|
|
96
|
-
rake (12.3.3)
|
|
97
|
-
regexp_parser (2.6.0)
|
|
98
|
-
reverse_markdown (2.1.1)
|
|
99
|
-
nokogiri
|
|
100
|
-
rexml (3.2.5)
|
|
101
|
-
rolify (6.0.0)
|
|
102
|
-
rubocop (1.37.1)
|
|
103
|
-
json (~> 2.3)
|
|
104
|
-
parallel (~> 1.10)
|
|
105
|
-
parser (>= 3.1.2.1)
|
|
106
|
-
rainbow (>= 2.2.2, < 4.0)
|
|
107
|
-
regexp_parser (>= 1.8, < 3.0)
|
|
108
|
-
rexml (>= 3.2.5, < 4.0)
|
|
109
|
-
rubocop-ast (>= 1.23.0, < 2.0)
|
|
110
|
-
ruby-progressbar (~> 1.7)
|
|
111
|
-
unicode-display_width (>= 1.4.0, < 3.0)
|
|
112
|
-
rubocop-ast (1.23.0)
|
|
113
|
-
parser (>= 3.1.1.0)
|
|
114
|
-
ruby-progressbar (1.11.0)
|
|
115
|
-
solargraph (0.47.2)
|
|
116
|
-
backport (~> 1.2)
|
|
117
|
-
benchmark
|
|
118
|
-
bundler (>= 1.17.2)
|
|
119
|
-
diff-lcs (~> 1.4)
|
|
120
|
-
e2mmap
|
|
121
|
-
jaro_winkler (~> 1.5)
|
|
122
|
-
kramdown (~> 2.3)
|
|
123
|
-
kramdown-parser-gfm (~> 1.1)
|
|
124
|
-
parser (~> 3.0)
|
|
125
|
-
reverse_markdown (>= 1.0.5, < 3)
|
|
126
|
-
rubocop (>= 0.52)
|
|
127
|
-
thor (~> 1.0)
|
|
128
|
-
tilt (~> 2.0)
|
|
129
|
-
yard (~> 0.9, >= 0.9.24)
|
|
130
|
-
thor (1.2.1)
|
|
131
|
-
tilt (2.0.11)
|
|
132
|
-
tzinfo (2.0.5)
|
|
133
|
-
concurrent-ruby (~> 1.0)
|
|
134
|
-
unicode-display_width (2.3.0)
|
|
135
|
-
webrick (1.7.0)
|
|
136
|
-
yard (0.9.28)
|
|
137
|
-
webrick (~> 1.7.0)
|
|
138
|
-
zeitwerk (2.6.0)
|
|
139
|
-
|
|
140
|
-
PLATFORMS
|
|
141
|
-
ruby
|
|
142
|
-
|
|
143
|
-
DEPENDENCIES
|
|
144
|
-
auxilium!
|
|
145
|
-
minitest (> 5.0)
|
|
146
|
-
pry
|
|
147
|
-
rake (~> 12.0)
|
|
148
|
-
responders!
|
|
149
|
-
solargraph
|
|
150
|
-
|
|
151
|
-
BUNDLED WITH
|
|
152
|
-
2.1.4
|
data/lib/tasks/semver.rake
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'json'
|
|
4
|
-
|
|
5
|
-
namespace File.basename(Dir.pwd) do
|
|
6
|
-
desc 'Semantically version and release.\nArguments: PART[=patch] (other options are major and minor)'
|
|
7
|
-
task :semver do
|
|
8
|
-
versions = nil
|
|
9
|
-
|
|
10
|
-
gemspec = Dir.glob(File.expand_path(Dir.pwd) + '/*.gemspec').first
|
|
11
|
-
if gemspec
|
|
12
|
-
spec = Gem::Specification.load(gemspec)
|
|
13
|
-
versions = spec.version.to_s
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
version_file = Dir.glob(File.expand_path(Dir.pwd) + '/lib/**/version.rb').first
|
|
17
|
-
if version_file
|
|
18
|
-
version_file_content = File.read(version_file)
|
|
19
|
-
versions = version_file_content.scan(/VERSION\s=\s(\"|')(.*)(\"|')/).flatten[1] if versions.nil?
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
raise 'Unable to detect version' if versions.nil?
|
|
23
|
-
|
|
24
|
-
versions = versions.split('.').map(&:to_i)
|
|
25
|
-
|
|
26
|
-
part = ENV['PART'] || 'patch'
|
|
27
|
-
what = %w[ma mi pa].index(part.to_s[0, 2].downcase)
|
|
28
|
-
what ||= 2
|
|
29
|
-
|
|
30
|
-
new_version = versions.tap { |parts| parts[what] += 1 }
|
|
31
|
-
new_version = new_version.map.with_index { |v, i| i > what ? 0 : v }.join('.')
|
|
32
|
-
|
|
33
|
-
if version_file
|
|
34
|
-
File.open(version_file, 'w') do |file|
|
|
35
|
-
file.puts version_file_content.gsub(/VERSION\s=\s(\"|')(.*)(\"|')/, "VERSION = \"#{new_version}\"")
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
relative_version_path = Pathname.new(version_file).relative_path_from(Dir.pwd)
|
|
39
|
-
`git add #{relative_version_path}`
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
if File.exist?('./package.json')
|
|
43
|
-
package = JSON.parse(File.read('./package.json'))
|
|
44
|
-
package['version'] = new_version
|
|
45
|
-
File.open('./package.json', 'w') do |file|
|
|
46
|
-
file.puts(JSON.pretty_generate(package))
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
`git add ./package.json`
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
if gemspec
|
|
53
|
-
puts "Release #{spec.name} #{new_version}"
|
|
54
|
-
else
|
|
55
|
-
puts "Updated version to #{new_version}"
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
puts
|
|
59
|
-
puts "Changelog:"
|
|
60
|
-
puts `git log $(git describe --tags --abbrev=0)..HEAD --oneline`
|
|
61
|
-
puts
|
|
62
|
-
puts
|
|
63
|
-
`git commit -m "Version #{new_version}"`
|
|
64
|
-
`git push`
|
|
65
|
-
`git tag #{new_version}`
|
|
66
|
-
`git push --tags`
|
|
67
|
-
end
|
|
68
|
-
end
|