sqlite_crypto 2.0.1 → 2.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: f7728bff2a398f6ed1fe0ce0888055586b7619d45954728240ef32ba33cd1650
4
- data.tar.gz: fb5715411594706283fd93969b4f97709f468870f428105c1cb5ebdefb8d5c56
3
+ metadata.gz: 80e11f5e0be719e1757f5c97c3702cc6a9f590cc098a28b530edd10b19a30c9f
4
+ data.tar.gz: 4d93d3d9e8c4f1dcb266a9c5a20e0534e1f24e85373e2e4316630ab508ef3577
5
5
  SHA512:
6
- metadata.gz: 7d0efcd9f607384d1e33ee2c55643408cae5d4a0382885dee40ef6bc0dc142f62d4085cc85f529fd2e76694ffc624651aa7802f85bc0de789716a0b3d7c1aa27
7
- data.tar.gz: 9954abb7f5068e1b85f9e636ce1abe0d921baa94b9b7394711745bba9bf349655611dcbd925b6ba0fe1c4d1405f2ae434bf863c7234ed864de17b5748b3efadd
6
+ metadata.gz: f675ad1e8b7b0b389a322bc2b023c488f268f2b212ac6520c550c32b0d15095a72bc163d6c3dc57716a4f04e49aa4e9689743ed3c0b11bcbbd8ac05aa5b37f3b
7
+ data.tar.gz: cc05e8bc9a4e36a20ddd15a28b95222a7ccc61329b31012acc69789c6760e3feca81a34fdfee07dab4488adc0f056c648b256c5fa7de9158e0142a55c6fcd6cb
data/CHANGELOG.md CHANGED
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.0.2] - 2026-02-11
9
+
10
+ ### Fixed
11
+ - **Generator autodiscovery**: Moved install generator to `lib/generators/sqlite_crypto/install/` to follow Rails convention. Previously `rails generate sqlite_crypto:install` could not find the generator (bug since v2.0.0)
12
+ - **Schema loading**: Moved `uuid`/`ulid` helper includes from require-time into railtie initializer. The previous `if defined?` guard ran before ActiveRecord was loaded, causing `NameError: undefined method 'uuid'` when loading schema.rb (bug since v2.0.1)
13
+ - **Rails 8+ compatibility**: Include schema helpers into `ActiveRecord::Schema::Definition` where schema.rb blocks are evaluated in Rails 8+
14
+
15
+ ### Added
16
+ - Schema round-trip integration test (dump, reload, verify)
17
+
18
+ ### Acknowledgements
19
+ - Thanks to [@yostinso](https://github.com/yostinso) for identifying both issues in [#17](https://github.com/bart-oz/sqlite_crypto/pull/17)
20
+
8
21
  ## [2.0.1] - 2026-01-14
9
22
 
10
23
  ### Security
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # SQLite Crypto
2
2
 
3
- [![Version](https://img.shields.io/badge/version-2.0.0-blue.svg)](https://github.com/bart-oz/sqlite_crypto/releases)
3
+ [![Version](https://img.shields.io/badge/version-2.0.2-blue.svg)](https://github.com/bart-oz/sqlite_crypto/releases)
4
4
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.txt)
5
5
  [![types supported](https://img.shields.io/badge/types-ULID,_UUIDv7/v4-brightgreen.svg)](https://github.com/bart-oz/sqlite_crypto)
6
6
  [![Tests](https://img.shields.io/badge/tests-passing-brightgreen.svg)](https://github.com/bart-oz/sqlite_crypto/actions)
@@ -10,4 +10,4 @@ SqliteCrypto.configure do |config|
10
10
  # Use if you need Ruby 3.1/3.2 compatibility
11
11
  #
12
12
  config.uuid_version = :v7 # UUIDv7 is set as default
13
- end
13
+ end
@@ -29,6 +29,16 @@ module SqliteCrypto
29
29
  ActiveRecord::ConnectionAdapters::SQLite3::SchemaDumper.prepend(SqliteCrypto::SchemaDumper)
30
30
  end
31
31
 
32
+ initializer "sqlite_crypto.schema_definitions", after: "active_record.initialize_database" do
33
+ require "sqlite_crypto/schema_definitions"
34
+ ActiveRecord::Schema.include(SqliteCrypto::SchemaDefinitions)
35
+
36
+ # Rails 8+: schema.rb block is evaluated in Schema::Definition context
37
+ if defined?(ActiveRecord::Schema::Definition)
38
+ ActiveRecord::Schema::Definition.include(SqliteCrypto::SchemaDefinitions)
39
+ end
40
+ end
41
+
32
42
  initializer "sqlite_crypto.migration_helpers", after: "active_record.initialize_database" do
33
43
  require "sqlite_crypto/migration_helpers"
34
44
  end
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Module to add uuid/ulid helper methods to schema loading context
4
3
  module SqliteCrypto
5
4
  module SchemaDefinitions
6
5
  def uuid
@@ -12,8 +11,3 @@ module SqliteCrypto
12
11
  end
13
12
  end
14
13
  end
15
-
16
- # Extend ActiveRecord::Schema context for schema.rb loading (not global Object)
17
- if defined?(ActiveRecord::Schema)
18
- ActiveRecord::Schema.include(SqliteCrypto::SchemaDefinitions)
19
- end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SqliteCrypto
4
- VERSION = "2.0.1"
4
+ VERSION = "2.0.2"
5
5
  RUBY_MINIMUM_VERSION = "3.1.0"
6
6
  RAILS_MINIMUM_VERSION = "7.1.0"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqlite_crypto
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - BartOz
@@ -64,10 +64,10 @@ files:
64
64
  - CHANGELOG.md
65
65
  - LICENSE.txt
66
66
  - README.md
67
+ - lib/generators/sqlite_crypto/install/install_generator.rb
68
+ - lib/generators/sqlite_crypto/install/templates/initializer.rb.tt
67
69
  - lib/sqlite_crypto.rb
68
70
  - lib/sqlite_crypto/configuration.rb
69
- - lib/sqlite_crypto/generators/install_generator.rb
70
- - lib/sqlite_crypto/generators/templates/initializer.rb.tt
71
71
  - lib/sqlite_crypto/generators/uuid.rb
72
72
  - lib/sqlite_crypto/migration_helpers.rb
73
73
  - lib/sqlite_crypto/model_extensions.rb