tanshuku 0.0.1 → 0.0.2

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: 8450b3eed6f8d725bec0a20f44800db1e604f6d4e2d26e1d832fd689c53ab926
4
- data.tar.gz: '08a7ad0f33eb83a5c231832a5b000a7b3bbf4d31fa78b1e480abaab16677bec2'
3
+ metadata.gz: 2c4a08c6ebc7f92503ef473e3ea41383f95e4fcc3857038b7d32f5d7fdace776
4
+ data.tar.gz: 9241e280560a203c4c3ae8c81fc4ca4eff3156a9989372902f5cc92f54cf009c
5
5
  SHA512:
6
- metadata.gz: f2649e896ad520627924ccb3259de36bf6163d3c555609f5d40b769f91a2627a2178e324153a55cef4791a529b85d8d083f0abc67ccc3c44271b10bebc03e7de
7
- data.tar.gz: b0d1f57bb3bf30a9d9344642aaf6a96163d927f3895e365c3c33f9e8d923031a8bfb1fed5aff14ab0ecb99d41e8276528f2f006b0d4beab4b16c6a8cfc032ba7
6
+ metadata.gz: cc7530a5e833a393418765c97490f9501c46ff7007324aeae8ded62cfa795ec42d731840145d5ac6fdd118b8a4bc790842fdd1b790cff94f590c3e2e2589877a
7
+ data.tar.gz: 3d2378bc6345a060e3f5b5276903c2aad94f01efdc98183ccaa5a32546a6fa2979a4e6aea6403087444364fb8911d31bfec02e76e9ab5edd4b91e20288d9585f
@@ -9,7 +9,7 @@ require "securerandom"
9
9
  module Tanshuku
10
10
  class Url < ActiveRecord::Base
11
11
  MAX_URL_LENGTH = 10_000
12
- URL_PATTERN = %r{\Ahttps?://\w+}
12
+ URL_PATTERN = %r{\A(?:https?:/)?/\w+}
13
13
  KEY_LENGTH = 20
14
14
 
15
15
  validates :url, :hashed_url, :key, presence: true
@@ -5,7 +5,7 @@ en:
5
5
  tanshuku/url:
6
6
  attributes:
7
7
  url:
8
- invalid: should start with https:// or http://
8
+ invalid: should start with https://, http://, or /
9
9
  models:
10
10
  tanshuku/url: Shortened URL
11
11
  attributes:
@@ -5,7 +5,7 @@ ja:
5
5
  tanshuku/url:
6
6
  attributes:
7
7
  url:
8
- invalid: は https:// または http:// で始まる必要があります
8
+ invalid: は https://、 http://、 / のいずれかで始まる必要があります
9
9
  models:
10
10
  tanshuku/url: 短縮URL
11
11
  attributes:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tanshuku
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tanshuku
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kg8m