rack-env-notifier 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -1
- data/README.md +6 -8
- data/lib/rack-env-notifier.rb +1 -1
- metadata +1 -1
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -34,7 +34,7 @@ Or install it yourself as:
|
|
34
34
|
|
35
35
|
## Usage
|
36
36
|
|
37
|
-
|
37
|
+
Rack::EnvNotifier can display a custom notification on every html page. It can be configured:
|
38
38
|
|
39
39
|
Rack::EnvNotifier.notify = Rails.env.production?
|
40
40
|
|
@@ -46,13 +46,13 @@ or
|
|
46
46
|
|
47
47
|
#### Position on screen
|
48
48
|
|
49
|
-
The notification
|
49
|
+
The notification message is wrapped by ``#env-notifer`` CSS ID. This can be customized using custom CSS.
|
50
50
|
|
51
|
-
To disable default CSS and use custom configure the initializer:
|
51
|
+
To disable default CSS and use a custom one, configure the initializer:
|
52
52
|
|
53
53
|
Rack::EnvNotifier.custom_css = true
|
54
54
|
|
55
|
-
|
55
|
+
and define the custom CSS:
|
56
56
|
|
57
57
|
#env-notifier {
|
58
58
|
font-size: 16px;
|
@@ -78,7 +78,7 @@ And define custom CSS:
|
|
78
78
|
|
79
79
|
Rack::EnvNotifier.message = "development mode"
|
80
80
|
|
81
|
-
|
81
|
+
The default message is configured in the initializer:
|
82
82
|
|
83
83
|
case Rails.env
|
84
84
|
when "development"
|
@@ -90,9 +90,7 @@ For Ruby on Rails, by default the message it will be the name of the current env
|
|
90
90
|
end
|
91
91
|
|
92
92
|
|
93
|
-
### Rails
|
94
|
-
|
95
|
-
Here is a sample initializer:
|
93
|
+
### Rails Sample Initializer
|
96
94
|
|
97
95
|
if Rails.env.development?
|
98
96
|
Rack::EnvNotifier.notify = true
|
data/lib/rack-env-notifier.rb
CHANGED