Permalink
Browse files

Removes trailing whitespace and hard tabs

  • Loading branch information...
rthbound committed Dec 4, 2013
1 parent bbe8fb5 commit dbd1c4e6ceb23674857d9b20fd33939659d6a1c7
View
@@ -30,7 +30,7 @@ Additionally, MongoMapper is tested against:
* Rails 3.0.x
* Rails 3.1.x
* Rails 3.2.x
* Rails 4.0.x
* Rails 4.0.x
NOTE: Rails 4 support is only in the v0.13.0 beta, which is not currently the default in RubyGems. Use the following line in your gemfile to use the beta:
View
@@ -9,7 +9,7 @@ begin
spec.pattern = 'spec/**/*_spec.rb'
spec.rspec_opts = ['--color']
end
task :default => :spec
task :default => :spec
rescue LoadError
nil
end
View
@@ -24,7 +24,7 @@ class User
:age => 28,
:skills => ['ruby', 'mongo', 'javascript'],
:links => {"Google" => "http://www.google.com"}
})
})
steve = User.create({
:first_name => 'Steve',
@@ -37,4 +37,4 @@ class User
john.links["Ruby on Rails"] = "http://www.rubyonrails.com"
john.save
pp john
pp john
@@ -6,7 +6,7 @@
class User
include MongoMapper::Document
key :name, String
key :tags, Array
end
View
@@ -6,7 +6,7 @@
class User
include MongoMapper::Document
key :name, String
key :tags, Array
end
@@ -32,4 +32,4 @@ class User
].each do |result|
pp result
puts
end
end
@@ -7,16 +7,16 @@ class OneAsProxy < OneProxy
def criteria
{type_key_name => proxy_owner.class.name, id_key_name => proxy_owner.id}
end
private
def type_key_name
"#{options[:as]}_type"
end
def id_key_name
"#{options[:as]}_id"
end
end
end
end
end
end
@@ -7,7 +7,7 @@ module Callbacks
def destroy
run_callbacks(:destroy) { super }
end
def touch(*)
run_callbacks(:touch) { super }
end
@@ -3,7 +3,7 @@ module Plugins
module Touch
extend ActiveSupport::Concern
def touch(key = :updated_at)
def touch(key = :updated_at)
raise ArgumentError, "Invalid key named #{key}" unless self.key_names.include?(key.to_s)
if self.class.embeddable?
self.write_attribute(key, Time.now.utc)
@@ -1,4 +1,4 @@
# The purpose of this is to check finding, initializing,
# The purpose of this is to check finding, initializing,
# and creating objects (typecasting times/dates and booleans).
require 'pp'
@@ -13,7 +13,7 @@
require 'mongo_mapper'
MongoMapper.database = 'testing'
class Foo
include MongoMapper::Document
key :approved, Boolean
@@ -49,4 +49,4 @@ class Foo
# I'm now getting something like this:
# user system total real
# write 1.660000 0.050000 1.710000 ( 1.752676)
# read 1.060000 0.050000 1.110000 ( 1.263429)
# read 1.060000 0.050000 1.110000 ( 1.263429)
@@ -16,7 +16,7 @@
end
doc.reload
doc.updated_at.should_not == old_updated_at
doc.updated_at.should_not == old_updated_at
end
end
@@ -79,7 +79,7 @@
@post.reload.updated_at.should_not == orig_updated_at
end
it "should when the child is updated" do
@comment.save
old_updated_at = @post.updated_at
@@ -88,7 +88,7 @@
end
@post.reload.updated_at.should_not == old_updated_at
end
it "should when the child is touched" do
@comment.save
old_updated_at = @post.updated_at
@@ -117,9 +117,9 @@
Timecop.freeze(Time.now + 1.day) do
comment.save
end
post.reload.updated_at.should == post.created_at
end
end
end
end
end
@@ -15,15 +15,15 @@
it "should print out non-nil attributes in alpha sorted order" do
@doc.inspect.should =~ /_id:.*, age: 29, name: "John"/
end
it "should print out all attributes when (optional) include_super argument is true" do
@doc.inspect(true).should =~ /_id:.*, age: 29, email: nil, name: "John"/
end
it "should include class name" do
@doc.inspect.should =~ /^#<User/
end
it "should include embedded documents" do
klass = Doc()
pets = EDoc()
@@ -33,7 +33,7 @@
doc = klass.new(:pets => [{:name => "Kitten"}])
doc.inspect.should =~ /_id:.*, pets: \[.*_id.*, name: "Kitten".*\]/
end
it "should include embedded document" do
klass = Doc()
pet = EDoc()
@@ -44,4 +44,4 @@
doc.inspect.should =~ /_id:.*, pet: .*_id.*, name: "Kitten".*/
end
end
end
end

0 comments on commit dbd1c4e

Please sign in to comment.