paul_bunyan 1.3.0 → 1.4.0

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: aaba25e126d5666479137139dc258a03599caac3
4
- data.tar.gz: 188f3801cbb78f8fd610db03867ae509f5f22953
3
+ metadata.gz: 39c2d1964ce640e53681be266ec3fd065ec310d5
4
+ data.tar.gz: d3b1aad302c4b7ee5f2025f5e718595202985199
5
5
  SHA512:
6
- metadata.gz: 6318d4c839fb4729bc8f179b6b32c00bdd0e42c98d995ea2b8cd23442a89e2c0146f344e3272deba47c89f9fe3cb7f666b3c5c38d7cbb1ebeb4f668429527793
7
- data.tar.gz: 42ff870a5bf157e5c7ff1bca6cf5bcd96e92fce8b44ef0c6be730274a81561315096797ec590fed0316144c8a81896133c950d695a6900364791498c5ac99068
6
+ metadata.gz: 2e408a9c88d81bf995d0982114728b8d261ad4bad9b1ac0151ebfa80d3ccf90bf85f732f468a928480ee7930e11e3517825b15af06315b6237e44a3856a48aae
7
+ data.tar.gz: 1fe0abb219320d2fb0e05f0e04da4c1ac307e7e09ef9f3a5d7e72b1147acd889e21457cb05531e0664518a6f517a3f2b86c791e46b5616917258696f71504995
@@ -0,0 +1 @@
1
+ Gemfile.lock
@@ -1,10 +1,23 @@
1
- bundler_args: ''
2
1
  language: ruby
2
+ sudo: false
3
+ cache: bundler
4
+ bundler_args: --path ../../vendor/bundle
5
+ rvm:
6
+ # - ruby-head
7
+ - 2.1
8
+ - 2.2
9
+ - 2.3.0
10
+ matrix:
11
+ fast_finish: true
12
+ # WWTD doesn't support allow_failures... yet
13
+ # allow_failures:
14
+ # - rvm: ruby-head
3
15
  gemfile:
4
- - Gemfile
5
16
  - spec/gemfiles/40.gemfile
6
17
  - spec/gemfiles/41.gemfile
7
18
  - spec/gemfiles/42.gemfile
8
- matrix:
9
- exclude:
10
19
  script: bundle exec rspec
20
+ notifications:
21
+ email:
22
+ on_success: never
23
+ on_failure: never
data/Dockerfile CHANGED
@@ -1,12 +1,16 @@
1
- FROM instructure/ruby:2.1
1
+ FROM instructure/rvm
2
2
  MAINTAINER Instructure
3
3
 
4
4
  COPY Gemfile* *.gemspec /usr/src/app/
5
5
  COPY lib/paul_bunyan/version.rb /usr/src/app/lib/paul_bunyan/
6
- RUN bundle install
6
+
7
+ USER root
8
+ RUN chown -R docker:docker /usr/src/app
9
+ USER docker
10
+ RUN /bin/bash -l -c "cd /usr/src/app && bundle install"
7
11
 
8
12
  COPY . /usr/src/app
9
13
  USER root
10
14
  RUN chown -R docker:docker /usr/src/app/*
11
15
  USER docker
12
- CMD ["bundle", "exec", "wwtd", "--parallel"]
16
+ CMD /bin/bash -l -c "cd /usr/src/app && bundle exec wwtd --parallel"
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Paul Bunyan (formerly: Logging)
2
2
 
3
+ [![Gem](https://badge.fury.io/rb/paul_bunyan.svg)](https://rubygems.org/gems/paul_bunyan)
4
+ [![Build Status](https://secure.travis-ci.org/instructure/paul_bunyan.svg)](http://travis-ci.org/instructure/paul_bunyan)
5
+ [![Dependency Status](https://gemnasium.com/badges/github.com/instructure/paul_bunyan.svg)](https://gemnasium.com/github.com/instructure/paul_bunyan)
6
+
3
7
  PaulBunyan is a re-usable component with a globally accessible Logger with extra
4
8
  support for handling logging in Rails.
5
9
 
@@ -27,7 +27,7 @@ module ActionController
27
27
  params: request.filtered_parameters,
28
28
  format: request.format.try(:ref),
29
29
  method: request.request_method,
30
- path: (request.fullpath rescue 'unknown'),
30
+ path: (request.filtered_path rescue 'unknown'),
31
31
  }
32
32
  end
33
33
 
@@ -1,3 +1,3 @@
1
1
  module PaulBunyan
2
- VERSION = '1.3.0'
2
+ VERSION = '1.4.0'
3
3
  end
@@ -71,6 +71,23 @@ RSpec.describe ActionController::Base do
71
71
  expect(payload).to include ip: '127.0.0.1'
72
72
  end
73
73
  end
74
+
75
+ context 'with sensitive info in the query params' do
76
+ before do
77
+ subject.request = ActionDispatch::TestRequest.new({
78
+ 'action_dispatch.parameter_filter' => [:password, :baz],
79
+ 'PATH_INFO' => '/somewhere',
80
+ 'QUERY_STRING' => 'password=foo&bar=baz&baz=qux',
81
+ })
82
+ end
83
+
84
+ it 'filters the sensitive params' do
85
+ calling_index do |*args|
86
+ payload = args.last
87
+ expect(payload).to include path: '/somewhere?password=[FILTERED]&bar=baz&baz=[FILTERED]'
88
+ end
89
+ end
90
+ end
74
91
  end
75
92
 
76
93
  def calling_index(&block)
@@ -1,6 +1,7 @@
1
1
  ENV["RAILS_ENV"] = "test"
2
2
 
3
3
  require "rspec"
4
+ require "byebug"
4
5
 
5
6
  require File.expand_path("../../spec/dummy/config/environment.rb", __FILE__)
6
7
  ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../spec/dummy/db/migrate", __FILE__)]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paul_bunyan
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Duane Johnson
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-09-29 00:00:00.000000000 Z
14
+ date: 2016-11-28 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: request_store
@@ -138,6 +138,7 @@ executables:
138
138
  extensions: []
139
139
  extra_rdoc_files: []
140
140
  files:
141
+ - ".dockerignore"
141
142
  - ".gitignore"
142
143
  - ".travis.yml"
143
144
  - Dockerfile
@@ -237,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
237
238
  version: '0'
238
239
  requirements: []
239
240
  rubyforge_project:
240
- rubygems_version: 2.4.5
241
+ rubygems_version: 2.5.1
241
242
  signing_key:
242
243
  specification_version: 4
243
244
  summary: Logging for all the things