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: fcf55b4f49837f9a37be96010aa3e638895d1326
4
- data.tar.gz: 9c6a3af682a40a0ea6c492fb2f43d4da537a3cd3
3
+ metadata.gz: 3236195a6f9bc09b82f30b266134bdee733b6877
4
+ data.tar.gz: da30535ec21331c8881a1762fa19ff7018cb5509
5
5
  SHA512:
6
- metadata.gz: e6291db5e043024c0da10a7087322b91a9cd96c0445b7472ecfb6a6ff88a99ad98885ec8fbb44bdb6e9217351dbfe72f4e60d88ba46db04c095cbbf1a8f07f3d
7
- data.tar.gz: dcb7bcf7fc48b0ce69c8ca4938ea6e18ea89f05fd623b3ffdf0399986db8f5523b898b09b0b9e6a1d1fa5d150a67e01aac4e88c6e3c169ba486676fdc2ef4dd1
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 = ActiveSupport::TaggedLogging.new(ZeromqLogger.new)
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
@@ -1,3 +1,3 @@
1
1
  module Ocean
2
- VERSION = "1.29.0"
2
+ VERSION = "1.29.1"
3
3
  end
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.0
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-01-31 00:00:00.000000000 Z
11
+ date: 2014-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday