bake 0.4.0 → 0.4.1

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: 190cf7469e9cbb8f4db68447334aa9797050e06da5b351755b6d8580e70a8b71
4
- data.tar.gz: b0ccbec0d89acf14fdd81a503736d0a66242deb4a18f07601c2bcf92fb25c4a6
3
+ metadata.gz: 144a3c9af8e24a615a96bdee20289797e61f6682f871201317a2a239e91892f3
4
+ data.tar.gz: a44cf0b9bc9707807c29dca1f5e3cd9645903b9bfd4df67e716512a2c74a9b81
5
5
  SHA512:
6
- metadata.gz: 78493f41f9267d11ff32e5280fff448fdd0541f6527d2cf59059f2650ca60c3e1436f40388721c2e9d3263b8ada72b5f2b49fd30cc36853723208c7c93e88506
7
- data.tar.gz: d922e66e49de98e5c01f5504f42e80064e435ffe9f357b4d900a8dbe6d4d942be9dc2d661b0a8d5c54e84ef73e42288aaf3fce4843916b11aef2fd4dd1344dfc
6
+ metadata.gz: b832fe843062980d070f90ceaf4d6d8d84e02984c9e191759f0af4df2b6d77ddd4f043ec147744f8c4728e39fdff0574645c1846d0b1ab919c5ec3e66189a43e
7
+ data.tar.gz: a57b5703daa1a3d41dd9e388833a0659a36cfaa5d97e38571e1269bcdf851d3c21030178211841327709e52cd57c4db253ddc2d43293e0d5dbe73c06b3d7f5ba
data/lib/bake/base.rb CHANGED
@@ -62,6 +62,8 @@ module Bake
62
62
  end
63
63
 
64
64
  def recipes
65
+ return to_enum(:recipes) unless block_given?
66
+
65
67
  names = self.public_methods - Base.public_instance_methods
66
68
 
67
69
  names.each do |name|
@@ -79,7 +79,11 @@ module Bake
79
79
  context = @parent.context
80
80
 
81
81
  if scope = context.scope
82
+ terminal.print_line(:context, context)
83
+
82
84
  print_scope(terminal, context.scope)
85
+
86
+ terminal.print_line
83
87
  end
84
88
 
85
89
  context.loaders.each do |loader|
@@ -42,7 +42,7 @@ module Bake
42
42
  def terminal(out = $stdout)
43
43
  terminal = Console::Terminal.for(out)
44
44
 
45
- terminal[:loader] = terminal.style(nil, nil, :bold)
45
+ terminal[:context] = terminal[:loader] = terminal.style(nil, nil, :bold)
46
46
  terminal[:command] = terminal.style(nil, nil, :bold)
47
47
  terminal[:description] = terminal.style(:blue)
48
48
 
data/lib/bake/context.rb CHANGED
@@ -111,6 +111,14 @@ module Bake
111
111
  @recipes[command]
112
112
  end
113
113
 
114
+ def to_s
115
+ if @root
116
+ "#{self.class} #{File.basename(@root)}"
117
+ else
118
+ self.class.name
119
+ end
120
+ end
121
+
114
122
  private
115
123
 
116
124
  def recipe_for(command)
data/lib/bake/version.rb CHANGED
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Bake
22
- VERSION = "0.4.0"
22
+ VERSION = "0.4.1"
23
23
  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.0
4
+ version: 0.4.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: 2020-02-19 00:00:00.000000000 Z
11
+ date: 2020-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: samovar