diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 000000000..7319d9cec --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,55 @@ +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 diff --git a/README.rdoc b/README.rdoc index 010b0e117..eacbcd84c 100644 --- a/README.rdoc +++ b/README.rdoc @@ -33,7 +33,7 @@ The schema comment looks like this: . . . It also annotates geometrical columns, geom type and srid, when using -`SpatialAdapter`, `PostgisAdapter` or `PostGISAdapter`: ++SpatialAdapter+, +PostgisAdapter+ or +PostGISAdapter+: # == Schema Info # @@ -43,7 +43,7 @@ It also annotates geometrical columns, geom type and srid, when using # path :geometry line_string, 4326 Also, if you pass the -r option, it'll annotate routes.rb with the output of -`rake routes`. ++rake routes+. == Install @@ -70,7 +70,7 @@ Into environment gems from Github checkout: == 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 @@ -105,9 +105,9 @@ To remove routes.rb annotations: === Usage Outside of Rails -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 -or more `--model-dir` options to inform annotate about the structure of your +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 +or more +--model-dir+ options to inform annotate about the structure of your project and help it bootstrap and load the relevant code. @@ -121,7 +121,7 @@ anywhere in the file: === 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: rails g annotate:install @@ -132,8 +132,8 @@ added (top or bottom of file), and in which artifacts. == Rails Integration By default, once you've generated a configuration file, annotate will be -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 +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 change: 'skip_on_db_migrate' => "false", @@ -142,9 +142,9 @@ To: '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 -`.rake` file: ++.rake+ file: skip_on_db_migrate=1 rake db:migrate @@ -188,21 +188,21 @@ migrations were run). If you prefer to sort alphabetically so that the results of annotation are consistent regardless of what order migrations are executed in, -use --sort. +use +--sort+. == Markdown The format produced is actually MultiMarkdown, making use of the syntax -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, -specify a format of markdown with `kramdown` as the provider by adding this to -your `.yardopts` file: +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, +specify a format of markdown with +kramdown+ as the provider by adding this to +your +.yardopts+ file: --markup markdown --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 @@ -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. 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 @@ -244,4 +244,3 @@ Released under the same license as Ruby. No Support. No Warranty. == Authors {See AUTHORS.rdoc}[link:AUTHORS.rdoc]. - diff --git a/annotate.gemspec b/annotate.gemspec index 914ff79c9..f13b5aa18 100644 --- a/annotate.gemspec +++ b/annotate.gemspec @@ -1,23 +1,25 @@ # This file is auto-generated! # DO NOT EDIT THIS FILE DIRECTLY! # Instead, edit the Rakefile and run 'rake gems:gemspec'.# -*- encoding: utf-8 -*- +# stub: annotate 2.6.1 ruby lib Gem::Specification.new do |s| 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.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.email = ["alex@stinky.com", "ctran@pragmaquest.com", "x@nofxx.com", "turadg@aleahmad.net", "jon@cloudability.com"] s.executables = ["annotate"] 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.licenses = ["Ruby"] s.require_paths = ["lib"] 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." if s.respond_to? :specification_version then diff --git a/bin/annotate b/bin/annotate index c2b70a2b7..657a22a63 100755 --- a/bin/annotate +++ b/bin/annotate @@ -119,7 +119,8 @@ OptionParser.new do |opts| 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" } end diff --git a/lib/annotate/version.rb b/lib/annotate/version.rb index 405cfb517..417f51d3f 100644 --- a/lib/annotate/version.rb +++ b/lib/annotate/version.rb @@ -1,5 +1,5 @@ module Annotate def self.version - '2.6.0' + '2.6.1' end end