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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f373b0084d189e8c0b81470a50ab2d4023b67b0f
4
- data.tar.gz: 3d2d61fca09bb618f2f5d7db0e62bd1b7bb5b364
3
+ metadata.gz: 6b54c57ee9a4c7ca502eabb9dce01b0e2e7d1690
4
+ data.tar.gz: 5305ccd94565d5c10e15bcf3d9f79e7abff14374
5
5
  SHA512:
6
- metadata.gz: b5ed2cfe4d14783b65fd8b31b2eb4e770e107bec7f440e117cca55562210c006ca96999dcaf16e0134df0986c96f0064263333a4c632cafe68ccdd3ca48934ae
7
- data.tar.gz: 3e523bb7764ab37ea6225201a881332c32a066bf40a0219653958158da02240f147407cb6ca2bf4bfd786ac98d641ad163f5f67df113eefb965b297fce1a5767
6
+ metadata.gz: a1f27b6eff59fc19c409bb29c0247edc6bc85a2da6bb9fa7233e73fe881f4ef854493919c174f237ca3710c581c66f032dbf456d17be3a610d7e3a3243b2d987
7
+ data.tar.gz: e46d475a81af312755188a2a4be7e615fdc763eca62827abe0a4d39f572947c3e7fc21054bc739fa73e1ef966d5a2110144e45001ab0cea82b65970d12172259
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.1.2
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.6.1'
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 'guard-spring'
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
- watch(%r{^spec/.+_spec\.rb$})
3
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
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
- # Rails example
8
- watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
9
- watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
10
- watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
11
- watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
12
- watch('config/routes.rb') { "spec/routing" }
13
- watch('app/controllers/application_controller.rb') { "spec/controllers" }
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
@@ -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 thatn `expected` it's highligted yellow. If it's 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
@@ -1,5 +1,5 @@
1
1
  module Shog
2
- VERSION_NUMBER = "0.1.3"
2
+ VERSION_NUMBER = "0.1.4"
3
3
  VERSION_SUFFIX = ""
4
4
  VERSION = "#{VERSION_NUMBER}#{VERSION_SUFFIX}"
5
5
  end
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.3
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: 2014-07-21 00:00:00.000000000 Z
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.3.0
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