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 +4 -4
- data/.rubocop.yml +77 -0
- data/.travis.yml +19 -0
- data/Gemfile +3 -1
- data/Gemfile.lock +1 -1
- data/README.md +3 -0
- data/Rakefile +4 -2
- data/lib/slack_notification.rb +4 -0
- data/slack-notification.gemspec +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05514333c89b93ed5c1a0dc0a9336ec603744a41f83d5eb6ea1c014daeb955b9
|
4
|
+
data.tar.gz: f5d675d6dad9cb57c9bd4749899099ebcf7257796b57af95f7db297190b58364
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0815a96c98f7201cc876a7a453edff2a00b3a2089c1daa62d4646077305d8ac75c317e2e9e60ba379664ca2bbe66dd465a98fe45d993194cac87461335bf1a64'
|
7
|
+
data.tar.gz: 46f36ba2cf91168bfbf4a0cc28f259d719adfec900acbdcdcede58a41e55c1d42bfa6ea378c6f8472b474c8187277e47bbb7b1ab1c4a2a93cbffae079870d926
|
data/.rubocop.yml
ADDED
@@ -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
|
data/.travis.yml
ADDED
@@ -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
data/Gemfile.lock
CHANGED
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
data/lib/slack_notification.rb
CHANGED
@@ -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)
|
data/slack-notification.gemspec
CHANGED
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.
|
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
|