From 08f5e908e31f6e33873ec5317c8a390db52af8ca Mon Sep 17 00:00:00 2001 From: Matthew Robertson Date: Wed, 13 Feb 2013 13:54:57 -0800 Subject: [PATCH] renamed category collection to config --- lib/ress.rb | 14 +++++++------- lib/ress/{category_collection.rb => config.rb} | 2 +- ...{category_collection_spec.rb => config_spec.rb} | 4 ++-- spec/ress_spec.rb | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) rename lib/ress/{category_collection.rb => config.rb} (96%) rename spec/ress/{category_collection_spec.rb => config_spec.rb} (93%) diff --git a/lib/ress.rb b/lib/ress.rb index c3098ba..8774df6 100644 --- a/lib/ress.rb +++ b/lib/ress.rb @@ -4,7 +4,7 @@ require "ress/subdomain" require "ress/alternate_version" require "ress/canonical_version" -require "ress/category_collection" +require "ress/config" require "ress/controller_additions" require "ress/view_helpers" @@ -15,24 +15,24 @@ module Ress extend self - def category_collection - @categories ||= CategoryCollection.new + def config + @categories ||= Config.new end def canonical_version - category_collection.canonical_version + config.canonical_version end def alternate_versions - category_collection.alternate_versions + config.alternate_versions end def include_modernizr? - category_collection.include_modernizr + config.include_modernizr end def configure - yield(category_collection) + yield(config) end end diff --git a/lib/ress/category_collection.rb b/lib/ress/config.rb similarity index 96% rename from lib/ress/category_collection.rb rename to lib/ress/config.rb index edc06c5..832ec20 100644 --- a/lib/ress/category_collection.rb +++ b/lib/ress/config.rb @@ -1,6 +1,6 @@ module Ress - class CategoryCollection + class Config attr_accessor :include_modernizr attr_reader :canonical_version, :alternate_versions diff --git a/spec/ress/category_collection_spec.rb b/spec/ress/config_spec.rb similarity index 93% rename from spec/ress/category_collection_spec.rb rename to spec/ress/config_spec.rb index d0860ac..31bd23f 100644 --- a/spec/ress/category_collection_spec.rb +++ b/spec/ress/config_spec.rb @@ -1,8 +1,8 @@ require_relative '../../lib/ress' -describe Ress::CategoryCollection do +describe Ress::Config do - let(:collection) { Ress::CategoryCollection.new } + let(:collection) { Ress::Config.new } describe '#add_alternate' do diff --git a/spec/ress_spec.rb b/spec/ress_spec.rb index 5e622d1..1293908 100644 --- a/spec/ress_spec.rb +++ b/spec/ress_spec.rb @@ -5,7 +5,7 @@ describe '.configure' do it 'yields the default category collection' do - Ress.configure { |r| r.should be_a(Ress::CategoryCollection) } + Ress.configure { |r| r.should be_a(Ress::Config) } end end