tanshuku 3.0.3 → 4.0.0

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: 60ef893ce52de6a2a3e9c76b217ec13fc11faa6aac8ddac739205dcf9336fdde
4
+ data.tar.gz: e764fe77479fb67ebd3a592525a442654c1ffe0e57e01f46a28710989c7a4fd7
5
5
  SHA512:
6
- metadata.gz: da2e7b6a1c95e2dcc92362967e7cb436e0febac5eacd78219e53094f458a92c37cbd12aaacb506d5008e802c9be7c8cb1f90625ee492626bde90b155979d4a2b
7
- data.tar.gz: 8fd045503b896f49c4512cc21830f4e1850c3e6f6d62a20b55f88ed9811c4362e6081aa8b332a848ffab4a245e289ba2eb1eb7cb8decf083f3607d4220a6a97d
6
+ metadata.gz: c4e7d22a8d8572a6ed2473f94eb1e659cb853b1b204c6aa6f199710228bafe190ff20761b60c2d27547dfae291ffe55c7f4e38ecd56678d3984e2f82a1590f4f
7
+ data.tar.gz: b373b1c24e1f6746de4003f394d583c9ed4a91256f90e34237a1db8ea1a590a63041c639e34f90b155cc36568e755dd1c3be773999283af2c52ae15a48940722
@@ -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 = "4.0.0"
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
 
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: 4.0.0
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-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -88,14 +88,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - ">="
90
90
  - !ruby/object:Gem::Version
91
- version: '3.1'
91
+ version: '3.2'
92
92
  required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  requirements: []
98
- rubygems_version: 3.5.11
98
+ rubygems_version: 3.5.22
99
99
  signing_key:
100
100
  specification_version: 4
101
101
  summary: Tanshuku is a simple and performance aware Rails engine for shortening URLs.