bake 0.16.1 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9398b0b75e437ea872787489f7fc88c9d41bb82c1d1e5b27d8720f1dcf69b10e
4
- data.tar.gz: 6efb23e691587de655204520e348c0d37d0a84fc6242bfbc42d92c8edee25ffa
3
+ metadata.gz: 10135085caa64994c79251726699d674223c0e4441d937cc548f56893b8ba331
4
+ data.tar.gz: ca1a86f96716c5a7e1827b49b3eefd06164295f0ab5621b007d5bd727bbba76a
5
5
  SHA512:
6
- metadata.gz: bb01a8f42b358b3b71bdeca12504db247cfef27051841fe99b410c85276d42fb76c3ceb2158df90767b4b58f2ab693fc8ed668b2edfc375df9239a5b2e486143
7
- data.tar.gz: 84fd70f0c123d2cb78c3cf66f6eed516011aca117f3663871bbb854995da4cb5e3e3d1a49cccd270684bf8f9c5591aab12db653c796b22825273fd8232078ac7
6
+ metadata.gz: d3db37001328e050c50adb89d6d2cd7e0cdef54f3b54ae2225d676b05e7ff735be19ba2056912e571ce5185f7a7336e334809b66c5312da1e0dbd798b4d87b3a
7
+ data.tar.gz: feb7ea189a4841a2b08ab43aa4a683ada9b19bb5fe8a189ba888b945bc8e1c85501e564030b883cf28eb24d9348e1fdbbf93a605ea1111245f29e4bb5469109d
checksums.yaml.gz.sig ADDED
Binary file
@@ -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/context.rb CHANGED
@@ -170,7 +170,7 @@ module Bake
170
170
  end
171
171
  end
172
172
 
173
- # @parameter path [Array<String>] the path for the scope.
173
+ # @parameter path [Array(String)] the path for the scope.
174
174
  def base_for(path)
175
175
  base = nil
176
176
 
data/lib/bake/version.rb CHANGED
@@ -21,5 +21,5 @@
21
21
  # THE SOFTWARE.
22
22
 
23
23
  module Bake
24
- VERSION = "0.16.1"
24
+ VERSION = "0.17.0"
25
25
  end
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.16.1
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
- date: 2021-08-12 00:00:00.000000000 Z
11
+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B
29
+ I3NhbXVlbC53aWxsaWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEB
30
+ CwUAA4IBgQBVoM+pu3dpdUhZM1w051iw5GfiqclAr1Psypf16Tiod/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
metadata.gz.sig ADDED
Binary file