umbrellio-sequel-plugins 0.8.0.73 → 0.9.0.79

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: a5c9f5f32a4df0073264d3eaceffad9ddd253d6f0ba2df064cef8f3a4c833007
4
- data.tar.gz: e8419cbb2ae5eea378770e05090119551aaf7d94e8787417ca90feaf0f496cb6
3
+ metadata.gz: 044270ad33b6b7a80b9e35be0f3b8d3765dc83392b9188d4f2605e897d974783
4
+ data.tar.gz: 28bf7d0755b796edb711c43adbf3a5133aecde56f1628b0462836f87ec9409ff
5
5
  SHA512:
6
- metadata.gz: f6b623635f70d7a4d7a8865a379e65352979ffa453f66eb736bf557a7b9956278a2b1bc97b0ae94bd531c627bee732e903f365d83c482e300f8e52223c0ebfdc
7
- data.tar.gz: 4aef5eb0a420c6df4af7d8384d79d55763582d6a8a4ddda0d2220f996d667d757bfb005a1bfe8c334a486f661ee2969c9c5a4fa2ca05c0514a4b66e2a53a7e08
6
+ metadata.gz: 2b92bc0504e24e5f61b9039b7e7af033105a36da5f21734de5eb77c81ee2564b7e77cdbcf9d860a1239123ee026f67c84c6f87f7c47325feb7dcb7927ec75289
7
+ data.tar.gz: f18cdf48d4dd3aacbd896e94f44f910b448bdea1813e2a0ae8b393e11d10cb244720f6b0ea2285067dda3b577ee7e6488d7fcda786b94e668871616c1b6d0738
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
@@ -2,6 +2,7 @@
2
2
 
3
3
  module SequelPlugins
4
4
  if defined?(::Rails)
5
- Engine = Class.new(::Rails::Engine)
5
+ class Engine < ::Rails::Engine
6
+ end
6
7
  end
7
8
  end
@@ -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.79
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-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel