logging_good 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c71fca99786df325a6e87f9d8f8b3ad2fd0e3f53b28e26d429ac1593313bfcb
4
- data.tar.gz: 5bfb075fd1a8a914c1ef866500cd27aeb13f3ee4ca9260204308e5f14efcffde
3
+ metadata.gz: 49ab600ebb43eaa6f928434f76b43775455194708154390297200361bd8a73ba
4
+ data.tar.gz: a512714a6d1ee8481e1e42ce2776024dc4d3d05f6dd7d46e67565b0d067acabf
5
5
  SHA512:
6
- metadata.gz: 9c863851e8d43a3e86fb98aed41768fac2aa8b099a334a85a8954a98a7fa4bd8049f6643155498e0fe1c3eb2a6148246c3abbbc705a5445da3cb3e49d409ed92
7
- data.tar.gz: '059371d8a52169bbe9156e554c6ccecf03e6674840f702e6f867b481329cc56dcca33bd5e3b93ac1cad0396befdab125db8cf92ea0b9f14f733267cece323552'
6
+ metadata.gz: 0bbd9eeae217c1b05692a3954cac58cfc6754c6540d9119dc5f64b9d542f932bf95ade204d0820973e8d6495f8c5c5a7863b6fe4dd9d04f78898629d892f3691
7
+ data.tar.gz: 2d0bbfe41afca1ad6116d5b9de1194ff6d7d608b444b192abe9eda2abe10ec28ad4596e9ca285d24b6459807c6ac8f5e4ad6da44a7a0e1f1e029b8b0bd71f686
data/.gitignore CHANGED
@@ -9,3 +9,6 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+
13
+ # Ignore application configuration
14
+ /config/application.yml
data/Gemfile.lock CHANGED
@@ -1,14 +1,22 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- logging_good (0.1.0)
4
+ logging_good (1.0.0)
5
5
  terminal-table (~> 1.8)
6
6
  unicode-display_width (~> 1.6)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
+ codecov (0.1.14)
12
+ json
13
+ simplecov
14
+ url
11
15
  diff-lcs (1.3)
16
+ docile (1.3.2)
17
+ figaro (1.1.1)
18
+ thor (~> 0.14)
19
+ json (2.2.0)
12
20
  rake (10.5.0)
13
21
  rspec (3.8.0)
14
22
  rspec-core (~> 3.8.0)
@@ -23,15 +31,24 @@ GEM
23
31
  diff-lcs (>= 1.2.0, < 2.0)
24
32
  rspec-support (~> 3.8.0)
25
33
  rspec-support (3.8.2)
34
+ simplecov (0.17.0)
35
+ docile (~> 1.1)
36
+ json (>= 1.8, < 3)
37
+ simplecov-html (~> 0.10.0)
38
+ simplecov-html (0.10.2)
26
39
  terminal-table (1.8.0)
27
40
  unicode-display_width (~> 1.1, >= 1.1.1)
41
+ thor (0.20.3)
28
42
  unicode-display_width (1.6.0)
43
+ url (0.3.2)
29
44
 
30
45
  PLATFORMS
31
46
  ruby
32
47
 
33
48
  DEPENDENCIES
34
49
  bundler (~> 2.0)
50
+ codecov
51
+ figaro (~> 1.1, >= 1.1.1)
35
52
  logging_good!
36
53
  rake (~> 10.0)
37
54
  rspec (~> 3.0)
data/Logging-Good.gif ADDED
Binary file
data/README.md CHANGED
@@ -1,12 +1,18 @@
1
- # LoggingGood
1
+ # Logging-Good
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/logging_good`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ ### hereafter, Rails logger is your best friend 👬
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ [![Gem](https://img.shields.io/gem/v/logging_good.svg?style=flat)](http://rubygems.org/gems/logging_good "View this project in Rubygems")
6
+ [![Build Status](https://travis-ci.org/manojnaidu619/logging-good.svg?branch=master)](https://travis-ci.org/manojnaidu619/logging-good)
7
+ [![codecov](https://codecov.io/gh/manojnaidu619/logging-good/branch/master/graph/badge.svg)](https://codecov.io/gh/manojnaidu619/logging-good)
8
+ [![codebeat badge](https://codebeat.co/badges/e47277ea-b906-4560-a86a-e8d265b848cc)](https://codebeat.co/projects/github-com-manojnaidu619-logging-good-master)
6
9
 
7
- ## Installation
10
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/manojnaidu619/logging-good/pulls)
11
+ [![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/manojnaidu619)
12
+
13
+ ![](Logging-Good.gif)
8
14
 
9
- Add this line to your application's Gemfile:
15
+ ## Installation
10
16
 
11
17
  ```ruby
12
18
  gem 'logging_good'
@@ -20,24 +26,42 @@ Or install it yourself as:
20
26
 
21
27
  $ gem install logging_good
22
28
 
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/logging_good. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
29
+ ## How to use
36
30
 
37
- ## License
31
+ **IMPORTANT** ! This gem is dependent on two other display formatting gems. Install it by adding below lines to your `Gemfile`
38
32
 
39
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
33
+ ```ruby
34
+ gem "unicode-display_width", '~> 1.6'
35
+ gem "terminal-table", '~> 1.8', '>= 1.8.0'
36
+ ```
37
+ then run `$ bundle install`
40
38
 
41
- ## Code of Conduct
39
+ So. After installing the above mentioned gems into your `Gemfile`, you are all set to explore this gem further...
42
40
 
43
- Everyone interacting in the LoggingGood project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/logging_good/blob/master/CODE_OF_CONDUCT.md).
41
+ Now, add this line into your controller action(s) to get started!
42
+ ```ruby
43
+ Now.logging_good(params)
44
+ ```
45
+ Other optional Arguments :
46
+ ```ruby
47
+ request
48
+ response.headers
49
+ ```
50
+ example:
51
+ ```ruby
52
+ # In app/controllers/abcd_controller.rb
53
+
54
+ def index
55
+ Now.logging_good(params, request)
56
+ ......
57
+ ......
58
+ end
59
+
60
+ def create
61
+ Now.logging_good(params)
62
+ ......
63
+ ......
64
+ end
65
+ ......
66
+ ```
67
+ That's Basically it. You are now able to see beautifully formatted data in your rails logs 🙌
data/lib/logging_good.rb CHANGED
@@ -50,7 +50,8 @@ def request_table(request)
50
50
  HTTP_ACCEPT: req["HTTP_ACCEPT"],
51
51
  HTTP_CONNECTION: req["HTTP_CONNECTION"],
52
52
  SERVER_NAME: req["SERVER_NAME"],
53
- SERVER_SOFTWARE: req["SERVER_SOFTWARE"]
53
+ SERVER_SOFTWARE: req["SERVER_SOFTWARE"],
54
+ SERVER_PORT: req["SERVER_PORT"]
54
55
  }
55
56
  table = generate_table(new_req, "REQUEST")
56
57
  puts table
@@ -1,3 +1,3 @@
1
1
  module LoggingGood
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
data/logging_good.gemspec CHANGED
@@ -26,6 +26,8 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency "rspec", "~> 3.0"
27
27
  spec.add_development_dependency "unicode-display_width", '~> 1.6'
28
28
  spec.add_development_dependency "terminal-table", '~> 1.8', '>= 1.8.0'
29
+ spec.add_development_dependency 'figaro', '~> 1.1', '>= 1.1.1'
30
+ spec.add_development_dependency 'codecov'
29
31
 
30
32
  spec.add_runtime_dependency "terminal-table", '~> 1.8'
31
33
  spec.add_runtime_dependency "unicode-display_width", '~> 1.6'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logging_good
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manoj Naidu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-30 00:00:00.000000000 Z
11
+ date: 2019-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -86,6 +86,40 @@ dependencies:
86
86
  - - ">="
87
87
  - !ruby/object:Gem::Version
88
88
  version: 1.8.0
89
+ - !ruby/object:Gem::Dependency
90
+ name: figaro
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '1.1'
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: 1.1.1
99
+ type: :development
100
+ prerelease: false
101
+ version_requirements: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - "~>"
104
+ - !ruby/object:Gem::Version
105
+ version: '1.1'
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: 1.1.1
109
+ - !ruby/object:Gem::Dependency
110
+ name: codecov
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ type: :development
117
+ prerelease: false
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
89
123
  - !ruby/object:Gem::Dependency
90
124
  name: terminal-table
91
125
  requirement: !ruby/object:Gem::Requirement
@@ -129,6 +163,7 @@ files:
129
163
  - Gemfile
130
164
  - Gemfile.lock
131
165
  - LICENSE.txt
166
+ - Logging-Good.gif
132
167
  - README.md
133
168
  - Rakefile
134
169
  - bin/console