actionslack 0.1.1 → 0.1.2

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: 27afb3fa4f6da31ef2138615bbf368d9cded850396c67122d73a647ca6bf2d1d
4
- data.tar.gz: 9b3804e467796b8a3a0d44d720afd384e8a46cf8840a2250b2ad60b0f3ffe98f
3
+ metadata.gz: 21fc855745a83c67aefd2391434f8dede96aff1b45ae677c2abdaec2047933fa
4
+ data.tar.gz: b09236edbb043bf9bbd6cbc1f50472c1dd1eef5fc11821174fd9bd160400c467
5
5
  SHA512:
6
- metadata.gz: 2ad13e13c673e0e4c208ae4950e27403d271d23389f522485b00ce667fb166fbb49dd40340c511dd6a3108604d394b0d12861690787c41870ad4ddfc726a5b1f
7
- data.tar.gz: 2f8394d469eddc413087431ff0bebfa62f018ec09cb0aea9b191fbc0236a152fc5ba2a920fc58f8da0f66cf5f26164e512c14989c73ea599916505e2ec9ee646
6
+ metadata.gz: 7b194b4a378398b8b8ff13b5d6b2fd906288b565ac33f392fb72467356f30d63f0e7e6e144621be04adaf95e713182277ec49521fa8b5298900c6d9d0f82acd8
7
+ data.tar.gz: e46830da21df1ad7ce58863e6e09a6113b7e4d847af2ec44f3592f80a4e8a77b2617cf6b471796edbf69e357941e7cc1edf28624c6c2e07a3a4f1e308bf2d69c
data/LICENSE.txt ADDED
@@ -0,0 +1,19 @@
1
+ Copyright © 2022 Akito Hikasa
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the "Software"),
5
+ to deal in the Software without restriction, including without limitation
6
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
7
+ and/or sell copies of the Software, and to permit persons to whom the
8
+ Software is furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included
11
+ in all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
15
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
17
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
18
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
19
+ OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -4,13 +4,11 @@ ActionSlack is a framework that supports your implementation of slack notificati
4
4
 
5
5
  ## Installation
6
6
 
7
- Install the gem and add to the application's Gemfile by executing:
8
-
9
- $ bundle add actionslack
10
-
11
- If bundler is not being used to manage dependencies, install the gem by executing:
7
+ ```ruby
8
+ gem 'actionslack', require: 'action_slack'
9
+ ```
12
10
 
13
- $ gem install actionslack
11
+ That's all
14
12
 
15
13
  ## Usage
16
14
 
@@ -55,12 +53,27 @@ person = Person.new('John')
55
53
  WelcomingNewCommer.notify(new_person: person)
56
54
  ```
57
55
 
58
- ## Development
56
+ Optionally, three configuration items are available.
57
+
58
+ Especially, there are three options for type: local, testflight, and production.
59
+
60
+ In `local`, ActionSlack does not post to Slack, only writes logs.
61
+ In `testflight`, ActionSlack will post to Slack, but adds an obvious prefix to the message to tell you that it is not a notice from a production environment.
62
+ So, I recommend to use it for checking connections.
59
63
 
60
- I will not release this to rubygems until becomes stable.
61
- Until then, I develop this privately.
64
+ I know you understand about `production` mode.
65
+
66
+ ```ruby
67
+ ActionSlack.configure do |config|
68
+ config.filepath = "#{PROJECT_ROOT}/webhooks.yml"
69
+ config.async = false # then, we don't use ActiveJob for posting
70
+ config.type = :production
71
+ end
72
+ ```
73
+
74
+ ## Development
62
75
 
63
- I'm also planning providing rspec tools. Stay tuned.
76
+ I'm planning provide rspec tools.
64
77
 
65
78
  ## Contributing
66
79
 
@@ -14,8 +14,6 @@ module ActionSlack
14
14
  end
15
15
  end
16
16
 
17
- private
18
-
19
17
  def notify_now(url, message)
20
18
  if ActionSlack.configuration.local?
21
19
  ActionSlack.logger.debug { "Post to Slack webhook url: #{url}, message: \"#{message}\"" }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActionSlack
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionslack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kakubin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-05 00:00:00.000000000 Z
11
+ date: 2022-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: webmock
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description: actionslack
56
70
  email:
57
71
  - wetsand.wfs@gmail.com
@@ -65,6 +79,7 @@ files:
65
79
  - CHANGELOG.md
66
80
  - CODE_OF_CONDUCT.md
67
81
  - Gemfile
82
+ - LICENSE.txt
68
83
  - README.md
69
84
  - Rakefile
70
85
  - lib/action_slack.rb