Permalink
Browse files

Improve documentation

  • Loading branch information...
1 parent b934a30 commit 8146e5d5b5e8cfd9cc6ae860bf60944fdf27beb4 @aslakhellesoy aslakhellesoy committed Aug 19, 2009
Showing with 230 additions and 196 deletions.
  1. +1 −0 History.txt
  2. +2 −2 Manifest.txt
  3. +1 −0 gem_tasks/features.rake
  4. +7 −0 gem_tasks/sdoc.rake
  5. +0 −8 gem_tasks/yard.rake
  6. +12 −0 lib/README.rdoc
  7. +1 −1 lib/cucumber/ast/background.rb
  8. +1 −1 lib/cucumber/ast/comment.rb
  9. +1 −1 lib/cucumber/ast/examples.rb
  10. +1 −1 lib/cucumber/ast/feature.rb
  11. +1 −1 lib/cucumber/ast/feature_element.rb
  12. +1 −1 lib/cucumber/ast/features.rb
  13. +2 −2 lib/cucumber/ast/outline_table.rb
  14. +1 −1 lib/cucumber/ast/py_string.rb
  15. +1 −1 lib/cucumber/ast/scenario.rb
  16. +2 −2 lib/cucumber/ast/scenario_outline.rb
  17. +1 −1 lib/cucumber/ast/step.rb
  18. +1 −1 lib/cucumber/ast/step_collection.rb
  19. +1 −1 lib/cucumber/ast/step_invocation.rb
  20. +61 −43 lib/cucumber/ast/table.rb
  21. +1 −1 lib/cucumber/ast/tags.rb
  22. +6 −8 lib/cucumber/ast/visitor.rb
  23. +1 −1 lib/cucumber/broadcaster.rb
  24. +1 −1 lib/cucumber/constantize.rb
  25. +1 −1 lib/cucumber/core_ext/exception.rb
  26. +8 −3 lib/cucumber/core_ext/instance_exec.rb
  27. +1 −1 lib/cucumber/core_ext/proc.rb
  28. +1 −1 lib/cucumber/core_ext/string.rb
  29. +4 −3 lib/cucumber/feature_file.rb
  30. +2 −1 lib/cucumber/filter.rb
  31. +6 −5 lib/cucumber/formatter/ansicolor.rb
  32. +1 −1 lib/cucumber/formatter/color_io.rb
  33. +2 −0 lib/cucumber/formatter/console.rb
  34. +3 −0 lib/cucumber/formatter/duration.rb
  35. +1 −0 lib/cucumber/formatter/html.rb
  36. +1 −0 lib/cucumber/formatter/junit.rb
  37. +1 −1 lib/cucumber/formatter/ordered_xml_markup.rb
  38. +2 −0 lib/cucumber/formatter/pretty.rb
  39. +1 −0 lib/cucumber/formatter/profile.rb
  40. +1 −0 lib/cucumber/formatter/progress.rb
  41. +2 −0 lib/cucumber/formatter/rerun.rb
  42. +1 −0 lib/cucumber/formatter/steps.rb
  43. +2 −1 lib/cucumber/formatter/tag_cloud.rb
  44. +1 −1 lib/cucumber/formatter/unicode.rb
  45. +1 −0 lib/cucumber/formatter/usage.rb
  46. +6 −5 lib/cucumber/parser/treetop_ext.rb
  47. +1 −2 lib/cucumber/platform.rb
  48. +2 −1 lib/cucumber/rails/world.rb
  49. +13 −11 lib/cucumber/rake/task.rb
  50. +9 −9 lib/cucumber/rb_support/rb_dsl.rb
  51. +1 −0 lib/cucumber/rb_support/rb_hook.rb
  52. +3 −0 lib/cucumber/rb_support/rb_language.rb
  53. +4 −2 lib/cucumber/rb_support/rb_step_definition.rb
  54. +3 −3 lib/cucumber/rspec_neuter.rb
  55. +2 −2 lib/cucumber/step_match.rb
  56. +26 −29 lib/cucumber/step_mother.rb
  57. +1 −1 lib/cucumber/version.rb
  58. +3 −3 lib/cucumber/webrat/element_locator.rb
  59. +5 −3 lib/cucumber/world.rb
  60. +0 −27 spec/cucumber/ast/visitor_spec.rb
View
@@ -4,6 +4,7 @@
* Table.map_headers! will fail with a decent error message when 0 or 2+ headers are matched. (Aslak Hellesøy)
=== New Features
+* The public API is documented and there is a new :sdoc task to generate nice searchable API docs.
* Add :default => :cucumber when setting up Rake tasks for Cucumber in Rails (Aslak Hellesøy)
* New When /^I fill in "([^\"]*)" for "([^\"]*)"$/ Webrat step for Rails (Aslak Hellesøy)
View
@@ -289,7 +289,8 @@ gem_tasks/flog.rake
gem_tasks/gemspec.rake
gem_tasks/rspec.rake
gem_tasks/sass.rake
-gem_tasks/yard.rake
+gem_tasks/sdoc.rake
+lib/README.rdoc
lib/autotest/cucumber.rb
lib/autotest/cucumber_mixin.rb
lib/autotest/cucumber_rails.rb
@@ -396,7 +397,6 @@ spec/cucumber/ast/scenario_spec.rb
spec/cucumber/ast/step_collection_spec.rb
spec/cucumber/ast/step_spec.rb
spec/cucumber/ast/table_spec.rb
-spec/cucumber/ast/visitor_spec.rb
spec/cucumber/broadcaster_spec.rb
spec/cucumber/cli/configuration_spec.rb
spec/cucumber/cli/drb_client_spec.rb
View
@@ -3,6 +3,7 @@ require 'cucumber/rake/task'
Cucumber::Rake::Task.new do |t|
t.cucumber_opts = %w{--format progress}
+ t.rcov = ENV['RCOV']
end
Cucumber::Rake::Task.new('pretty') do |t|
View
@@ -0,0 +1,7 @@
+require 'sdoc' # and use your RDoc task the same way you used it before
+
+Rake::RDocTask.new(:sdoc) do |rdoc|
+ rdoc.rdoc_dir = 'doc/sdoc'
+ rdoc.options += %w{--fmt shtml -N --webcvs=http://github.com/aslakhellesoy/cucumber/blob/v0.3.96/%s --title "Cucumber API" --threads 4 --main README --exclude cucumber/parser lib}
+ rdoc.template = 'direct' # lighter template used on railsapi.com
+end
View
@@ -1,8 +0,0 @@
-begin
- require 'yard'
-
- YARD::Rake::YardocTask.new do |t|
- t.files = ['lib/**/*.rb']
- end
-rescue LoadError => ignore
-end
View
@@ -0,0 +1,12 @@
+= Cucumber API
+
+This is the public API of Cucumber. The public API includes the classes, modules
+and methods you can use if you are a user of Cucumber. It also applies to you if
+you're developing a 3rd party tool that integrates with Cucumber.
+
+== Internal API
+
+Cucumber has more classes, modules and methods than what you can see in the public
+API. If you decide to dive into the source code and make use of an API that isn't
+part of this documentation - beware that this API might change at any time. If you
+want a particular internal API to be promoted to the public API - let us know.
@@ -2,7 +2,7 @@
module Cucumber
module Ast
- class Background
+ class Background #:nodoc:
include FeatureElement
attr_reader :feature_elements
@@ -7,7 +7,7 @@ module Ast
#
# This gets parsed into a Comment with value <tt>"# Lorem ipsum\n# dolor sit amet\n"</tt>
#
- class Comment
+ class Comment #:nodoc:
def initialize(value)
@value = value
end
@@ -1,6 +1,6 @@
module Cucumber
module Ast
- class Examples
+ class Examples #:nodoc:
def initialize(line, keyword, name, outline_table)
@keyword, @name, @outline_table = keyword, name, outline_table
end
@@ -1,7 +1,7 @@
module Cucumber
module Ast
# Represents the root node of a parsed feature.
- class Feature
+ class Feature #:nodoc:
attr_accessor :file, :language
attr_writer :features
attr_reader :name
@@ -1,7 +1,7 @@
require 'enumerator'
module Cucumber
- module FeatureElement
+ module FeatureElement #:nodoc:
attr_writer :feature
def attach_steps(steps)
@@ -1,6 +1,6 @@
module Cucumber
module Ast
- class Features
+ class Features #:nodoc:
include Enumerable
attr_reader :duration
@@ -1,6 +1,6 @@
module Cucumber
module Ast
- class OutlineTable < Table
+ class OutlineTable < Table #:nodoc:
def initialize(raw, scenario_outline)
super(raw)
@scenario_outline = scenario_outline
@@ -44,7 +44,7 @@ def visit_scenario_name(visitor, row)
@scenario_outline.visit_scenario_name(visitor, row)
end
- class ExampleRow < Cells
+ class ExampleRow < Cells #:nodoc:
attr_reader :scenario_outline # https://rspec.lighthouseapp.com/projects/16211/tickets/342
def create_step_invocations!(scenario_outline)
@@ -16,7 +16,7 @@ module Ast
#
# Note how the indentation from the source is stripped away.
#
- class PyString
+ class PyString #:nodoc:
def self.default_arg_name
"string"
end
@@ -2,7 +2,7 @@
module Cucumber
module Ast
- class Scenario
+ class Scenario #:nodoc:
include FeatureElement
attr_reader :name, :line
@@ -1,9 +1,9 @@
module Cucumber
module Ast
- class ScenarioOutline
+ class ScenarioOutline #:nodoc:
include FeatureElement
- module ExamplesArray
+ module ExamplesArray #:nodoc:
def accept(visitor)
return if $cucumber_interrupted
each do |examples|
View
@@ -3,7 +3,7 @@
module Cucumber
module Ast
- class Step
+ class Step #:nodoc:
attr_reader :line, :keyword, :name, :multiline_arg
attr_writer :step_collection, :options
attr_accessor :feature_element, :exception
@@ -1,7 +1,7 @@
module Cucumber
module Ast
# Holds an Array of Step or StepDefinition
- class StepCollection
+ class StepCollection #:nodoc:
include Enumerable
def initialize(steps)
@@ -2,7 +2,7 @@
module Cucumber
module Ast
- class StepInvocation
+ class StepInvocation #:nodoc:
attr_writer :step_collection, :background
attr_reader :name, :matched_cells, :status, :reported_exception
attr_accessor :exception
Oops, something went wrong.

0 comments on commit 8146e5d

Please sign in to comment.