rails-quietly 0.0.1 → 0.0.2

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
  SHA256:
3
- metadata.gz: 12d9928081f951e48e7c73a0dbde9b23458e61bdafdbcf05a51b089c2fbf933d
4
- data.tar.gz: a2f6d99510d0493d645ce0d350af6fdfe967136346099b18007531d2b21c751d
3
+ metadata.gz: '0901cb57bf4a969bf26c50c04c9ab556bc417d001ab7c794f57bc6bd24d9092a'
4
+ data.tar.gz: fd3164c23d88f14393649fcec4c1629e983090f681400358b18218a7fc06890a
5
5
  SHA512:
6
- metadata.gz: f658b402c6c1f6409a77d48bfaffaf6b5166522f3ccb174c217322ee93e58c7f7f3346eddb5d65e905856f812b12494b5f897edc5f824f6c96fb5165205faf09
7
- data.tar.gz: 0ba5b58fc4c89376607f42cab6343ceffdcfb95eafb9b663105e0345982780774b3af552bdee0efb8771a0a54fb44f0cec90d5b47fc5bbbef182bdf9d4e09807
6
+ metadata.gz: 61f548f5607c209a74a1b19e6bb366402a2d2c565646b21d63548963117ca27fe84bd6b3f2df3ba3aae35b6149764ce9c2c71bf7d73f69982fae776c579e7c8c
7
+ data.tar.gz: 9873cf813444c887e3cba7268466efb5d3291556e448f95cdfa4bb7178c4998b971ed290284587a27fb9a06de7fcec70e376dbe8aa3287b3843e16dff55b7067
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source "https://rubygems.org"
2
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,17 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rails-quietly (0.0.2)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+
10
+ PLATFORMS
11
+ ruby
12
+
13
+ DEPENDENCIES
14
+ rails-quietly!
15
+
16
+ BUNDLED WITH
17
+ 2.0.0
data/lib/quietly.rb ADDED
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Quietly
4
+ def go_quiet
5
+ old_logger = ::ActiveRecord::Base.logger
6
+ ::ActiveRecord::Base.logger = nil
7
+ old_logger
8
+ end
9
+
10
+ def end_quiet(old_logger)
11
+ ::ActiveRecord::Base.logger = old_logger
12
+ end
13
+
14
+ def quietly
15
+ old_logger = go_quiet
16
+ result = yield
17
+ end_quiet(old_logger)
18
+ result
19
+ end
20
+ end
@@ -0,0 +1,13 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'rails-quietly'
3
+ s.version = '0.0.2'
4
+ s.date = '2019-04-08'
5
+ s.summary = 'Simple wrapper for suppressing logging in Rails'
6
+ s.description = 'A simple wrapper to suppress logging in various ways in Rails apps.'
7
+ s.homepage = 'http://rubygems.org/gems/rails-quietly'
8
+ s.license = 'GPL-3.0'
9
+ s.authors = ['Julian Fiander']
10
+ s.email = 'julian@fiander.one'
11
+ s.require_paths = %w[lib]
12
+ s.files = `git ls-files`.split("\n")
13
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-quietly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander
@@ -15,7 +15,11 @@ email: julian@fiander.one
15
15
  executables: []
16
16
  extensions: []
17
17
  extra_rdoc_files: []
18
- files: []
18
+ files:
19
+ - Gemfile
20
+ - Gemfile.lock
21
+ - lib/quietly.rb
22
+ - rails-quietly.gemspec
19
23
  homepage: http://rubygems.org/gems/rails-quietly
20
24
  licenses:
21
25
  - GPL-3.0