brut 0.0.23 → 0.0.25

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: 661bfefb9cded225579d7faae56e20458a403a26e2d336c7cd6c6c7cba832b4d
4
- data.tar.gz: d09d29af185d03035d0f4256bc1d42f784c3b7ad3f6f0aadb8caf3fa41464c44
3
+ metadata.gz: bf68186bd88a531232ff742e646b7a68454620e15e563187d06f6d0ca822bec0
4
+ data.tar.gz: e8f3b2cef4f4997d3bd4bc700552d2744cc06dc52f75426d24dd770a1db628a0
5
5
  SHA512:
6
- metadata.gz: a942224c334d13e01f869f75ec80aaa0cf46089d5d93c39ad9e297d5518d28f1487ba028e47bd9dea745503a9a34becdb458ef00c485759930a099182f3f1e47
7
- data.tar.gz: 9264c21ebd224c64c73d157b54020e2cab1f0c2779d5b9df8cd34746a08aa0b62b6898941df49d53ca8ddb9b93066b7e723e9775917e3a551decbdbbe4f8000f
6
+ metadata.gz: 0d3ebc470ada689e782cb9d58c2c3299b14a84a38a744738fb0e04b527105f0cd81806dbfbc710f9e832d32604507ee5f02e68c77359c6f89c47ba3745276193
7
+ data.tar.gz: f1f7edff9cb3e35b5fc9240cae1c180eba14a06288c2e5f2db5c6032f4714a3f7b87b1ce99e6b294a41b5525061f4837dc6cc8dedbe90a150d985bdb0a76f485
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brut (0.0.23)
4
+ brut (0.0.25)
5
5
  concurrent-ruby
6
6
  i18n
7
7
  irb
@@ -170,6 +170,9 @@ class Brut::CLI::Apps::DB < Brut::CLI::App
170
170
  if !migrations_dir.exist?
171
171
  err.puts "#{migrations_dir} doesn't exist"
172
172
  return
173
+ elsif Dir[migrations_dir / "*.rb"].empty?
174
+ out.puts "No migrations yet"
175
+ return
173
176
  end
174
177
  Brut.container.sequel_db_handle.extension :pg_array
175
178
 
data/lib/brut/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Brut
2
2
  # @!visibility private
3
- VERSION = "0.0.23"
3
+ VERSION = "0.0.25"
4
4
  end
@@ -20,16 +20,17 @@ module Sequel
20
20
 
21
21
 
22
22
  if args.last.is_a?(Hash)
23
+ name = args.first
23
24
  if name != "schema_migrations" && name != "schema_info"
24
25
  if args.last[:comment]
25
26
  run %{
26
- comment on table #{args.first} is #{literal args.last[:comment]}
27
+ comment on table #{name} is #{literal args.last[:comment]}
27
28
  }
28
29
  else
29
- raise ArgumentError, "Table #{args.first} must have a comment"
30
+ raise ArgumentError, "Table #{name} must have a comment"
30
31
  end
31
32
  if args.last[:external_id]
32
- add_column args.first, :external_id, :citext, unique: true
33
+ add_column name, :external_id, :citext, unique: true
33
34
  end
34
35
  end
35
36
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brut
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.23
4
+ version: 0.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Bryant Copeland