Skip to content

Commit

Permalink
eliminated extra code and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gato-omega committed Jan 17, 2012
1 parent 9712fe2 commit 69ee65a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 131 deletions.
4 changes: 0 additions & 4 deletions .rvmrc
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
#rvm use ruby-1.8.7-p249@jd_sage_pay
rvm use ruby-1.9.2-p290@jd_sage_pay
#rvm use 1.8.7-p249@sage_pay
#rvm use ruby-1.9.2-p180@stage_casting

22 changes: 8 additions & 14 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
# Source gems from the default public repository
source :rubygems

gem 'activesupport', '~> 3.1.3'
gem 'activemodel', '~> 3.1.0'
gem 'i18n', '~> 0.6.0'
#gem 'validatable', '1.6.7'
gem "uuid", "~> 2.3.4"
group :production do
gem 'activesupport', '~> 3.1.3'
gem 'activemodel', '~> 3.1.0'
gem 'i18n', '~> 0.6.0'
gem "uuid", "~> 2.3.4"
end

group :development do
group :development, :test do
gem 'rake', '~> 0.8.7'
gem 'rspec', '~> 2.7'
end

gem "awesome_print", '1.0.1', :group => [:test, :development]
group :development do
gem "awesome_print", '1.0.1'
gem 'hirb', '~> 0.6.0'
gem 'wirble', '~> 0.1.3'
gem 'wirb', '~> 0.4.1'
gem 'colorize', '~> 0.5.8'
end

group :test do
gem 'remarkable_activemodel', '>=4.0.0.alpha2'
end

14 changes: 7 additions & 7 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'rubygems'
require 'rake'
require 'spec/rake/spectask'
#require 'spec/rake/spectask'
require 'date'

#############################################################################
Expand Down Expand Up @@ -46,12 +46,12 @@ end

task :default => :spec

Spec::Rake::SpecTask.new

Spec::Rake::SpecTask.new(:coverage) do |coverage|
coverage.rcov = true
coverage.rcov_opts << '--exclude' << '\.rvm,spec'
end
#Spec::Rake::SpecTask.new
#
#Spec::Rake::SpecTask.new(:coverage) do |coverage|
# coverage.rcov = true
# coverage.rcov_opts << '--exclude' << '\.rvm,spec'
#end

#require 'rake/rdoctask'
require 'rdoc/task'
Expand Down
28 changes: 0 additions & 28 deletions lib/validatable-ext.rb

This file was deleted.

22 changes: 0 additions & 22 deletions lib/validations/validates_inclusion_of.rb

This file was deleted.

56 changes: 0 additions & 56 deletions spec/support/validation_matchers.rb
Original file line number Diff line number Diff line change
@@ -1,60 +1,4 @@
module ValidationMatchers
# def validates_the_presence_of(model_name, attribute, message = "can't be empty")
# model = model_factory(model_name, attribute => "")
# model.should_not be_valid
# model.errors.on(attribute).should include(message)
# end
#
# def does_not_require_the_presence_of(model_name, attribute)
# model = model_factory(model_name, attribute => "")
# model.should be_valid
# model.errors.on(attribute).should be_nil
# end
#
# def validates_the_length_of(model_name, attribute, limits, message = "is invalid")
# if limits[:min]
# model = model_factory(model_name, attribute => 'a' * (limits[:min] - 1))
# model.should_not be_valid
# model.errors.on(attribute).should include(message)
#
# model = model_factory(model_name, attribute => 'a' * limits[:min])
# model.should be_valid
# model.errors.on(attribute).should be_nil
#
# model = model_factory(model_name, attribute => 'a' * (limits[:min] + 1))
# model.should be_valid
# model.errors.on(attribute).should be_nil
# end
#
# if limits[:max]
# model = model_factory(model_name, attribute => 'a' * (limits[:max] - 1))
# model.should be_valid
# model.errors.on(attribute).should be_nil
#
# model = model_factory(model_name, attribute => 'a' * limits[:max])
# model.should be_valid
# model.errors.on(attribute).should be_nil
#
# model = model_factory(model_name, attribute => 'a' * (limits[:max] + 1))
# model.should_not be_valid
# model.errors.on(attribute).should include(message)
# end
#
# if limits[:exactly]
# model = model_factory(model_name, attribute => 'a' * (limits[:exactly] - 1))
# model.should_not be_valid
# model.errors.on(attribute).should include(message)
#
# model = model_factory(model_name, attribute => 'a' * limits[:exactly])
# model.should be_valid
# model.errors.on(attribute).should be_nil
#
# model = model_factory(model_name, attribute => 'a' * (limits[:exactly] + 1))
# model.should_not be_valid
# model.errors.on(attribute).should include(message)
# end
# end
#
def validates_the_format_of(model_name, attribute, examples, message = "is invalid")
(examples[:invalid] || []).each do |invalid|
model = model_factory(model_name, attribute => invalid)
Expand Down

0 comments on commit 69ee65a

Please sign in to comment.