tanshuku 2.0.0 → 2.0.2

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: 12ed0c4f9a99b9b6e2c988a8fe327cc491420b9586c3128dd6e2493f46819b0a
4
- data.tar.gz: a566c0f82f98f54301b3ab91ce23dc09629ba2e5de79970b06b62ac13d54cf10
3
+ metadata.gz: 02ecbaaff21e734b68382c179b154a19425e89ca3639bc16717aea64ff9f8398
4
+ data.tar.gz: 5ba490d590f1434a46333ad450bedd15568dbbf5e57f4254bc480d3a2f532bd2
5
5
  SHA512:
6
- metadata.gz: 28d39d2e039b8916441f4bca51c130374002c416d9afd08836166ea354370bbe341be9df7b552e023e5f03c6abc08071493434b3bbb62df862391c55d7f82349
7
- data.tar.gz: 0c7e3337b95a5e647e8cd44d2a61df7070ac9897537d047dd10aaff243cd227f3622e68f549152bfc94eaa9f6e34bd6732185fc4812c749e477550bc0ca6303b
6
+ metadata.gz: 4387ca8fd4cc69cbc71ec38463bb31de400ed62d29d4ee0ef947634deca95a763e9408edb1be6e97f96b0baad2441aefd703bd8cd2711b1a66d9dbac78370de6
7
+ data.tar.gz: 6a492c69c9133a526a8f9d0e366580ef89f2d9e857b82a809c0e7ba3bde50650fc3248d5fbd494b9cd6ee25787751881301a7d39c3f1c5bcbce91a9b1084e955
data/README.md CHANGED
@@ -1,3 +1,9 @@
1
+ [![RubyGems.org](https://img.shields.io/badge/RubyGems.org-Tanshuku%20v2-red)](https://rubygems.org/gems/tanshuku/versions/2.0.0)
2
+ [![Ruby 2.5+](https://img.shields.io/badge/Ruby-2.5+-red)](https://www.ruby-lang.org)
3
+ [![Rails 5.1+](https://img.shields.io/badge/Rails-5.1+-red)](https://rubyonrails.org/)
4
+ [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
5
+ [![Checks](https://github.com/kg8m/tanshuku/actions/workflows/checks.yml/badge.svg?branch=2-0-stable)](https://github.com/kg8m/tanshuku/blob/2-0-stable/.github/workflows/checks.yml)
6
+
1
7
  # Tanshuku
2
8
 
3
9
  Tanshuku is a simple and small Rails engine that makes it easier to shorten URLs.
@@ -43,6 +43,22 @@ module Tanshuku
43
43
  end
44
44
 
45
45
  include ActiveModel::Attributes
46
+
47
+ # @!attribute [rw] default_url_options
48
+ # Default URL options for Rails’ +url_for+. Defaults to +{}+.
49
+ #
50
+ # @return [Hash]
51
+ # @return [void] If you set an invalid object.
52
+ #
53
+ # @note
54
+ # The example below means that the configured host and protocol are used. Shortened URLs will be like
55
+ # +https://example.com/t/abcdefghij0123456789+.
56
+ #
57
+ # @example
58
+ # # config/initializers/tanshuku.rb
59
+ # Tanshuku.configure do |config|
60
+ # config.default_url_options = { host: "example.com", protocol: :https }
61
+ # end
46
62
  attribute :default_url_options, default: {}
47
63
 
48
64
  # @!attribute [rw] max_url_length
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tanshuku
4
- VERSION = "2.0.0"
4
+ VERSION = "2.0.2"
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: 2.0.0
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kg8m
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-09 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
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: '6.0'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
- version: '7.0'
36
+ version: '7.2'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '6.0'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
- version: '7.0'
46
+ version: '7.2'
47
47
  description: Tanshuku is a simple and performance aware Rails engine for shortening
48
48
  URLs. Tanshuku generates a shortened URL per a normalized original URL. Tanshuku
49
49
  redirects from a shortened URL to its corresponding original URL.
@@ -85,17 +85,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - ">="
87
87
  - !ruby/object:Gem::Version
88
- version: '3.0'
88
+ version: '2.7'
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.2.33
98
+ rubygems_version: 3.3.27
99
99
  signing_key:
100
100
  specification_version: 4
101
101
  summary: Tanshuku is a simple and performance aware Rails engine for shortening URLs.