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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ccdc04a2de611e4b1fe6b0e611fe9cc3c3751081045f0073044ff53e8dc53371
4
- data.tar.gz: bbc7c517c0a35beba4978ae97d3a6b0f7c1958c41143b28b98ce579997fdc983
3
+ metadata.gz: 8bd927c484d22c11d47881a873a533ee74ac69aee14cfaee765bca8ed538ab8d
4
+ data.tar.gz: fff71f2022cf4707efe4546c6ef44308339c25e88822b23a939604da4cde1270
5
5
  SHA512:
6
- metadata.gz: 5e9e973fde3d6aeb5ab774a26068d1505383e3d36e37c55680ca7ad2ae340228dc55cd2f186e330385b0dfa220b9d04b94e6cbd7c5089dc49221bdfabbb60a92
7
- data.tar.gz: 2c860738ae8dba73d4844a18bee439bd541f0329fbbdccf3235e8a4d90223bb309489de539443b2613241afeba2ef47be03ff817e33d79b810717a33bb5ff179
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 may take a database and an
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. If
36
- # everything fails, the user's username is used as the database and username
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
- database = ENV["USER"]
52
- username = ENV["USER"]
58
+ return nil
59
+ # database = ENV["USER"]
60
+ # username = ENV["USER"]
53
61
  end
54
62
  end
55
63
  [database, username]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MikrasUtils
4
- VERSION = "0.16.1"
4
+ VERSION = "0.16.2"
5
5
  end
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.1
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-03-22 00:00:00.000000000 Z
11
+ date: 2025-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg_conn