ocean-rails 1.29.0 → 1.29.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3236195a6f9bc09b82f30b266134bdee733b6877
|
4
|
+
data.tar.gz: da30535ec21331c8881a1762fa19ff7018cb5509
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9678c833b9e144b0b67f1feb0e184697972a513df86f1c299715ac927f435537fede88c1c95bef8ec8974603d34cd1559a7f900f65801f9915702c99d1c0881
|
7
|
+
data.tar.gz: da707d98896f96f514c1d0b343a1ea5b08942458c66cc6d9b8778e6afdf4080ab7274e82c4002537c0f2280e600c65363a26526646eceae34f6a71c9c478c3e4
|
@@ -1,15 +1,18 @@
|
|
1
|
+
# If we're running in production, assign another ZMQ logger here.
|
2
|
+
# Another one is assigned in the app's config/application.rb - for some
|
3
|
+
# reason, assigning one in config/environments/production.rb won't work.
|
4
|
+
# Why this is so is an irritating mystery.
|
1
5
|
|
2
6
|
if Rails.env == 'production' && ENV['NO_ZEROMQ_LOGGING'].blank?
|
3
7
|
|
4
8
|
# Use a different logger for distributed setups
|
5
|
-
Rails.logger =
|
9
|
+
Rails.logger = ZeromqLogger.new
|
6
10
|
Rails.logger.level = Logger::INFO
|
7
|
-
Rails.logger.log_tags = []
|
8
11
|
|
9
12
|
# Announce us
|
10
|
-
Rails.logger.info "Initialising"
|
13
|
+
Rails.logger.info "Initialising Rails process"
|
11
14
|
|
12
15
|
# Make sure we log our exit
|
13
|
-
at_exit { Rails.logger.info "Exiting" }
|
16
|
+
at_exit { Rails.logger.info "Exiting Rails process" }
|
14
17
|
|
15
18
|
end
|
@@ -90,4 +90,22 @@ class OceanSetupGenerator < Rails::Generators::NamedBase #:nodoc: all
|
|
90
90
|
git :init
|
91
91
|
end
|
92
92
|
|
93
|
+
def add_production_zeromq_logging
|
94
|
+
inject_into_file 'config/application.rb', before: "module " do <<-'RUBY'
|
95
|
+
# If we're running in production, assign the first ZMQ logger here
|
96
|
+
# (another one is assigned by the ocean-rails gem in an initializer).
|
97
|
+
# Why this has to be done in two distinct places is an irritating mystery.
|
98
|
+
Rails.logger = ZeromqLogger.new if Rails.env == "production"
|
99
|
+
|
100
|
+
RUBY
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
def turn_off_view_logging_in_production
|
105
|
+
application(nil, env: "production") do
|
106
|
+
"# We don't want to see view render lines in production.
|
107
|
+
config.action_view.logger = nil"
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
93
111
|
end
|
data/lib/ocean/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ocean-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.29.
|
4
|
+
version: 1.29.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Bengtson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|