bake 0.15.0 → 0.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bake.rb +6 -1
- data/lib/bake/arguments.rb +7 -1
- data/lib/bake/base.rb +6 -0
- data/lib/bake/command.rb +2 -0
- data/lib/bake/command/call.rb +2 -0
- data/lib/bake/command/list.rb +2 -0
- data/lib/bake/command/top.rb +6 -0
- data/lib/bake/context.rb +6 -0
- data/lib/bake/documentation.rb +2 -0
- data/lib/bake/loader.rb +2 -0
- data/lib/bake/loaders.rb +3 -1
- data/lib/bake/recipe.rb +2 -0
- data/lib/bake/scope.rb +2 -0
- data/lib/bake/types.rb +2 -0
- data/lib/bake/types/any.rb +2 -0
- data/lib/bake/types/array.rb +2 -0
- data/lib/bake/types/boolean.rb +2 -0
- data/lib/bake/types/decimal.rb +2 -0
- data/lib/bake/types/float.rb +2 -0
- data/lib/bake/types/hash.rb +2 -0
- data/lib/bake/types/input.rb +2 -0
- data/lib/bake/types/integer.rb +2 -0
- data/lib/bake/types/nil.rb +2 -0
- data/lib/bake/types/output.rb +2 -0
- data/lib/bake/types/string.rb +2 -0
- data/lib/bake/types/symbol.rb +2 -0
- data/lib/bake/types/tuple.rb +2 -0
- data/lib/bake/version.rb +3 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9398b0b75e437ea872787489f7fc88c9d41bb82c1d1e5b27d8720f1dcf69b10e
|
4
|
+
data.tar.gz: 6efb23e691587de655204520e348c0d37d0a84fc6242bfbc42d92c8edee25ffa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb01a8f42b358b3b71bdeca12504db247cfef27051841fe99b410c85276d42fb76c3ceb2158df90767b4b58f2ab693fc8ed668b2edfc375df9239a5b2e486143
|
7
|
+
data.tar.gz: 84fd70f0c123d2cb78c3cf66f6eed516011aca117f3663871bbb854995da4cb5e3e3d1a49cccd270684bf8f9c5591aab12db653c796b22825273fd8232078ac7
|
data/lib/bake.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
2
4
|
#
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -18,4 +20,7 @@
|
|
18
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
21
|
# THE SOFTWARE.
|
20
22
|
|
21
|
-
|
23
|
+
require_relative 'bake/version'
|
24
|
+
require_relative 'bake/loaders'
|
25
|
+
require_relative 'bake/loader'
|
26
|
+
require_relative 'bake/context'
|
data/lib/bake/arguments.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
2
4
|
#
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -52,7 +54,7 @@ module Bake
|
|
52
54
|
break
|
53
55
|
end
|
54
56
|
|
55
|
-
name = name
|
57
|
+
name = normalize(name)
|
56
58
|
|
57
59
|
# Extract the trailing arguments:
|
58
60
|
@options[name] = extract_arguments(name, arguments)
|
@@ -80,6 +82,10 @@ module Bake
|
|
80
82
|
|
81
83
|
private
|
82
84
|
|
85
|
+
def normalize(name)
|
86
|
+
name.tr('-', '_').to_sym
|
87
|
+
end
|
88
|
+
|
83
89
|
def delimiter_index(arguments)
|
84
90
|
arguments.index{|argument| argument =~ /\A(--|;\z)/}
|
85
91
|
end
|
data/lib/bake/base.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
2
4
|
#
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -93,5 +95,9 @@ module Bake
|
|
93
95
|
def recipe_for(name)
|
94
96
|
Recipe.new(self, name)
|
95
97
|
end
|
98
|
+
|
99
|
+
def to_s
|
100
|
+
"\#<#{self.class}>"
|
101
|
+
end
|
96
102
|
end
|
97
103
|
end
|
data/lib/bake/command.rb
CHANGED
data/lib/bake/command/call.rb
CHANGED
data/lib/bake/command/list.rb
CHANGED
data/lib/bake/command/top.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
2
4
|
#
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -33,6 +35,10 @@ module Bake
|
|
33
35
|
options do
|
34
36
|
option '-h/--help', 'Show help.'
|
35
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
|
36
42
|
end
|
37
43
|
|
38
44
|
nested :command, {
|
data/lib/bake/context.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
2
4
|
#
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -140,6 +142,10 @@ module Bake
|
|
140
142
|
end
|
141
143
|
end
|
142
144
|
|
145
|
+
def inspect
|
146
|
+
"\#<#{self.class} #{@root}>"
|
147
|
+
end
|
148
|
+
|
143
149
|
private
|
144
150
|
|
145
151
|
def recipe_for(command)
|
data/lib/bake/documentation.rb
CHANGED
data/lib/bake/loader.rb
CHANGED
data/lib/bake/loaders.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
2
4
|
#
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -95,7 +97,7 @@ module Bake
|
|
95
97
|
|
96
98
|
# Enumerate all loaded gems and add them.
|
97
99
|
def append_from_gems
|
98
|
-
Gem.loaded_specs.each do |name, spec|
|
100
|
+
::Gem.loaded_specs.each do |name, spec|
|
99
101
|
Console.logger.debug(self) {"Checking gem #{name}: #{spec.full_gem_path}..."}
|
100
102
|
|
101
103
|
if path = spec.full_gem_path and File.directory?(path)
|
data/lib/bake/recipe.rb
CHANGED
data/lib/bake/scope.rb
CHANGED
data/lib/bake/types.rb
CHANGED
data/lib/bake/types/any.rb
CHANGED
data/lib/bake/types/array.rb
CHANGED
data/lib/bake/types/boolean.rb
CHANGED
data/lib/bake/types/decimal.rb
CHANGED
data/lib/bake/types/float.rb
CHANGED
data/lib/bake/types/hash.rb
CHANGED
data/lib/bake/types/input.rb
CHANGED
data/lib/bake/types/integer.rb
CHANGED
data/lib/bake/types/nil.rb
CHANGED
data/lib/bake/types/output.rb
CHANGED
data/lib/bake/types/string.rb
CHANGED
data/lib/bake/types/symbol.rb
CHANGED
data/lib/bake/types/tuple.rb
CHANGED
data/lib/bake/version.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
2
4
|
#
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -19,5 +21,5 @@
|
|
19
21
|
# THE SOFTWARE.
|
20
22
|
|
21
23
|
module Bake
|
22
|
-
VERSION = "0.
|
24
|
+
VERSION = "0.16.1"
|
23
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: samovar
|
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
122
|
- !ruby/object:Gem::Version
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
|
-
rubygems_version: 3.1.
|
125
|
+
rubygems_version: 3.1.6
|
126
126
|
signing_key:
|
127
127
|
specification_version: 4
|
128
128
|
summary: A replacement for rake with a simpler syntax.
|