bridgetown_sequel 1.0.0 → 1.1.1

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: 4e6ca1a45fc7d41e356530445901efee54620d9bc048bff13f09dae01bfcefe9
4
- data.tar.gz: 1d02ccdb71b8d20ca461c10f57ac4e991f6398f590e7fef959858885e4fb6d21
3
+ metadata.gz: 4a51b222272301ffe21bf60c4df11cc34d7b18116290d81fc2cb6e280b541a13
4
+ data.tar.gz: 8cd7b635fe90fafce9f88e55d1d6ea7ecd08d5aae157b2f8a6f75cd25ce486c0
5
5
  SHA512:
6
- metadata.gz: 4fa744caa34d8afcd16b40bcf4f44af91d40b7caae93feec04573a4827cf690a25fc1cdc6381ffcdb15c7cdc4e3bae582ed0a387549b628f200813d2e0b3468f
7
- data.tar.gz: 010b80725bb53f34b71e27c72c7e1e20b29bac183d9acd8b720c43b7b25677d1edf15a1229acf48c138ed5405710ed5f27b127d01a47a6e5898b8c74b87cd3e4
6
+ metadata.gz: 8295e0430b6fde6c4990faa7f70b16420d1a8adc4790ceb8c4b7e1653d7cb9c90c074ca14fc6c0720d59c047b7d531dd8728f4c3913aac893b5d21c190582888
7
+ data.tar.gz: 9a05d4c484a77b44dbd85d7f62bf1f35411948913e2996888d68a8090bcb0dfc90ca57e6647a757b273be70677fdb51aa82ab58715c93a159fec8adf8524b27e
data/CHANGELOG.md CHANGED
@@ -7,7 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- - ...
10
+ ## [1.1.1] - 2024-04-03
11
+
12
+ - Fix lambda error in initializer
13
+
14
+ ## [1.1.0] - 2024-04-03
15
+
16
+ - Fix incorrect namespacing for loading tasks: `Bridgetown::Sequel` -> `BridgetownSequel`
11
17
 
12
18
  ## [1.0.0] - 2024-04-03
13
19
 
data/README.md CHANGED
@@ -6,9 +6,10 @@ It's been tested only with PostgreSQL, but it should support any of the database
6
6
 
7
7
  ## Installation
8
8
 
9
- Run this command to add this plugin to your site's Gemfile:
9
+ Run these commands to add this plugin along with the database adapter of your choice to your site's Gemfile:
10
10
 
11
11
  ```shell
12
+ bundle add pg # or sqlite3, etc.
12
13
  bundle add bridgetown_sequel
13
14
  ```
14
15
 
@@ -30,7 +31,7 @@ Bridgetown.load_tasks
30
31
 
31
32
  # Now add this:
32
33
  require "bridgetown_sequel"
33
- Bridgetown::Sequel.load_tasks
34
+ BridgetownSequel.load_tasks
34
35
  ```
35
36
 
36
37
  Finally, you'll want to create a `models` folder at the top-level of your site repo, as well as a `migrations` folder.
@@ -50,7 +51,7 @@ end
50
51
  Next, you'll want to create a migration. Run the following command:
51
52
 
52
53
  ```shell
53
- bin/bridgetown db::migrations:new name=create_projects
54
+ bin/bridgetown db::migrations:new filename=create_projects
54
55
  ```
55
56
 
56
57
  And modify the new `migrations/001_create_projects.rb` file to look something like this:
@@ -129,12 +130,7 @@ Raw SQL statements won't be logged out-of-the-box, but you can attach Bridgetown
129
130
  Bridgetown.db.loggers << Bridgetown.logger
130
131
  ```
131
132
 
132
- For a quick reference on what you can do with the Sequel DSL, check out this [handy cheat sheet](https://sequel.jeremyevans.net/rdoc/files/doc/cheat_sheet_rdoc.html).
133
-
134
- ## Testing
135
-
136
- * Run `bundle exec rake test` to run the test suite
137
- * Or run `script/cibuild` to validate with Rubocop and Minitest together.
133
+ For a quick reference on what you can do with the Sequel DSL, check out this [handy cheat sheet](https://devhints.io/sequel).
138
134
 
139
135
  ## Contributing
140
136
 
@@ -144,3 +140,8 @@ For a quick reference on what you can do with the Sequel DSL, check out this [ha
144
140
  4. Commit your changes (`git commit -am 'Add some feature'`)
145
141
  5. Push to the branch (`git push origin my-new-feature`)
146
142
  6. Create a new Pull Request
143
+
144
+ ## Testing
145
+
146
+ * Run `bundle exec rake test` to run the test suite
147
+ * Or run `script/cibuild` to validate with Rubocop and Minitest together.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BridgetownSequel
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.1"
5
5
  end
@@ -6,12 +6,10 @@ require "bridgetown"
6
6
  # See: https://stackoverflow.com/questions/52671926/rails-may-have-been-in-progress-in-another-thread-when-fork-was-called
7
7
  require "sequel"
8
8
 
9
- module Bridgetown
10
- module Sequel
11
- def self.load_tasks(models_dir: "models")
12
- ENV["BRIDGETOWN_SEQUEL_MODELS_DIR"] ||= models_dir
13
- load File.expand_path("tasks/sequel_database.rake", __dir__)
14
- end
9
+ module BridgetownSequel
10
+ def self.load_tasks(models_dir: "models")
11
+ ENV["BRIDGETOWN_SEQUEL_MODELS_DIR"] ||= models_dir
12
+ load File.expand_path("tasks/sequel_database.rake", __dir__)
15
13
  end
16
14
  end
17
15
 
@@ -19,7 +17,7 @@ Bridgetown.initializer :bridgetown_sequel do |
19
17
  config,
20
18
  models_dir: ENV.fetch("BRIDGETOWN_SEQUEL_MODELS_DIR", "models"),
21
19
  skip_autoload: false,
22
- model_setup: -> {},
20
+ model_setup: ->(model) {},
23
21
  connection_options: {}
24
22
  |
25
23
  unless skip_autoload
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown_sequel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team