slack-notification 0.1.6 → 0.1.7

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: 295982d800ebdbc47fd742339e1832122a08ce8a4117e8ff28e624ff38c5be48
4
- data.tar.gz: fe36d1ec52e4c220e7fcdebb14cd45bf2a87e98982452ff3c7db0cd49bdbe7a9
3
+ metadata.gz: 05514333c89b93ed5c1a0dc0a9336ec603744a41f83d5eb6ea1c014daeb955b9
4
+ data.tar.gz: f5d675d6dad9cb57c9bd4749899099ebcf7257796b57af95f7db297190b58364
5
5
  SHA512:
6
- metadata.gz: b230fbcc057533576139ecfd4e979af4e166bcc9b7585bb52f5b4e61254665d14d012e46dcd7da3c024f5c75a8e5481db6cc963d1c6243e2fa0dbd5c37f22052
7
- data.tar.gz: 966c70cc0d5edca56a7865224e0d0af518a36900b76edd6ee79fef88db48b641e0cb7fad6c8ef65b9b753d49671b9de14b72a776fce59b15fd63e15414ceb63a
6
+ metadata.gz: '0815a96c98f7201cc876a7a453edff2a00b3a2089c1daa62d4646077305d8ac75c317e2e9e60ba379664ca2bbe66dd465a98fe45d993194cac87461335bf1a64'
7
+ data.tar.gz: 46f36ba2cf91168bfbf4a0cc28f259d719adfec900acbdcdcede58a41e55c1d42bfa6ea378c6f8472b474c8187277e47bbb7b1ab1c4a2a93cbffae079870d926
@@ -0,0 +1,77 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.5
3
+ Exclude:
4
+ - bin/**/*
5
+ - config/**/*
6
+ - db/**/*
7
+ - vendor/**/*
8
+ - tmp/**/*
9
+
10
+ Layout/IndentFirstHashElement:
11
+ EnforcedStyle: consistent
12
+ Layout/AccessModifierIndentation:
13
+ EnforcedStyle: outdent
14
+ Layout/EmptyLinesAroundAccessModifier:
15
+ Enabled: true
16
+ Layout/AlignArray:
17
+ Enabled: true
18
+ Layout/AlignHash:
19
+ Enabled: true
20
+ Layout/EmptyLineAfterGuardClause:
21
+ Enabled: true
22
+ Layout/SpaceInsideBlockBraces:
23
+ EnforcedStyle: space
24
+ EnforcedStyleForEmptyBraces: no_space
25
+ Layout/SpaceInsideHashLiteralBraces:
26
+ EnforcedStyle: space
27
+ EnforcedStyleForEmptyBraces: no_space
28
+ Layout/SpaceInsideArrayLiteralBrackets:
29
+ EnforcedStyle: no_space
30
+
31
+ Lint/UnusedMethodArgument:
32
+ Enabled: true
33
+ Lint/UselessAssignment:
34
+ Enabled: true
35
+
36
+ Metrics/LineLength:
37
+ Max: 100
38
+ Metrics/MethodLength:
39
+ Enabled: true
40
+ Metrics/ClassLength:
41
+ Enabled: true
42
+ Max: 125
43
+ Metrics/ModuleLength:
44
+ Max: 125
45
+ Metrics/ParameterLists:
46
+ Enabled: true
47
+ Metrics/CyclomaticComplexity:
48
+ Enabled: true
49
+ Metrics/AbcSize:
50
+ Enabled: true
51
+
52
+ Naming/MemoizedInstanceVariableName:
53
+ Enabled: false
54
+ Naming/UncommunicativeMethodParamName:
55
+ Enabled: false
56
+
57
+ Style/Documentation:
58
+ Enabled: false
59
+ Style/FrozenStringLiteralComment:
60
+ Enabled: true
61
+ Style/NumericLiterals:
62
+ Enabled: true
63
+ Style/StringLiterals:
64
+ EnforcedStyle: single_quotes
65
+ Style/AndOr:
66
+ Enabled: true
67
+ Style/ClassCheck:
68
+ Enabled: true
69
+ Style/GuardClause:
70
+ Enabled: true
71
+
72
+ Security/Eval:
73
+ Enabled: true
74
+ Security/JSONLoad:
75
+ Enabled: true
76
+ Security/YAMLLoad:
77
+ Enabled: true
@@ -0,0 +1,19 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.5.1
4
+ branches:
5
+ except:
6
+ - "/^v[0-9]+\\.[0-9]+\\.[0-9]+(?:-.*)?/"
7
+ notifications:
8
+ email:
9
+ on_success: change
10
+ on_failure: always
11
+ before_script:
12
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
13
+ - chmod +x ./cc-test-reporter
14
+ - ./cc-test-reporter before-build
15
+ script:
16
+ - bundle exec rspec
17
+ - bundle exec rubocop
18
+ after_script:
19
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in slack-notification.gemspec
4
6
  gemspec
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- slack-notification (0.1.6)
4
+ slack-notification (0.1.7)
5
5
  slack-notifier (~> 2.3)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # SlackNotification
2
2
 
3
+ [![Gem Version](https://img.shields.io/gem/v/slack-notification.svg)](https://rubygems.org/gems/slack-notification)
4
+ [![Build Status](https://travis-ci.org/jfiander/slack-notification.svg)](https://travis-ci.org/jfiander/slack-notification)
5
+
3
6
  This is a simplified API for sending Slack messages from (e.g.) a Rails application.
4
7
 
5
8
  ## Installation
data/Rakefile CHANGED
@@ -1,2 +1,4 @@
1
- require "bundler/gem_tasks"
2
- task :default => :spec
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ task default: :spec
@@ -31,9 +31,11 @@ class SlackNotification
31
31
  private
32
32
 
33
33
  def notifier
34
+ # :nocov:
34
35
  raise "Missing notifier url for #{@channel}." unless slack_urls[@channel]
35
36
 
36
37
  Slack::Notifier.new(slack_urls[@channel])
38
+ # :nocov:
37
39
  end
38
40
 
39
41
  def validated_fields(fields)
@@ -90,9 +92,11 @@ private
90
92
  end
91
93
 
92
94
  def credentials_urls
95
+ # :nocov:
93
96
  Rails.application.credentials.slack.each_with_object({}) do |(k, v), h|
94
97
  h[k.to_s.gsub('_', '-')] = v
95
98
  end
99
+ # :nocov:
96
100
  end
97
101
 
98
102
  def validated_type(type = nil)
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'slack-notification'
8
- spec.version = '0.1.6'
8
+ spec.version = '0.1.7'
9
9
  spec.authors = ['Julian Fiander']
10
10
  spec.email = ['julian@fiander.one']
11
11
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack-notification
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander
@@ -120,6 +120,8 @@ extensions: []
120
120
  extra_rdoc_files: []
121
121
  files:
122
122
  - ".gitignore"
123
+ - ".rubocop.yml"
124
+ - ".travis.yml"
123
125
  - Gemfile
124
126
  - Gemfile.lock
125
127
  - LICENSE.txt