bake 0.15.2 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/bake/arguments.rb +5 -1
- data/lib/bake/base.rb +4 -0
- data/lib/bake/command/call.rb +22 -1
- data/lib/bake/command/top.rb +4 -0
- data/lib/bake/context.rb +1 -1
- data/lib/bake/loaders.rb +1 -1
- data/lib/bake/version.rb +1 -1
- data.tar.gz.sig +2 -0
- metadata +33 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10135085caa64994c79251726699d674223c0e4441d937cc548f56893b8ba331
|
4
|
+
data.tar.gz: ca1a86f96716c5a7e1827b49b3eefd06164295f0ab5621b007d5bd727bbba76a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3db37001328e050c50adb89d6d2cd7e0cdef54f3b54ae2225d676b05e7ff735be19ba2056912e571ce5185f7a7336e334809b66c5312da1e0dbd798b4d87b3a
|
7
|
+
data.tar.gz: feb7ea189a4841a2b08ab43aa4a683ada9b19bb5fe8a189ba888b945bc8e1c85501e564030b883cf28eb24d9348e1fdbbf93a605ea1111245f29e4bb5469109d
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data/lib/bake/arguments.rb
CHANGED
@@ -54,7 +54,7 @@ module Bake
|
|
54
54
|
break
|
55
55
|
end
|
56
56
|
|
57
|
-
name = name
|
57
|
+
name = normalize(name)
|
58
58
|
|
59
59
|
# Extract the trailing arguments:
|
60
60
|
@options[name] = extract_arguments(name, arguments)
|
@@ -82,6 +82,10 @@ module Bake
|
|
82
82
|
|
83
83
|
private
|
84
84
|
|
85
|
+
def normalize(name)
|
86
|
+
name.tr('-', '_').to_sym
|
87
|
+
end
|
88
|
+
|
85
89
|
def delimiter_index(arguments)
|
86
90
|
arguments.index{|argument| argument =~ /\A(--|;\z)/}
|
87
91
|
end
|
data/lib/bake/base.rb
CHANGED
data/lib/bake/command/call.rb
CHANGED
@@ -32,16 +32,37 @@ module Bake
|
|
32
32
|
class Call < Samovar::Command
|
33
33
|
self.description = "Execute one or more commands."
|
34
34
|
|
35
|
+
OUTPUT = {
|
36
|
+
json: ->(value){require 'json'; $stdout.puts(JSON.pretty_generate(value))},
|
37
|
+
pp: ->(value){require 'pp'; PP.pp(value, $stdout)},
|
38
|
+
raw: ->(value){$stdout.puts(value)},
|
39
|
+
yaml: ->(value){require 'yaml'; $stdout.puts(YAML.dump(value))},
|
40
|
+
}
|
41
|
+
|
42
|
+
options do
|
43
|
+
option "-o/--output <format>", "Output the result of the last task in the given format: #{OUTPUT.keys.join(", ")}.", type: Symbol
|
44
|
+
end
|
45
|
+
|
35
46
|
def bakefile
|
36
47
|
@parent.bakefile
|
37
48
|
end
|
38
49
|
|
39
50
|
many :commands, "The commands & arguments to invoke.", default: ["default"], stop: false
|
40
51
|
|
52
|
+
def format(output, value)
|
53
|
+
if formatter = OUTPUT[output]
|
54
|
+
formatter.call(value)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
41
58
|
def call
|
42
59
|
context = @parent.context
|
43
60
|
|
44
|
-
context.call(*@commands)
|
61
|
+
last_result = context.call(*@commands)
|
62
|
+
|
63
|
+
if output = @options[:output]
|
64
|
+
format(output, last_result)
|
65
|
+
end
|
45
66
|
end
|
46
67
|
end
|
47
68
|
end
|
data/lib/bake/command/top.rb
CHANGED
@@ -35,6 +35,10 @@ module Bake
|
|
35
35
|
options do
|
36
36
|
option '-h/--help', 'Show help.'
|
37
37
|
option '-b/--bakefile <path>', 'Override the path to the bakefile to use.'
|
38
|
+
|
39
|
+
option '-g/--gem <name>', 'Load the specified gem, e.g. "bake ~> 1.0".' do |value|
|
40
|
+
gem(*value.split(/\s+/))
|
41
|
+
end
|
38
42
|
end
|
39
43
|
|
40
44
|
nested :command, {
|
data/lib/bake/context.rb
CHANGED
data/lib/bake/loaders.rb
CHANGED
@@ -97,7 +97,7 @@ module Bake
|
|
97
97
|
|
98
98
|
# Enumerate all loaded gems and add them.
|
99
99
|
def append_from_gems
|
100
|
-
Gem.loaded_specs.each do |name, spec|
|
100
|
+
::Gem.loaded_specs.each do |name, spec|
|
101
101
|
Console.logger.debug(self) {"Checking gem #{name}: #{spec.full_gem_path}..."}
|
102
102
|
|
103
103
|
if path = spec.full_gem_path and File.directory?(path)
|
data/lib/bake/version.rb
CHANGED
data.tar.gz.sig
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
�h��Y�|
|
2
|
+
�E��b���0g[.�|���v�k����O �i�R�S[�j�8N�U#e!�e��Fi��gR��>�xډ�q$��}z����T/�yR�[o"�|n+r��.;�G��e��E7���-@C�CJl�)h��$~�f�q I��I[e�Y�/�I��GLa�<�-�H�������fy�F�Ґ$Ҫ��4�5��h G�j����W݄��w�FA�b�o�F,4%#L���z�:�7�,� �M��D�ka�4<g4K��#Z�Z���o�S"S�2v���.^�)�%��M�w��s#�\�Wu��[��N���q)A�z�fo�6�i��u�����S�f����Y)E�,�N�^�5�H��G
|
metadata
CHANGED
@@ -1,14 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
|
+
- Olle Jonsson
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
|
11
|
+
cert_chain:
|
12
|
+
- |
|
13
|
+
-----BEGIN CERTIFICATE-----
|
14
|
+
MIIEhDCCAuygAwIBAgIBATANBgkqhkiG9w0BAQsFADA3MTUwMwYDVQQDDCxzYW11
|
15
|
+
ZWwud2lsbGlhbXMvREM9b3Jpb250cmFuc2Zlci9EQz1jby9EQz1uejAeFw0yMTA4
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clAr1Psypf16Tiod/ho//4oAu6T
|
31
|
+
9fj3DPX/acWV9P/FScvqo4Qgv6g4VWO5ZU7z2JmPoTXZtYMunRAmQPFL/gSUc6aK
|
32
|
+
vszMHIyhtyzRc6DnfW2AiVOjMBjaYv8xXZc9bduniRVPrLR4J7ozmGLh4o4uJp7w
|
33
|
+
x9KCFaR8Lvn/r0oJWJOqb/DMAYI83YeN2Dlt3jpwrsmsONrtC5S3gOUle5afSGos
|
34
|
+
bYt5ocnEpKSomR9ZtnCGljds/aeO1Xgpn2r9HHcjwnH346iNrnHmMlC7BtHUFPDg
|
35
|
+
Ts92S47PTOXzwPBDsrFiq3VLbRjHSwf8rpqybQBH9MfzxGGxTaETQYOd6b4e4Ag6
|
36
|
+
y92abGna0bmIEb4+Tx9rQ10Uijh1POzvr/VTH4bbIPy9FbKrRsIQ24qDbNJRtOpE
|
37
|
+
RAOsIl+HOBTb252nx1kIRN5hqQx272AJCbCjKx8egcUQKffFVVCI0nye09v5CK+a
|
38
|
+
HiLJ8VOFx6w=
|
39
|
+
-----END CERTIFICATE-----
|
40
|
+
date: 2022-05-21 00:00:00.000000000 Z
|
12
41
|
dependencies:
|
13
42
|
- !ruby/object:Gem::Dependency
|
14
43
|
name: samovar
|
@@ -122,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
151
|
- !ruby/object:Gem::Version
|
123
152
|
version: '0'
|
124
153
|
requirements: []
|
125
|
-
rubygems_version: 3.1.
|
154
|
+
rubygems_version: 3.1.6
|
126
155
|
signing_key:
|
127
156
|
specification_version: 4
|
128
157
|
summary: A replacement for rake with a simpler syntax.
|
metadata.gz.sig
ADDED
Binary file
|