Commit eb633bcf by Cuong Tran

Merge branch 'release/2.6.1'

parents 8c4f3999 3a83d9d3
You can redistribute it and/or modify it under either the terms of the
2-clause BSDL (see the file BSDL), or the conditions below:
1. You may make and give away verbatim copies of the source form of the
software without restriction, provided that you duplicate all of the
original copyright notices and associated disclaimers.
2. You may modify your copy of the software in any way, provided that
you do at least ONE of the following:
a) place your modifications in the Public Domain or otherwise
make them Freely Available, such as by posting said
modifications to Usenet or an equivalent medium, or by allowing
the author to include your modifications in the software.
b) use the modified software only within your corporation or
organization.
c) give non-standard binaries non-standard names, with
instructions on where to get the original software distribution.
d) make other distribution arrangements with the author.
3. You may distribute the software in object code or binary form,
provided that you do at least ONE of the following:
a) distribute the binaries and library files of the software,
together with instructions (in the manual page or equivalent)
on where to get the original distribution.
b) accompany the distribution with the machine-readable source of
the software.
c) give non-standard binaries non-standard names, with
instructions on where to get the original software distribution.
d) make other distribution arrangements with the author.
4. You may modify and include the part of the software into any other
software (possibly commercial). But some files in the distribution
are not written by the author, so that they are not under these terms.
For the list of those files and their copying conditions, see the
file LEGAL.
5. The scripts and library files supplied as input to or produced as
output from the software do not automatically fall under the
copyright of the software, but belong to whomever generated them,
and may be sold commercially, and may be aggregated with this
software.
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.
\ No newline at end of file
...@@ -33,7 +33,7 @@ The schema comment looks like this: ...@@ -33,7 +33,7 @@ The schema comment looks like this:
. . . . . .
It also annotates geometrical columns, geom type and srid, when using It also annotates geometrical columns, geom type and srid, when using
`SpatialAdapter`, `PostgisAdapter` or `PostGISAdapter`: +SpatialAdapter+, +PostgisAdapter+ or +PostGISAdapter+:
# == Schema Info # == Schema Info
# #
...@@ -43,7 +43,7 @@ It also annotates geometrical columns, geom type and srid, when using ...@@ -43,7 +43,7 @@ It also annotates geometrical columns, geom type and srid, when using
# path :geometry line_string, 4326 # path :geometry line_string, 4326
Also, if you pass the -r option, it'll annotate routes.rb with the output of Also, if you pass the -r option, it'll annotate routes.rb with the output of
`rake routes`. +rake routes+.
== Install == Install
...@@ -70,7 +70,7 @@ Into environment gems from Github checkout: ...@@ -70,7 +70,7 @@ Into environment gems from Github checkout:
== Usage == Usage
(If you used the Gemfile install, prefix the below commands with `bundle exec`.) (If you used the Gemfile install, prefix the below commands with +bundle exec+.)
=== Usage in Rails === Usage in Rails
...@@ -105,9 +105,9 @@ To remove routes.rb annotations: ...@@ -105,9 +105,9 @@ To remove routes.rb annotations:
=== Usage Outside of Rails === Usage Outside of Rails
Everything above applies, except that --routes is not meaningful, and you will Everything above applies, except that +--routes+ is not meaningful, and you will
probably need to explicitly set one or more `--require` option(s), and/or one probably need to explicitly set one or more +--require+ option(s), and/or one
or more `--model-dir` options to inform annotate about the structure of your or more +--model-dir+ options to inform annotate about the structure of your
project and help it bootstrap and load the relevant code. project and help it bootstrap and load the relevant code.
...@@ -121,7 +121,7 @@ anywhere in the file: ...@@ -121,7 +121,7 @@ anywhere in the file:
=== Configuration in Rails === Configuration in Rails
To generate a configuration file (in the form of a `.rake` file), to set To generate a configuration file (in the form of a +.rake+ file), to set
default options: default options:
rails g annotate:install rails g annotate:install
...@@ -132,8 +132,8 @@ added (top or bottom of file), and in which artifacts. ...@@ -132,8 +132,8 @@ added (top or bottom of file), and in which artifacts.
== Rails Integration == Rails Integration
By default, once you've generated a configuration file, annotate will be By default, once you've generated a configuration file, annotate will be
executed whenever you run `rake db:migrate` (but only in development mode). executed whenever you run +rake db:migrate+ (but only in development mode).
If you want to disable this behavior permanently, edit the `.rake` file and If you want to disable this behavior permanently, edit the +.rake+ file and
change: change:
'skip_on_db_migrate' => "false", 'skip_on_db_migrate' => "false",
...@@ -142,9 +142,9 @@ To: ...@@ -142,9 +142,9 @@ To:
'skip_on_db_migrate' => "true", 'skip_on_db_migrate' => "true",
If you want to run `rake db:migrate` as a one-off without running annotate, If you want to run +rake db:migrate+ as a one-off without running annotate,
you can do so with a simple environment variable, instead of editing the you can do so with a simple environment variable, instead of editing the
`.rake` file: +.rake+ file:
skip_on_db_migrate=1 rake db:migrate skip_on_db_migrate=1 rake db:migrate
...@@ -188,21 +188,21 @@ migrations were run). ...@@ -188,21 +188,21 @@ migrations were run).
If you prefer to sort alphabetically so that the results of If you prefer to sort alphabetically so that the results of
annotation are consistent regardless of what order migrations are executed in, annotation are consistent regardless of what order migrations are executed in,
use --sort. use +--sort+.
== Markdown == Markdown
The format produced is actually MultiMarkdown, making use of the syntax The format produced is actually MultiMarkdown, making use of the syntax
extension for tables. It's recommended you use `kramdown` as your parser if extension for tables. It's recommended you use +kramdown+ as your parser if
you want to use this format. If you're using `yard` to generate documentation, you want to use this format. If you're using +yard+ to generate documentation,
specify a format of markdown with `kramdown` as the provider by adding this to specify a format of markdown with +kramdown+ as the provider by adding this to
your `.yardopts` file: your +.yardopts+ file:
--markup markdown --markup markdown
--markup-provider kramdown --markup-provider kramdown
Be sure to add this to your `Gemfile` as well: Be sure to add this to your +Gemfile+ as well:
gem 'kramdown', :groups => [:development], :require => false gem 'kramdown', :groups => [:development], :require => false
...@@ -214,7 +214,7 @@ will blow away the initial/final comment block in your models if it looks like ...@@ -214,7 +214,7 @@ will blow away the initial/final comment block in your models if it looks like
it was previously added by this gem. it was previously added by this gem.
Be sure to check the changes that this tool makes! If you are using Git, Be sure to check the changes that this tool makes! If you are using Git,
you may simply check your project's status after running `annotate`: you may simply check your project's status after running +annotate+:
$ git status $ git status
...@@ -244,4 +244,3 @@ Released under the same license as Ruby. No Support. No Warranty. ...@@ -244,4 +244,3 @@ Released under the same license as Ruby. No Support. No Warranty.
== Authors == Authors
{See AUTHORS.rdoc}[link:AUTHORS.rdoc]. {See AUTHORS.rdoc}[link:AUTHORS.rdoc].
# This file is auto-generated! # This file is auto-generated!
# DO NOT EDIT THIS FILE DIRECTLY! # DO NOT EDIT THIS FILE DIRECTLY!
# Instead, edit the Rakefile and run 'rake gems:gemspec'.# -*- encoding: utf-8 -*- # Instead, edit the Rakefile and run 'rake gems:gemspec'.# -*- encoding: utf-8 -*-
# stub: annotate 2.6.1 ruby lib
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = "annotate" s.name = "annotate"
s.version = "2.6.0" s.version = "2.6.1"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Cuong Tran", "Alex Chaffee", "Marcos Piccinini", "Turadg Aleahmad", "Jon Frisby"] s.authors = ["Cuong Tran", "Alex Chaffee", "Marcos Piccinini", "Turadg Aleahmad", "Jon Frisby"]
s.date = "2013-11-29" s.date = "2013-12-21"
s.description = "Annotates Rails/ActiveRecord Models, routes, fixtures, and others based on the database schema." s.description = "Annotates Rails/ActiveRecord Models, routes, fixtures, and others based on the database schema."
s.email = ["alex@stinky.com", "ctran@pragmaquest.com", "x@nofxx.com", "turadg@aleahmad.net", "jon@cloudability.com"] s.email = ["alex@stinky.com", "ctran@pragmaquest.com", "x@nofxx.com", "turadg@aleahmad.net", "jon@cloudability.com"]
s.executables = ["annotate"] s.executables = ["annotate"]
s.extra_rdoc_files = ["README.rdoc", "CHANGELOG.rdoc", "TODO.rdoc"] s.extra_rdoc_files = ["README.rdoc", "CHANGELOG.rdoc", "TODO.rdoc"]
s.files = ["AUTHORS.rdoc", "CHANGELOG.rdoc", "README.rdoc", "TODO.rdoc", "annotate.gemspec", "bin/annotate", "lib/annotate.rb", "lib/annotate/active_record_patch.rb", "lib/annotate/annotate_models.rb", "lib/annotate/annotate_routes.rb", "lib/annotate/tasks.rb", "lib/annotate/version.rb", "lib/generators/annotate/USAGE", "lib/generators/annotate/install_generator.rb", "lib/generators/annotate/templates/auto_annotate_models.rake", "lib/tasks/annotate_models.rake", "lib/tasks/annotate_routes.rake", "tasks/migrate.rake"] s.files = ["AUTHORS.rdoc", "CHANGELOG.rdoc", "LICENSE.txt", "README.rdoc", "TODO.rdoc", "annotate.gemspec", "bin/annotate", "lib/annotate.rb", "lib/annotate/active_record_patch.rb", "lib/annotate/annotate_models.rb", "lib/annotate/annotate_routes.rb", "lib/annotate/tasks.rb", "lib/annotate/version.rb", "lib/generators/annotate/USAGE", "lib/generators/annotate/install_generator.rb", "lib/generators/annotate/templates/auto_annotate_models.rake", "lib/tasks/annotate_models.rake", "lib/tasks/annotate_routes.rake", "tasks/migrate.rake"]
s.homepage = "http://github.com/ctran/annotate_models" s.homepage = "http://github.com/ctran/annotate_models"
s.licenses = ["Ruby"] s.licenses = ["Ruby"]
s.require_paths = ["lib"] s.require_paths = ["lib"]
s.rubyforge_project = "annotate" s.rubyforge_project = "annotate"
s.rubygems_version = "2.0.6" s.rubygems_version = "2.1.11"
s.summary = "Annotates Rails Models, routes, fixtures, and others based on the database schema." s.summary = "Annotates Rails Models, routes, fixtures, and others based on the database schema."
if s.respond_to? :specification_version then if s.respond_to? :specification_version then
......
...@@ -119,7 +119,8 @@ OptionParser.new do |opts| ...@@ -119,7 +119,8 @@ OptionParser.new do |opts|
end end
end end
opts.on('-e', '--exclude [tests,fixtures,factories]', ['tests','fixtures','factories'], "Do not annotate fixtures, test files, and/or factories") do |exclusions| opts.on('-e', '--exclude [DIRS]', ['tests','fixtures','factories'], "Do not annotate fixtures, test files, and/or factories") do |exclusions|
exclusions ||= %w(tests fixtures factories)
exclusions.each { |exclusion| ENV["exclude_#{exclusion}"] = "yes" } exclusions.each { |exclusion| ENV["exclude_#{exclusion}"] = "yes" }
end end
......
module Annotate module Annotate
def self.version def self.version
'2.6.0' '2.6.1'
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment