mikras_utils 0.16.1 → 0.16.2
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/exe/mkacl +0 -2
- data/lib/mikras.rb +13 -5
- data/lib/mikras_utils/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bd927c484d22c11d47881a873a533ee74ac69aee14cfaee765bca8ed538ab8d
|
4
|
+
data.tar.gz: fff71f2022cf4707efe4546c6ef44308339c25e88822b23a939604da4cde1270
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 125053f30f386c93b59d17118279628a3bf0018334fd0865168f329bde96ad31d02b9301a41899b48154d219192119b5abae27f5b5a9f58c2f5ab036c874177e
|
7
|
+
data.tar.gz: 46a12421cacd790d25346e0ce6e1cd145bf4da45cda083f45cb58eae7332cac1ef866e5ba8304f443d75cfe770b21492d40c4ffbc9b71c826364a30b4f4e9e01
|
data/exe/mkacl
CHANGED
@@ -61,8 +61,6 @@ require 'shellopts'
|
|
61
61
|
require_relative '../lib/mikras.rb'
|
62
62
|
require_relative '../lib/mikras_utils/mkacl.rb'
|
63
63
|
|
64
|
-
PRICK_STATE_FILE = "prick.state.yml"
|
65
|
-
|
66
64
|
opts, args = ShellOpts::process(SPEC, ARGV)
|
67
65
|
file = args.extract(-1)
|
68
66
|
database = args.extract(0..1)
|
data/lib/mikras.rb
CHANGED
@@ -24,16 +24,23 @@ module Prick
|
|
24
24
|
end
|
25
25
|
|
26
26
|
module Mikras
|
27
|
+
MIKRAS_DIR = Prick::PRICK_DIR
|
27
28
|
MIKRAS_LIBDIR = Prick::PRICK_DIR && File.join(Prick::PRICK_DIR, "lib")
|
28
29
|
|
29
30
|
# Add project-dir/lib to search path
|
30
31
|
$LOAD_PATH.unshift MIKRAS_LIBDIR if MIKRAS_LIBDIR
|
31
32
|
|
32
|
-
# Find database/username. Called from scripts that
|
33
|
+
# Find database/username. Called from scripts that takes an optinal database and
|
33
34
|
# username argument. If the arguments are absent, the database/username is
|
34
35
|
# initialized using the PRICK_DATABASE and PRICK_USERNAME environment
|
35
|
-
# variables and if they are also absent, the PRICK_STATE_FILE is read.
|
36
|
-
#
|
36
|
+
# variables and if they are also absent, the PRICK_STATE_FILE is read.
|
37
|
+
# Returns nil if everything fails
|
38
|
+
#
|
39
|
+
# Should typically be called like this
|
40
|
+
#
|
41
|
+
# opts, args = ShellOpts.parse(SPEC, ARGV)
|
42
|
+
# database, username = Mikras.credentials args.expect(0..2) or
|
43
|
+
# ShellOpts.error "Can't find database/username"
|
37
44
|
#
|
38
45
|
def self.credentials(database_argument, username_argument = nil)
|
39
46
|
if database_argument
|
@@ -48,8 +55,9 @@ module Mikras
|
|
48
55
|
database = prick_state["database"]
|
49
56
|
username = prick_state["username"]
|
50
57
|
else
|
51
|
-
|
52
|
-
|
58
|
+
return nil
|
59
|
+
# database = ENV["USER"]
|
60
|
+
# username = ENV["USER"]
|
53
61
|
end
|
54
62
|
end
|
55
63
|
[database, username]
|
data/lib/mikras_utils/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mikras_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Claus Rasmussen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg_conn
|