Commit e2d3beb7 by Cuong Tran

Merge pull request #30 from jeremyolliver/development_dependencies

Specify Development dependencies
parents 3fae3291 546524fd
......@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
"spec/spec_helper.rb",
"tasks/migrate.rake"
]
s.homepage = %q{http://github.com/ctran/annotate}
s.homepage = %q{http://github.com/ctran/annotate_models}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.5}
......@@ -45,6 +45,10 @@ Gem::Specification.new do |s|
"spec/annotate_spec.rb",
"spec/spec_helper.rb"
]
s.add_runtime_dependency('rake')
s.add_development_dependency('jeweler')
s.add_development_dependency('rspec', '~> 1.3.2')
s.add_development_dependency('activesupport', '>= 2.1.0')
if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
......
$:.unshift(File.dirname(__FILE__)) unless
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
require 'yaml'
module Annotate
def self.version
version_file = File.dirname(__FILE__) + "/../VERSION.yml"
......
......@@ -229,7 +229,7 @@ module AnnotateModels
# in subdirectories without namespacing.
def get_model_class(file)
require File.expand_path("#{model_dir}/#{file}") # this is for non-rails projects, which don't get Rails auto-require magic
model = file.gsub(/\.rb$/, '').camelize
model = ActiveSupport::Inflector.camelize(file.gsub(/\.rb$/, ''))
parts = model.split('::')
begin
parts.inject(Object) {|klass, part| klass.const_get(part) }
......
require File.dirname(__FILE__) + '/../spec_helper.rb'
require 'annotate/annotate_models'
require 'rubygems'
require 'activesupport'
require 'active_support'
describe AnnotateModels do
......
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