ulid-rails 2.0.0.pre.1 → 2.0.0.pre.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/lib/ulid/rails/type.rb +1 -5
- data/lib/ulid/rails/version.rb +1 -1
- data/ulid-rails.gemspec +15 -8
- metadata +4 -21
- data/.env +0 -1
- data/.github/workflows/lint.yml +0 -20
- data/.github/workflows/test.yml +0 -27
- data/.gitignore +0 -10
- data/.rubocop.yml +0 -13
- data/.standard.yml +0 -4
- data/Gemfile +0 -2
- data/Rakefile +0 -10
- data/bin/console +0 -14
- data/bin/run_tests +0 -18
- data/bin/setup +0 -8
- data/docker-compose.yml +0 -51
- data/gemfiles/5.2.gemfile +0 -10
- data/gemfiles/6.0.gemfile +0 -10
- data/gemfiles/6.1.gemfile +0 -10
- data/gemfiles/7.0.5.gemfile +0 -10
- data/gemfiles/7.0.gemfile +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40792a9dc420058bbd9a61da6808df142a4649ed4f032973e669f989a8680190
|
4
|
+
data.tar.gz: b3de361dda87bddc9c4119e19225bf6738fc73775c5ef51e0edb027de81a6e70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 762e47b12d8ae6b72c3c7ffe7bba234791c47bd5116ae1ce540ff18a3c7aa3cece358f3579de9f133374af39396c0315d1c1e486281aadd704acf0f6fbca336e
|
7
|
+
data.tar.gz: 86162930acbfb620571fc3aa4451eef4a7407d118f8a64846e6fe32f0ee53e068c36f35503ad0ef6742bb4ecc0e89ae2a66f440603d337b31267002863d68414
|
data/CHANGELOG.md
CHANGED
@@ -2,10 +2,15 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
-
## 2.0.0.pre.
|
5
|
+
## 2.0.0.pre.2
|
6
6
|
|
7
7
|
- Drop support for Rails 5.0 and Rails 5.1.
|
8
8
|
- Fix various issues when calling `#where` with non-String values, or multiple ULID values.
|
9
|
+
- The following modules/classes have been removed:
|
10
|
+
- `ULID::Rails::Formatter`
|
11
|
+
- `ULID::Rails::Validator`
|
12
|
+
- `ULID::Rails::Patch::FinderMethods`
|
13
|
+
- `ULID::Rails::Patch::SchemaStatements`
|
9
14
|
|
10
15
|
## 1.1.1
|
11
16
|
|
data/lib/ulid/rails/type.rb
CHANGED
@@ -19,7 +19,7 @@ module ULID
|
|
19
19
|
|
20
20
|
def serialize(value)
|
21
21
|
return value if value.is_a?(Data)
|
22
|
-
return
|
22
|
+
return nil unless value.is_a?(String)
|
23
23
|
|
24
24
|
cast_string_to_ulid(value)
|
25
25
|
end
|
@@ -44,10 +44,6 @@ module ULID
|
|
44
44
|
end
|
45
45
|
|
46
46
|
class Data < ActiveModel::Type::Binary::Data
|
47
|
-
def self.null
|
48
|
-
new(nil)
|
49
|
-
end
|
50
|
-
|
51
47
|
def self.from_serialized(data)
|
52
48
|
deserialized = Base32::Crockford.encode(data.hex).rjust(26, "0")
|
53
49
|
new(deserialized)
|
data/lib/ulid/rails/version.rb
CHANGED
data/ulid-rails.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Kazunori Kajihiro", "Zendesk"]
|
10
10
|
spec.email = ["kazunori.kajihiro@gmail.com", "ruby-core@zendesk.com"]
|
11
11
|
|
12
|
-
spec.summary = "ULID for
|
13
|
-
spec.description = "ULID for
|
12
|
+
spec.summary = "ULID for Rails"
|
13
|
+
spec.description = "ULID for Rails"
|
14
14
|
spec.homepage = "https://github.com/k2nr/ulid-rails/"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
@@ -22,12 +22,19 @@ Gem::Specification.new do |spec|
|
|
22
22
|
}
|
23
23
|
|
24
24
|
# Specify which files should be added to the gem when it is released.
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
25
|
+
spec.files = %w[
|
26
|
+
CHANGELOG.md
|
27
|
+
LICENSE.txt
|
28
|
+
README.md
|
29
|
+
lib/ulid/rails.rb
|
30
|
+
lib/ulid/rails/errors.rb
|
31
|
+
lib/ulid/rails/patch.rb
|
32
|
+
lib/ulid/rails/postgresql_type.rb
|
33
|
+
lib/ulid/rails/sqlite_type.rb
|
34
|
+
lib/ulid/rails/type.rb
|
35
|
+
lib/ulid/rails/version.rb
|
36
|
+
ulid-rails.gemspec
|
37
|
+
]
|
31
38
|
spec.require_paths = ["lib"]
|
32
39
|
|
33
40
|
spec.add_dependency "ulid", "~> 1.0"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ulid-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.pre.
|
4
|
+
version: 2.0.0.pre.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazunori Kajihiro
|
8
8
|
- Zendesk
|
9
9
|
autorequire:
|
10
|
-
bindir:
|
10
|
+
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
date: 2023-09-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
@@ -165,7 +165,7 @@ dependencies:
|
|
165
165
|
- - "~>"
|
166
166
|
- !ruby/object:Gem::Version
|
167
167
|
version: 1.16.0
|
168
|
-
description: ULID for
|
168
|
+
description: ULID for Rails
|
169
169
|
email:
|
170
170
|
- kazunori.kajihiro@gmail.com
|
171
171
|
- ruby-core@zendesk.com
|
@@ -173,26 +173,9 @@ executables: []
|
|
173
173
|
extensions: []
|
174
174
|
extra_rdoc_files: []
|
175
175
|
files:
|
176
|
-
- ".env"
|
177
|
-
- ".github/workflows/lint.yml"
|
178
|
-
- ".github/workflows/test.yml"
|
179
|
-
- ".gitignore"
|
180
|
-
- ".rubocop.yml"
|
181
|
-
- ".standard.yml"
|
182
176
|
- CHANGELOG.md
|
183
|
-
- Gemfile
|
184
177
|
- LICENSE.txt
|
185
178
|
- README.md
|
186
|
-
- Rakefile
|
187
|
-
- bin/console
|
188
|
-
- bin/run_tests
|
189
|
-
- bin/setup
|
190
|
-
- docker-compose.yml
|
191
|
-
- gemfiles/5.2.gemfile
|
192
|
-
- gemfiles/6.0.gemfile
|
193
|
-
- gemfiles/6.1.gemfile
|
194
|
-
- gemfiles/7.0.5.gemfile
|
195
|
-
- gemfiles/7.0.gemfile
|
196
179
|
- lib/ulid/rails.rb
|
197
180
|
- lib/ulid/rails/errors.rb
|
198
181
|
- lib/ulid/rails/patch.rb
|
@@ -227,5 +210,5 @@ requirements: []
|
|
227
210
|
rubygems_version: 3.4.12
|
228
211
|
signing_key:
|
229
212
|
specification_version: 4
|
230
|
-
summary: ULID for
|
213
|
+
summary: ULID for Rails
|
231
214
|
test_files: []
|
data/.github/workflows/lint.yml
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
---
|
2
|
-
name: Linting
|
3
|
-
|
4
|
-
on:
|
5
|
-
pull_request:
|
6
|
-
push:
|
7
|
-
branches:
|
8
|
-
- master
|
9
|
-
workflow_dispatch:
|
10
|
-
|
11
|
-
jobs:
|
12
|
-
standardrb:
|
13
|
-
runs-on: ubuntu-latest
|
14
|
-
steps:
|
15
|
-
- uses: actions/checkout@v3
|
16
|
-
- uses: ruby/setup-ruby@v1
|
17
|
-
with:
|
18
|
-
ruby-version: "3.1"
|
19
|
-
bundler-cache: true
|
20
|
-
- run: bundle exec rubocop
|
data/.github/workflows/test.yml
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
---
|
2
|
-
name: Tests
|
3
|
-
|
4
|
-
on:
|
5
|
-
pull_request:
|
6
|
-
push:
|
7
|
-
branches:
|
8
|
-
- master
|
9
|
-
workflow_dispatch:
|
10
|
-
|
11
|
-
jobs:
|
12
|
-
tests:
|
13
|
-
name: ActiveRecord ${{ matrix.activerecord-version }} / Ruby ${{ matrix.ruby-version }}
|
14
|
-
runs-on: ubuntu-latest
|
15
|
-
strategy:
|
16
|
-
fail-fast: false
|
17
|
-
matrix:
|
18
|
-
activerecord-version: ["6.0", "6.1", "7.0", "7.0.5"]
|
19
|
-
ruby-version: ["2.7", "3.0", "3.1", "3.2"]
|
20
|
-
include:
|
21
|
-
- {activerecord-version: "5.2", ruby-version: "2.7"}
|
22
|
-
steps:
|
23
|
-
- uses: actions/checkout@v3
|
24
|
-
- run: docker-compose run test
|
25
|
-
env:
|
26
|
-
RUBY_VERSION: ${{ matrix.ruby-version }}
|
27
|
-
AR_VERSION: ${{ matrix.activerecord-version }}
|
data/.gitignore
DELETED
data/.rubocop.yml
DELETED
data/.standard.yml
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "ulid/rails"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start(__FILE__)
|
data/bin/run_tests
DELETED
data/bin/setup
DELETED
data/docker-compose.yml
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
version: '3.6'
|
2
|
-
services:
|
3
|
-
test:
|
4
|
-
image: "ruby:${RUBY_VERSION}"
|
5
|
-
command: sh -c "rm -f Gemfile.lock && bundle install && bin/run_tests"
|
6
|
-
environment:
|
7
|
-
- AR_VERSION=${AR_VERSION}
|
8
|
-
depends_on:
|
9
|
-
pg12:
|
10
|
-
condition: service_healthy
|
11
|
-
mysql56:
|
12
|
-
condition: service_healthy
|
13
|
-
mysql57:
|
14
|
-
condition: service_healthy
|
15
|
-
mysql80:
|
16
|
-
condition: service_healthy
|
17
|
-
working_dir: /app
|
18
|
-
volumes:
|
19
|
-
- bundle:/usr/local/bundle
|
20
|
-
- .:/app
|
21
|
-
|
22
|
-
mysql56:
|
23
|
-
image: mysql:5.6
|
24
|
-
environment:
|
25
|
-
MYSQL_ROOT_PASSWORD: password
|
26
|
-
command: --innodb-large-prefix --innodb-file-format=barracuda
|
27
|
-
healthcheck:
|
28
|
-
test: mysql --password=password -e "show databases;"
|
29
|
-
mysql57:
|
30
|
-
image: mysql:5.7
|
31
|
-
environment:
|
32
|
-
MYSQL_ROOT_PASSWORD: password
|
33
|
-
healthcheck:
|
34
|
-
test: mysql --password=password -e "show databases;"
|
35
|
-
mysql80:
|
36
|
-
image: mysql:8.0
|
37
|
-
command: --default-authentication-plugin=mysql_native_password
|
38
|
-
environment:
|
39
|
-
MYSQL_ROOT_PASSWORD: password
|
40
|
-
healthcheck:
|
41
|
-
test: mysql --password=password -e "show databases;"
|
42
|
-
pg12:
|
43
|
-
image: postgres:12
|
44
|
-
environment:
|
45
|
-
PGDATA: /data
|
46
|
-
POSTGRES_DB: db
|
47
|
-
POSTGRES_HOST_AUTH_METHOD: trust
|
48
|
-
healthcheck:
|
49
|
-
test: echo "\\l" | psql -U postgres
|
50
|
-
volumes:
|
51
|
-
bundle:
|
data/gemfiles/5.2.gemfile
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
gemspec path: ".."
|
4
|
-
|
5
|
-
gem "activesupport", "~> 5.2.0"
|
6
|
-
gem "activemodel", "~> 5.2.0"
|
7
|
-
gem "activerecord", "~> 5.2.0"
|
8
|
-
gem "sqlite3", "~> 1.3", ">= 1.3.6"
|
9
|
-
gem "mysql2", ">= 0.4.4", "< 0.6.0"
|
10
|
-
gem "pg", ">= 0.18", "< 2.0"
|
data/gemfiles/6.0.gemfile
DELETED
data/gemfiles/6.1.gemfile
DELETED
data/gemfiles/7.0.5.gemfile
DELETED
data/gemfiles/7.0.gemfile
DELETED