forked from bradrobertson/apartment
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new version cleanup unused files
- Loading branch information
bradrobertson
committed
Jun 6, 2011
1 parent
8950ebd
commit d1ee2e5
Showing
11 changed files
with
92 additions
and
63 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rvm 1.9.2@apartment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# 0.2.0 | ||
* June 6, 2011 * | ||
|
||
- Refactor to use more rails/active_support functionality | ||
- Refactor config to lazily load apartment.yml if exists | ||
- Remove OStruct and just use hashes for fetching methods | ||
- Added schema load on create instead of migrating from scratch | ||
|
||
# 0.1.3 | ||
* March 30, 2011 * | ||
|
||
- Original pass from Ryan | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,5 @@ | |
|
||
module Apartment | ||
|
||
def self.included(base) | ||
base.extend Apartment::ClassMethods | ||
end | ||
end | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,35 @@ | ||
require 'active_support/hash_with_indifferent_access' | ||
|
||
module Apartment | ||
require 'ostruct' | ||
|
||
module Config | ||
|
||
extend self | ||
|
||
@default_config = { | ||
:excluded_models => ["User"], | ||
:use_postgres_schemas => true | ||
} | ||
|
||
# Always query from config object, fallback to super method_missing | ||
def method_missing(method) | ||
config[method] || super | ||
end | ||
|
||
protected | ||
|
||
def config | ||
@config ||= begin | ||
@default_config.merge!(YAML.load_file(config_file).symbolize_keys) if File.exists?(config_file) | ||
|
||
@default_config | ||
end | ||
end | ||
|
||
def config_file | ||
File.join(Rails.root, "config/apartment.yml") | ||
end | ||
|
||
end | ||
|
||
config_file = File.join(Rails.root, "config/apartment.yml") | ||
config = { | ||
:excluded_models => ["User"], | ||
:use_postgres_schemas => true | ||
} | ||
|
||
Config = OpenStruct.new config.merge(YAML.load_file(config_file)) if File.exists? config_file | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module Apartment | ||
VERSION = "0.1.3" | ||
VERSION = "0.2.0" | ||
end |