orchestration 0.5.11 → 0.5.12

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: de47b72daeab700a9646fa1c930e747bf7b5f03c630fe63d7ee3fee7aa95d8e3
4
- data.tar.gz: 5a92f1d0826e717fff61ad1b5bf386801907cdf7cf4874a444c5051553f24795
3
+ metadata.gz: 80872dc0b6d1fe6a0e4223915a047c9ed6b3461540b64842613b4d8a0ba72f3d
4
+ data.tar.gz: b33f4a5c305fd48f952a92a4f98748d1dae64eae62d5b222b4831f80cc2dbe9f
5
5
  SHA512:
6
- metadata.gz: aba93e5eb3921c239d1a350e007df868b49ae0c038e25dff0db2d188574f55309871b4cf155b6102c135b65ce0e1d39cacffd3837abbca5736150f96a341015f
7
- data.tar.gz: d99a48140ecd9b170b868083dc3023437a4ca212b5ad8f14512f5b2959025988350083b4fd1d6dd96b437a6a360ebc2311cf809b884146db9cc6998d6383afb7
6
+ metadata.gz: 4d83d6166ce64feb661d3952431d4b26569c96568308008f0070960343cb7959847ae5217cf30e780fa0228387cdb4e4404091ac6934996492cda355eec9b932
7
+ data.tar.gz: 6c78278a30cd2489e229900560c583731e29e4f88f4309530d6ff09095d59e426d6a500896d20dadcb03eca8dfdd3786b0c68d43c7b675209d7cdf4f374acbf1
data/README.md CHANGED
@@ -27,7 +27,7 @@ The below screenshot demonstrates _Orchestration_ being installed in a brand new
27
27
  Add _Orchestration_ to your Gemfile:
28
28
 
29
29
  ```ruby
30
- gem 'orchestration', '~> 0.5.11'
30
+ gem 'orchestration', '~> 0.5.12'
31
31
  ```
32
32
 
33
33
  Install:
@@ -82,37 +82,31 @@ module Orchestration
82
82
  end
83
83
 
84
84
  def host
85
- url_config['host'] || file_config['host'] || super
85
+ chained_config('host') || super
86
86
  end
87
87
 
88
88
  def port
89
89
  return nil if sqlite?
90
90
 
91
- url_config['port'] || file_config['port'] || super
91
+ chained_config('port') || super
92
92
  end
93
93
 
94
94
  def username
95
- (
96
- url_config['username'] ||
97
- file_config['username'] ||
98
- (adapter && adapter.credentials['username'])
99
- )
95
+ chained_config('username') || (adapter && adapter.credentials['username'])
100
96
  end
101
97
 
102
98
  def password
103
- (
104
- url_config['password'] ||
105
- file_config['password'] ||
106
- (adapter && adapter.credentials['password'])
107
- )
99
+ chained_config('password') || (adapter && adapter.credentials['password'])
108
100
  end
109
101
 
110
102
  def database
111
- (
112
- url_config['database'] ||
113
- file_config['database'] ||
114
- (adapter && adapter.credentials['database'])
115
- )
103
+ chained_config('database') || (adapter && adapter.credentials['database'])
104
+ end
105
+
106
+ def chained_config(key)
107
+ return url_config[key] || file_config[key] if @env.environment == 'test'
108
+
109
+ file_config[key] || url_config[key]
116
110
  end
117
111
 
118
112
  def adapter_by_name(name)
@@ -1,6 +1,6 @@
1
1
  environment ENV.fetch('RAILS_ENV') { 'development' }
2
2
 
3
- port ENV.fetch('WEB_PORT') { 3000 }
3
+ port ENV.fetch('WEB_PORT') { 8080 }
4
4
  workers ENV.fetch('WEB_CONCURRENCY') { 4 }
5
5
  threads_count = ENV.fetch('RAILS_MAX_THREADS') { 8 }
6
6
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Orchestration
4
- VERSION = '0.5.11'
4
+ VERSION = '0.5.12'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orchestration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.11
4
+ version: 0.5.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Farrell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-28 00:00:00.000000000 Z
11
+ date: 2021-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: database_url