From 7b330655899417c144a58b0c86958cb4a33ae168 Mon Sep 17 00:00:00 2001 From: Andrew Goodnough Date: Fri, 22 May 2015 17:19:04 -0500 Subject: [PATCH 1/5] Runs annotate on 'rake db:rollback' too --- lib/tasks/migrate.rake | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/lib/tasks/migrate.rake b/lib/tasks/migrate.rake index 2935213bc..5b334c0ed 100644 --- a/lib/tasks/migrate.rake +++ b/lib/tasks/migrate.rake @@ -2,20 +2,22 @@ # (They are not used to build annotate itself.) # Append annotations to Rake tasks for ActiveRecord, so annotate automatically gets -# run after doing db:migrate. +# run after doing db:migrate. # Unfortunately it relies on ENV for options; it'd be nice to be able to set options # in a per-project config file so this task can read them. namespace :db do - task :migrate do - Annotate::Migration.update_annotations - end + [:migrate, :rollback].each do |cmd| + task cmd do + Annotate::Migration.update_annotations + end - namespace :migrate do - [:change, :up, :down, :reset, :redo].each do |t| - task t do - Annotate::Migration.update_annotations + namespace cmd do + [:change, :up, :down, :reset, :redo].each do |t| + task t do + Annotate::Migration.update_annotations + end end - end + end end end @@ -26,7 +28,7 @@ module Annotate def self.update_annotations unless @@working || (ENV['skip_on_db_migrate'] =~ /(true|t|yes|y|1)$/i) @@working = true - Rake::Task['annotate_models'].invoke + Rake::Task['annotate_models'].invoke end end end From 8f3aeb1002d168218071087af98cd5fa96904d63 Mon Sep 17 00:00:00 2001 From: Cuong Tran Date: Tue, 16 Jun 2015 13:42:33 -0700 Subject: [PATCH 2/5] Revert "Runs annotate on 'rake db:rollback' too" --- lib/tasks/migrate.rake | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/tasks/migrate.rake b/lib/tasks/migrate.rake index 5b334c0ed..2935213bc 100644 --- a/lib/tasks/migrate.rake +++ b/lib/tasks/migrate.rake @@ -2,22 +2,20 @@ # (They are not used to build annotate itself.) # Append annotations to Rake tasks for ActiveRecord, so annotate automatically gets -# run after doing db:migrate. +# run after doing db:migrate. # Unfortunately it relies on ENV for options; it'd be nice to be able to set options # in a per-project config file so this task can read them. namespace :db do - [:migrate, :rollback].each do |cmd| - task cmd do - Annotate::Migration.update_annotations - end + task :migrate do + Annotate::Migration.update_annotations + end - namespace cmd do - [:change, :up, :down, :reset, :redo].each do |t| - task t do - Annotate::Migration.update_annotations - end + namespace :migrate do + [:change, :up, :down, :reset, :redo].each do |t| + task t do + Annotate::Migration.update_annotations end - end + end end end @@ -28,7 +26,7 @@ module Annotate def self.update_annotations unless @@working || (ENV['skip_on_db_migrate'] =~ /(true|t|yes|y|1)$/i) @@working = true - Rake::Task['annotate_models'].invoke + Rake::Task['annotate_models'].invoke end end end From d3a135de5e3d4d5d853c7d0b9c51819f7bbae6b7 Mon Sep 17 00:00:00 2001 From: Cuong Tran Date: Wed, 9 Feb 2022 21:48:58 -0800 Subject: [PATCH 3/5] bump: version to 3.2.0 --- lib/annotate/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/annotate/version.rb b/lib/annotate/version.rb index d08e5a822..e103c6b87 100644 --- a/lib/annotate/version.rb +++ b/lib/annotate/version.rb @@ -1,5 +1,5 @@ module Annotate def self.version - '3.1.1' + '3.2.0' end end From 4319ec855b4d13a136ab3a373aed825857b2a528 Mon Sep 17 00:00:00 2001 From: Cuong Tran Date: Wed, 9 Feb 2022 21:57:15 -0800 Subject: [PATCH 4/5] Bump version to 3.2.0 --- lib/annotate/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/annotate/version.rb b/lib/annotate/version.rb index d08e5a822..e103c6b87 100644 --- a/lib/annotate/version.rb +++ b/lib/annotate/version.rb @@ -1,5 +1,5 @@ module Annotate def self.version - '3.1.1' + '3.2.0' end end From 11c0a4aa8b6e6693fa9d99037ed8217e29d356b7 Mon Sep 17 00:00:00 2001 From: Wladimir Braguini Domingues Date: Thu, 26 Dec 2024 16:03:38 -0300 Subject: [PATCH 5/5] fix: work with rails 8 --- Gemfile | 2 +- annotate.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 4acd9cb84..b08aaaa09 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' ruby '>= 2.4.0' -gem 'activerecord', '>= 4.2.5', '< 6', require: false +gem 'activerecord', '>= 4.2.5', '< 8.2', require: false gem 'rake', require: false group :development do diff --git a/annotate.gemspec b/annotate.gemspec index 43b2ac990..7d0efc745 100644 --- a/annotate.gemspec +++ b/annotate.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |s| s.specification_version = 4 if s.respond_to? :specification_version s.add_runtime_dependency(%q, '>= 10.4', '< 14.0') - s.add_runtime_dependency(%q, ['>= 3.2', '< 8.0']) + s.add_runtime_dependency(%q, ['>= 3.2', '< 8.2']) s.metadata = { "bug_tracker_uri" => "https://github.com/ctran/annotate_models/issues/",