Permalink
Browse files

Change project name to also_validates

  • Loading branch information...
1 parent ec9c010 commit caed2f2803985159d464812bc92d89f92722e5f5 @noahd1 committed Sep 24, 2012
View
@@ -1,6 +1,5 @@
source 'https://rubygems.org'
-# Specify your gem's dependencies in validation_aggregator.gemspec
gemspec
group :test do
View
@@ -1,4 +1,4 @@
-# ValidationAggregator
+# AlsoValidates
An ActiveModel validator that validates associated models, adding any errors on those models back onto the "primary" model.
@@ -1,5 +1,5 @@
# -*- encoding: utf-8 -*-
-require File.expand_path('../lib/validation_aggregator/version', __FILE__)
+require File.expand_path('../lib/also_validates/version', __FILE__)
Gem::Specification.new do |gem|
gem.authors = ["Noah Davis"]
@@ -11,8 +11,8 @@ Gem::Specification.new do |gem|
gem.files = `git ls-files`.split($\)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
- gem.name = "validation_aggregator"
+ gem.name = "also_validates"
gem.require_paths = ["lib"]
gem.add_dependency(%q<activemodel>, [">= 3.0.0"])
- gem.version = ValidationAggregator::VERSION
+ gem.version = AlsoValidates::VERSION
end
View
@@ -0,0 +1,8 @@
+require "active_model"
+require "also_validates/version"
+require "also_validates/validation"
+require "also_validates/helper"
+
+ActiveModel::Validations::HelperMethods.module_eval do
+ include AlsoValidates::Helper
+end
@@ -0,0 +1,7 @@
+module AlsoValidates
+ module Helper
+ def also_validates(*models)
+ validates_with AlsoValidates::Validation, models: models
+ end
+ end
+end
@@ -1,4 +1,4 @@
-module ValidationAggregator
+module AlsoValidates
class Validation < ActiveModel::Validator
def initialize(args)
@@ -0,0 +1,3 @@
+module AlsoValidates
+ VERSION = "0.0.1"
+end
@@ -1,8 +0,0 @@
-require "active_model"
-require "validation_aggregator/version"
-require "validation_aggregator/validation"
-require "validation_aggregator/helper"
-
-ActiveModel::Validations::HelperMethods.module_eval do
- include ValidationAggregator::Helper
-end
@@ -1,7 +0,0 @@
-module ValidationAggregator
- module Helper
- def also_validates(*models)
- validates_with ValidationAggregator::Validation, models: models
- end
- end
-end
@@ -1,3 +0,0 @@
-module ValidationAggregator
- VERSION = "0.0.1"
-end
View
@@ -1,8 +1,8 @@
require "rubygems"
require "bundler/setup"
-require "validation_aggregator"
require "shoulda-matchers"
+require "also_validates"
require "fixtures/object_fixtures"
RSpec.configure do |config|

0 comments on commit caed2f2

Please sign in to comment.