From 3a83d9d3cecfc754c8480fb0509c679bf0f7299a Mon Sep 17 00:00:00 2001 From: Cuong Tran Date: Sat, 21 Dec 2013 06:10:32 -0800 Subject: [PATCH 1/2] Pump version to 2.6.1 which fixes #22 --- annotate.gemspec | 10 ++++++---- lib/annotate/version.rb | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) 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/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 From c3e75eed4c549e42853d6f53595b2097bdacc161 Mon Sep 17 00:00:00 2001 From: Orban Botond Date: Fri, 27 Dec 2013 13:26:22 +0200 Subject: [PATCH 2/2] FIX #157 --- annotate.gemspec | 4 +--- lib/annotate/annotate_models.rb | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/annotate.gemspec b/annotate.gemspec index f13b5aa18..1560f5289 100644 --- a/annotate.gemspec +++ b/annotate.gemspec @@ -1,6 +1,4 @@ -# This file is auto-generated! -# DO NOT EDIT THIS FILE DIRECTLY! -# Instead, edit the Rakefile and run 'rake gems:gemspec'.# -*- encoding: utf-8 -*- +# -*- encoding: utf-8 -*- # stub: annotate 2.6.1 ruby lib Gem::Specification.new do |s| diff --git a/lib/annotate/annotate_models.rb b/lib/annotate/annotate_models.rb index efaefc2bc..0c848dec6 100644 --- a/lib/annotate/annotate_models.rb +++ b/lib/annotate/annotate_models.rb @@ -131,6 +131,11 @@ def get_schema_info(klass, header, options = {}) end end + # Check out if we got an array column + if col.respond_to?(:array) && col.array + attrs << "is an Array" + end + # Check out if we got a geometric column # and print the type and SRID if col.respond_to?(:geometry_type)