Skip to content

Commit 88a3874

Browse files
committed
Goodbye, bad whitespace
1 parent 9ef36f0 commit 88a3874

29 files changed

+161
-175
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ $ rails generate couchrest_model:config
109109
$ rails generate model person --orm=couchrest_model
110110
```
111111

112-
## General Usage
112+
## General Usage
113113

114114
```ruby
115115
require 'couchrest_model'

THANKS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ CouchRest THANKS
22
=====================
33

44
CouchRest was originally developed by J. Chris Anderson <jchris@grabb.it>
5-
and a number of other contributors. Many people further contributed to
5+
and a number of other contributors. Many people further contributed to
66
CouchRest by reporting problems, suggesting various improvements or submitting
77
changes. A list of these people is included below.
88

@@ -15,7 +15,7 @@ changes. A list of these people is included below.
1515
* [Marcos Tapajós](http://tapajos.me)
1616
* [Sam Lown](http://github.com/samlown)
1717
* [Will Leinweber](http://github.com/will)
18-
18+
1919
Patches are welcome. The primary source for this software project is [on Github](http://github.com/couchrest/couchrest)
2020

2121
A lot of people have active forks - thank you all - even the patches I don't end up using are helpful.

benchmarks/dirty.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class BenchmarkCasted < Hash
1010
include CouchRest::Model::CastedModel
11-
11+
1212
property :name
1313
end
1414

@@ -86,11 +86,11 @@ def run_benchmark
8686
if ENV['BENCHMARK_DB']
8787
# db writing
8888
x.report("write changed record to db") do
89-
db_n.times { |i| b.string = "test#{i}"; b.save }
89+
db_n.times { |i| b.string = "test#{i}"; b.save }
9090
end
9191

9292
x.report("write unchanged record to db") do
93-
db_n.times { b.save }
93+
db_n.times { b.save }
9494
end
9595

9696
# db reading

history.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@
8686
* Support typecasting `Symbol`
8787
* Added `:array` option to properties
8888
* Typecasting Dates, Times, and Booleans, with invalid values returns nil
89-
89+
9090
* API Breaking Changes
9191
* Properties with blocks are now singular unless the `array: true` option is passed.
92-
92+
9393

9494
## 1.2.0.beta - 2012-06-08
9595

@@ -217,7 +217,7 @@ Notes:
217217
## CouchRest Model 1.0.0.beta8
218218

219219
* Major enhancements
220-
* Added model generator
220+
* Added model generator
221221

222222
* Minor enhancements
223223
* Raise error on adding objects to "collection_of" without an id

lib/couchrest/model/associations.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ module ClassMethods
1111
# An attribute will be created matching the name of the attribute
1212
# with '_id' on the end, or the foreign key (:foreign_key) provided.
1313
#
14-
# Searching for the assocated object is performed using a string
14+
# Searching for the assocated object is performed using a string
1515
# (:proxy) to be evaulated in the context of the owner. Typically
1616
# this will be set to the class name (:class_name), or determined
1717
# automatically if the owner belongs to a proxy object.
1818
#
1919
# If the association owner is proxied by another model, than an attempt will
2020
# be made to automatically determine the correct place to request
21-
# the documents. Typically, this is a method with the pluralized name of the
21+
# the documents. Typically, this is a method with the pluralized name of the
2222
# association inside owner's owner, or proxy.
2323
#
2424
# For example, imagine a company acts as a proxy for invoices and clients.
@@ -28,7 +28,7 @@ module ClassMethods
2828
#
2929
# self.company.clients
3030
#
31-
# If the name of the collection proxy is not the pluralized assocation name,
31+
# If the name of the collection proxy is not the pluralized assocation name,
3232
# it can be set with the :proxy_name option.
3333
#
3434
def belongs_to(attrib, *options)

lib/couchrest/model/base.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Base < CouchRest::Document
1919
include Designs
2020
include CastedBy
2121
include Dirty
22-
22+
2323

2424
def self.subclasses
2525
@subclasses ||= []
@@ -76,13 +76,13 @@ def self.build(attrs = {}, options = {}, &block)
7676
alias :new_record? :new?
7777
alias :new_document? :new?
7878

79-
# Compare this model with another by confirming to see
79+
# Compare this model with another by confirming to see
8080
# if the IDs and their databases match!
8181
#
82-
# Camparison of the database is required in case the
82+
# Camparison of the database is required in case the
8383
# model has been proxied or loaded elsewhere.
8484
#
85-
# A Basic CouchRest document will only ever compare using
85+
# A Basic CouchRest document will only ever compare using
8686
# a Hash comparison on the attributes.
8787
def == other
8888
return false unless other.is_a?(Base)

lib/couchrest/model/designs.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module ClassMethods
3030
# Adding a prefix allows you to associate multiple design documents with the same
3131
# model. This is useful if you'd like to split your designs into seperate
3232
# use cases; one for regular search functions and a second for stats for example.
33-
#
33+
#
3434
# # Create a design doc with id _design/Cats
3535
# design do
3636
# view :by_name
@@ -100,7 +100,7 @@ def prepare_design_options(*args)
100100
end
101101

102102
def prepare_source_paths(options)
103-
103+
104104
end
105105

106106
end

lib/couchrest/model/extended_attachments.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def create_attachment(args={})
1212
rescue ArgumentError
1313
raise ArgumentError, 'You must specify :file and :name'
1414
end
15-
15+
1616
# return all attachments
1717
def attachments
1818
self['_attachments'] ||= {}
@@ -51,15 +51,15 @@ def attachment_url(attachment_name)
5151
return unless has_attachment?(attachment_name)
5252
"#{database.root}/#{self.id}/#{attachment_name}"
5353
end
54-
54+
5555
# returns URI to fetch the attachment from
5656
def attachment_uri(attachment_name)
5757
return unless has_attachment?(attachment_name)
5858
"#{database.uri}/#{self.id}/#{attachment_name}"
5959
end
60-
60+
6161
private
62-
62+
6363
def get_mime_type(path)
6464
return nil if path.nil?
6565
type = ::MIME::Types.type_for(path)
@@ -75,7 +75,7 @@ def set_attachment_attr(args)
7575
'data' => args[:file].read
7676
}
7777
end
78-
78+
7979
end # module ExtendedAttachments
8080
end
8181
end

lib/couchrest/model/properties.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def directly_set_attributes(hash, mass_assign = false)
100100
multi_parameter_attributes << [ key, value ]
101101
false
102102
elsif self.respond_to?("#{key}=")
103-
self.send("#{key}=", value)
103+
self.send("#{key}=", value)
104104
elsif mass_assign || mass_assign_any_attribute
105105
self[key] = value
106106
end
@@ -131,7 +131,7 @@ def assign_multiparameter_attributes(pairs, hash)
131131
def execute_callstack_for_multiparameter_attributes(callstack, hash)
132132
callstack.each do |name, values_with_empty_parameters|
133133
if self.respond_to?("#{name}=")
134-
casted_attrib = send("#{name}=", values_with_empty_parameters)
134+
casted_attrib = send("#{name}=", values_with_empty_parameters)
135135
unless casted_attrib.is_a?(Hash)
136136
hash.reject { |key, value| key.include?(name.to_s)}
137137
end
@@ -177,7 +177,7 @@ def property(name, *options, &block)
177177

178178
# Automatically set <tt>updated_at</tt> and <tt>created_at</tt> fields
179179
# on the document whenever saving occurs.
180-
#
180+
#
181181
# These properties are casted as Time objects, so they should always
182182
# be set to UTC.
183183
def timestamps!

lib/couchrest/model/property.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def initialize(name, options = {}, &block)
1818
def to_s
1919
name
2020
end
21-
21+
2222
def to_sym
2323
@_sym_name ||= name.to_sym
2424
end
@@ -65,7 +65,7 @@ def default_value
6565
end
6666

6767
# Initialize a new instance of a property's type ready to be
68-
# used. If a proc is defined for the init method, it will be used instead of
68+
# used. If a proc is defined for the init method, it will be used instead of
6969
# a normal call to the class.
7070
def build(*args)
7171
raise StandardError, "Cannot build property without a class" if @type.nil?

0 commit comments

Comments
 (0)