Skip to content

Commit

Permalink
Whitespace and doc fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
norman committed Feb 4, 2010
1 parent addcd01 commit be03dc3
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/friendly_id/active_record2/finders.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module ActiveRecord2
# FriendlyId-specific methods.
module Finders

# FinderProxy is used to choose which {Finder} subclass to instantiate;
# FinderProxy is used to choose which finder class to instantiate;
# depending on the model_class's +friendly_id_config+ and the options
# passed into the constructor, it will decide whether to use simple or
# slugged finder, a single or multiple finder, and in the case of slugs,
Expand Down
2 changes: 1 addition & 1 deletion lib/friendly_id/finders.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Base
# not be determined.
# The return value will be:
# * +true+ - if the id is definitely friendly (i.e., any string with non-numeric characters)
# * +false+ - if the id is definitely unfriendly (i.e., an Integer, ActiveRecord::Base, etc.)
# * +false+ - if the id is definitely unfriendly (i.e., an Integer, a model instance, etc.)
# * +nil+ - if it can not be determined (i.e., a numeric string like "206".)
# @return [true, false, nil]
# @see #unfriendly?
Expand Down
4 changes: 2 additions & 2 deletions lib/friendly_id/version.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module FriendlyId
module Version
module Version
MAJOR = 2
MINOR = 3
TINY = 0
STRING = [MAJOR, MINOR, TINY].join('.')
end
end
end
3 changes: 3 additions & 0 deletions test/custom_normalizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
module FriendlyId
module Test

# Generic tests for models to ensure that they properly implement using the
# +normalize_friendly_id+ method to allow developers to hook into the
# slug string generation.
module CustomNormalizer

test "should invoke the custom normalizer" do
Expand Down
4 changes: 3 additions & 1 deletion test/generic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
module FriendlyId

module Test


# Tests for any model that implements FriendlyId. Any test that tests model
# features should include this module.
module Generic

def setup
Expand Down
2 changes: 2 additions & 0 deletions test/sequel/basic_simple_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
module FriendlyId
module Test
module Sequel

# Tests for Sequel models using FriendlyId without slugs.
class BasicSimpleTest < ::Test::Unit::TestCase
include FriendlyId::Test::Generic
include FriendlyId::Test::Sequel::Core
Expand Down
4 changes: 2 additions & 2 deletions test/sequel/basic_slugged_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
module FriendlyId
module Test
module Sequel

# Tests for Sequel models using FriendlyId with slugs.
class BasicSluggedTest < ::Test::Unit::TestCase

include FriendlyId::Test::Generic
include FriendlyId::Test::Slugged
include FriendlyId::Test::Sequel::Core
include FriendlyId::Test::Sequel::Slugged

end
end
end
Expand Down
2 changes: 2 additions & 0 deletions test/sequel/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
module FriendlyId
module Test
module Sequel

# Core tests for any sequel model using FriendlyId.
module Core

def teardown
Expand Down
1 change: 1 addition & 0 deletions test/sequel/sti_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
module FriendlyId
module Test
module Sequel

class StiTest < ::Test::Unit::TestCase

include FriendlyId::Test::Generic
Expand Down
1 change: 1 addition & 0 deletions test/sequel/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require "rubygems"
require "sequel/extensions/migration"
require "logger"

require File.dirname(__FILE__) + "/../test_helper"
require File.dirname(__FILE__) + "/../../lib/friendly_id/sequel"
require File.dirname(__FILE__) + "/../../lib/friendly_id/sequel/create_slugs"
Expand Down
1 change: 1 addition & 0 deletions test/slugged.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module FriendlyId

module Test

# Tests for any model that implements slugs.
module Slugged

test "should have a slug" do
Expand Down

0 comments on commit be03dc3

Please sign in to comment.