Skip to content

Commit

Permalink
Fix incorrect namespacing for loading tasks: Bridgetown::Sequel -> …
Browse files Browse the repository at this point in the history
…`BridgetownSequel`
  • Loading branch information
jaredcwhite committed Apr 3, 2024
1 parent 325f07a commit 5d43568
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- ...

## [1.1.0] - 2024-04-03

- Fix incorrect namespacing for loading tasks: `Bridgetown::Sequel` -> `BridgetownSequel`

## [1.0.0] - 2024-04-03

- First version of the Bridgetown Sequel gem.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Bridgetown.load_tasks

# Now add this:
require "bridgetown_sequel"
Bridgetown::Sequel.load_tasks
BridgetownSequel.load_tasks
```

Finally, you'll want to create a `models` folder at the top-level of your site repo, as well as a `migrations` folder.
Expand Down
10 changes: 4 additions & 6 deletions lib/bridgetown_sequel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
# See: https://stackoverflow.com/questions/52671926/rails-may-have-been-in-progress-in-another-thread-when-fork-was-called
require "sequel"

module Bridgetown
module Sequel
def self.load_tasks(models_dir: "models")
ENV["BRIDGETOWN_SEQUEL_MODELS_DIR"] ||= models_dir
load File.expand_path("tasks/sequel_database.rake", __dir__)
end
module BridgetownSequel
def self.load_tasks(models_dir: "models")
ENV["BRIDGETOWN_SEQUEL_MODELS_DIR"] ||= models_dir
load File.expand_path("tasks/sequel_database.rake", __dir__)
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/bridgetown_sequel/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module BridgetownSequel
VERSION = "1.0.0"
VERSION = "1.1.0"
end

0 comments on commit 5d43568

Please sign in to comment.