potluck-postgres 0.0.6 → 0.0.7
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 +4 -4
- data/VERSION +1 -0
- data/lib/potluck/postgres/version.rb +7 -0
- data/lib/potluck/postgres.rb +20 -6
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6484b446d1c719baef9d5aec6fc545d305107581c62335c33e9b30098f050ff7
|
4
|
+
data.tar.gz: a9b09e742ea51367296b898ca20c331830203eace33489e28e7820d3fe914cab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f1433d0ac8702cb655ce8e7dcdea53c1a196e27e6cce9619b7f79405028e6693565bcfda69d6ade2940950661fbc6b84fdb293aeb25a9462b8ae905550e122f
|
7
|
+
data.tar.gz: 4e7f3c780602ba4c62021b0611d9adf44b0dadb049c3ee448c20280141e78588ceff79b2876034af53c584a97349a902ab79df30f0b41fd1b1102c923b00d136
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.7
|
data/lib/potluck/postgres.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require('potluck')
|
4
4
|
require('sequel')
|
5
|
+
require_relative('postgres/version')
|
5
6
|
|
6
7
|
module Potluck
|
7
8
|
##
|
@@ -141,7 +142,7 @@ module Potluck
|
|
141
142
|
|
142
143
|
return if applied.empty? && steps <= 0
|
143
144
|
|
144
|
-
index = [[0, (all.index(current) || -1) + steps].max, all.size].min
|
145
|
+
index = [[0, (all.index(current) || -1) + steps].max, all.size - 1].min
|
145
146
|
file = all[index]
|
146
147
|
|
147
148
|
args.last[:target] = migrator.send(:migration_version_from_file, file)
|
@@ -158,20 +159,33 @@ module Potluck
|
|
158
159
|
# Content of the launchctl plist file.
|
159
160
|
#
|
160
161
|
def self.plist
|
162
|
+
versions = Dir["#{HOMEBREW_PREFIX}/opt/postgresql@*"].sort_by { |path| path.split('@').last.to_f }
|
163
|
+
version =
|
164
|
+
if versions.empty?
|
165
|
+
raise(PostgresError, "No Postgres installation found (try running `brew install postgresql@X`)")
|
166
|
+
else
|
167
|
+
File.basename(versions.last)
|
168
|
+
end
|
169
|
+
|
161
170
|
super(
|
162
171
|
<<~EOS
|
172
|
+
<key>EnvironmentVariables</key>
|
173
|
+
<dict>
|
174
|
+
<key>LC_ALL</key>
|
175
|
+
<string>C</string>
|
176
|
+
</dict>
|
163
177
|
<key>ProgramArguments</key>
|
164
178
|
<array>
|
165
|
-
<string
|
179
|
+
<string>#{HOMEBREW_PREFIX}/opt/#{version}/bin/postgres</string>
|
166
180
|
<string>-D</string>
|
167
|
-
<string
|
181
|
+
<string>#{HOMEBREW_PREFIX}/var/#{version}</string>
|
168
182
|
</array>
|
169
183
|
<key>WorkingDirectory</key>
|
170
|
-
<string
|
184
|
+
<string>#{HOMEBREW_PREFIX}</string>
|
171
185
|
<key>StandardOutPath</key>
|
172
|
-
<string
|
186
|
+
<string>#{HOMEBREW_PREFIX}/var/log/#{version}.log</string>
|
173
187
|
<key>StandardErrorPath</key>
|
174
|
-
<string
|
188
|
+
<string>#{HOMEBREW_PREFIX}/var/log/#{version}.log</string>
|
175
189
|
EOS
|
176
190
|
)
|
177
191
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: potluck-postgres
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nate Pickens
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: potluck
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.0.
|
19
|
+
version: 0.0.7
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.0.
|
26
|
+
version: 0.0.7
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pg
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -96,7 +96,9 @@ extra_rdoc_files: []
|
|
96
96
|
files:
|
97
97
|
- LICENSE
|
98
98
|
- README.md
|
99
|
+
- VERSION
|
99
100
|
- lib/potluck/postgres.rb
|
101
|
+
- lib/potluck/postgres/version.rb
|
100
102
|
homepage: https://github.com/npickens/potluck/tree/master/potluck-postgres
|
101
103
|
licenses:
|
102
104
|
- MIT
|
@@ -119,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
121
|
- !ruby/object:Gem::Version
|
120
122
|
version: '0'
|
121
123
|
requirements: []
|
122
|
-
rubygems_version: 3.
|
124
|
+
rubygems_version: 3.3.7
|
123
125
|
signing_key:
|
124
126
|
specification_version: 4
|
125
127
|
summary: A Ruby manager for Postgres.
|