rails-quietly 0.0.2 → 0.0.3

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: '0901cb57bf4a969bf26c50c04c9ab556bc417d001ab7c794f57bc6bd24d9092a'
4
- data.tar.gz: fd3164c23d88f14393649fcec4c1629e983090f681400358b18218a7fc06890a
3
+ metadata.gz: 8f509c2981017b96905d941f18a91a4f74fc64b33bd7c2ff88c4522d3368dac7
4
+ data.tar.gz: 0fdf9cb8a0d9055507aaa73df18bcf631afddf1938631d1173be5471436844d3
5
5
  SHA512:
6
- metadata.gz: 61f548f5607c209a74a1b19e6bb366402a2d2c565646b21d63548963117ca27fe84bd6b3f2df3ba3aae35b6149764ce9c2c71bf7d73f69982fae776c579e7c8c
7
- data.tar.gz: 9873cf813444c887e3cba7268466efb5d3291556e448f95cdfa4bb7178c4998b971ed290284587a27fb9a06de7fcec70e376dbe8aa3287b3843e16dff55b7067
6
+ metadata.gz: af84ab294eb46dc9df87082875ad5635fa70cb8dfd1d46fdb930db35af21433a0cb5dd8a40654323d8a29e309ab1d6101d98d4c3f8a08a0a0f20836f5caca5b5
7
+ data.tar.gz: 98152a464aca9f84d7760eea57949a00f9c211729134bc9e28ead31bb7d6bc609781a8da85a3a7c9afa7d687c8bdbd9a3c31c81402741445078fd771250f20c8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails-quietly (0.0.2)
4
+ rails-quietly (0.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/Readme.md ADDED
@@ -0,0 +1,52 @@
1
+ # Rails, Quietly
2
+
3
+ A simple wrapper to suppress logging in various ways in Rails apps.
4
+
5
+ ## Installation
6
+
7
+ Add this to your Gemfile:
8
+
9
+ ```ruby
10
+ gem 'rails-quietly'
11
+ ```
12
+
13
+ or install directly:
14
+
15
+ ```bash
16
+ gem install rails-quietly
17
+ ```
18
+
19
+ ## Inclusion
20
+
21
+ In `config/applicaiton.rb`, include the following:
22
+
23
+ ```ruby
24
+ require 'quietly'
25
+ include Quietly
26
+ ```
27
+
28
+ This puts the module into global scope.
29
+
30
+ ## Usage
31
+
32
+ You can either use the `quietly` method with a block:
33
+
34
+ ```ruby
35
+ result_b = quietly do
36
+ a = ModelA.query
37
+ ModelB.query(a)
38
+ end
39
+ ```
40
+
41
+ or manually suppress and restore logging:
42
+
43
+ ```ruby
44
+ old_logger = go_quiet
45
+
46
+ a = ModelA.query
47
+ result_b = ModelB.query(a)
48
+
49
+ end_quiet(old_logger)
50
+
51
+ result_b
52
+ ```
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'rails-quietly'
3
- s.version = '0.0.2'
3
+ s.version = '0.0.3'
4
4
  s.date = '2019-04-08'
5
5
  s.summary = 'Simple wrapper for suppressing logging in Rails'
6
6
  s.description = 'A simple wrapper to suppress logging in various ways in Rails apps.'
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.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander
@@ -18,6 +18,7 @@ extra_rdoc_files: []
18
18
  files:
19
19
  - Gemfile
20
20
  - Gemfile.lock
21
+ - Readme.md
21
22
  - lib/quietly.rb
22
23
  - rails-quietly.gemspec
23
24
  homepage: http://rubygems.org/gems/rails-quietly