madvertise-ext 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/madvertise/configuration.rb +9 -1
- data/lib/madvertise/environment.rb +11 -2
- data/madvertise-ext.gemspec +1 -1
- metadata +1 -1
@@ -82,9 +82,17 @@ class Configuration < Section
|
|
82
82
|
DEFAULTS = {
|
83
83
|
log_backend: :stdout,
|
84
84
|
log_caller: false,
|
85
|
+
log_level: :info,
|
85
86
|
log_format: "%{time} %{progname}(%{pid}) [%{severity}] %{msg}\n",
|
86
87
|
log4j_format: "%d %c(%t) [%p] %m%n",
|
87
|
-
|
88
|
+
production: {
|
89
|
+
log_format: "%{msg}\n",
|
90
|
+
log4j_format: "%m%n",
|
91
|
+
},
|
92
|
+
staging: {
|
93
|
+
log_format: "%{msg}\n",
|
94
|
+
log4j_format: "%m%n",
|
95
|
+
},
|
88
96
|
}
|
89
97
|
|
90
98
|
# Create a new {Configuration} object.
|
@@ -32,15 +32,24 @@ class Environment
|
|
32
32
|
end
|
33
33
|
|
34
34
|
# Return true if the current environment is +production+.
|
35
|
-
def
|
35
|
+
def production?
|
36
36
|
to_sym == :production
|
37
37
|
end
|
38
38
|
|
39
|
+
alias :prod? :production?
|
40
|
+
|
41
|
+
# Return true if the current environment is +production+.
|
42
|
+
def staging?
|
43
|
+
to_sym == :staging
|
44
|
+
end
|
45
|
+
|
39
46
|
# Return true if the current environment is +development+.
|
40
|
-
def
|
47
|
+
def development?
|
41
48
|
to_sym == :development
|
42
49
|
end
|
43
50
|
|
51
|
+
alias :dev? :development?
|
52
|
+
|
44
53
|
# Return true if the current environment is +test+.
|
45
54
|
def test?
|
46
55
|
to_sym == :test
|
data/madvertise-ext.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "madvertise-ext"
|
5
|
-
spec.version = "0.9.
|
5
|
+
spec.version = "0.9.5"
|
6
6
|
spec.authors = ["madvertise Mobile Advertising GmbH"]
|
7
7
|
spec.email = ["tech@madvertise.com"]
|
8
8
|
spec.description = %q{Ruby core extensions and helper libraries}
|