Commit 5f17dbf7 by Jon Frisby

Merge remote-tracking branch 'alexch/master' into development

Conflicts: .gitignore Gemfile History.txt Rakefile annotate.gemspec lib/annotate/annotate_models.rb spec/annotate/annotate_models_spec.rb spec/spec_helper.rb todo.txt
parents aa07dc71 2f6dbdc0
......@@ -3,6 +3,7 @@ source :rubygems
group :development do
gem 'jeweler'
gem 'rspec'
gem 'wrong'
end
gem 'activesupport', '>= 3.0.0', :require => nil
GEM
remote: http://rubygems.org/
specs:
ParseTree (3.0.8)
RubyInline (>= 3.7.0)
sexp_processor (>= 3.0.0)
RubyInline (3.11.2)
ZenTest (~> 4.3)
ZenTest (4.6.2)
activesupport (3.0.0)
diff-lcs (1.1.3)
file-tail (1.0.8)
tins (~> 0.3)
git (1.2.5)
jeweler (1.6.4)
bundler (~> 1.0)
git (>= 1.2.5)
rake
predicated (0.2.6)
rake (0.9.2.2)
rspec (2.7.0)
rspec-core (~> 2.7.0)
......@@ -17,6 +26,27 @@ GEM
rspec-expectations (2.7.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.7.0)
ruby2ruby (1.3.1)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
ruby_parser (2.0.6)
sexp_processor (~> 3.0)
sexp_processor (3.1.0)
sourcify (0.5.0)
file-tail (>= 1.0.5)
ruby2ruby (>= 1.2.5)
ruby_parser (>= 2.0.5)
sexp_processor (>= 3.0.5)
tins (0.3.9)
wrong (0.6.1)
ParseTree (~> 3.0)
diff-lcs (~> 1.1.2)
file-tail (~> 1.0)
predicated (>= 0.2.3)
ruby2ruby (~> 1.2)
ruby_parser (~> 2.0.4)
sexp_processor (~> 3.0)
sourcify (>= 0.3.0)
PLATFORMS
ruby
......@@ -25,3 +55,4 @@ DEPENDENCIES
activesupport (>= 3.0.0)
jeweler
rspec
wrong
......@@ -21,8 +21,10 @@
non-standard capitalization.
Note that this still requires that the inflector be configured to understand
the special case.
* Merge away a few branches whose changes we already have in order to clean up
the Github network graph.
* Shore up test cases a bit.
* Merge against many of the older branches on Github whose functionality is
already reflected to reduce confusion about what is and is not implemented
here.
* Accept String or Symbol for :position (et al) options.
* Rename "annotate" bin to "annotate_models" to avoid conflicting with
ImageMagick.
......
......@@ -142,9 +142,9 @@ Released under the same license as Ruby. No Support. No Warranty.
== AUTHOR:
Original code by: Dave Thomas -- Pragmatic Programmers, LLC
Overhauled by: Alex Chaffee
Gemmed by: Cuong Tran
Original code by: Dave Thomas -- Pragmatic Programmers, LLC <http://agilewebdevelopment.com/plugins/annotate_models>
Overhauled by: Alex Chaffee <http://alexch.github.com>
Gemmed by: Cuong Tran <http://github.com/ctran>
Maintained by: Alex Chaffee and Cuong Tran
Integrated by: Jon Frisby
......
......@@ -58,15 +58,18 @@ Gem::Specification.new do |s|
s.add_runtime_dependency(%q<activesupport>, [">= 3.0.0"])
s.add_development_dependency(%q<jeweler>, [">= 0"])
s.add_development_dependency(%q<rspec>, [">= 0"])
s.add_development_dependency(%q<wrong>, [">= 0"])
else
s.add_dependency(%q<activesupport>, [">= 3.0.0"])
s.add_dependency(%q<jeweler>, [">= 0"])
s.add_dependency(%q<rspec>, [">= 0"])
s.add_dependency(%q<wrong>, [">= 0"])
end
else
s.add_dependency(%q<activesupport>, [">= 3.0.0"])
s.add_dependency(%q<jeweler>, [">= 0"])
s.add_dependency(%q<rspec>, [">= 0"])
s.add_dependency(%q<wrong>, [">= 0"])
end
end
......@@ -77,6 +77,13 @@ EOS
describe "#get_model_class" do
require "tmpdir"
module ::ActiveRecord
class Base
def self.has_many name
end
end
end
def create(file, body="hi")
file_path = File.join(AnnotateModels.model_dir, file)
FileUtils.mkdir_p(File.dirname(file_path))
......@@ -168,6 +175,18 @@ EOS
EOS
check_class_name 'bar/non_namespaced_foo_with_capitals_inside_bar.rb', 'NonNamespacedFooWithCapitalsInsideBar'
end
it "should allow known macros" do
create('foo_with_known_macro.rb', <<-EOS)
class FooWithKnownMacro < ActiveRecord::Base
has_many :yah
end
EOS
capturing(:stderr) do
check_class_name 'foo_with_known_macro.rb', 'FooWithKnownMacro'
end.should == ""
end
end
describe "#remove_annotation_of_file" do
......
......@@ -6,6 +6,8 @@ rescue LoadError
require 'rspec'
end
require "wrong/adapters/rspec"
$:.unshift(File.dirname(__FILE__) + '/../lib')
require 'active_support'
require 'active_support/core_ext/string/inflections'
......
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