tap-gen 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History +5 -0
- data/lib/tap/generator/generators/config.rb +9 -9
- data/lib/tap/generator/generators/generator.rb +0 -2
- data/lib/tap/generator/generators/task.rb +1 -1
- data/templates/tap/generator/generators/generator/task.erb +1 -1
- data/templates/tap/generator/generators/task/task.erb +1 -1
- metadata +2 -2
data/History
CHANGED
@@ -7,10 +7,10 @@ module Tap::Generator::Generators
|
|
7
7
|
#
|
8
8
|
# Configurations for other types of configurable resources may also be
|
9
9
|
# generated. Specify the constant attribute identifying the resource
|
10
|
-
# using the '
|
10
|
+
# using the 'type' flag. This generates a config file for the Root
|
11
11
|
# generator:
|
12
12
|
#
|
13
|
-
# % tap generate config root --
|
13
|
+
# % tap generate config root --type generator
|
14
14
|
#
|
15
15
|
class Config < Tap::Generator::Base
|
16
16
|
|
@@ -67,20 +67,20 @@ module Tap::Generator::Generators
|
|
67
67
|
# used when the doc config is false.
|
68
68
|
NODOC_FORMAT = nodoc_format
|
69
69
|
|
70
|
-
config :doc, true, &c.switch #
|
71
|
-
config :nest, false, &c.switch #
|
72
|
-
config :blanks, true, &c.switch #
|
73
|
-
config :
|
70
|
+
config :doc, true, &c.switch # Include documentation in the config
|
71
|
+
config :nest, false, &c.switch # Generate nested config files
|
72
|
+
config :blanks, true, &c.switch # Allow generation of empty config files
|
73
|
+
config :type, 'task' # Specify the resource type
|
74
74
|
|
75
|
-
# Lookup the named resource
|
75
|
+
# Lookup the named resource. Lookup happens through the active Env
|
76
76
|
# instance, specifically using:
|
77
77
|
#
|
78
|
-
# Env.instance
|
78
|
+
# Env.instance[type][name]
|
79
79
|
#
|
80
80
|
# Raises an error if the name cannot be resolved to a resource.
|
81
81
|
def lookup(name)
|
82
82
|
env = Tap::Env.instance
|
83
|
-
env
|
83
|
+
env[type][name] or raise "unknown #{type}: #{name}"
|
84
84
|
end
|
85
85
|
|
86
86
|
def manifest(m, name, config_name=nil)
|
@@ -7,7 +7,7 @@ module Tap::Generator::Generators
|
|
7
7
|
# Generates a new Tap::Task and an associated test file.
|
8
8
|
class Task < Tap::Generator::Base
|
9
9
|
|
10
|
-
config :test, true, &c.switch
|
10
|
+
config :test, true, &c.switch # Specifies creation of a test file
|
11
11
|
|
12
12
|
def manifest(m, const_name)
|
13
13
|
const = Tap::Env::Constant.new(const_name.camelize)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'tap/generator/base'
|
2
2
|
|
3
|
-
<% redirect do |target| %>#
|
3
|
+
<% redirect do |target| %># :startdoc::generator <replace with manifest summary>
|
4
4
|
# <replace with command line description>
|
5
5
|
|
6
6
|
# <%= const.name %> Documentation
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'tap/task'
|
2
2
|
|
3
|
-
<% redirect do |target| %>#
|
3
|
+
<% redirect do |target| %># :startdoc::task <replace with manifest summary>
|
4
4
|
# <replace with command line description>
|
5
5
|
|
6
6
|
# <%= const.name %> Documentation
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tap-gen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Chiang
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-05
|
12
|
+
date: 2009-06-05 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|