Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d3755e0
Showing
9 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,2 @@ | |||
pkg/ | |||
.bundle/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
rvm 1.9.2@has_normalized_sti |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,12 @@ | |||
source :rubygems | |||
|
|||
group :development do | |||
gem 'jeweler' | |||
gem 'mocha' | |||
gem 'i18n' | |||
end | |||
|
|||
group :test do | |||
gem 'rspec' | |||
gem 'activerecord', '~> 3.0.0' | |||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,43 @@ | |||
GEM | |||
remote: http://rubygems.org/ | |||
specs: | |||
activemodel (3.0.8) | |||
activesupport (= 3.0.8) | |||
builder (~> 2.1.2) | |||
i18n (~> 0.5.0) | |||
activerecord (3.0.8) | |||
activemodel (= 3.0.8) | |||
activesupport (= 3.0.8) | |||
arel (~> 2.0.10) | |||
tzinfo (~> 0.3.23) | |||
activesupport (3.0.8) | |||
arel (2.0.10) | |||
builder (2.1.2) | |||
diff-lcs (1.1.2) | |||
git (1.2.5) | |||
i18n (0.5.0) | |||
jeweler (1.6.2) | |||
bundler (~> 1.0) | |||
git (>= 1.2.5) | |||
rake | |||
mocha (0.9.12) | |||
rake (0.9.2) | |||
rspec (2.6.0) | |||
rspec-core (~> 2.6.0) | |||
rspec-expectations (~> 2.6.0) | |||
rspec-mocks (~> 2.6.0) | |||
rspec-core (2.6.4) | |||
rspec-expectations (2.6.0) | |||
diff-lcs (~> 1.1.2) | |||
rspec-mocks (2.6.0) | |||
tzinfo (0.3.28) | |||
|
|||
PLATFORMS | |||
ruby | |||
|
|||
DEPENDENCIES | |||
activerecord (~> 3.0.0) | |||
i18n | |||
jeweler | |||
mocha | |||
rspec |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,21 @@ | |||
begin | |||
require 'jeweler' | |||
Jeweler::Tasks.new do |gem| | |||
gem.name = 'has_normalized_sti' | |||
gem.summary = 'allows rails STI to work when the type is normalized out' | |||
gem.description = <<-DESC | |||
has_normalzied_sti expects the model to have a type_id column | |||
referencing a types table containg all the possible types. | |||
the types table will be auto populated with new types as new | |||
subclasses are saved | |||
DESC | |||
gem.email = 'kevin@glowacz.info' | |||
gem.author = 'Kevin Glowacz' | |||
gem.files.exclude '.rvmrc' | |||
end | |||
rescue LoadError | |||
puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler' | |||
end | |||
|
|||
require 'rspec/core/rake_task' | |||
RSpec::Core::RakeTask.new(:spec) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
require 'has_normalized_sti' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,12 @@ | |||
module HasNormalizedSti | |||
def self.included(base) | |||
base.extend(ClassMethods) | |||
end | |||
|
|||
module ClassMethods | |||
def has_normalized_sti(options = {}) | |||
end | |||
end | |||
end | |||
|
|||
ActiveRecord::Base.send :include, HasNormalizedSti |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,7 @@ | |||
require 'rspec' | |||
|
|||
require 'rubygems' | |||
require 'active_record' | |||
|
|||
$:.unshift File.dirname(__FILE__) + '/../lib' | |||
require File.dirname(__FILE__) + '/../init' |