sandyw-active_configuration 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -39,5 +39,11 @@ module ActiveConfiguration
39
39
  return @options_hash if namespace == :all
40
40
  @options_hash.select{|key, option| option.option_namespace == namespace }.with_indifferent_access
41
41
  end
42
+
43
+ def copy
44
+ copy = self.clone
45
+ copy.options_hash = options_hash.clone
46
+ copy
47
+ end
42
48
  end
43
49
  end
@@ -1,8 +1,8 @@
1
1
  module ActiveConfiguration
2
2
  class Version
3
3
  MAJOR = 1
4
- MINOR = 2
5
- PATCH = 1
4
+ MINOR = 3
5
+ PATCH = 0
6
6
  BUILD = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
@@ -80,7 +80,8 @@ module ActiveRecord
80
80
 
81
81
  # Returns the configuration details of this class.
82
82
  def self.configuration
83
- @configuration ||= ActiveConfiguration::Base.new
83
+ @@configuration ||= {}
84
+ @@configuration[self.name.to_s] ||= (@@configuration[superclass.name.to_s].present? ? @@configuration[superclass.name.to_s].copy : ActiveConfiguration::Base.new)
84
85
  end
85
86
  EOV
86
87
 
@@ -142,4 +143,4 @@ module ActiveRecord
142
143
  end
143
144
  end
144
145
  end
145
- end
146
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sandyw-active_configuration
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-06-11 00:00:00.000000000 Z
13
+ date: 2013-06-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -196,7 +196,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
196
196
  version: '0'
197
197
  segments:
198
198
  - 0
199
- hash: -3189903809501531503
199
+ hash: -1542153128017837752
200
200
  required_rubygems_version: !ruby/object:Gem::Requirement
201
201
  none: false
202
202
  requirements: