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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2dc84d4b5731b1487e433e2292b0f398690ea523
4
- data.tar.gz: ddea706f2a76c965c5e100c309054789a082f379
3
+ metadata.gz: c90f33cfdf09bdfa3918b5f43adecf1e88b22f2e
4
+ data.tar.gz: ddff41de9df172bb244805fbb1357cf1baa08ebb
5
5
  SHA512:
6
- metadata.gz: 0feea6c7a74fef533258880438f840782487226e444fdc093cdcda5b00e27c30d149cb60d282938a31e38f7992ed31786d16ab40aa6ecd4a6c1c3a196837894e
7
- data.tar.gz: 7974d9bfd0c3f5ebc1830e12116eb8928ce18f4caffc9ce943ed62138abc7df941ff59683cb425ec22acb498e28f3a408e8366c7b90485a0cca18d9c79c0dd89
6
+ metadata.gz: 6d3fe56507c539c75b2988afd5f8610e631692cd2f40c4d5fc5936f7c48a82b7cec9a050d18247176b02b0d42d14ea8f6f65381f6244e1d5344540feec4ea85a
7
+ data.tar.gz: 5cb69fbebf8107af69caeddc84b80be8471d9b222b4c66ca9e2479a777e572d22368a02f92429c29d471af0fe5499a69c8cbc5e6606944b49035379adf4c4278
@@ -3,3 +3,7 @@ Style/Documentation:
3
3
 
4
4
  Metrics/LineLength:
5
5
  Max: 100
6
+
7
+ Metrics/BlockLength:
8
+ Exclude:
9
+ - 'spec/**/*_spec.rb'
@@ -1,10 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
- - 2.0.0
5
- - 2.1.6
6
3
  - 2.2.2
7
4
  - 2.3.0
5
+ - 2.4.0
6
+ - 2.4.2
8
7
  before_install: gem install bundler -v 1.10.6
9
8
  script:
10
9
  - bundle exec rspec --fail-fast
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  gemspec
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rspec/core/rake_task'
3
5
 
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'bundler/setup'
4
5
 
@@ -1,8 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Slack
2
4
  class Attachment
3
- ATTRIBUTES = [
4
- :fallback, :text, :title, :title_link, :image_url, :thumb_url, :color, :pretext, :author,
5
- :author_name, :author_link, :author_icon
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|
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Slack
2
4
  class Field
3
5
  attr_accessor :title, :value, :short
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Slack
2
4
  class Message
3
5
  attr_accessor :text
@@ -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
- [:username, :channel, :icon_url, :icon_emoji].each do |option_attr|
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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Slack
2
- VERSION = '2.2.0'.freeze
4
+ VERSION = '2.2.1'
3
5
  end
@@ -1,4 +1,6 @@
1
- # coding: utf-8
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 'pry', '~> 0.10'
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 'rubocop', '~> 0.37', '> 0.35'
30
+ spec.add_development_dependency 'webmock', '~> 1.22'
29
31
 
30
- spec.add_runtime_dependency 'faraday', '~> 0.9.2'
32
+ spec.add_runtime_dependency 'faraday', '~> 0.9'
31
33
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Slack::Attachment do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  RSpec.describe Slack::Field do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Slack::Message do
@@ -1,7 +1,7 @@
1
- require 'spec_helper'
1
+ # frozen_string_literal: true
2
2
 
3
- # Ruby 1.9.3 needs to require securerandom
4
- require 'securerandom' if RUBY_VERSION < '2.0.0'
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
- [:username, :channel, :icon_url, :icon_emoji].each do |option_attr|
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}")
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/setup'
2
4
 
3
5
  Bundler.require
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.0
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: 2016-02-11 00:00:00.000000000 Z
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: rake
28
+ name: pry
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.4'
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.4'
40
+ version: '0.10'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rspec
42
+ name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.4'
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: '3.4'
54
+ version: '10.4'
55
55
  - !ruby/object:Gem::Dependency
56
- name: pry
56
+ name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.10'
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: '0.10'
68
+ version: '3.4'
69
69
  - !ruby/object:Gem::Dependency
70
- name: webmock
70
+ name: rubocop
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.22'
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: '1.22'
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: rubocop
104
+ name: webmock
99
105
  requirement: !ruby/object:Gem::Requirement
100
106
  requirements:
101
107
  - - "~>"
102
108
  - !ruby/object:Gem::Version
103
- version: '0.37'
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: '0.37'
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.2
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.2
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: