Commit 667b76ea by Marcos Piccinini

lil fix and v bump

parent 28916f44
---
:major: 2
:minor: 3
:patch: 0
:patch: 1
......@@ -2,11 +2,11 @@
Gem::Specification.new do |s|
s.name = %q{annotate}
s.version = "2.3.0"
s.version = "2.3.1"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Cuong Tran", "Marcos Piccinini"]
s.date = %q{2009-06-11}
s.date = %q{2009-07-02}
s.default_executable = %q{annotate}
s.email = %q{x@nofxx.com}
s.executables = ["annotate"]
......@@ -18,6 +18,8 @@ Gem::Specification.new do |s|
"History.txt",
"README.rdoc",
"Rakefile",
"VERSION.yml",
"annotate.gemspec",
"bin/annotate",
"lib/annotate.rb",
"lib/annotate/annotate_models.rb",
......@@ -33,7 +35,7 @@ Gem::Specification.new do |s|
s.homepage = %q{http://github.com/nofxx/annotate}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.3}
s.rubygems_version = %q{1.3.4}
s.summary = %q{Annotates Rails Models, routes, and others}
s.test_files = [
"spec/annotate/annotate_models_spec.rb",
......
......@@ -10,6 +10,8 @@ module AnnotateModels
SPEC_MODEL_DIR = File.join("spec", "models")
# Object Daddy http://github.com/flogic/object_daddy/tree/master
EXEMPLARS_DIR = File.join("spec", "exemplars")
# Machinist http://github.com/notahat/machinist
BLUEPRINT = File.join("spec", "blueprint")
def model_dir
@model_dir || "app/models"
......@@ -114,7 +116,7 @@ module AnnotateModels
old_content.sub!(/^# #{COMPAT_PREFIX}.*?\n(#.*\n)*\n/, '')
# Write it back
new_content = options[:position].to_sym == :before ? (info_block + old_content) : (old_content + "\n" + info_block)
new_content = options[:position] == 'before' ? (info_block + old_content) : (old_content + "\n" + info_block)
File.open(file_name, "wb") { |f| f.puts new_content }
true
......
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