slack_bot 0.0.1 → 0.0.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
  SHA1:
3
- metadata.gz: 053825e40815b1120ba20e773089ca8390b24741
4
- data.tar.gz: af2fba9682f0d98f4f9cda58ae0601ae72b7da52
3
+ metadata.gz: c8afb5e23038e92a8eb68fdcb4f3138c262c0b26
4
+ data.tar.gz: e7100e41bea635b114b7a2f8e49848bddf33e377
5
5
  SHA512:
6
- metadata.gz: 55057785689d5250137692e5850b821b67a4e383754f4f047aaeb6eb4f508f20fbca996de9cff27aead5048755dd4a2610596c7651135ae8d53fb24addb0b9ca
7
- data.tar.gz: 1f5ac6012e1b69e9f80f4139575145e579539f78d6632f68a079abed084eba8351de92aa318c8a9b113b421b11fee00b62d6aeab18149fb5262b273a41182eda
6
+ metadata.gz: fa5b7e4998fface2e9a755013592cb0c1c7cbae091899599114ec04e8fb281fbb7decbc912c9e55eabc8c150dba58a6a2d38e9c0fa29f1d63bfa722bfc9adb5e
7
+ data.tar.gz: 311c18679cd86bcaa258ad52f61f38db5b48a3703d15d76e7a2b7c06adc2aecc0807f13d6061d0852d30ed56dd47f62a6b4bffdf107e1165802d05ba9d22b824
@@ -1,12 +1,12 @@
1
1
  module SlackBot
2
2
  class Notify < ActiveRecord::Base
3
3
 
4
- def self.execute
4
+ def self.execute(body, bot_name, channel)
5
5
  query = {
6
6
  token: ::SlackBot.token,
7
- channel: ::SlackBot.channel,
8
- text: ::SlackBot.body,
9
- username: ::SlackBot.bot_name
7
+ channel: channel,
8
+ text: body,
9
+ username: bot_name
10
10
  }
11
11
  uri = Addressable::URI.parse(::SlackBot.endpoint)
12
12
  uri.query_values ||= {}
@@ -1,3 +1,3 @@
1
1
  module SlackBot
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/slack_bot.rb CHANGED
@@ -29,7 +29,7 @@ module SlackBot
29
29
  yield self if block_given?
30
30
  end
31
31
 
32
- def self.notify
33
- Notify.execute
32
+ def self.notify(body: SlackBot.body, bot_name: SlackBot.bot_name, channel: SlackBot.channel)
33
+ Notify.execute(body, bot_name, channel)
34
34
  end
35
35
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kidachi_
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-09 00:00:00.000000000 Z
11
+ date: 2014-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 4.1.0
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 4.1.0
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: addressable
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +52,34 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec-rails
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'
69
+ - !ruby/object:Gem::Dependency
70
+ name: spring-commands-rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
55
83
  description: SlackBot.
56
84
  email:
57
85
  - t.daiki50@gmail.com