mince 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/mince/config.rb +16 -14
- data/lib/mince/version.rb +1 -1
- metadata +1 -1
data/lib/mince/config.rb
CHANGED
@@ -1,24 +1,26 @@
|
|
1
1
|
require 'active_support/core_ext/object/blank'
|
2
2
|
require 'singleton'
|
3
3
|
|
4
|
-
|
5
|
-
|
4
|
+
module Mince
|
5
|
+
class Config
|
6
|
+
include Singleton
|
6
7
|
|
7
|
-
|
8
|
+
attr_reader :database_name
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
10
|
+
def initialize
|
11
|
+
self.database_name = "mince"
|
12
|
+
end
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
def database_name=(val)
|
15
|
+
@database_name = [val, ENV['TEST_ENV_NUMBER']].compact.join("-")
|
16
|
+
end
|
16
17
|
|
17
|
-
|
18
|
-
|
19
|
-
|
18
|
+
def self.database_name
|
19
|
+
instance.database_name
|
20
|
+
end
|
20
21
|
|
21
|
-
|
22
|
-
|
22
|
+
def self.database_name=(val)
|
23
|
+
instance.database_name = val
|
24
|
+
end
|
23
25
|
end
|
24
26
|
end
|
data/lib/mince/version.rb
CHANGED