ulid-rails 2.0.0.pre.1 → 2.0.0.pre.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: 4fe6dfad2124c31cc7fbd3b744c8309d3abbd1fe8b3f0f737e87730d48e4a7ad
4
- data.tar.gz: 5c94f88160609b46cb584c5e802e1a8fbfc3ae92e75e08277ca50c4f5693d24b
3
+ metadata.gz: 40792a9dc420058bbd9a61da6808df142a4649ed4f032973e669f989a8680190
4
+ data.tar.gz: b3de361dda87bddc9c4119e19225bf6738fc73775c5ef51e0edb027de81a6e70
5
5
  SHA512:
6
- metadata.gz: 0f39ff3a403a16b42ea3ee18a82938b266998f936dabe319084d52dedc2a2260761b92ed3273b8b074c0ee95b30979eef30b41abfa8db73ea16b0436652f1b26
7
- data.tar.gz: a836d749d63b71b66cc310262db3c3cd529b5378e17c3ef5c265503c695d446fdc954df36f9c74b828ab423620e707138877322db1546b1d6fc3f3e7c4b986aa
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.1
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
 
@@ -19,7 +19,7 @@ module ULID
19
19
 
20
20
  def serialize(value)
21
21
  return value if value.is_a?(Data)
22
- return Data.null unless value.is_a?(String)
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)
@@ -1,5 +1,5 @@
1
1
  module ULID
2
2
  module Rails
3
- VERSION = "2.0.0.pre.1"
3
+ VERSION = "2.0.0.pre.2"
4
4
  end
5
5
  end
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 rails"
13
- spec.description = "ULID for rails"
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
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
26
- spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
27
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
28
- end
29
- spec.bindir = "exe"
30
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
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.1
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: exe
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 rails
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 rails
213
+ summary: ULID for Rails
231
214
  test_files: []
data/.env DELETED
@@ -1 +0,0 @@
1
- RUBY_VERSION=2.7
@@ -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
@@ -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
@@ -1,10 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
- /Gemfile.lock
10
- /gemfiles/*.gemfile.lock
data/.rubocop.yml DELETED
@@ -1,13 +0,0 @@
1
- require:
2
- - rubocop-minitest
3
- - standard
4
-
5
- inherit_gem:
6
- rubocop-minitest: config/default.yml
7
- standard: config/base.yml
8
-
9
- AllCops:
10
- NewCops: enable
11
- Exclude:
12
- - 'vendor/**/*'
13
- TargetRubyVersion: "2.7"
data/.standard.yml DELETED
@@ -1,4 +0,0 @@
1
- ruby_version: 2.3
2
- ignore:
3
- - 'vendor/**/*'
4
- - 'gemfiles/vendor/**/*'
data/Gemfile DELETED
@@ -1,2 +0,0 @@
1
- version = ENV["AR_VERSION"] || "6.0"
2
- eval_gemfile File.expand_path("../gemfiles/#{version}.gemfile", __FILE__)
data/Rakefile DELETED
@@ -1,10 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
3
-
4
- Rake::TestTask.new(:test) do |t|
5
- t.libs << "test"
6
- t.libs << "lib"
7
- t.test_files = FileList["test/**/*_test.rb"]
8
- end
9
-
10
- task default: :test
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
@@ -1,18 +0,0 @@
1
- #!/bin/bash
2
-
3
- set -e
4
-
5
- test_with_db() {
6
- echo "Testing with $1"
7
- DB=$1 bundle exec rake
8
- }
9
-
10
- test_with_db "sqlite3"
11
-
12
- test_with_db "mysql56"
13
-
14
- test_with_db "mysql57"
15
-
16
- test_with_db "mysql80"
17
-
18
- test_with_db "pg12"
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
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
@@ -1,10 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec path: ".."
4
-
5
- gem "activesupport", "~> 6.0.0"
6
- gem "activemodel", "~> 6.0.0"
7
- gem "activerecord", "~> 6.0.0"
8
- gem "sqlite3", "~> 1.4"
9
- gem "mysql2", ">= 0.4.4"
10
- gem "pg", ">= 0.18", "< 2.0"
data/gemfiles/6.1.gemfile DELETED
@@ -1,10 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec path: ".."
4
-
5
- gem "activesupport", "~> 6.1.0"
6
- gem "activemodel", "~> 6.1.0"
7
- gem "activerecord", "~> 6.1.0"
8
- gem "sqlite3", "~> 1.4"
9
- gem "mysql2", "~> 0.5"
10
- gem "pg", "~> 1.1"
@@ -1,10 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec path: ".."
4
-
5
- gem "activesupport", "~> 7.0.5"
6
- gem "activemodel", "~> 7.0.5"
7
- gem "activerecord", "~> 7.0.5"
8
- gem "sqlite3", "~> 1.4"
9
- gem "mysql2", "~> 0.5"
10
- gem "pg", "~> 1.1"
data/gemfiles/7.0.gemfile DELETED
@@ -1,10 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec path: ".."
4
-
5
- gem "activesupport", "~> 7.0.0", "< 7.0.5"
6
- gem "activemodel", "~> 7.0.0", "< 7.0.5"
7
- gem "activerecord", "~> 7.0.0", "< 7.0.5"
8
- gem "sqlite3", "~> 1.4"
9
- gem "mysql2", "~> 0.5"
10
- gem "pg", "~> 1.1"