better_logs 0.0.1.alpha1 → 0.1.0

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
  SHA1:
3
- metadata.gz: 940d8126bd51e74118baef158662a95dbd33a4fd
4
- data.tar.gz: 70081daa195b06a3e2ddec056ecb17ab54b65151
3
+ metadata.gz: ece6d96bc5daf1b196109b2c1c2862ea7a148a77
4
+ data.tar.gz: c109e15ba3a254740b285505310bdfbde6bb6037
5
5
  SHA512:
6
- metadata.gz: 194c0bf6cf9b3aa7ce6916e454fb3c8d57e7962960615bb9893cdd5a2297d31b047a95fd98f77a63aef4028f2344af4e9bbc38727a6cf9e47604e6010ccc726c
7
- data.tar.gz: 35ef1df79a8915caa6d5cdb9c201fab2ba2d3f4a8ea716e1a6d9fd86abf64c94a470ecc5a7e7c90d3be1cbc13b2e01e2f989f06d0415818f76fe7a55b03f1ef6
6
+ metadata.gz: 485eadc726d53f1b691872d19ccab0cb33ddb17f4352eb2883ca64f0b82eeb6da0d83c67f4e91407a719efa4982c9f1f384985c045104f116a264b01e67608e1
7
+ data.tar.gz: 59655ca7c6337bc82ca761c0fe69dbcbcbb62ead6b416c24e064c1571502724b23731e6356ff001a25920d6ee53d12d5b004ca1561f7ae57ded6638e70b5f894
data/.coveralls.yml ADDED
@@ -0,0 +1,2 @@
1
+ service_name: travis-pro
2
+ repo_token: 1RYbSf31ZCua8YV3evfPN7s21wM1ddTZs
data/.travis.yml CHANGED
@@ -1,5 +1,12 @@
1
- language: ruby
1
+ language:
2
+ - ruby
3
+ cache:
4
+ - bundler
2
5
  rvm:
3
6
  - 1.9.3
4
7
  - 2.0.0
5
8
  - 2.1.0
9
+ addons:
10
+ code_climate:
11
+ repo_token:
12
+ secure: IBQdXqdWdfTPduZhn4GJ/K0gcPY+1pJRH8AQvnoRTHWFrtOUAiLjPDycoyGA46BG4Zp5OOLeOloPvgctN80I7utVlg43bqZUgykCuBQRhW2yVN1eoBMDhhQ1zhDAuTCmI4Cpnj2ly1xQF4sKNxTOZNZmk+MTtEurFbewju+a518=
data/Gemfile CHANGED
@@ -6,11 +6,11 @@ gem 'railties', '~> 4.0'
6
6
  gem 'flat_keys', '~> 0.0'
7
7
 
8
8
  group :development do
9
- gem 'rdoc', '~> 3.12'
10
- gem 'bundler', '~> 1.0'
11
- gem 'jeweler', '~> 2.0'
12
- gem 'simplecov', '~> 0.8'
13
- gem 'rspec', '~> 2.14'
14
- gem 'guard-rspec', '~> 4.2'
15
- gem 'terminal-notifier-guard', '~> 1.5'
9
+ gem 'rdoc', '~> 4.1'
10
+ gem 'bundler', '~> 1.0'
11
+ gem 'jeweler', '~> 2.0'
12
+ gem 'rspec', '~> 2.14'
13
+ gem 'guard-rspec', '~> 4.2'
14
+ gem 'terminal-notifier-guard', '~> 1.5'
15
+ gem 'codeclimate-test-reporter', '~> 0.3', require: nil
16
16
  end
data/Gemfile.lock CHANGED
@@ -23,6 +23,8 @@ GEM
23
23
  celluloid-io (0.15.0)
24
24
  celluloid (>= 0.15.0)
25
25
  nio4r (>= 0.5.0)
26
+ codeclimate-test-reporter (0.3.0)
27
+ simplecov (>= 0.7.1, < 1.0.0)
26
28
  coderay (1.1.0)
27
29
  descendants_tracker (0.0.4)
28
30
  thread_safe (~> 0.3, >= 0.3.1)
@@ -43,9 +45,9 @@ GEM
43
45
  multi_json (>= 1.7.5, < 2.0)
44
46
  nokogiri (~> 1.6.0)
45
47
  oauth2
46
- guard (2.5.1)
48
+ guard (2.6.0)
47
49
  formatador (>= 0.2.4)
48
- listen (~> 2.6)
50
+ listen (~> 2.7)
49
51
  lumberjack (~> 1.0)
50
52
  pry (>= 0.9.12)
51
53
  thor (>= 0.18.1)
@@ -67,12 +69,12 @@ GEM
67
69
  json (1.8.1)
68
70
  jwt (0.1.11)
69
71
  multi_json (>= 1.5)
70
- listen (2.7.0)
72
+ listen (2.7.2)
71
73
  celluloid (>= 0.15.2)
72
74
  celluloid-io (>= 0.15.0)
73
75
  rb-fsevent (>= 0.9.3)
74
76
  rb-inotify (>= 0.9)
75
- lumberjack (1.0.4)
77
+ lumberjack (1.0.5)
76
78
  method_source (0.8.2)
77
79
  mini_portile (0.5.3)
78
80
  minitest (5.3.3)
@@ -104,7 +106,7 @@ GEM
104
106
  rb-fsevent (0.9.4)
105
107
  rb-inotify (0.9.3)
106
108
  ffi (>= 0.5.0)
107
- rdoc (3.12.2)
109
+ rdoc (4.1.1)
108
110
  json (~> 1.4)
109
111
  rspec (2.14.1)
110
112
  rspec-core (~> 2.14.0)
@@ -119,7 +121,7 @@ GEM
119
121
  multi_json
120
122
  simplecov-html (~> 0.8.0)
121
123
  simplecov-html (0.8.0)
122
- slop (3.4.7)
124
+ slop (3.5.0)
123
125
  terminal-notifier-guard (1.5.3)
124
126
  thor (0.19.1)
125
127
  thread_safe (0.3.3)
@@ -134,11 +136,11 @@ DEPENDENCIES
134
136
  actionpack (~> 4.0)
135
137
  activesupport (~> 4.0)
136
138
  bundler (~> 1.0)
139
+ codeclimate-test-reporter (~> 0.3)
137
140
  flat_keys (~> 0.0)
138
141
  guard-rspec (~> 4.2)
139
142
  jeweler (~> 2.0)
140
143
  railties (~> 4.0)
141
- rdoc (~> 3.12)
144
+ rdoc (~> 4.1)
142
145
  rspec (~> 2.14)
143
- simplecov (~> 0.8)
144
146
  terminal-notifier-guard (~> 1.5)
data/Guardfile CHANGED
@@ -1,24 +1,5 @@
1
- # A sample Guardfile
2
- # More info at https://github.com/guard/guard#readme
3
-
4
- guard :rspec do
1
+ guard :rspec, cmd: 'clear; bundle exec rspec' do
5
2
  watch(%r{^spec/.+_spec\.rb$})
6
- watch(%r{^lib/(.+)\.rb$})
7
- # { |m| "spec/lib/#{m[1]}_spec.rb" }
8
- # watch('spec/spec_helper.rb') { "spec" }
9
- #
10
- # # Rails example
11
- # watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
12
- # watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
13
- # 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"] }
14
- # watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
15
- # watch('config/routes.rb') { "spec/routing" }
16
- # watch('app/controllers/application_controller.rb') { "spec/controllers" }
17
- #
18
- # # Capybara features specs
19
- # watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
20
- #
21
- # # Turnip features and steps
22
- # watch(%r{^spec/acceptance/(.+)\.feature$})
23
- # watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
3
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
4
+ watch('spec/spec_helper.rb') { "spec" }
24
5
  end
data/README.rdoc CHANGED
@@ -1,5 +1,7 @@
1
1
  {<img src="https://travis-ci.org/techthumb/better_logs.svg?branch=master" alt="Build Status" />}[https://travis-ci.org/techthumb/better_logs]
2
-
2
+ {<img src="https://badge.fury.io/rb/better_logs.svg" alt="Gem Version" />}[http://badge.fury.io/rb/better_logs]
3
+ {<img src="https://codeclimate.com/repos/535a5dcae30ba03fdc00efe2/badges/1196b8f5d38c79f87546/gpa.png" />}[https://codeclimate.com/repos/535a5dcae30ba03fdc00efe2/feed]
4
+ {<img src="https://codeclimate.com/repos/535a5dcae30ba03fdc00efe2/badges/1196b8f5d38c79f87546/coverage.png" />}[https://codeclimate.com/repos/535a5dcae30ba03fdc00efe2/feed]
3
5
  = BetterLogs
4
6
 
5
7
  Logging for Rails request/response lifecycle in a machine readable format (starting with Splunk) — Edit
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1.alpha1
1
+ 0.1.0
data/better_logs.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: better_logs 0.0.1.alpha1 ruby lib
5
+ # stub: better_logs 0.1.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "better_logs"
9
- s.version = "0.0.1.alpha1"
9
+ s.version = "0.1.0"
10
10
 
11
- s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Kunal Parikh"]
14
- s.date = "2014-04-25"
14
+ s.date = "2014-04-27"
15
15
  s.description = "Logging for Rails request/response lifecycle in a machine readable format (starting with Splunk)"
16
16
  s.email = "kunal@techthumb.in"
17
17
  s.extra_rdoc_files = [
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
19
19
  "README.rdoc"
20
20
  ]
21
21
  s.files = [
22
+ ".coveralls.yml",
22
23
  ".document",
23
24
  ".travis.yml",
24
25
  "Gemfile",
@@ -37,11 +38,10 @@ Gem::Specification.new do |s|
37
38
  "lib/better_logs/formatters/key_value_formatter.rb",
38
39
  "lib/better_logs/initializer.rb",
39
40
  "lib/better_logs/railtie.rb",
40
- "spec/action_controller/payload_spec.rb",
41
- "spec/formatters/key_value_formatter_spec.rb",
42
- "spec/spec_helper.rb",
43
- "test/helper.rb",
44
- "test/test_better_logging.rb"
41
+ "spec/lib/better_logs/action_controller/log_subscriber_spec.rb",
42
+ "spec/lib/better_logs/action_controller/payload_spec.rb",
43
+ "spec/lib/better_logs/formatters/key_value_formatter_spec.rb",
44
+ "spec/spec_helper.rb"
45
45
  ]
46
46
  s.homepage = "http://github.com/techthumb/better_logs"
47
47
  s.licenses = ["MIT"]
@@ -56,38 +56,38 @@ Gem::Specification.new do |s|
56
56
  s.add_runtime_dependency(%q<actionpack>, ["~> 4.0"])
57
57
  s.add_runtime_dependency(%q<railties>, ["~> 4.0"])
58
58
  s.add_runtime_dependency(%q<flat_keys>, ["~> 0.0"])
59
- s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
59
+ s.add_development_dependency(%q<rdoc>, ["~> 4.1"])
60
60
  s.add_development_dependency(%q<bundler>, ["~> 1.0"])
61
61
  s.add_development_dependency(%q<jeweler>, ["~> 2.0"])
62
- s.add_development_dependency(%q<simplecov>, ["~> 0.8"])
63
62
  s.add_development_dependency(%q<rspec>, ["~> 2.14"])
64
63
  s.add_development_dependency(%q<guard-rspec>, ["~> 4.2"])
65
64
  s.add_development_dependency(%q<terminal-notifier-guard>, ["~> 1.5"])
65
+ s.add_development_dependency(%q<codeclimate-test-reporter>, ["~> 0.3"])
66
66
  else
67
67
  s.add_dependency(%q<activesupport>, ["~> 4.0"])
68
68
  s.add_dependency(%q<actionpack>, ["~> 4.0"])
69
69
  s.add_dependency(%q<railties>, ["~> 4.0"])
70
70
  s.add_dependency(%q<flat_keys>, ["~> 0.0"])
71
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
71
+ s.add_dependency(%q<rdoc>, ["~> 4.1"])
72
72
  s.add_dependency(%q<bundler>, ["~> 1.0"])
73
73
  s.add_dependency(%q<jeweler>, ["~> 2.0"])
74
- s.add_dependency(%q<simplecov>, ["~> 0.8"])
75
74
  s.add_dependency(%q<rspec>, ["~> 2.14"])
76
75
  s.add_dependency(%q<guard-rspec>, ["~> 4.2"])
77
76
  s.add_dependency(%q<terminal-notifier-guard>, ["~> 1.5"])
77
+ s.add_dependency(%q<codeclimate-test-reporter>, ["~> 0.3"])
78
78
  end
79
79
  else
80
80
  s.add_dependency(%q<activesupport>, ["~> 4.0"])
81
81
  s.add_dependency(%q<actionpack>, ["~> 4.0"])
82
82
  s.add_dependency(%q<railties>, ["~> 4.0"])
83
83
  s.add_dependency(%q<flat_keys>, ["~> 0.0"])
84
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
84
+ s.add_dependency(%q<rdoc>, ["~> 4.1"])
85
85
  s.add_dependency(%q<bundler>, ["~> 1.0"])
86
86
  s.add_dependency(%q<jeweler>, ["~> 2.0"])
87
- s.add_dependency(%q<simplecov>, ["~> 0.8"])
88
87
  s.add_dependency(%q<rspec>, ["~> 2.14"])
89
88
  s.add_dependency(%q<guard-rspec>, ["~> 4.2"])
90
89
  s.add_dependency(%q<terminal-notifier-guard>, ["~> 1.5"])
90
+ s.add_dependency(%q<codeclimate-test-reporter>, ["~> 0.3"])
91
91
  end
92
92
  end
93
93
 
data/lib/better_logs.rb CHANGED
@@ -2,6 +2,7 @@ module ::BetterLogs
2
2
  end
3
3
 
4
4
  require 'flat_keys'
5
+ require 'rails'
5
6
  require 'active_support'
6
7
  require 'active_support/core_ext/hash/indifferent_access'
7
8
  require 'action_pack'
@@ -1,14 +1,13 @@
1
1
  class ::BetterLogs::ActionController::LogSubscriber < ActiveSupport::LogSubscriber
2
- def process_action(event)
3
- logger.info formatter.format(::BetterLogs::ActionController::Payload.new(event.payload))
4
- end
2
+ attr_reader :formatter, :logger
5
3
 
6
- private
7
- def logger
8
- Rails.logger
4
+ def initialize(formatter = ::BetterLogs::Formatters::KeyValueFormatter.new,
5
+ logger = ::Rails.logger)
6
+ @formatter = formatter
7
+ @logger = logger
9
8
  end
10
9
 
11
- def formatter
12
- @formatter ||= ::BetterLogs::Formatters::KeyValueFormatter.new
10
+ def process_action(event)
11
+ logger.info formatter.format(::BetterLogs::ActionController::Payload.new(event.payload))
13
12
  end
14
13
  end
@@ -3,6 +3,7 @@ class ::BetterLogs::ActionController::Payload < DelegateClass(ActiveSupport::Has
3
3
  def initialize(payload)
4
4
  payload = payload.with_indifferent_access
5
5
  data = payload.except(*IGNORED_KEYS)
6
+ data[:status] = 500 if data.has_key?(:exception)
6
7
  if data.has_key?(:params)
7
8
  data[:controller] = data[:params].delete(:controller)
8
9
  data[:action] = data[:params].delete(:action)
@@ -0,0 +1,21 @@
1
+ require 'spec_helper'
2
+
3
+ describe ::BetterLogs::ActionController::LogSubscriber do
4
+ context 'formatter' do
5
+ subject { described_class.new.formatter }
6
+
7
+ it "defaults to '#{::BetterLogs::Formatters::KeyValueFormatter.name}'" do
8
+ should be_an_instance_of ::BetterLogs::Formatters::KeyValueFormatter
9
+ end
10
+ end
11
+
12
+ context 'logger' do
13
+ before { Rails.stub(:logger).and_return(rails_logger) }
14
+ let(:rails_logger) { double(ActiveSupport::Logger) }
15
+ subject { described_class.new.logger }
16
+
17
+ it "defaults to 'Rails.logger'" do
18
+ should === rails_logger
19
+ end
20
+ end
21
+ end
@@ -1,15 +1,24 @@
1
1
  require 'spec_helper'
2
2
  describe ::BetterLogs::ActionController::Payload do
3
- let(:payload) { {nested: {keys: {should: {be: {flattened: 'with dots'}}}}} }
4
3
 
5
4
  subject { ::BetterLogs::ActionController::Payload.new(payload) }
6
5
 
7
6
  describe 'when payload is a nested hash' do
7
+ let(:payload) { {nested: {keys: {should: {be: {flattened: 'with dots'}}}}} }
8
8
  it 'flattens nested keys' do
9
9
  subject.should == { 'nested.keys.should.be.flattened' => 'with dots' }
10
10
  end
11
11
  end
12
12
 
13
+ describe 'when payload includes key :exception' do
14
+ let(:payload) { {exception: 'some exception'} }
15
+ it 'should add a status of 500' do
16
+ subject.should include('status')
17
+ subject['status'].should == 500
18
+ end
19
+ end
20
+
21
+
13
22
  %w(action controller).each do | key |
14
23
  describe "when payload includes key :#{key}" do
15
24
  let(:payload) { {"#{key}" => :some_value} }
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+
3
+ describe BetterLogs::Formatters::KeyValueFormatter do
4
+ describe '#format' do
5
+
6
+ let(:payload) do
7
+ BetterLogs::ActionController::Payload.new(key_one: 'value_one', key_two: 'value_two')
8
+ end
9
+
10
+ subject { BetterLogs::Formatters::KeyValueFormatter.new.format(payload) }
11
+
12
+ it { should == 'key_one=value_one key_two=value_two' }
13
+ end
14
+ end
data/spec/spec_helper.rb CHANGED
@@ -1 +1,3 @@
1
+ require 'codeclimate-test-reporter'
2
+ CodeClimate::TestReporter.start
1
3
  require_relative '../lib/better_logs'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better_logs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.alpha1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kunal Parikh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-25 00:00:00.000000000 Z
11
+ date: 2014-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - ~>
74
74
  - !ruby/object:Gem::Version
75
- version: '3.12'
75
+ version: '4.1'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ~>
81
81
  - !ruby/object:Gem::Version
82
- version: '3.12'
82
+ version: '4.1'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -109,61 +109,61 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '2.0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: simplecov
112
+ name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ~>
116
116
  - !ruby/object:Gem::Version
117
- version: '0.8'
117
+ version: '2.14'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ~>
123
123
  - !ruby/object:Gem::Version
124
- version: '0.8'
124
+ version: '2.14'
125
125
  - !ruby/object:Gem::Dependency
126
- name: rspec
126
+ name: guard-rspec
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - ~>
130
130
  - !ruby/object:Gem::Version
131
- version: '2.14'
131
+ version: '4.2'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - ~>
137
137
  - !ruby/object:Gem::Version
138
- version: '2.14'
138
+ version: '4.2'
139
139
  - !ruby/object:Gem::Dependency
140
- name: guard-rspec
140
+ name: terminal-notifier-guard
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - ~>
144
144
  - !ruby/object:Gem::Version
145
- version: '4.2'
145
+ version: '1.5'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - ~>
151
151
  - !ruby/object:Gem::Version
152
- version: '4.2'
152
+ version: '1.5'
153
153
  - !ruby/object:Gem::Dependency
154
- name: terminal-notifier-guard
154
+ name: codeclimate-test-reporter
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - ~>
158
158
  - !ruby/object:Gem::Version
159
- version: '1.5'
159
+ version: '0.3'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - ~>
165
165
  - !ruby/object:Gem::Version
166
- version: '1.5'
166
+ version: '0.3'
167
167
  description: Logging for Rails request/response lifecycle in a machine readable format
168
168
  (starting with Splunk)
169
169
  email: kunal@techthumb.in
@@ -173,6 +173,7 @@ extra_rdoc_files:
173
173
  - LICENSE.txt
174
174
  - README.rdoc
175
175
  files:
176
+ - .coveralls.yml
176
177
  - .document
177
178
  - .travis.yml
178
179
  - Gemfile
@@ -191,11 +192,10 @@ files:
191
192
  - lib/better_logs/formatters/key_value_formatter.rb
192
193
  - lib/better_logs/initializer.rb
193
194
  - lib/better_logs/railtie.rb
194
- - spec/action_controller/payload_spec.rb
195
- - spec/formatters/key_value_formatter_spec.rb
195
+ - spec/lib/better_logs/action_controller/log_subscriber_spec.rb
196
+ - spec/lib/better_logs/action_controller/payload_spec.rb
197
+ - spec/lib/better_logs/formatters/key_value_formatter_spec.rb
196
198
  - spec/spec_helper.rb
197
- - test/helper.rb
198
- - test/test_better_logging.rb
199
199
  homepage: http://github.com/techthumb/better_logs
200
200
  licenses:
201
201
  - MIT
@@ -211,9 +211,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
211
211
  version: '0'
212
212
  required_rubygems_version: !ruby/object:Gem::Requirement
213
213
  requirements:
214
- - - '>'
214
+ - - '>='
215
215
  - !ruby/object:Gem::Version
216
- version: 1.3.1
216
+ version: '0'
217
217
  requirements: []
218
218
  rubyforge_project:
219
219
  rubygems_version: 2.2.1
@@ -1,7 +0,0 @@
1
- require 'spec_helper'
2
- describe BetterLogs::Formatters::KeyValueFormatter do
3
- let(:payload) { BetterLogs::ActionController::Payload.new({key_one: 'value_one', key_two: 'value_two'}) }
4
-
5
- subject { BetterLogs::Formatters::KeyValueFormatter.new.format(payload) }
6
- it { should == 'key_one=value_one key_two=value_two' }
7
- end
data/test/helper.rb DELETED
@@ -1,34 +0,0 @@
1
- require 'simplecov'
2
-
3
- module SimpleCov::Configuration
4
- def clean_filters
5
- @filters = []
6
- end
7
- end
8
-
9
- SimpleCov.configure do
10
- clean_filters
11
- load_adapter 'test_frameworks'
12
- end
13
-
14
- ENV["COVERAGE"] && SimpleCov.start do
15
- add_filter "/.rvm/"
16
- end
17
- require 'rubygems'
18
- require 'bundler'
19
- begin
20
- Bundler.setup(:default, :development)
21
- rescue Bundler::BundlerError => e
22
- $stderr.puts e.message
23
- $stderr.puts "Run `bundle install` to install missing gems"
24
- exit e.status_code
25
- end
26
- require 'test/unit'
27
- require 'shoulda'
28
-
29
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
30
- $LOAD_PATH.unshift(File.dirname(__FILE__))
31
- require 'better_logs'
32
-
33
- class Test::Unit::TestCase
34
- end
@@ -1,7 +0,0 @@
1
- require 'helper'
2
-
3
- class TestBetterLogging < Test::Unit::TestCase
4
- should "probably rename this file and start testing for real" do
5
- flunk "hey buddy, you should probably rename this file and start testing for real"
6
- end
7
- end