tanshuku 3.0.3 → 3.0.4

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: db4e1d65d98b73853e453f4ddcc2dafda8e87aefeebfb2a5a576503a9efef91c
4
- data.tar.gz: 3b2f404902140117f8a35517244f5c25fcdf000aea46eee29af049675034e9d5
3
+ metadata.gz: e58c92fe21d3bbe02cee1eb98952988e5cc8085b4906fdf48d9b8a12215be0eb
4
+ data.tar.gz: 2645ea149d69d67edd67eb3a3740493337becfcbbb7d1a89290f5bf507694ec6
5
5
  SHA512:
6
- metadata.gz: da2e7b6a1c95e2dcc92362967e7cb436e0febac5eacd78219e53094f458a92c37cbd12aaacb506d5008e802c9be7c8cb1f90625ee492626bde90b155979d4a2b
7
- data.tar.gz: 8fd045503b896f49c4512cc21830f4e1850c3e6f6d62a20b55f88ed9811c4362e6081aa8b332a848ffab4a245e289ba2eb1eb7cb8decf083f3607d4220a6a97d
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.3"
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.3
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: 2024-06-30 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.
@@ -89,13 +95,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
95
  - - ">="
90
96
  - !ruby/object:Gem::Version
91
97
  version: '3.1'
98
+ - - "<"
99
+ - !ruby/object:Gem::Version
100
+ version: '3.4'
92
101
  required_rubygems_version: !ruby/object:Gem::Requirement
93
102
  requirements:
94
103
  - - ">="
95
104
  - !ruby/object:Gem::Version
96
105
  version: '0'
97
106
  requirements: []
98
- rubygems_version: 3.5.11
107
+ rubygems_version: 3.5.22
99
108
  signing_key:
100
109
  specification_version: 4
101
110
  summary: Tanshuku is a simple and performance aware Rails engine for shortening URLs.