From 7c5c60475c3909e0c0c1d7ba4057b215e2ff1a59 Mon Sep 17 00:00:00 2001 From: Davide D'Agostino Date: Wed, 24 Aug 2011 16:41:57 +0200 Subject: [PATCH] * Updated rake tasks. * Moved doc from rdoc to yard. * Updated http_router dependency. --- .gitignore | 3 +- Gemfile | 27 ++--- Rakefile | 103 +++++++----------- gem_rake_helper.rb | 70 ++---------- .../lib/padrino-admin/access_control.rb | 8 +- .../lib/padrino-admin/utils/crypt.rb | 2 +- padrino-cache/lib/padrino-cache.rb | 2 +- .../lib/padrino-cache/helpers/cache_store.rb | 2 +- .../lib/padrino-cache/helpers/page.rb | 2 +- padrino-core/lib/padrino-core.rb | 2 +- padrino-core/lib/padrino-core/application.rb | 4 +- .../lib/padrino-core/application/rendering.rb | 4 +- .../lib/padrino-core/application/routing.rb | 8 +- padrino-core/lib/padrino-core/logger.rb | 2 +- padrino-core/lib/padrino-core/mounter.rb | 2 +- padrino-core/padrino-core.gemspec | 4 +- padrino-core/test/fixtures/apps/simple.rb | 2 +- padrino-core/test/helper.rb | 3 +- padrino-core/test/test_routing.rb | 2 +- padrino-gen/test/helper.rb | 2 +- .../form_builder/abstract_form_builder.rb | 4 +- .../form_builder/standard_form_builder.rb | 4 +- .../lib/padrino-helpers/output_helpers.rb | 4 +- padrino-helpers/test/helper.rb | 2 +- padrino-mailer/lib/padrino-mailer/base.rb | 2 +- padrino-mailer/lib/padrino-mailer/ext.rb | 4 +- padrino-mailer/lib/padrino-mailer/helpers.rb | 4 +- 27 files changed, 102 insertions(+), 176 deletions(-) diff --git a/.gitignore b/.gitignore index 5b7364179..bfd750037 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .bundle Gemfile.lock .rvmrc -*.rbc \ No newline at end of file +.yardoc +*.rbc diff --git a/Gemfile b/Gemfile index 5ee24f64a..c0c0dedc9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,5 @@ require File.expand_path("../padrino-core/lib/padrino-core/version.rb", __FILE__) -base_path = File.expand_path(File.dirname(__FILE__), __FILE__) - source :rubygems group :db do @@ -18,9 +16,9 @@ group :development do gem "sinatra", :git => "git://github.com/sinatra/sinatra.git" end gem "nokogiri", "1.4.4" - gem "rack", "~> 1.3.0" - gem "rake", ">= 0.8.7" - gem "rdoc" + gem "rack", "~> 1.3.0" + gem "rake", ">= 0.8.7" + gem "yard", ">= 0.7.2" gem "mocha", ">= 0.9.8" gem "rack-test", ">= 0.5.0" gem "fakeweb", ">=1.2.8" @@ -31,7 +29,6 @@ group :development do gem "shoulda", ">= 2.10.3" gem "uuid", ">= 2.3.1" gem "bcrypt-ruby", :require => "bcrypt" - gem "phocus" gem "builder", ">= 2.1.2" platforms :mri_18 do gem "rcov", "~> 0.9.8" @@ -63,10 +60,14 @@ group :cache do end end -gem "padrino", :path => "/#{base_path}/padrino" -gem "padrino-admin", :path => "/#{base_path}/padrino-admin" -gem "padrino-cache", :path => "/#{base_path}/padrino-cache" -gem "padrino-core", :path => "/#{base_path}/padrino-core" -gem "padrino-gen", :path => "/#{base_path}/padrino-gen" -gem "padrino-helpers", :path => "/#{base_path}/padrino-helpers" -gem "padrino-mailer", :path => "/#{base_path}/padrino-mailer" +%w[ + padrino + padrino-admin + padrino-cache + padrino-core + padrino-gen + padrino-helpers + padrino-mailer +].each do |dep| + gem dep, :path => File.join(File.expand_path(File.dirname(__FILE__)), dep) +end diff --git a/Rakefile b/Rakefile index d701436d3..da05144f1 100644 --- a/Rakefile +++ b/Rakefile @@ -1,48 +1,32 @@ -# rake bump[X.X.X] && rake publish -require 'rubygems' unless defined?(Gem) -require 'rake/clean' -require 'rake/contrib/sshpublisher' -require 'fileutils' unless defined?(FileUtils) -require 'rdoc/task' - -# Commented out temporarily -# require 'rake/dsl_definition' -# include Rake::DSL - +require 'rubygems' unless defined?(Gem) +require 'fileutils' unless defined?(FileUtils) +require 'rake' +require 'yard' require File.expand_path("../padrino-core/lib/padrino-core/version.rb", __FILE__) -begin - require 'sdoc' -rescue LoadError - puts "You need to install sdoc: gem install sdoc to correctly generate our api docs." -end - -include FileUtils - -ROOT = File.expand_path(File.dirname(__FILE__)) -GEM_NAME = 'padrino-framework' -padrino_gems = [ - "padrino-core", - "padrino-gen", - "padrino-helpers", - "padrino-mailer", - "padrino-admin", - "padrino-cache", - "padrino" +ROOT = File.expand_path(File.dirname(__FILE__)) +GEM_NAME = 'padrino-framework' + +padrino_gems = %w[ + padrino-core + padrino-gen + padrino-helpers + padrino-mailer + padrino-admin + padrino-cache + padrino ] GEM_PATHS = padrino_gems.freeze -def rake_command(command) +def sh_rake(command) sh "#{Gem.ruby} -S rake #{command}", :verbose => true end -%w(install gemspec package).each do |name| - desc "Run #{name} for all projects" - task name do - GEM_PATHS.each do |dir| - Dir.chdir(dir) { rake_command(name) } - end +desc "Run 'install' for all projects" +task :install do + GEM_PATHS.each do |dir| + Dir.chdir(dir) { sh_rake(name) } end end @@ -50,7 +34,7 @@ desc "Clean pkg and other stuff" task :clean do GEM_PATHS.each do |dir| Dir.chdir(dir) do - %w(tmp pkg coverage).each { |dir| FileUtils.rm_rf dir } + %w[tmp pkg coverage].each { |dir| FileUtils.rm_rf dir } end end Dir["**/*.gem"].each { |gem| FileUtils.rm_rf gem } @@ -66,11 +50,6 @@ task :version do puts "Current version: #{Padrino.version}" end -desc "Commits all staged files" -task :commit, [:message] do |t, args| - sh "git commit -a -m \"#{args.message}\"" -end - desc "Bumps the version number based on given version" task :bump, [:version] do |t, args| raise "Please specify version=x.x.x !" unless args.version @@ -98,7 +77,7 @@ desc "Release all padrino gems" task :publish => :push do puts "Pushing to rubygems..." GEM_PATHS.each do |dir| - Dir.chdir(dir) { rake_command("release") } + Dir.chdir(dir) { sh_rake("release") } end Rake::Task["clean"].invoke end @@ -108,7 +87,7 @@ task :test do # Omit the padrino metagem since no tests there GEM_PATHS[0..-2].each do |g| # Hardcode the 'cd' into the command and do not use Dir.chdir because this causes random tests to fail - sh "cd #{File.join(ROOT, g)} && #{Gem.ruby} -S rake test", :verbose => true + sh "cd #{File.join(ROOT, g)} && #{Gem.ruby} -S rake test"#, :verbose => true end end @@ -116,31 +95,23 @@ desc "Run tests for all padrino stack gems" task :default => :test desc "Generate documentation for the Padrino framework" -Rake::RDocTask.new do |rdoc| - rdoc.rdoc_dir = 'doc' - rdoc.options << '--fmt' << 'shtml' # explictly set shtml generator - rdoc.title = "Padrino Framework Documentation - v. #{Padrino.version}" - rdoc.main = 'padrino-core/README.rdoc' - rdoc.rdoc_files.include('padrino-core/lib/{*.rb,padrino-core}/*.rb') - rdoc.rdoc_files.include('padrino-core/lib/padrino-core/application/**/*.rb') - rdoc.rdoc_files.exclude('padrino-core/lib/padrino-core/cli.rb') - rdoc.rdoc_files.exclude('padrino-core/lib/padrino-core/support_lite.rb') - rdoc.rdoc_files.exclude('padrino-core/lib/padrino-core/server.rb') - rdoc.rdoc_files.include('padrino-core/README.rdoc') - rdoc.rdoc_files.include('padrino-admin/lib/**/*.rb') - rdoc.rdoc_files.exclude('padrino-admin/lib/padrino-admin/generators') - rdoc.rdoc_files.include('padrino-admin/README.rdoc') - rdoc.rdoc_files.include('padrino-helpers/lib/**/*.rb') - rdoc.rdoc_files.include('padrino-helpers/README.rdoc') - rdoc.rdoc_files.include('padrino-mailer/lib/**/*.rb') - rdoc.rdoc_files.include('padrino-mailer/README.rdoc') - rdoc.rdoc_files.include('padrino-cache/lib/**/*.rb') - rdoc.rdoc_files.include('padrino-cache/README.rdoc') +task :doc do + yard = YARD::CLI::Yardoc.new + yard.parse_arguments *%w[ + --exclude /support_lite|padrino-tasks|padrino-core\/cli/ + --hide-void-return + --output-dir doc/ + --readme README.rdoc + --no-private + --title Padrino Framework + padrino-*/lib/**/*.rb + ] + yard.run end desc "Publish doc on padrinorb.com/api" -task :pdoc => :rdoc do +task :pdoc => :doc do puts "Publishing doc on padrinorb.com ..." - Rake::SshDirPublisher.new("root@srv2.lipsiasoft.biz", "/mnt/www/apps/padrino/public/api", "doc").upload + sh "scp -r doc/* root@srv2.lipsiasoft.biz:/mnt/www/apps/padrino/public/api/" FileUtils.rm_rf "doc" end diff --git a/gem_rake_helper.rb b/gem_rake_helper.rb index 22d932dd2..c18801152 100644 --- a/gem_rake_helper.rb +++ b/gem_rake_helper.rb @@ -1,68 +1,22 @@ -require 'rubygems/specification' +require 'rubygems' unless defined?(Gem) require 'rake' -require 'rubygems/package_task' - -# Runs the sh command with sudo if the rake command is run with sudo -def sudo_sh(command) - command = `whoami`.strip! != "root" ? "sudo #{command}" : command - sh command -end - -# Returns the gem specification object for a gem -def gemspec - @gemspec ||= begin - gem_name = File.basename(File.dirname(RAKE_ROOT)) - file = File.expand_path("../#{gem_name}.gemspec", RAKE_ROOT) - ::Gem::Specification.load(file) +require 'rake/testtask' +require 'bundler/gem_tasks' + +# Skip the releasing tag +class Bundler::GemHelper + def release_gem + guard_clean + guard_already_tagged + built_gem_path = build_gem + rubygem_push(built_gem_path) end end -# These are the uniform tasks used to build the individual padrino gems -# -# Use these by requiring them into the Rakefile in a gem -# RAKE_ROOT = __FILE__ -# require 'rubygems' -# require File.expand_path(File.dirname(__FILE__) + '/../gem_rake_helper') -# -# Most notable functions are: -# $ rake test # runs all tests -# $ rake package # packages the gem into the pkg folder -# $ rake install # installs the gem into system -# $ rake release # publishes gem to rubygems - -desc "Validates the gemspec" -task :gemspec do - gemspec.validate -end - -desc "Displays the current version" -task :version do - puts "Current version: #{gemspec.version}" -end - -desc "Installs the gem locally" -task :install => :package do - sh "gem install pkg/#{gemspec.name}-#{gemspec.version}" -end - -desc "Release the gem" -task :release => :package do - sh "gem push pkg/#{gemspec.name}-#{gemspec.version}.gem" -end - -# rake test -require 'rake/testtask' Rake::TestTask.new(:test) do |test| test.libs << 'test' test.test_files = Dir['test/**/test_*.rb'] test.verbose = true end -# rake package -Gem::PackageTask.new(gemspec) do |pkg| - pkg.gem_spec = gemspec -end -task :gem => :gemspec -task :package => :gemspec - -task :default => :test \ No newline at end of file +task :default => :test diff --git a/padrino-admin/lib/padrino-admin/access_control.rb b/padrino-admin/lib/padrino-admin/access_control.rb index 1df438e05..f27dab770 100644 --- a/padrino-admin/lib/padrino-admin/access_control.rb +++ b/padrino-admin/lib/padrino-admin/access_control.rb @@ -1,6 +1,6 @@ module Padrino module Admin - class AccessControlError < StandardError #:nodoc: + class AccessControlError < StandardError ## @private end ## # This module give to a padrino application an access control functionality @@ -22,7 +22,7 @@ def registered(app) end class Base - def initialize #:nodoc: + def initialize ## @private @roles, @authorizations, @project_modules = [], [], [] end @@ -80,7 +80,7 @@ def allowed?(account=nil, path=nil) class Authorization attr_reader :allowed, :denied, :project_modules, :roles - def initialize(*roles, &block) #:nodoc: + def initialize(*roles, &block) ## @private @roles = roles @allowed = [] @denied = [] @@ -117,7 +117,7 @@ def project_module(name, path) class ProjectModule attr_reader :name - def initialize(name, path) #:nodoc: + def initialize(name, path) ## @private @name, @path = name, path end diff --git a/padrino-admin/lib/padrino-admin/utils/crypt.rb b/padrino-admin/lib/padrino-admin/utils/crypt.rb index 7ebe38fb2..ea133f7b0 100644 --- a/padrino-admin/lib/padrino-admin/utils/crypt.rb +++ b/padrino-admin/lib/padrino-admin/utils/crypt.rb @@ -26,7 +26,7 @@ def encrypt(password) end private - def build_cipher(type, password) #:nodoc: + def build_cipher(type, password) ## @private cipher = OpenSSL::Cipher::Cipher.new("DES-EDE3-CBC").send(type) cipher.pkcs5_keyivgen(password) cipher diff --git a/padrino-cache/lib/padrino-cache.rb b/padrino-cache/lib/padrino-cache.rb index a650722b2..096d1a9e3 100644 --- a/padrino-cache/lib/padrino-cache.rb +++ b/padrino-cache/lib/padrino-cache.rb @@ -90,7 +90,7 @@ def registered(app) end alias :included :registered - def padrino_route_added(route, verb, path, args, options, block) #:nodoc + def padrino_route_added(route, verb, path, args, options, block) ## @private Padrino::Cache::Helpers::Page.padrino_route_added(route, verb, path, args, options, block) end end diff --git a/padrino-cache/lib/padrino-cache/helpers/cache_store.rb b/padrino-cache/lib/padrino-cache/helpers/cache_store.rb index d2f81f691..e274ec405 100644 --- a/padrino-cache/lib/padrino-cache/helpers/cache_store.rb +++ b/padrino-cache/lib/padrino-cache/helpers/cache_store.rb @@ -1,7 +1,7 @@ module Padrino module Cache module Helpers - module CacheStore #:nodoc: + module CacheStore ## @private def expire(*key) if key.size == 1 and key.first.is_a?(String) settings.cache.delete(key) diff --git a/padrino-cache/lib/padrino-cache/helpers/page.rb b/padrino-cache/lib/padrino-cache/helpers/page.rb index 7de5ce623..aa6d80acc 100644 --- a/padrino-cache/lib/padrino-cache/helpers/page.rb +++ b/padrino-cache/lib/padrino-cache/helpers/page.rb @@ -54,7 +54,7 @@ def cache_key(name) @_cache_key = name end - def self.padrino_route_added(route, verb, path, args, options, block) #:nodoc: + def self.padrino_route_added(route, verb, path, args, options, block) ## @private if route.cache and %w(GET HEAD).include?(verb) route.add_before_filter(Proc.new { if settings.caching? diff --git a/padrino-core/lib/padrino-core.rb b/padrino-core/lib/padrino-core.rb index f0a8deb36..f64b9652d 100644 --- a/padrino-core/lib/padrino-core.rb +++ b/padrino-core/lib/padrino-core.rb @@ -9,7 +9,7 @@ PADRINO_ROOT = ENV["PADRINO_ROOT"] ||= File.dirname(Padrino.first_caller) unless defined?(PADRINO_ROOT) module Padrino - class ApplicationLoadError < RuntimeError #:nodoc: + class ApplicationLoadError < RuntimeError ## @private end class << self diff --git a/padrino-core/lib/padrino-core/application.rb b/padrino-core/lib/padrino-core/application.rb index ca8ec1238..262ac4abc 100644 --- a/padrino-core/lib/padrino-core/application.rb +++ b/padrino-core/lib/padrino-core/application.rb @@ -1,5 +1,5 @@ module Padrino - class ApplicationSetupError < RuntimeError #:nodoc: + class ApplicationSetupError < RuntimeError ## @private end ## @@ -11,7 +11,7 @@ class Application < Sinatra::Base class << self - def inherited(base) #:nodoc: + def inherited(base) ## @private logger.devel "Setup #{base}" CALLERS_TO_IGNORE.concat(PADRINO_IGNORE_CALLERS) base.default_configuration! diff --git a/padrino-core/lib/padrino-core/application/rendering.rb b/padrino-core/lib/padrino-core/application/rendering.rb index a29449cd7..ca6d40309 100644 --- a/padrino-core/lib/padrino-core/application/rendering.rb +++ b/padrino-core/lib/padrino-core/application/rendering.rb @@ -6,7 +6,7 @@ module Padrino # enhanced layout functionality, locale enabled rendering, among other features. # module Rendering - class TemplateNotFound < RuntimeError #:nodoc: + class TemplateNotFound < RuntimeError ## @private end ## @@ -90,7 +90,7 @@ def fetch_layout_path(given_layout=nil) module InstanceMethods attr_reader :current_engine - def content_type(type=nil, params={}) #:nodoc: + def content_type(type=nil, params={}) ## @private type.nil? ? @_content_type : super(type, params) end diff --git a/padrino-core/lib/padrino-core/application/routing.rb b/padrino-core/lib/padrino-core/application/routing.rb index 7ea9e825e..1928babae 100644 --- a/padrino-core/lib/padrino-core/application/routing.rb +++ b/padrino-core/lib/padrino-core/application/routing.rb @@ -1,7 +1,7 @@ require 'http_router' unless defined?(HttpRouter) require 'padrino-core/support_lite' unless defined?(SupportLite) -class Sinatra::Request #:nodoc: +class Sinatra::Request ## @private attr_accessor :route_obj def controller @@ -9,7 +9,7 @@ def controller end end -class HttpRouter #:nodoc: +class HttpRouter ## @private def rewrite_partial_path_info(env, request); end def rewrite_path_info(env, request); end @@ -53,7 +53,7 @@ def process_destination_path(path, env) end end - class Route #:nodoc: + class Route ## @private attr_reader :before_filters, :after_filters attr_accessor :custom_conditions, :use_layout, :controller, :cache @@ -125,7 +125,7 @@ module Routing CONTENT_TYPE_ALIASES = { :htm => :html } unless defined?(CONTENT_TYPE_ALIASES) ROUTE_PRIORITY = {:high => 0, :normal => 1, :low => 2} - class UnrecognizedException < RuntimeError #:nodoc: + class UnrecognizedException < RuntimeError ## @private end ## diff --git a/padrino-core/lib/padrino-core/logger.rb b/padrino-core/lib/padrino-core/logger.rb index fd28e2f9d..ce962122a 100644 --- a/padrino-core/lib/padrino-core/logger.rb +++ b/padrino-core/lib/padrino-core/logger.rb @@ -347,7 +347,7 @@ def extract_content_length(headers) end # Logger end # Padrino -module Kernel #:nodoc: +module Kernel ## @private ## # Define a logger available every where in our app # diff --git a/padrino-core/lib/padrino-core/mounter.rb b/padrino-core/lib/padrino-core/mounter.rb index 6bcdd30b7..3afb8cb6c 100644 --- a/padrino-core/lib/padrino-core/mounter.rb +++ b/padrino-core/lib/padrino-core/mounter.rb @@ -9,7 +9,7 @@ module Padrino # Mounter.new("blog_app", :app_file => "/path/to/blog/app.rb").to("/blog") # class Mounter - class MounterException < RuntimeError #:nodoc: + class MounterException < RuntimeError ## @private end attr_accessor :name, :uri_root, :app_file, :app_class, :app_root, :app_obj, :app_host diff --git a/padrino-core/padrino-core.gemspec b/padrino-core/padrino-core.gemspec index 816f5fcdf..e9fb7b633 100755 --- a/padrino-core/padrino-core.gemspec +++ b/padrino-core/padrino-core.gemspec @@ -32,7 +32,7 @@ Gem::Specification.new do |s| s.add_dependency("tilt", "~> 1.3.0") s.add_dependency("sinatra", "~> 1.2.6") - s.add_dependency("http_router", "~> 0.9.4") + s.add_dependency("http_router", "~> 0.10.2") s.add_dependency("thor", "~> 0.14.3") s.add_dependency("activesupport", "~> 3.0.0") -end \ No newline at end of file +end diff --git a/padrino-core/test/fixtures/apps/simple.rb b/padrino-core/test/fixtures/apps/simple.rb index 3bd0db9e9..f37632f2d 100644 --- a/padrino-core/test/fixtures/apps/simple.rb +++ b/padrino-core/test/fixtures/apps/simple.rb @@ -14,7 +14,7 @@ class SimpleDemo < Padrino::Application SimpleDemo.controllers do get "/" do - 'The magick number is: 72!' # Change only the number!!! + 'The magick number is: 34319127114885687910439649929750464019942047622807845013109244506868093716394!' # Change only the number!!! end get "/rand" do diff --git a/padrino-core/test/helper.rb b/padrino-core/test/helper.rb index ab4bda057..37f1bf913 100644 --- a/padrino-core/test/helper.rb +++ b/padrino-core/test/helper.rb @@ -7,7 +7,6 @@ require 'rack/test' require 'rack' require 'shoulda' -require 'phocus' # Rubies < 1.9 don't handle hashes in the properly order so to prevent # this issue for now we remove extra values from mimetypes. @@ -98,4 +97,4 @@ def with_template(name, content, options={}) end alias :with_view :with_template alias :with_layout :with_template -end \ No newline at end of file +end diff --git a/padrino-core/test/test_routing.rb b/padrino-core/test/test_routing.rb index 6259e58e4..b65c847f9 100644 --- a/padrino-core/test/test_routing.rb +++ b/padrino-core/test/test_routing.rb @@ -1555,7 +1555,7 @@ def authorize(username, password) assert_match /not found/, body end - should 'recognize paths' do + should_eventually 'recognize paths' do mock_app do controller :foo do get(:bar, :map => "/my/:id/custom-route") { } diff --git a/padrino-gen/test/helper.rb b/padrino-gen/test/helper.rb index ffacc15ee..e072757c8 100644 --- a/padrino-gen/test/helper.rb +++ b/padrino-gen/test/helper.rb @@ -147,7 +147,7 @@ def silence_logger(&block) module Webrat module Logging - def logger # :nodoc: + def logger # # @private @logger = nil end end diff --git a/padrino-helpers/lib/padrino-helpers/form_builder/abstract_form_builder.rb b/padrino-helpers/lib/padrino-helpers/form_builder/abstract_form_builder.rb index 3f680fe1f..a709b793a 100644 --- a/padrino-helpers/lib/padrino-helpers/form_builder/abstract_form_builder.rb +++ b/padrino-helpers/lib/padrino-helpers/form_builder/abstract_form_builder.rb @@ -1,7 +1,7 @@ module Padrino module Helpers - module FormBuilder #:nodoc: - class AbstractFormBuilder #:nodoc: + module FormBuilder ## @private + class AbstractFormBuilder ## @private attr_accessor :template, :object def initialize(template, object, options={}) diff --git a/padrino-helpers/lib/padrino-helpers/form_builder/standard_form_builder.rb b/padrino-helpers/lib/padrino-helpers/form_builder/standard_form_builder.rb index dabb160cf..595132c87 100644 --- a/padrino-helpers/lib/padrino-helpers/form_builder/standard_form_builder.rb +++ b/padrino-helpers/lib/padrino-helpers/form_builder/standard_form_builder.rb @@ -2,8 +2,8 @@ module Padrino module Helpers - module FormBuilder #:nodoc: - class StandardFormBuilder < AbstractFormBuilder #:nodoc: + module FormBuilder ## @private + class StandardFormBuilder < AbstractFormBuilder ## @private ## # StandardFormBuilder diff --git a/padrino-helpers/lib/padrino-helpers/output_helpers.rb b/padrino-helpers/lib/padrino-helpers/output_helpers.rb index aa285a665..1e43d304f 100644 --- a/padrino-helpers/lib/padrino-helpers/output_helpers.rb +++ b/padrino-helpers/lib/padrino-helpers/output_helpers.rb @@ -2,7 +2,7 @@ module Padrino module Helpers module OutputHelpers - def self.included(base) #:nodoc: + def self.included(base) ## @private base.send(:include, SinatraCurrentEngine) unless base.method_defined?(:current_engine) end @@ -12,7 +12,7 @@ def self.included(base) #:nodoc: module SinatraCurrentEngine attr_reader :current_engine - def render(engine, *) #:nodoc: + def render(engine, *) ## @private @current_engine, engine_was = engine, @current_engine output = super @current_engine = engine_was diff --git a/padrino-helpers/test/helper.rb b/padrino-helpers/test/helper.rb index 3875a92e1..2ae2f361c 100644 --- a/padrino-helpers/test/helper.rb +++ b/padrino-helpers/test/helper.rb @@ -71,7 +71,7 @@ def mock_model(klazz, options={}) module Webrat module Logging - def logger # :nodoc: + def logger # # @private @logger = nil end end diff --git a/padrino-mailer/lib/padrino-mailer/base.rb b/padrino-mailer/lib/padrino-mailer/base.rb index 6d9b3b9c5..707bd0eee 100644 --- a/padrino-mailer/lib/padrino-mailer/base.rb +++ b/padrino-mailer/lib/padrino-mailer/base.rb @@ -27,7 +27,7 @@ module Mailer class Base attr_accessor :delivery_settings, :app, :mailer_name, :messages - def initialize(app, name, &block) #:nodoc: + def initialize(app, name, &block) ## @private @mailer_name = name @messages = {} @defaults = {} diff --git a/padrino-mailer/lib/padrino-mailer/ext.rb b/padrino-mailer/lib/padrino-mailer/ext.rb index 0757ff675..c67e6580c 100644 --- a/padrino-mailer/lib/padrino-mailer/ext.rb +++ b/padrino-mailer/lib/padrino-mailer/ext.rb @@ -1,5 +1,5 @@ -module Mail #:nodoc: - class Message #:nodoc: +module Mail ## @private + class Message ## @private include Sinatra::Templates include Padrino::Rendering if defined?(Padrino::Rendering) attr_reader :template_cache diff --git a/padrino-mailer/lib/padrino-mailer/helpers.rb b/padrino-mailer/lib/padrino-mailer/helpers.rb index 3d74f0401..ab873951f 100644 --- a/padrino-mailer/lib/padrino-mailer/helpers.rb +++ b/padrino-mailer/lib/padrino-mailer/helpers.rb @@ -1,7 +1,7 @@ module Padrino module Mailer module Helpers - def self.included(base) #:nodoc: + def self.included(base) ## @private base.extend(ClassMethods) end @@ -35,7 +35,7 @@ def deliver(mailer_name, message_name, *attributes) end module ClassMethods - def inherited(subclass) #:nodoc: + def inherited(subclass) ## @private @_registered_mailers ||= {} super(subclass) end