sequelize-rails 0.4.1 → 0.5.0

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: f1b95356822be96711195c7cb2756d2c84d3f1e8d1db2d9bdc1e4e7defee16d5
4
- data.tar.gz: e1261347c5eb6b75c3e5fcd7407cea9d17cc3deb451c7c0847cbf0316863c6ec
3
+ metadata.gz: ffb36f44727f56d3d9f157d95b669785999567afc37d7b2b4a1c99e4b7fbfe40
4
+ data.tar.gz: f2f9b2e5b1a96a8048731ab03cbc279fb363f1549da47f988869dc9d55d34989
5
5
  SHA512:
6
- metadata.gz: 5152e52462ee0e45700ab0650a3ea61cff498c8bd8022769db5f712785e4d123db5910b6c19b9cd0ffd8a489af6dcd9f8b5ae8f50bfe3030e47e6cfe928576dd
7
- data.tar.gz: 9ffb4fe02077f5b269ed43124da05e9e48db8fae102e4ea7f00b624d4dcc1566d7efa7f0d1d2f7e0e5f73e2d8a1a4b517375d01ec7a6740365f061ff60461bd3
6
+ metadata.gz: 33451f66a4c01399910e6ec4bfdbed2a9136f1da5fe537020efae31a39e1cbdc514da3f7f0773888cf16bd4e5a1648ef57d76170fd3ee76aa006e27fde85485a
7
+ data.tar.gz: 692a29096179817f411539a22363cf4a8688bdf688236fa9c5ecee2b8644c0a72d78939be12db570ff6a5faa7a9d620fd90415b5ea075a2107d283f85f4f06de
data/.rubocop.yml ADDED
@@ -0,0 +1,2 @@
1
+ Exclude:
2
+ - '**/*'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.5.0] - 2023-09-04
4
+
5
+ - Adds the `db:seed` rake task for running seed files
6
+ - Stubs the `db:schema:load` rake task and adds it as a step in `db:setup`
7
+ - Stubs the `db:schema:dump` rake task
8
+
3
9
  ## [0.4.1] - 2023-08-16
4
10
 
5
11
  - Adds a `Rails.application.config.sequel.after_connect` hook that is called after each connection is established. This hook can be used to add plugins and extensions to the database connection once established.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sequelize-rails (0.4.1)
4
+ sequelize-rails (0.5.0)
5
5
  activerecord (>= 6.0.0)
6
6
  rails (>= 6.0.0)
7
7
  sequel (>= 5.0.0)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sequel
4
4
  module Rails
5
- VERSION = "0.4.1"
5
+ VERSION = "0.5.0"
6
6
  end
7
7
  end
@@ -125,13 +125,13 @@ db_namespace = namespace ns do
125
125
  end
126
126
 
127
127
  namespace :migrate do
128
- # desc "Runs the \"down\" method for the last applied migration"
128
+ desc "Runs the \"down\" method for the last applied migration"
129
129
  task down: [:connection] do
130
130
  target = (migrator.applied_migrations[-2] || "0_").split("_", 2).first.to_i
131
131
  migrator(target: target).run
132
132
  end
133
133
 
134
- # desc "Runs the \"up\" method for the next pending migration"
134
+ desc "Runs the \"up\" method for the next pending migration"
135
135
  task up: [:connection] do
136
136
  pending = migrator.migration_tuples.first
137
137
  if pending
@@ -172,30 +172,33 @@ db_namespace = namespace ns do
172
172
  desc "Rolls back the last migration"
173
173
  task rollback: [:"migrate:down"]
174
174
 
175
- # namespace :schema do
176
- # namespace :cache do
177
- # desc "Clears the database schema and indicies caches"
178
- # task clear: [] do
179
- # end
175
+ namespace :schema do
176
+ # namespace :cache do
177
+ # desc "Clears the database schema and indicies caches"
178
+ # task clear: [] do
179
+ # end
180
180
 
181
- # desc "Creates the database schema and indicies caches"
182
- # task dump: [] do
183
- # end
184
- # end
181
+ # desc "Creates the database schema and indicies caches"
182
+ # task dump: [] do
183
+ # end
184
+ # end
185
185
 
186
- # desc "Creates a backup of just the database's schema"
187
- # task dump: [] do
188
- # end
186
+ desc "Creates a backup of the database's schema"
187
+ task dump: [] do
188
+ puts "Please implement the #{ns}:schema:dump task within your Rakefile"
189
+ end
189
190
 
190
- # desc "Restores the database's schema from backup"
191
- # task load: [] do
192
- # end
193
- # end
191
+ desc "Restores the database's schema from backup"
192
+ task load: [] do
193
+ puts "Please implement the #{ns}:schema:load task within your Rakefile"
194
+ end
195
+ end
194
196
 
195
- # desc "Loads the seed data from db/seeds.rb"
196
- # task seed: [] do
197
- # end
197
+ desc "Loads seed data by running db/seeds.rb"
198
+ task seed: [:connection] do
199
+ require Rails.root.join("db", "seeds.rb")
200
+ end
198
201
 
199
- desc "Runs the #{ns}:create, #{ns}:migrate, #{ns}:seed tasks"
200
- task setup: [:"#{ns}:create", :"#{ns}:migrate", :"#{ns}:seed"]
202
+ desc "Runs the #{ns}:create, #{ns}:schema:load, #{ns}:migrate, #{ns}:seed tasks"
203
+ task setup: [:"#{ns}:create", :"#{ns}:schema:load", :"#{ns}:migrate", :"#{ns}:seed"]
201
204
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequelize-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenaniah Cerny
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-16 00:00:00.000000000 Z
11
+ date: 2023-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -145,6 +145,7 @@ extensions: []
145
145
  extra_rdoc_files: []
146
146
  files:
147
147
  - ".DS_Store"
148
+ - ".rubocop.yml"
148
149
  - ".standard.yml"
149
150
  - Appraisals
150
151
  - CHANGELOG.md