yard-cucumber 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 2.0.1 / 2011-03-14
2
+
3
+ - YARD 0.6.5 compatibility
4
+
1
5
  === 2.0.0 / 2011-02-08
2
6
 
3
7
  * Cucumber In The YARD becomes `yard-cucumber` and with that gains the
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'rake'
2
2
 
3
- task :default => :yardoc
3
+ task :default => :gendoc
4
4
 
5
5
  task :clean do
6
6
  `rm -rf doc`
@@ -8,7 +8,7 @@ task :clean do
8
8
  end
9
9
 
10
10
  task :gendoc => :clean do
11
- `yardoc -e ./lib/city.rb -p ./lib/templates 'example/**/*' --debug`
11
+ `yardoc -e ./lib/yard-cucumber.rb 'example/**/*' --debug`
12
12
  end
13
13
 
14
14
  task :gem do
@@ -191,19 +191,13 @@ module Cucumber
191
191
 
192
192
  private
193
193
  def matrix(gherkin_table)
194
- gherkin_table.map do |gherkin_row|
195
- row = gherkin_row.cells
196
- class << row
197
- attr_accessor :line
198
- end
199
- row.line = gherkin_row.line
200
- row
201
- end
194
+ gherkin_table.map {|gherkin_row| gherkin_row.cells }
202
195
  end
203
196
 
204
197
  def clone_table(base)
205
198
  base.map {|row| row.map {|cell| cell.dup }}
206
199
  end
200
+
207
201
  end
208
202
  end
209
203
  end
data/lib/yard-cucumber.rb CHANGED
@@ -4,7 +4,7 @@ require 'gherkin/formatter/tag_count_formatter'
4
4
 
5
5
 
6
6
  module CucumberInTheYARD
7
- VERSION = '2.0.0' unless defined?(CucumberInTheYARD::VERSION)
7
+ VERSION = '2.0.1' unless defined?(CucumberInTheYARD::VERSION)
8
8
  end
9
9
 
10
10
  require File.dirname(__FILE__) + "/yard/code_objects/cucumber/base.rb"
@@ -37,6 +37,7 @@ require File.dirname(__FILE__) + "/yard/handlers/legacy/step_transform_handler.r
37
37
  require File.dirname(__FILE__) + "/yard/parser/source_parser.rb"
38
38
  require File.dirname(__FILE__) + "/yard/templates/helpers/base_helper.rb"
39
39
 
40
+ require File.dirname(__FILE__) + "/yard/server/adapter.rb"
40
41
  require File.dirname(__FILE__) + "/yard/server/commands/list_command.rb"
41
42
  require File.dirname(__FILE__) + "/yard/server/router.rb"
42
43
 
@@ -44,10 +45,6 @@ require File.dirname(__FILE__) + "/yard/server/router.rb"
44
45
  # This registered template works for yardoc
45
46
  YARD::Templates::Engine.register_template_path File.dirname(__FILE__) + '/templates'
46
47
 
47
- # This template is for yard server but will raise an error if included here, it
48
- # is patched in the adapter setup.
49
- #YARD::Templates::Engine.register_template_path File.dirname(__FILE__) + '/docserver'
50
-
51
48
  # The following static paths and templates are for yard server
52
49
  YARD::Server.register_static_path File.dirname(__FILE__) + "/templates/default/fulldoc/html"
53
50
  YARD::Server.register_static_path File.dirname(__FILE__) + "/docserver/default/fulldoc/html"
@@ -28,6 +28,10 @@ module YARD::Parser
28
28
  environment_files + support_files + other_files + feature_files
29
29
  end
30
30
 
31
+ #
32
+ # Overriding the parse_in_order method was necessary so that step definitions
33
+ # match to steps utilizing the load ordering that is used by Cucumber.
34
+ #
31
35
  def parse_in_order(*files)
32
36
 
33
37
  files = order_by_cucumber_standards(*files)
@@ -7,6 +7,15 @@ module YARD
7
7
 
8
8
  alias_method :yard_setup, :setup
9
9
 
10
+ #
11
+ # To provide the templates necessary for `yard-cucumber` to integrate
12
+ # with YARD the adapter has to around-alias the setup method to place
13
+ # the `yard-cucumber` server templates as the last template in the list.
14
+ #
15
+ # When they are normally loaded with the plugin they cause an error with
16
+ # the `yardoc` command. They are also not used because the YARD server
17
+ # templates are placed after all plugin templates.
18
+ #
10
19
  def setup
11
20
  yard_setup
12
21
  YARD::Templates::Engine.template_paths +=
@@ -15,7 +24,12 @@ module YARD
15
24
 
16
25
  alias_method :yard_shutdown, :shutdown
17
26
 
18
- def yard_shutdown
27
+ #
28
+ # Similar to the addition, it is good business to tear down the templates
29
+ # that were added by again around-aliasing the shutdown method.
30
+ #
31
+ def shutdown
32
+ yard_shutdown
19
33
  YARD::Templates::Engine.template_paths -=
20
34
  [File.dirname(__FILE__) + '/../../templates',File.dirname(__FILE__) + '/../../docserver']
21
35
  end
@@ -2,6 +2,9 @@ module YARD
2
2
  module Server
3
3
  module Commands
4
4
 
5
+ #
6
+ # List Features powers the features menu option in `yard server`
7
+ #
5
8
  class ListFeaturesCommand < ListCommand
6
9
  def type; :features end
7
10
 
@@ -11,6 +14,9 @@ module YARD
11
14
  end
12
15
  end
13
16
 
17
+ #
18
+ # List Tags powers the tags menu option in `yard server`
19
+ #
14
20
  class ListTagsCommand < ListCommand
15
21
  def type; :tags end
16
22
 
@@ -3,7 +3,8 @@ module YARD
3
3
 
4
4
  #
5
5
  # The YARD::Server::Router needs the following modification,
6
- # otherwise it perfectly suited for the requirements documents
6
+ # so that it will provide routing for the features and tags commands
7
+ # to their appropriate definitions
7
8
  #
8
9
  Router.class_eval do
9
10
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: yard-cucumber
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.0.0
5
+ version: 2.0.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Franklin Webber
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-02-08 00:00:00 -08:00
13
+ date: 2011-03-14 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -134,7 +134,6 @@ files:
134
134
  - lib/yard/handlers/step_transform_handler.rb
135
135
  - lib/yard/parser/cucumber/feature.rb
136
136
  - lib/yard/parser/source_parser.rb
137
- - lib/yard/rake/city_task.rb
138
137
  - lib/yard/server/adapter.rb
139
138
  - lib/yard/server/commands/list_command.rb
140
139
  - lib/yard/server/router.rb
@@ -144,7 +143,7 @@ homepage: http://github.com/burtlo/yard-cucumber
144
143
  licenses: []
145
144
 
146
145
  post_install_message: "\n\
147
- (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)\n\n Thank you for installing yard-cucumber 2.0.0 / 2011-02-08.\n \n Changes:\n \n * Cucumber In The YARD becomes `yard-cucumber` and with that gains the\n benefits of being a YARD plugin\n \n\n\
146
+ (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)\n\n Thank you for installing yard-cucumber 2.0.1 / 2011-03-14.\n \n Changes:\n \n - YARD 0.6.5 compatibility\n \n\n\
148
147
  (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)\n\n"
149
148
  rdoc_options:
150
149
  - --charset=UTF-8
@@ -165,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
164
  requirements: []
166
165
 
167
166
  rubyforge_project:
168
- rubygems_version: 1.5.0
167
+ rubygems_version: 1.6.2
169
168
  signing_key:
170
169
  specification_version: 3
171
170
  summary: Cucumber Features in YARD
@@ -1,12 +0,0 @@
1
- module YARD::Rake
2
-
3
- class CitydocTask < YardocTask
4
-
5
- def initialize(name = :yard)
6
- super
7
- self.options += [ "-e", "#{ File.dirname(__FILE__)}/../../city.rb", "-p", "#{File.dirname(__FILE__)}/../../templates" ]
8
- end
9
-
10
- end
11
-
12
- end