qrpm 0.3.5 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/exe/qrpm +15 -0
  3. data/lib/qrpm/version.rb +1 -1
  4. data/qrpm.gemspec +2 -2
  5. metadata +10 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46adf6022a282921ffec7babe5d51a630265fdc006fe6a8f2108b05175d3801f
4
- data.tar.gz: 152bedc386c3b1f80d4727c89bb2eda22aea5f98dec9d4bc505eb7484419e93c
3
+ metadata.gz: 63a6edf353c6d30720575fc0b3fd61bc375ed6745ae205ff8a8bca821aea66cf
4
+ data.tar.gz: 15adccd7d88bd17d368332d1b4b04b1f703ffcb12a0f6b628cbdee067e5b5db7
5
5
  SHA512:
6
- metadata.gz: 5c97e24da7f3bde2793c624300c93ccd8197cae6f8c204e708663a2549c9c718cbd64f1a741c8a576c0aac65af8bcf9272eb633dafe3ca7def268a92a5bae73a
7
- data.tar.gz: aab20b330f1968edeac8e4eeb96ba2a1953cb688f74b8274804d7e9c1b8b53ab023552338b438d13ebcdae32f2cf52837d4a9527284349440d55b7c677450601
6
+ metadata.gz: 854708afcd1367185177f937af752547996939ed81a96238b65d997c587452ab9008e5d6cd7bb0607570089fa0af22eb09e78f86b2c80245db3154175f86257f
7
+ data.tar.gz: d45577a909d6b13b1ed38f6ce11f3cc76be6052112c464f3bb2bff6b2aef98f404e6e3dc09e281c489790718612d01518fdaf500234377db240b974b115c34cc
data/exe/qrpm CHANGED
@@ -138,6 +138,11 @@ begin
138
138
 
139
139
  -d,dump
140
140
  Dump internal data and exit. For debug
141
+
142
+ COMMANDS
143
+ show! -- QRPM-FILE VARIABLE...
144
+ Output the value of a variable. Typically used to extract the version
145
+ number from a qrpm.yml file
141
146
  )
142
147
 
143
148
  opts, args = ShellOpts.process(SPEC, ARGV, verbose: true, quiet: true)
@@ -154,11 +159,14 @@ begin
154
159
  # on the command line
155
160
  overrides = {}
156
161
  file = nil
162
+ show = []
157
163
  while arg = args.extract(0..1)
158
164
  if arg =~ /^(.*?)=(.*)$/
159
165
  overrides[$1] = $2
160
166
  elsif file.nil?
161
167
  file = arg
168
+ elsif opts.subcommand == :show!
169
+ show << arg
162
170
  else
163
171
  args.expect(-1, "More than one file argument")
164
172
  end
@@ -209,6 +217,13 @@ begin
209
217
  qrpm = compiler.compile(conf)
210
218
  rpm = qrpm.rpm
211
219
 
220
+ if opts.subcommand == :show!
221
+ for variable in show
222
+ puts qrpm[variable].sub(/^\/\//, "/")
223
+ end
224
+ exit
225
+ end
226
+
212
227
  if opts.dump?
213
228
  puts "Compiler"
214
229
  indent { compiler.dump }
data/lib/qrpm/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Qrpm
4
- VERSION = "0.3.5"
4
+ VERSION = "0.4.1"
5
5
  end
data/qrpm.gemspec CHANGED
@@ -25,9 +25,9 @@ Gem::Specification.new do |spec|
25
25
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
26
26
  spec.require_paths = ["lib"]
27
27
 
28
- spec.add_dependency "shellopts", "~> 2.1.1"
28
+ spec.add_dependency "shellopts"
29
29
  spec.add_dependency "indented_io"
30
- spec.add_dependency "constrain", "= 0.5.1"
30
+ spec.add_dependency "constrain"
31
31
  spec.add_dependency "forward_to"
32
32
 
33
33
  # Uncomment to register a new dependency of your gem
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qrpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-28 00:00:00.000000000 Z
11
+ date: 2024-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: shellopts
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 2.1.1
19
+ version: '0'
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: 2.1.1
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: indented_io
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: constrain
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 0.5.1
47
+ version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 0.5.1
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: forward_to
57
57
  requirement: !ruby/object:Gem::Requirement