shog 0.1.3 → 0.1.4
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 +4 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +1 -0
- data/Gemfile +2 -3
- data/Guardfile +14 -13
- data/lib/shog.rb +2 -2
- data/lib/shog/formatter.rb +1 -1
- data/lib/shog/rails.rb +1 -0
- data/lib/shog/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b54c57ee9a4c7ca502eabb9dce01b0e2e7d1690
|
4
|
+
data.tar.gz: 5305ccd94565d5c10e15bcf3d9f79e7abff14374
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1f27b6eff59fc19c409bb29c0247edc6bc85a2da6bb9fa7233e73fe881f4ef854493919c174f237ca3710c581c66f032dbf456d17be3a610d7e3a3243b2d987
|
7
|
+
data.tar.gz: e46d475a81af312755188a2a4be7e615fdc763eca62827abe0a4d39f572947c3e7fc21054bc739fa73e1ef966d5a2110144e45001ab0cea82b65970d12172259
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1
|
1
|
+
2.2.1
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
See https://github.com/phallguy/shog/releases
|
data/Gemfile
CHANGED
@@ -4,13 +4,12 @@ source 'https://rubygems.org'
|
|
4
4
|
gemspec
|
5
5
|
|
6
6
|
|
7
|
-
gem 'guard', '~> 2.
|
7
|
+
gem 'guard', '~> 2.12.5'
|
8
8
|
gem 'spring'
|
9
9
|
gem 'byebug'
|
10
10
|
gem 'pry-byebug'
|
11
11
|
gem 'guard-rspec'
|
12
|
-
gem '
|
13
|
-
gem 'fuubar', github: 'thekompanee/fuubar'
|
12
|
+
gem 'fuubar'
|
14
13
|
gem 'foreman'
|
15
14
|
gem 'yard'
|
16
15
|
gem 'redcarpet'
|
data/Guardfile
CHANGED
@@ -1,15 +1,16 @@
|
|
1
|
-
guard :rspec do
|
2
|
-
|
3
|
-
|
4
|
-
watch('spec/spec_helper.rb') { "spec" }
|
5
|
-
watch('spec/support/*.rb') { "spec" }
|
1
|
+
guard :rspec, cmd: "bundle exec rspec" do
|
2
|
+
require "guard/rspec/dsl"
|
3
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
6
4
|
|
7
|
-
#
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
watch(
|
12
|
-
watch(
|
13
|
-
watch(
|
14
|
-
end
|
5
|
+
# Feel free to open issues for suggestions and improvements
|
6
|
+
|
7
|
+
# RSpec files
|
8
|
+
rspec = dsl.rspec
|
9
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
10
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
11
|
+
watch(rspec.spec_files)
|
15
12
|
|
13
|
+
# Ruby files
|
14
|
+
ruby = dsl.ruby
|
15
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
16
|
+
end
|
data/lib/shog.rb
CHANGED
@@ -9,6 +9,6 @@ module Shog
|
|
9
9
|
# Set up formatting options for the default rails logger.
|
10
10
|
# @see Shog::Formatter#configure
|
11
11
|
def self.configure(&block)
|
12
|
-
::Rails.logger.formatter.configure &block
|
12
|
+
::Rails.logger.formatter = Shog::Formatter.new.configure &block
|
13
13
|
end
|
14
|
-
end
|
14
|
+
end
|
data/lib/shog/formatter.rb
CHANGED
@@ -72,7 +72,7 @@ module Shog
|
|
72
72
|
# Formats a time value expressed in ms, adding color to highlight times
|
73
73
|
# outside the expected range.
|
74
74
|
#
|
75
|
-
# If `time` is more
|
75
|
+
# If `time` is more than `expected` it's highlighted yellow. If it's more
|
76
76
|
# than double it's highlighted red.
|
77
77
|
#
|
78
78
|
# @param [String] time in ms.
|
data/lib/shog/rails.rb
CHANGED
@@ -6,6 +6,7 @@ module Shog
|
|
6
6
|
# Automatically integrate Shog with the rails logger.
|
7
7
|
class Railtie < ::Rails::Railtie
|
8
8
|
config.before_initialize do
|
9
|
+
next if ::Rails.logger.formatter.class == Shog::Formatter
|
9
10
|
::Rails.logger.formatter = Shog::Formatter.new.configure do
|
10
11
|
with :defaults
|
11
12
|
with :requests
|
data/lib/shog/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Alexander
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -94,6 +94,7 @@ files:
|
|
94
94
|
- ".ruby-version"
|
95
95
|
- ".sublimelinterrc"
|
96
96
|
- ".yardopts"
|
97
|
+
- CHANGELOG.md
|
97
98
|
- Gemfile
|
98
99
|
- Guardfile
|
99
100
|
- LICENSE
|
@@ -133,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
134
|
version: '0'
|
134
135
|
requirements: []
|
135
136
|
rubyforge_project:
|
136
|
-
rubygems_version: 2.
|
137
|
+
rubygems_version: 2.4.6
|
137
138
|
signing_key:
|
138
139
|
specification_version: 4
|
139
140
|
summary: Make rails 4.0 log details more colorful
|