slack-poster 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -0
- data/.travis.yml +2 -3
- data/Gemfile +2 -0
- data/Rakefile +2 -0
- data/bin/console +1 -0
- data/lib/slack/attachment.rb +5 -3
- data/lib/slack/field.rb +2 -0
- data/lib/slack/message.rb +2 -0
- data/lib/slack/poster.rb +3 -1
- data/lib/slack/version.rb +3 -1
- data/slack-poster.gemspec +7 -5
- data/spec/attachment_spec.rb +2 -0
- data/spec/field_spec.rb +2 -0
- data/spec/message_spec.rb +2 -0
- data/spec/poster_spec.rb +4 -4
- data/spec/spec_helper.rb +2 -0
- metadata +25 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c90f33cfdf09bdfa3918b5f43adecf1e88b22f2e
|
4
|
+
data.tar.gz: ddff41de9df172bb244805fbb1357cf1baa08ebb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d3fe56507c539c75b2988afd5f8610e631692cd2f40c4d5fc5936f7c48a82b7cec9a050d18247176b02b0d42d14ea8f6f65381f6244e1d5344540feec4ea85a
|
7
|
+
data.tar.gz: 5cb69fbebf8107af69caeddc84b80be8471d9b222b4c66ca9e2479a777e572d22368a02f92429c29d471af0fe5499a69c8cbc5e6606944b49035379adf4c4278
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/bin/console
CHANGED
data/lib/slack/attachment.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Slack
|
2
4
|
class Attachment
|
3
|
-
ATTRIBUTES = [
|
4
|
-
|
5
|
-
|
5
|
+
ATTRIBUTES = %i[
|
6
|
+
fallback text title title_link image_url thumb_url color pretext author
|
7
|
+
author_name author_link author_icon
|
6
8
|
].freeze
|
7
9
|
|
8
10
|
ATTRIBUTES.each do |attribute|
|
data/lib/slack/field.rb
CHANGED
data/lib/slack/message.rb
CHANGED
data/lib/slack/poster.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'slack/version'
|
2
4
|
require 'slack/field'
|
3
5
|
require 'slack/message'
|
@@ -11,7 +13,7 @@ module Slack
|
|
11
13
|
|
12
14
|
# Define getters and setters for the options hash keys. This will make assign of the options
|
13
15
|
# more flexible.
|
14
|
-
[
|
16
|
+
%i[username channel icon_url icon_emoji].each do |option_attr|
|
15
17
|
define_method(option_attr) { @options[option_attr] }
|
16
18
|
define_method("#{option_attr}=") { |value| @options[option_attr] = value }
|
17
19
|
end
|
data/lib/slack/version.rb
CHANGED
data/slack-poster.gemspec
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
2
4
|
lib = File.expand_path('../lib', __FILE__)
|
3
5
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
6
|
|
@@ -20,12 +22,12 @@ Gem::Specification.new do |spec|
|
|
20
22
|
spec.require_paths = ['lib']
|
21
23
|
|
22
24
|
spec.add_development_dependency 'bundler', '> 1.10.0'
|
25
|
+
spec.add_development_dependency 'pry', '~> 0.10'
|
23
26
|
spec.add_development_dependency 'rake', '~> 10.4'
|
24
27
|
spec.add_development_dependency 'rspec', '~> 3.4'
|
25
|
-
spec.add_development_dependency '
|
26
|
-
spec.add_development_dependency 'webmock', '~> 1.22'
|
28
|
+
spec.add_development_dependency 'rubocop', '~> 0.49', '> 0.35'
|
27
29
|
spec.add_development_dependency 'vcr', '~> 3.0'
|
28
|
-
spec.add_development_dependency '
|
30
|
+
spec.add_development_dependency 'webmock', '~> 1.22'
|
29
31
|
|
30
|
-
spec.add_runtime_dependency 'faraday', '~> 0.9
|
32
|
+
spec.add_runtime_dependency 'faraday', '~> 0.9'
|
31
33
|
end
|
data/spec/attachment_spec.rb
CHANGED
data/spec/field_spec.rb
CHANGED
data/spec/message_spec.rb
CHANGED
data/spec/poster_spec.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
require 'securerandom'
|
3
|
+
require 'spec_helper'
|
4
|
+
require 'securerandom'
|
5
5
|
|
6
6
|
describe Slack::Poster do
|
7
7
|
let(:hook) { ENV.fetch('SLACK_POSTER_TEST_WEBHOOK') }
|
@@ -29,7 +29,7 @@ describe Slack::Poster do
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
[
|
32
|
+
%i[username channel icon_url icon_emoji].each do |option_attr|
|
33
33
|
describe "#{option_attr}=" do
|
34
34
|
it "sets the #{option_attr} field in options hash" do
|
35
35
|
poster.send("#{option_attr}=", "test_#{option_attr}")
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slack-poster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo Otero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -25,61 +25,67 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.10.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: pry
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '10
|
33
|
+
version: '0.10'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '10
|
40
|
+
version: '0.10'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '10.4'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '10.4'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '3.4'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '3.4'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: rubocop
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '0.49'
|
76
|
+
- - ">"
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0.35'
|
76
79
|
type: :development
|
77
80
|
prerelease: false
|
78
81
|
version_requirements: !ruby/object:Gem::Requirement
|
79
82
|
requirements:
|
80
83
|
- - "~>"
|
81
84
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
85
|
+
version: '0.49'
|
86
|
+
- - ">"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0.35'
|
83
89
|
- !ruby/object:Gem::Dependency
|
84
90
|
name: vcr
|
85
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,39 +101,33 @@ dependencies:
|
|
95
101
|
- !ruby/object:Gem::Version
|
96
102
|
version: '3.0'
|
97
103
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
104
|
+
name: webmock
|
99
105
|
requirement: !ruby/object:Gem::Requirement
|
100
106
|
requirements:
|
101
107
|
- - "~>"
|
102
108
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
104
|
-
- - ">"
|
105
|
-
- !ruby/object:Gem::Version
|
106
|
-
version: '0.35'
|
109
|
+
version: '1.22'
|
107
110
|
type: :development
|
108
111
|
prerelease: false
|
109
112
|
version_requirements: !ruby/object:Gem::Requirement
|
110
113
|
requirements:
|
111
114
|
- - "~>"
|
112
115
|
- !ruby/object:Gem::Version
|
113
|
-
version: '
|
114
|
-
- - ">"
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: '0.35'
|
116
|
+
version: '1.22'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: faraday
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
121
|
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: 0.9
|
123
|
+
version: '0.9'
|
124
124
|
type: :runtime
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: 0.9
|
130
|
+
version: '0.9'
|
131
131
|
description: Slack Poster is a gem to make your integration with Slack WebHooks easier.
|
132
132
|
email:
|
133
133
|
- oterosantos@gmail.com
|
@@ -189,4 +189,3 @@ test_files:
|
|
189
189
|
- spec/message_spec.rb
|
190
190
|
- spec/poster_spec.rb
|
191
191
|
- spec/spec_helper.rb
|
192
|
-
has_rdoc:
|