sequel_tools 0.1.12 → 0.1.13

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: 3668a069d02fe15d3bb54d054ad64dd0eab240ba4f6e65023aa8a6f92b3008cf
4
- data.tar.gz: '019eefc9bf0565c54126fd54670da7623094a133dcddf34cbcaf75498f282c9e'
3
+ metadata.gz: dbc03d963faeda496049e1e3a8cc111bb68a18eeca2986b9b18a872280c6520a
4
+ data.tar.gz: c498ec036d519fcc585e39c7dd32af341884138b108bf0baf08e7f5da73cd0bb
5
5
  SHA512:
6
- metadata.gz: bf9dcaa9cea96bbcec7afaf439e9b32d95baa36181769dd0a954e9a7da25a4f04594483757aedea620bd1fd2899e83d4553682c3e6e193e7463dc26615db03af
7
- data.tar.gz: ef6078623ab39f8d58f78c1f836b08081b4c4ab1b94981cf9fea6d3a47efb7d1c887af77d381e55c9c79f8d9f9dcf695c401eec1a14906612f57b15a04c84885
6
+ metadata.gz: 65dc15bc47c0eba4f5fa067bc8ee521bebe3926a7e423e3dd9d1b7b5bda0ea65ea2cb925edc41ceac8e9e762df276873f92ce00a0687638e0e42b347b7c4d076
7
+ data.tar.gz: 84a43de92472aaca2c48814b2a92f8305711103bc4c402d31e8ddc5fd3e6047ec1b11e3a70f408fae2f1a10e7d0665befaba7ec346db1b9ae5c9dc330bdc32ca
data/README.md CHANGED
@@ -40,8 +40,8 @@ Here's a sample Rakefile supporting migrate actions:
40
40
  require 'bundler/setup'
41
41
  require 'sequel_tools'
42
42
 
43
- base_config = SequelTools.base_config(
44
- project_root: File.expand_path(__dir__),
43
+ base_config = {
44
+ # project_root: Dir.pwd,
45
45
  dbadapter: 'postgres',
46
46
  dbname: 'mydb',
47
47
  username: 'myuser',
@@ -63,7 +63,14 @@ base_config = SequelTools.base_config(
63
63
  # when nil, defaults to the value of the :dbadapter config.
64
64
  # This is the database we should connect to before executing "create database dbname"
65
65
  maintenancedb: :default,
66
- )
66
+ # migrations_table: 'schema_migrations',
67
+ # allow other tables data to be included in the dump file generated by rake db:schema_dump
68
+ # extra_tables_in_dump: nil
69
+ # for example, if you want to keep migrations from ActiveRecord in the dump file, while using
70
+ # another table for Sequel migrations:
71
+ # migrations_table: 'sequel_schema_migrations',
72
+ # extra_tables_in_dump: ['schema_migrations'],
73
+ }
67
74
 
68
75
  namespace 'db' do
69
76
  SequelTools.inject_rake_tasks base_config.merge(dump_schema_on_migrate: true), self
@@ -1,5 +1,5 @@
1
1
  # frozen-string-literal: true
2
2
 
3
3
  module SequelTools
4
- VERSION = '0.1.12'
4
+ VERSION = '0.1.13'
5
5
  end
data/lib/sequel_tools.rb CHANGED
@@ -4,7 +4,7 @@ require 'sequel_tools/version'
4
4
 
5
5
  module SequelTools
6
6
  DEFAULT_CONFIG = {
7
- project_root: nil,
7
+ project_root: Dir.pwd,
8
8
  pg_dump: 'pg_dump', # command used to run pg_dump
9
9
  psql: 'psql', # command used to run psql
10
10
  maintenancedb: :default, # DB to connect to for creating/dropping databases
@@ -24,7 +24,7 @@ module SequelTools
24
24
  extra_tables_in_dump: nil,
25
25
  } # unfrozen on purpose so that one might want to update the defaults
26
26
 
27
- REQUIRED_KEYS = [ :project_root, :dbadapter, :dbname, :username ]
27
+ REQUIRED_KEYS = [ :dbadapter, :dbname, :username ]
28
28
  class MissingConfigError < StandardError; end
29
29
  def self.base_config(extra_config = {})
30
30
  config = DEFAULT_CONFIG.merge extra_config
@@ -40,7 +40,7 @@ module SequelTools
40
40
  def self.inject_rake_tasks(config = {}, rake_context)
41
41
  require_relative 'sequel_tools/actions_manager'
42
42
  require_relative 'sequel_tools/all_actions'
43
- actions_manager = ActionsManager.new config
43
+ actions_manager = ActionsManager.new base_config(config)
44
44
  actions_manager.load_all
45
45
  actions_manager.export_as_rake_tasks rake_context
46
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Rosenfeld Rosas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-05 00:00:00.000000000 Z
11
+ date: 2022-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel