production_toolkit 0.2.0.pre.alpha.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +11 -10
- data/lib/production_toolkit.rb +2 -1
- data/lib/production_toolkit/initializers/logging.rb +9 -0
- data/lib/production_toolkit/railtie.rb +1 -0
- data/lib/production_toolkit/version.rb +1 -1
- data/production_toolkit.gemspec +0 -1
- metadata +6 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 003ba95f5f7edaf83b1ef7780f9b0847156f2c68
|
4
|
+
data.tar.gz: 0b0f1245f9dbed2504ad15002733c05eb477c882
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b6212908f35f2c1cc3d109a2f25c2237252f1c671c36cc826a2abcd977e5b6b15999e28f9010d564f757fafcc2beba634c517eeeb8659fb4aa81576255f6740
|
7
|
+
data.tar.gz: 2c53272c49b08afb32c2399f4715d2c6ca771730a500c5fd7138d44094812864d69f8aa0eea00761b0e5d76cfccabee0685927f6429d015ec437af6506f3d89b
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -19,13 +19,14 @@ gem 'production_toolkit'
|
|
19
19
|
|
20
20
|
Also add the relevant dependencies of your project:
|
21
21
|
|
22
|
-
|
23
|
-
gem '
|
24
|
-
gem '
|
25
|
-
gem 'le'
|
26
|
-
gem 'rollbar', '~> 2.4.0'
|
27
|
-
gem 'lograge', '~> 0.3.6'
|
28
|
-
gem 'rollbar', '~> 2.9.0'
|
22
|
+
```ruby
|
23
|
+
gem 'pansophy', '~> 0.3'
|
24
|
+
gem 'unicorn'
|
25
|
+
gem 'le'
|
26
|
+
gem 'rollbar', '~> 2.4.0'
|
27
|
+
gem 'lograge', '~> 0.3.6'
|
28
|
+
gem 'rollbar', '~> 2.9.0'
|
29
|
+
```
|
29
30
|
|
30
31
|
# SYNOPSIS
|
31
32
|
|
@@ -38,8 +39,8 @@ As these contain many basic examples with expected output.
|
|
38
39
|
|
39
40
|
When using the 'le' gem, production_toolkit will set the log level to the one defined in the application's production.rb (for version >= 0.1.3).
|
40
41
|
|
41
|
-
|
42
|
-
|
43
|
-
|
42
|
+
```ruby
|
43
|
+
config.log_level = :warn
|
44
|
+
```
|
44
45
|
|
45
46
|
If a log level is not defined by the app, the logger will default to 'info' level logging.
|
data/lib/production_toolkit.rb
CHANGED
@@ -3,7 +3,8 @@ require 'production_toolkit/railtie' if defined?(Rails)
|
|
3
3
|
TOOL_DEFAULTS = {
|
4
4
|
config_fetcher: 'pansophy',
|
5
5
|
error_reporting: 'rollbar',
|
6
|
-
|
6
|
+
log_files: 'le',
|
7
|
+
performance_monitor: 'off',
|
7
8
|
server: 'unicorn',
|
8
9
|
log_format: 'production_toolkit/lograge'
|
9
10
|
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
if defined?(Rails)
|
2
|
+
if Rails.env.production?
|
3
|
+
require 'le'
|
4
|
+
log_entries_key = Rails.application.secrets.log_entries_key
|
5
|
+
log_level_symbol = Rails.application.config.log_level || :info
|
6
|
+
log_level = Logger.const_get(log_level_symbol.to_s.upcase)
|
7
|
+
Rails.logger = Le.new(log_entries_key, ssl: true, tag: true, log_level: log_level)
|
8
|
+
end
|
9
|
+
end
|
data/production_toolkit.gemspec
CHANGED
@@ -23,7 +23,6 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_development_dependency 'unicorn', '~> 4.8'
|
24
24
|
spec.add_development_dependency 'pansophy', '~> 0.5'
|
25
25
|
spec.add_development_dependency 'le', '~> 2.6'
|
26
|
-
spec.add_development_dependency 'newrelic_rpm', '~> 3.9'
|
27
26
|
spec.add_development_dependency 'lograge', '~> 0.3.6'
|
28
27
|
|
29
28
|
spec.add_development_dependency 'bundler'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: production_toolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Noack
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rollbar
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '2.6'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: newrelic_rpm
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '3.9'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '3.9'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: lograge
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -233,6 +219,7 @@ files:
|
|
233
219
|
- README.md
|
234
220
|
- Rakefile
|
235
221
|
- lib/production_toolkit.rb
|
222
|
+
- lib/production_toolkit/initializers/logging.rb
|
236
223
|
- lib/production_toolkit/initializers/lograge.rb
|
237
224
|
- lib/production_toolkit/initializers/rollbar.rb
|
238
225
|
- lib/production_toolkit/lograge.rb
|
@@ -255,12 +242,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
255
242
|
version: '0'
|
256
243
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
257
244
|
requirements:
|
258
|
-
- - "
|
245
|
+
- - ">="
|
259
246
|
- !ruby/object:Gem::Version
|
260
|
-
version:
|
247
|
+
version: '0'
|
261
248
|
requirements: []
|
262
249
|
rubyforge_project:
|
263
|
-
rubygems_version: 2.6.
|
250
|
+
rubygems_version: 2.6.8
|
264
251
|
signing_key:
|
265
252
|
specification_version: 4
|
266
253
|
summary: Integrate production gems for high quality projects.
|