mikras-ruby 0.3.2 → 0.4.0

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mikras/version.rb +1 -1
  3. data/lib/mikras.rb +17 -25
  4. metadata +3 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a0ddfe0b78e8e3307e410feeb375a616fafdb45deac3fd3507f4c1cfd7477325
4
- data.tar.gz: 74804a4728b60a700ef7ddf1197ca3760ebe34a5919dd01c33cffa95ceb5bbcc
3
+ metadata.gz: cd41da64df6630d5332ef3a076b35bb83320d5af509afb0cb27e40ba4e3b88bd
4
+ data.tar.gz: 944effc1dd23e98294f38ce6ef5699dcb91a688e88cd89fd1d0d972a0b4eadff
5
5
  SHA512:
6
- metadata.gz: be76c1fc45d0626dde7257ea5b46fa92bdd2f9b0af4150e79f62ae6c5033d241515c5ffa5c54ef927d38d91dadaac9b05a57cf4a64f59257209602be71cfed68
7
- data.tar.gz: 6e01530e633a49e0c4a806cf23c23c6f3dda1612cd543032d076399361f71f7102317361233f4130756c7eaf3ec291a4aedfdb6481c2ef33f71bc3ef40834d95
6
+ metadata.gz: 682807b716b9ae58a3bfa18f49ad7c198312a7781b63acff393c267488782f553e6b7a7179049066a7de4a004090dbf210357b9537813504d7faf107ac4542d0
7
+ data.tar.gz: 858c04dbd749d5ded30f4dda8df07b107e109cda20abe493040d1a607e55e79394d5c10a15caff20964e058c254b7bfb243084873cf1ce79c09c4bbc428f0fb8
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mikras
4
- VERSION = "0.3.2"
4
+ VERSION = "0.4.0"
5
5
  end
data/lib/mikras.rb CHANGED
@@ -1,33 +1,24 @@
1
1
 
2
- # General include file for Mikras scripts that sets up Prick constants and the
3
- # ruby include path so that files in PRICK_LIBDIR can be required. It is
4
- # installed in a gem so that it can be found before the environment has been
5
- # initialized
2
+ # General include file for Mikras scripts in the project directory. It searches
3
+ # up the directory hierachy for the project directory and sets up Prick
4
+ # constants and the ruby include path so that files in libdir can be referenced
5
+ # without a path in 'require'. It is installed in a gem so that it can be found
6
+ # before the environment has been initialized
6
7
  #
7
8
  # It also requries the local project file lib/mikras.rb if it exists
8
9
  #
9
- # require 'mikras'
10
- # require 'some-script.rb' # DIR/lib is now in ruby load path
10
+ # Example
11
11
  #
12
- # It should have been split into two files: prick.rb with definitions of the
12
+ # require 'mikras' # Adds project/lib to the ruby load path
13
+ # require 'some-script.rb' # in project/lib
14
+ #
15
+ # puts Prick::DIR # The project directory
16
+ #
17
+ # It could have been split into two files: prick.rb with definitions of the
13
18
  # Prick module and mikras.rb with the Mikras module but prick.rb would conflict
14
19
  # with prick(1) and it is too expensive to include the whole prick library
15
20
  # structure from prick
16
21
  #
17
- #
18
- # It defines the Prick core constants
19
- # PRICK_SCRIPT
20
- #
21
- # PRICK_FILE
22
- # PRICK_STATE_FILE
23
- # PRICK_ENVIRONMENT_FILE
24
- #
25
- # DIR
26
- #
27
- # PRICK_DATABASE
28
- # PRICK_USERNAME
29
- # PRICK_ENVIRONMENT
30
- #
31
22
 
32
23
  require 'yaml'
33
24
  require 'shellopts'
@@ -74,8 +65,9 @@ public
74
65
 
75
66
  NAME = ENV['PRICK_NAME'] || prick['name']
76
67
 
77
- # Prick subdirectories - this includes the PRICK_LIBDIR and PRICK_SHAREDIR
78
- # directories that are not implemented in Prick (yet)
68
+ # Prick subdirectories - this includes the PRICK_LIBDIR, PRICK_SHAREDIR, and
69
+ # PRICK_FDWDIR directories that are not implemented in Prick. TODO: Separate
70
+ # Prick and Mikras constants
79
71
  SCHEMADIR = ENV['PRICK_SCHEMADIR'] || "#{DIR}/schema"
80
72
  BINDIR = ENV['PRICK_BINDIR'] || "#{DIR}/bin"
81
73
  LIBEXECDIR = ENV['PRICK_LIBEXECDIR'] || "#{DIR}/libexec"
@@ -86,6 +78,7 @@ public
86
78
  TMPDIR = ENV['PRICK_TMPDIR'] || "#{DIR}/tmp"
87
79
  CLONEDIR = ENV['PRICK_CLONEDIR'] || "#{DIR}/tmp/clones"
88
80
  SPECDIR = ENV['PRICK_SPECDIR'] || "#{DIR}/spec"
81
+ FDWDIR = ENV['PRICK_FDWDIR'] || "#{DIR}/spec"
89
82
 
90
83
  $LOAD_PATH.unshift LIBDIR
91
84
 
@@ -103,7 +96,6 @@ public
103
96
  end
104
97
 
105
98
  private
106
-
107
99
  # "Print" a constant
108
100
  def self.dumpc(*consts)
109
101
  consts = consts.flatten
@@ -119,7 +111,7 @@ module Mikras
119
111
  LOCAL_MIKRAS_RB = File.join(Prick::LIBDIR, "mikras-ruby.rb")
120
112
  end
121
113
 
122
- # Require pre-project include file if present
114
+ # Require local customizations if present
123
115
  if File.exist? Mikras::LOCAL_MIKRAS_RB
124
116
  require Mikras::LOCAL_MIKRAS_RB
125
117
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mikras-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2025-05-12 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: shellopts
@@ -42,7 +41,6 @@ homepage: http://www.nowhere.com/
42
41
  licenses: []
43
42
  metadata:
44
43
  homepage_uri: http://www.nowhere.com/
45
- post_install_message:
46
44
  rdoc_options: []
47
45
  require_paths:
48
46
  - lib
@@ -57,8 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
55
  - !ruby/object:Gem::Version
58
56
  version: '0'
59
57
  requirements: []
60
- rubygems_version: 3.3.7
61
- signing_key:
58
+ rubygems_version: 3.6.9
62
59
  specification_version: 4
63
60
  summary: Mikras include file
64
61
  test_files: []