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 CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.1.2 / 2009-06-05
2
+
3
+ * bug fix in config generator
4
+ * minor documentation updates + cleanup
5
+
1
6
  == 0.1.1 / 2009-05-25
2
7
 
3
8
  * oops, ::manifest in template instead of ::task
@@ -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 'resource' flag. This generates a config file for the Root
10
+ # using the 'type' flag. This generates a config file for the Root
11
11
  # generator:
12
12
  #
13
- # % tap generate config root --resource generator
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 # 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 :resource, 'task' # specify the resource type
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 class. Lookup happens through the active Env
75
+ # Lookup the named resource. Lookup happens through the active Env
76
76
  # instance, specifically using:
77
77
  #
78
- # Env.instance.constant_manifest(resource)[name]
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.constant_manifest(resource)[name] or raise "unknown #{resource}: #{name}"
83
+ env[type][name] or raise "unknown #{type}: #{name}"
84
84
  end
85
85
 
86
86
  def manifest(m, name, config_name=nil)
@@ -7,8 +7,6 @@ module Tap::Generator::Generators
7
7
  # Generates a new generator.
8
8
  class Generator < Tap::Generator::Generators::Task
9
9
 
10
- config :test, true, &c.switch # specifies creation of a test file
11
-
12
10
  def manifest(m, const_name)
13
11
  super
14
12
 
@@ -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 # specifies creation of a test file
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| %># <%= const.const_name %>::generator <replace with manifest summary>
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| %># <%= const.const_name %>::task <replace with manifest summary>
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.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-25 00:00:00 -06:00
12
+ date: 2009-06-05 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency