umbrellio-sequel-plugins 0.8.0.73 → 0.9.0.76

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: a5c9f5f32a4df0073264d3eaceffad9ddd253d6f0ba2df064cef8f3a4c833007
4
- data.tar.gz: e8419cbb2ae5eea378770e05090119551aaf7d94e8787417ca90feaf0f496cb6
3
+ metadata.gz: c2e993d233df32418338f7de48f9bca64752aaaf9dc784e2c85b03876752c281
4
+ data.tar.gz: 3d3e0678d59ec23fe423f792da6820c212ef5b4a7ee0792af1ce011e688db011
5
5
  SHA512:
6
- metadata.gz: f6b623635f70d7a4d7a8865a379e65352979ffa453f66eb736bf557a7b9956278a2b1bc97b0ae94bd531c627bee732e903f365d83c482e300f8e52223c0ebfdc
7
- data.tar.gz: 4aef5eb0a420c6df4af7d8384d79d55763582d6a8a4ddda0d2220f996d667d757bfb005a1bfe8c334a486f661ee2969c9c5a4fa2ca05c0514a4b66e2a53a7e08
6
+ metadata.gz: 799605817f6ffd341439a781bbb57eee5cc527a3985a98740e2eb260a78a78a7afc7bb40adb4fd5cf7613d5cd621ff2573ad96ba0ac3c7b4e460edfb10d33679
7
+ data.tar.gz: e8749ed4fb97f0e7bbda35cbc48c6eeb0720c004a0de318a1a57e80cef89976011fedf486829c55dce08e7de81338eb56978a9cd3bee33aa31b4c08163ad5ba4
data/CHANGELOG.md CHANGED
@@ -1,9 +1,12 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
- ## [0.8.0] 2022-06-29
4
+ ## [0.9.0] 2022-07-01
5
5
  ### Added
6
+ - Add `--server` option to `rails dbconsole` command.
6
7
 
8
+ ## [0.8.0] 2022-06-29
9
+ ### Added
7
10
  - `rails dbconsole` command support for Sequel (also aliased as `rails db`) for easy access to the DB console. See the README for installation instructions.
8
11
 
9
12
  ## [0.7.0] 2022-06-24
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- umbrellio-sequel-plugins (0.8.0)
4
+ umbrellio-sequel-plugins (0.9.0)
5
5
  sequel
6
6
  symbiont-ruby
7
7
 
@@ -4,6 +4,8 @@ require "rails/command"
4
4
  require "rails/commands/dbconsole/dbconsole_command"
5
5
 
6
6
  class Rails::Command::DbconsoleCommand < Rails::Command::Base
7
+ class_option :server, type: :string, desc: "Specifies the server to use."
8
+
7
9
  def perform
8
10
  require "rake"
9
11
  Rake.with_application(&:load_rakefile) # Needed to initialize Rails.application
@@ -29,7 +31,14 @@ class Rails::DBConsole
29
31
  SequelRails.configuration = sequel_configuration.merge!(raw: rails_db_config)
30
32
 
31
33
  storage = SequelRails::Storage.adapter_for(Rails.env)
32
- @configuration_hash = storage.config.with_indifferent_access
34
+ config = storage.config.with_indifferent_access
35
+
36
+ if @options[:server]
37
+ server_config = config.fetch(:servers).fetch(@options[:server])
38
+ config.merge!(server_config)
39
+ end
40
+
41
+ @configuration_hash = config
33
42
  end
34
43
 
35
44
  def adapter
@@ -4,7 +4,7 @@ lib = File.expand_path("lib", __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- gem_version = "0.8.0"
7
+ gem_version = "0.9.0"
8
8
 
9
9
  if ENV.fetch("PUBLISH_JOB", nil)
10
10
  release_version = "#{gem_version}.#{ENV.fetch("GITHUB_RUN_NUMBER")}"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: umbrellio-sequel-plugins
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0.73
4
+ version: 0.9.0.76
5
5
  platform: ruby
6
6
  authors:
7
7
  - Team Umbrellio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-29 00:00:00.000000000 Z
11
+ date: 2022-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel