defra_ruby_alert 2.0.0 → 2.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
  SHA256:
3
- metadata.gz: a72107fb14c719e0d2495efafc847b62471d69735498d328711253e1142bb5c7
4
- data.tar.gz: 88f2e7e02f488cff8e8f786ca2978c8061689b7d42f9ecae0fcc7aa4dd4dc448
3
+ metadata.gz: bd752fb4d156ca20aa6c449a7a537ccc174b2749c738f086e8f1ba3834fefbf9
4
+ data.tar.gz: 8b7038c5c82b72d17c8e600de490becc8cd93686e61571c62a666493e2e1e842
5
5
  SHA512:
6
- metadata.gz: 2f7f2af88032dd603bc196af1f295a966f64427dfe2a6a74d2656996e583a4a6cf289e4cce8e8313348b99c4b8f672c2036fafdf173ae14be933f3ccde63ea5e
7
- data.tar.gz: 04424c5b64b3043893cf2820cfaffbf23a364bb450ad31924c48bb8e972a673f46dae23b829dbf0d4c793f1c157f14fbe4d9b925f89ee2da00145c9d0a56aee7
6
+ metadata.gz: 58fb7b1763a226d9b9e17625512242f0f641256dca858959ecc1cbba6de55e32170396bcc2f2ed79aff9a1ee47a43eb03aa11de7adc8113c54c6af3bcdc39f7d
7
+ data.tar.gz: 7668f51ade4c8a7debe50c56508521d984def72d73e561308d4bc1092151d2b58477445227ff7a9bd7baf18f6aeb4f057cd5f56e7a17085b3f74fc32afc3381f
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # Defra Ruby Alert
2
2
 
3
- [![Build Status](https://travis-ci.com/DEFRA/defra-ruby-alert.svg?branch=master)](https://travis-ci.com/DEFRA/defra-ruby-alert)
3
+ [![Build Status](https://travis-ci.com/DEFRA/defra-ruby-alert.svg?branch=main)](https://travis-ci.com/DEFRA/defra-ruby-alert)
4
4
  [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_defra-ruby-alert&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=DEFRA_defra-ruby-alert)
5
5
  [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_defra-ruby-alert&metric=coverage)](https://sonarcloud.io/dashboard?id=DEFRA_defra-ruby-alert)
6
- [![security](https://hakiri.io/github/DEFRA/defra-ruby-alert/master.svg)](https://hakiri.io/github/DEFRA/defra-ruby-alert/master)
6
+ [![security](https://hakiri.io/github/DEFRA/defra-ruby-alert/main.svg)](https://hakiri.io/github/DEFRA/defra-ruby-alert/main)
7
7
  [![Gem Version](https://badge.fury.io/rb/defra_ruby_alert.svg)](https://badge.fury.io/rb/defra_ruby_alert)
8
8
  [![Licence](https://img.shields.io/badge/Licence-OGLv3-blue.svg)](http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3)
9
9
 
@@ -11,7 +11,7 @@ Currently there are a number of Rails based digital services in Defra, all of wh
11
11
 
12
12
  This means we are often duplicating the code to configure and manage Airbrake across them. So we created this gem 😁!
13
13
 
14
- It's aim is to help us
14
+ Its aim is to help us
15
15
 
16
16
  - start to reduce the duplication across projects
17
17
  - be consistent in how we configure and manage Airbrake
@@ -73,17 +73,17 @@ The gem has been designed to be used by our Rails apps, so we would also expect
73
73
  config.environment = Rails.env
74
74
  ```
75
75
 
76
- ### blacklist
76
+ ### blocklist
77
77
 
78
78
  > Specifies which keys in the payload (parameters, session data, environment data, etc) should be filtered. Before sending an error, filtered keys will be substituted with the [Filtered] label.
79
79
 
80
- Not every project uses this, but some do hence we provide the ability to specify a blacklist.
80
+ Not every project uses this, but some do hence we provide the ability to specify a blocklist.
81
81
 
82
82
  ```ruby
83
- config.blacklist = [/password/i, /postcode/i, :name]
83
+ config.blocklist = [/password/i, /postcode/i, :name]
84
84
  ```
85
85
 
86
- See Airbrake's [blacklist_keys](https://github.com/airbrake/airbrake-ruby#blacklist_keys) for more details.
86
+ See Airbrake's [blocklist_keys](https://github.com/airbrake/airbrake-ruby#blocklist_keys) for more details.
87
87
 
88
88
  ## Usage
89
89
 
@@ -62,8 +62,8 @@ module DefraRuby
62
62
  # A list of parameters that should be filtered out of what is sent to
63
63
  # Airbrake. By default, all "password" attributes will have their contents
64
64
  # replaced.
65
- # https://github.com/airbrake/airbrake-ruby#blacklist_keys
66
- c.blacklist_keys = DefraRuby::Alert.configuration.blacklist
65
+ # https://github.com/airbrake/airbrake-ruby#blocklist_keys
66
+ c.blocklist_keys = DefraRuby::Alert.configuration.blocklist
67
67
  end
68
68
  end
69
69
  end
@@ -4,10 +4,10 @@ module DefraRuby
4
4
  module Alert
5
5
  class Configuration
6
6
  attr_accessor :root_directory, :logger, :environment
7
- attr_accessor :host, :project_key, :blacklist, :enabled
7
+ attr_accessor :host, :project_key, :blocklist, :enabled
8
8
 
9
9
  def initialize
10
- @blacklist = []
10
+ @blocklist = []
11
11
  @enabled = false
12
12
  end
13
13
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module DefraRuby
4
4
  module Alert
5
- VERSION = "2.0.0"
5
+ VERSION = "2.1.0"
6
6
  end
7
7
  end
@@ -20,7 +20,7 @@ module DefraRuby
20
20
  :logger= => nil,
21
21
  :environment= => nil,
22
22
  :ignore_environments= => nil,
23
- :blacklist_keys= => nil
23
+ :blocklist_keys= => nil
24
24
  )
25
25
 
26
26
  allow(Airbrake).to receive(:configure).and_yield(configuration)
@@ -14,7 +14,7 @@ module DefraRuby
14
14
 
15
15
  expect(fresh_config.host).to be_nil
16
16
  expect(fresh_config.project_key).to be_nil
17
- expect(fresh_config.blacklist).to eq([])
17
+ expect(fresh_config.blocklist).to eq([])
18
18
  expect(fresh_config.enabled).to eq(false)
19
19
  end
20
20
  end
@@ -1,10 +1,10 @@
1
1
  example_id | status | run_time |
2
2
  -------------------------------------------------------- | ------ | --------------- |
3
- ./spec/defra_ruby/alert/airbrake_runner_spec.rb[1:1:1] | passed | 0.01164 seconds |
4
- ./spec/defra_ruby/alert/airbrake_runner_spec.rb[1:1:2:1] | passed | 0.00106 seconds |
5
- ./spec/defra_ruby/alert/airbrake_runner_spec.rb[1:1:3:1] | passed | 0.00239 seconds |
6
- ./spec/defra_ruby/alert/configuration_spec.rb[1:1] | passed | 0.00357 seconds |
7
- ./spec/defra_ruby/alert_spec.rb[1:1:1] | passed | 0.00218 seconds |
8
- ./spec/defra_ruby/alert_spec.rb[1:2:1:1] | passed | 0.00068 seconds |
9
- ./spec/defra_ruby/alert_spec.rb[1:2:2:1] | passed | 0.00009 seconds |
10
- ./spec/defra_ruby/alert_spec.rb[1:3:1] | passed | 0.00032 seconds |
3
+ ./spec/defra_ruby/alert/airbrake_runner_spec.rb[1:1:1] | passed | 0.00255 seconds |
4
+ ./spec/defra_ruby/alert/airbrake_runner_spec.rb[1:1:2:1] | passed | 0.00052 seconds |
5
+ ./spec/defra_ruby/alert/airbrake_runner_spec.rb[1:1:3:1] | passed | 0.00062 seconds |
6
+ ./spec/defra_ruby/alert/configuration_spec.rb[1:1] | passed | 0.00259 seconds |
7
+ ./spec/defra_ruby/alert_spec.rb[1:1:1] | passed | 0.00304 seconds |
8
+ ./spec/defra_ruby/alert_spec.rb[1:2:1:1] | passed | 0.0017 seconds |
9
+ ./spec/defra_ruby/alert_spec.rb[1:2:2:1] | passed | 0.00178 seconds |
10
+ ./spec/defra_ruby/alert_spec.rb[1:3:1] | passed | 0.01859 seconds |
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: defra_ruby_alert
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Defra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-04 00:00:00.000000000 Z
11
+ date: 2020-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: airbrake