sequel_tools 0.1.8 → 0.1.11

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: 17bb9b0da66eb5b99c648c41d902e56e2cb93348d7a1b50d6ab447bfab0cabe8
4
- data.tar.gz: 2c066a0179cd2a67127cca5812cc37abb40b02b63ceef28186376540ec2798fc
3
+ metadata.gz: 6d598579322a3645ebc25cdf804f53b478016a68a6c479b30d46e30ce6019cf2
4
+ data.tar.gz: 82f122492e419faf2b9a03ca463ab79593eafdb689186e66d61de0a8a4873489
5
5
  SHA512:
6
- metadata.gz: b3f10ee727d2b6ae3b8a3b7c0ead5947817fa6f6b9238d3c7708553534936c303bd09665a45519ff4b6cf0041f64c348b5eb117267d22b24b814cb21c8f33057
7
- data.tar.gz: 65493ac56d38975f0857a0db28007fd06036c668a035e7de6e1694902025ea2df77d4b6b3e0f82a18115cf77684cd6451035a3d7c71174296b98ef4987be928a
6
+ metadata.gz: 7e40f95a57ef0b23e708e5060f517b98bd6a774622afa61c64e2d3f77dd39ed8a5fcc61ddcd3cac38c8756fb24f8f0b99ca963277eaf89182d20e00ac73ab8d3
7
+ data.tar.gz: 23830ae52f9c3518eb5bce1fe9b471906e1e45e04ba58fb3efe88b170e32399c59d96625ad5abd6b710355cab9675c60f473f7d1fc5a24eb447aeb342c322726
data/.rvmrc ADDED
@@ -0,0 +1,2 @@
1
+ # fix warnings in Travis CI build caused by RVM using the -client option in JRUBY_OPTS
2
+ unset JRUBY_OPTS
data/.travis.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  sudo: true
2
2
  language: ruby
3
3
  rvm:
4
- - 2.4.1
5
- - jruby-9.1.9.0
4
+ - 3.0.1
5
+ #- jruby-9.2.17.0
6
6
  before_install: scripts/ci/travis-build.sh
7
7
  #before_install: gem install bundler -v 1.16.0
data/README.md CHANGED
@@ -131,7 +131,7 @@ approve your pull requests and you'd be able to maintain it independently.
131
131
  ## Development and running tests
132
132
 
133
133
  The tests assume the database `sequel_tools_test_pw` exists and can be only accessed using a
134
- username and password. It also assumes a valid user/passwd is `user_tools_user/secret`. The
134
+ username and password. It also assumes a valid user/passwd is `sequel_tools_user/secret`. The
135
135
  database `sequel_tools_test` is also required to exist and it should be possible to access it
136
136
  using the `trust` authentication method, without requiring a password. You may achieve that by
137
137
  adding these lines to the start of your `pg_hba.conf`:
@@ -12,9 +12,13 @@ class SequelTools::ActionsManager
12
12
  stdout, stderr, success = PgHelper.run_pg_command c, "#{pg_dump} -s"
13
13
  return unless success
14
14
  content = stdout
15
- if content =~ /schema_(migrations|info)/
15
+ migrations_table = c[:migrations_table]
16
+ if (migrations_table ? content.include?(migrations_table) :
17
+ (content =~ /schema_(migrations|info)/))
18
+ table_options = migrations_table ? "-t #{migrations_table}" :
19
+ '-t schema_migrations -t schema_info'
16
20
  stdout, stderr, success =
17
- PgHelper.run_pg_command c, "#{pg_dump} -a -t schema_migrations -t schema_info --inserts"
21
+ PgHelper.run_pg_command c, "#{pg_dump} -a #{table_options} --inserts"
18
22
  unless success
19
23
  puts 'failed to dump data for schema_migrations and schema_info. Aborting.'
20
24
  exit 1
@@ -43,7 +43,8 @@ class MigrationUtils
43
43
  def self.migrations_differences(context)
44
44
  config = context[:config]
45
45
  migrations_path = config[:migrations_location]
46
- existing = Dir["#{migrations_path}/*.rb"].map{|fn| File.basename fn }.sort
46
+ existing = Dir["#{migrations_path}/*.rb"].map{|fn| File.basename(fn).downcase }.sort
47
+ existing.delete(File.basename(config[:seeds_location])&.downcase)
47
48
  migrator = find_migrator context
48
49
  migrated = migrator.ds.select_order_map(migrator.column)
49
50
  unapplied = existing - migrated
@@ -1,5 +1,5 @@
1
1
  # frozen-string-literal: true
2
2
 
3
3
  module SequelTools
4
- VERSION = '0.1.8'
4
+ VERSION = '0.1.11'
5
5
  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.8
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Rosenfeld Rosas
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-19 00:00:00.000000000 Z
11
+ date: 2022-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel
@@ -97,6 +97,7 @@ extra_rdoc_files: []
97
97
  files:
98
98
  - ".gitignore"
99
99
  - ".rspec"
100
+ - ".rvmrc"
100
101
  - ".travis.yml"
101
102
  - Gemfile
102
103
  - LICENSE.txt
@@ -139,7 +140,7 @@ homepage: https://github.com/rosenfeld/sequel_tools
139
140
  licenses:
140
141
  - MIT
141
142
  metadata: {}
142
- post_install_message:
143
+ post_install_message:
143
144
  rdoc_options: []
144
145
  require_paths:
145
146
  - lib
@@ -154,8 +155,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
155
  - !ruby/object:Gem::Version
155
156
  version: '0'
156
157
  requirements: []
157
- rubygems_version: 3.2.3
158
- signing_key:
158
+ rubygems_version: 3.3.7
159
+ signing_key:
159
160
  specification_version: 4
160
161
  summary: Add Rake tasks to manage Sequel migrations
161
162
  test_files: []