tanshuku 3.0.2 → 3.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e6c98a33f29084decc0bf2ae419c74dc57c9919405abe33a8905f264cb9ee4c
4
- data.tar.gz: b368f46ce49b78be825c96ec434be4b35caead85d43ea7fb66e656f10e061ba4
3
+ metadata.gz: e58c92fe21d3bbe02cee1eb98952988e5cc8085b4906fdf48d9b8a12215be0eb
4
+ data.tar.gz: 2645ea149d69d67edd67eb3a3740493337becfcbbb7d1a89290f5bf507694ec6
5
5
  SHA512:
6
- metadata.gz: '0238ca7e945a9fe8328229e4c996b6b7f7f3571ee7dd8ff7f378cf18a64067e319d34bb5351f01f545a99ccc8d7d63e243231c1a8c0ecffc838d053d35df4b5c'
7
- data.tar.gz: f23e354fcff8c116f339aa21784bb833cc06eb90becc723a679d224024a94384a2df30704806b85981417dad0a2ee5c6e5abdf2b2bda28f31c100b0994ecb3d1
6
+ metadata.gz: 3de0f694c17bffe64fcb1e325db169e3b7ace075b670d4b5daf8ea1ee3cc56ce65d912f82d8188a53ac2a8222e87acabfcef24ebb76dfa63fae111d77336e16c
7
+ data.tar.gz: d04042eaa513ef56a4978b1f38c863e780634798aee69f4d13e6cd8a383957e5e5fe258fe6fb544f1a280854863809af9c2bfcad5124ed9a63476e9fea45c92b
@@ -4,8 +4,13 @@ class CreateTanshukuUrls < ActiveRecord::Migration[7.0]
4
4
  def change
5
5
  create_table :tanshuku_urls do |t|
6
6
  t.text :url, null: false
7
+
8
+ # You might adjust the `limit: 128` depending on `Tanshuku.config.url_hasher`.
7
9
  t.string :hashed_url, null: false, limit: 128, index: { unique: true }, comment: "cf. Tanshuku::Url.hash_url"
10
+
11
+ # You might adjust the `limit: 20` depending on `.key_length` and `.key_generator` of `Tanshuku.config`.
8
12
  t.string :key, null: false, limit: 20, index: { unique: true }, comment: "cf. Tanshuku::Url.generate_key"
13
+
9
14
  t.datetime :created_at, null: false, precision: nil
10
15
  end
11
16
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tanshuku
4
- VERSION = "3.0.2"
4
+ VERSION = "3.0.4"
5
5
  end
data/lib/tanshuku.rb CHANGED
@@ -15,9 +15,9 @@ module Tanshuku
15
15
  # {Tanshuku.configure} for configuration.
16
16
  def self.config
17
17
  # Disable this cop but use `Tanshuku::Configuration#configure` for thread-safety.
18
- # rubocop:disable ThreadSafety/InstanceVariableInClassMethod
18
+ # rubocop:disable ThreadSafety/ClassInstanceVariable
19
19
  @config ||= Configuration.new
20
- # rubocop:enable ThreadSafety/InstanceVariableInClassMethod
20
+ # rubocop:enable ThreadSafety/ClassInstanceVariable
21
21
  end
22
22
 
23
23
  # Configures Tanshuku.
@@ -21,7 +21,9 @@ class CheckAll
21
21
  end
22
22
 
23
23
  def call
24
+ # rubocop:disable ThreadSafety/NewThread
24
25
  TASKNAMES.map { |taskname| Thread.new(taskname, &executor) }.each(&:join)
26
+ # rubocop:enable ThreadSafety/NewThread
25
27
  output_result
26
28
  end
27
29
 
@@ -31,7 +33,7 @@ class CheckAll
31
33
  lambda do |taskname|
32
34
  command = "bundle exec rake #{taskname}"
33
35
 
34
- outputs = []
36
+ outputs = [] #: Array[String]
35
37
  outputs << format(TITLE_TEMPLATE, command:)
36
38
 
37
39
  # Use `PTY.spawn` to get colorized outputs of each command.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tanshuku
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - kg8m
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-27 00:00:00.000000000 Z
11
+ date: 2024-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -16,28 +16,34 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 2.4.0
19
+ version: '2.4'
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: 2.4.0
26
+ version: '2.4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 7.0.0
33
+ version: '7.0'
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '8.0'
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
41
  - - ">="
39
42
  - !ruby/object:Gem::Version
40
- version: 7.0.0
43
+ version: '7.0'
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '8.0'
41
47
  description: Tanshuku is a simple and performance aware Rails engine for shortening
42
48
  URLs. Tanshuku generates a shortened URL per a normalized original URL. Tanshuku
43
49
  redirects from a shortened URL to its corresponding original URL.
@@ -49,7 +55,6 @@ extra_rdoc_files: []
49
55
  files:
50
56
  - LICENSE
51
57
  - README.md
52
- - Steepfile
53
58
  - app/controllers/tanshuku/urls_controller.rb
54
59
  - app/models/tanshuku/url.rb
55
60
  - config/locales/en.yml
@@ -63,8 +68,6 @@ files:
63
68
  - lib/tanshuku/engine.rb
64
69
  - lib/tanshuku/version.rb
65
70
  - lib/tasks/check_all.rb
66
- - rbs_collection.lock.yaml
67
- - rbs_collection.yaml
68
71
  - sig/app/controllers/tanshuku/urls_controller.rbs
69
72
  - sig/app/models/tanshuku/url.rbs
70
73
  - sig/db/migrate/create_tanshuku_urls.rbs
@@ -92,13 +95,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
92
95
  - - ">="
93
96
  - !ruby/object:Gem::Version
94
97
  version: '3.1'
98
+ - - "<"
99
+ - !ruby/object:Gem::Version
100
+ version: '3.4'
95
101
  required_rubygems_version: !ruby/object:Gem::Requirement
96
102
  requirements:
97
103
  - - ">="
98
104
  - !ruby/object:Gem::Version
99
105
  version: '0'
100
106
  requirements: []
101
- rubygems_version: 3.5.3
107
+ rubygems_version: 3.5.22
102
108
  signing_key:
103
109
  specification_version: 4
104
110
  summary: Tanshuku is a simple and performance aware Rails engine for shortening URLs.
data/Steepfile DELETED
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- target :main do
4
- check "app", "config", "db", "lib"
5
- signature "sig"
6
- collection_config "rbs_collection.yaml"
7
- end
@@ -1,264 +0,0 @@
1
- ---
2
- path: ".gem_rbs_collection"
3
- gems:
4
- - name: actionmailer
5
- version: '7.0'
6
- source:
7
- type: git
8
- name: ruby/gem_rbs_collection
9
- revision: 13ae8cd19056d62358a9d4836106b8b31219fc1e
10
- remote: https://github.com/ruby/gem_rbs_collection.git
11
- repo_dir: gems
12
- - name: actionpack
13
- version: '6.0'
14
- source:
15
- type: git
16
- name: ruby/gem_rbs_collection
17
- revision: 13ae8cd19056d62358a9d4836106b8b31219fc1e
18
- remote: https://github.com/ruby/gem_rbs_collection.git
19
- repo_dir: gems
20
- - name: actionview
21
- version: '6.0'
22
- source:
23
- type: git
24
- name: ruby/gem_rbs_collection
25
- revision: 13ae8cd19056d62358a9d4836106b8b31219fc1e
26
- remote: https://github.com/ruby/gem_rbs_collection.git
27
- repo_dir: gems
28
- - name: activejob
29
- version: '6.0'
30
- source:
31
- type: git
32
- name: ruby/gem_rbs_collection
33
- revision: 13ae8cd19056d62358a9d4836106b8b31219fc1e
34
- remote: https://github.com/ruby/gem_rbs_collection.git
35
- repo_dir: gems
36
- - name: activemodel
37
- version: '7.0'
38
- source:
39
- type: git
40
- name: ruby/gem_rbs_collection
41
- revision: 13ae8cd19056d62358a9d4836106b8b31219fc1e
42
- remote: https://github.com/ruby/gem_rbs_collection.git
43
- repo_dir: gems
44
- - name: activerecord
45
- version: '7.0'
46
- source:
47
- type: git
48
- name: ruby/gem_rbs_collection
49
- revision: 13ae8cd19056d62358a9d4836106b8b31219fc1e
50
- remote: https://github.com/ruby/gem_rbs_collection.git
51
- repo_dir: gems
52
- - name: activestorage
53
- version: '6.1'
54
- source:
55
- type: git
56
- name: ruby/gem_rbs_collection
57
- revision: 13ae8cd19056d62358a9d4836106b8b31219fc1e
58
- remote: https://github.com/ruby/gem_rbs_collection.git
59
- repo_dir: gems
60
- - name: activesupport
61
- version: '7.0'
62
- source:
63
- type: git
64
- name: ruby/gem_rbs_collection
65
- revision: 13ae8cd19056d62358a9d4836106b8b31219fc1e
66
- remote: https://github.com/ruby/gem_rbs_collection.git
67
- repo_dir: gems
68
- - name: addressable
69
- version: '2.8'
70
- source:
71
- type: git
72
- name: ruby/gem_rbs_collection
73
- revision: 13ae8cd19056d62358a9d4836106b8b31219fc1e
74
- remote: https://github.com/ruby/gem_rbs_collection.git
75
- repo_dir: gems
76
- - name: base64
77
- version: '0'
78
- source:
79
- type: stdlib
80
- - name: bigdecimal
81
- version: '0'
82
- source:
83
- type: stdlib
84
- - name: cgi
85
- version: '0'
86
- source:
87
- type: stdlib
88
- - name: concurrent-ruby
89
- version: '1.1'
90
- source:
91
- type: git
92
- name: ruby/gem_rbs_collection
93
- revision: 13ae8cd19056d62358a9d4836106b8b31219fc1e
94
- remote: https://github.com/ruby/gem_rbs_collection.git
95
- repo_dir: gems
96
- - name: connection_pool
97
- version: '2.4'
98
- source:
99
- type: git
100
- name: ruby/gem_rbs_collection
101
- revision: 13ae8cd19056d62358a9d4836106b8b31219fc1e
102
- remote: https://github.com/ruby/gem_rbs_collection.git
103
- repo_dir: gems
104
- - name: date
105
- version: '0'
106
- source:
107
- type: stdlib
108
- - name: dbm
109
- version: '0'
110
- source:
111
- type: stdlib
112
- - name: digest
113
- version: '0'
114
- source:
115
- type: stdlib
116
- - name: erb
117
- version: '0'
118
- source:
119
- type: stdlib
120
- - name: fileutils
121
- version: '0'
122
- source:
123
- type: stdlib
124
- - name: globalid
125
- version: '1.1'
126
- source:
127
- type: git
128
- name: ruby/gem_rbs_collection
129
- revision: 13ae8cd19056d62358a9d4836106b8b31219fc1e
130
- remote: https://github.com/ruby/gem_rbs_collection.git
131
- repo_dir: gems
132
- - name: i18n
133
- version: '1.10'
134
- source:
135
- type: git
136
- name: ruby/gem_rbs_collection
137
- revision: 13ae8cd19056d62358a9d4836106b8b31219fc1e
138
- remote: https://github.com/ruby/gem_rbs_collection.git
139
- repo_dir: gems
140
- - name: io-console
141
- version: '0'
142
- source:
143
- type: stdlib
144
- - name: logger
145
- version: '0'
146
- source:
147
- type: stdlib
148
- - name: mail
149
- version: '2.8'
150
- source:
151
- type: git
152
- name: ruby/gem_rbs_collection
153
- revision: 13ae8cd19056d62358a9d4836106b8b31219fc1e
154
- remote: https://github.com/ruby/gem_rbs_collection.git
155
- repo_dir: gems
156
- - name: minitest
157
- version: '0'
158
- source:
159
- type: stdlib
160
- - name: monitor
161
- version: '0'
162
- source:
163
- type: stdlib
164
- - name: mutex_m
165
- version: '0'
166
- source:
167
- type: stdlib
168
- - name: net-protocol
169
- version: '0'
170
- source:
171
- type: stdlib
172
- - name: net-smtp
173
- version: '0'
174
- source:
175
- type: stdlib
176
- - name: nokogiri
177
- version: '1.11'
178
- source:
179
- type: git
180
- name: ruby/gem_rbs_collection
181
- revision: 13ae8cd19056d62358a9d4836106b8b31219fc1e
182
- remote: https://github.com/ruby/gem_rbs_collection.git
183
- repo_dir: gems
184
- - name: pstore
185
- version: '0'
186
- source:
187
- type: stdlib
188
- - name: psych
189
- version: '0'
190
- source:
191
- type: stdlib
192
- - name: rack
193
- version: '2.2'
194
- source:
195
- type: git
196
- name: ruby/gem_rbs_collection
197
- revision: 13ae8cd19056d62358a9d4836106b8b31219fc1e
198
- remote: https://github.com/ruby/gem_rbs_collection.git
199
- repo_dir: gems
200
- - name: rails-dom-testing
201
- version: '2.0'
202
- source:
203
- type: git
204
- name: ruby/gem_rbs_collection
205
- revision: 13ae8cd19056d62358a9d4836106b8b31219fc1e
206
- remote: https://github.com/ruby/gem_rbs_collection.git
207
- repo_dir: gems
208
- - name: railties
209
- version: '6.0'
210
- source:
211
- type: git
212
- name: ruby/gem_rbs_collection
213
- revision: 13ae8cd19056d62358a9d4836106b8b31219fc1e
214
- remote: https://github.com/ruby/gem_rbs_collection.git
215
- repo_dir: gems
216
- - name: rake
217
- version: '13.0'
218
- source:
219
- type: git
220
- name: ruby/gem_rbs_collection
221
- revision: 13ae8cd19056d62358a9d4836106b8b31219fc1e
222
- remote: https://github.com/ruby/gem_rbs_collection.git
223
- repo_dir: gems
224
- - name: rdoc
225
- version: '0'
226
- source:
227
- type: stdlib
228
- - name: securerandom
229
- version: '0'
230
- source:
231
- type: stdlib
232
- - name: singleton
233
- version: '0'
234
- source:
235
- type: stdlib
236
- - name: tempfile
237
- version: '0'
238
- source:
239
- type: stdlib
240
- - name: thor
241
- version: '1.2'
242
- source:
243
- type: git
244
- name: ruby/gem_rbs_collection
245
- revision: 13ae8cd19056d62358a9d4836106b8b31219fc1e
246
- remote: https://github.com/ruby/gem_rbs_collection.git
247
- repo_dir: gems
248
- - name: time
249
- version: '0'
250
- source:
251
- type: stdlib
252
- - name: timeout
253
- version: '0'
254
- source:
255
- type: stdlib
256
- - name: tsort
257
- version: '0'
258
- source:
259
- type: stdlib
260
- - name: uri
261
- version: '0'
262
- source:
263
- type: stdlib
264
- gemfile_lock_path: Gemfile.lock
data/rbs_collection.yaml DELETED
@@ -1,19 +0,0 @@
1
- sources:
2
- - type: git
3
- name: ruby/gem_rbs_collection
4
- remote: https://github.com/ruby/gem_rbs_collection.git
5
- revision: main
6
- repo_dir: gems
7
-
8
- path: .gem_rbs_collection
9
-
10
- gems:
11
- - name: rbs
12
- ignore: true
13
- - name: steep
14
- ignore: true
15
- - name: tanshuku
16
- ignore: true
17
-
18
- - name: digest
19
- - name: securerandom