lita-pebbles 0.0.8 → 0.0.9

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: 27b6cc39cbe75335a76fa9e6d30e6ae101d9956c
4
- data.tar.gz: 2ca584d184a6df25072fd87ed0948b03d36fdd98
3
+ metadata.gz: 13bcb113a9c4cc9bcdafa96403ff6bd617573cc8
4
+ data.tar.gz: 7ebff252e7a42587316a512f4d845ef59287a5f3
5
5
  SHA512:
6
- metadata.gz: 04a8a3894a83a3cd7137490ec3337b70ff295f0d4de05e18a647590e6f18a95eb06c35b12cd1e8a539193ecea8b20990176a6624ec2111445b00c443914b4c52
7
- data.tar.gz: fd72cd00df9bb4a604affdc2f45f23adb941fa285dcc1e5ec3eb04d33415b3c1ecab91cf0d0fad5ef582c03fa4a3d85effb16cbf2cc77039c421ab1a7d7306d1
6
+ metadata.gz: 4d520df664fa137e2ab37870ab406741047761b017dfd7417af26eab5c400770a23632cf8118a89e2f28cc90ee126d820a85e2e05d1dca3a9968c90322a93f45
7
+ data.tar.gz: 923303c7ec742be35fc41b5ec9cf8e89b6f2e4f0970c6679bd7e9806461833388d14ed4765b890437d429aac77105df3af0e30de5944a4575abef558a15d2718
data/README.md CHANGED
@@ -18,8 +18,8 @@ And then execute:
18
18
  # lita_config.rb (example)
19
19
  Lita.configure do |config|
20
20
  config.handlers.schedules.room = ENV["BOT_ROOM_ID"]
21
- config.handlers.schedules.should_sleep_at = '* * * * * Asia/Tokyo'
22
- config.handlers.schedules.should_wake_up_at = '* * * * * Asia/Tokyo'
21
+ config.handlers.schedules.should_sleep_at = '* 23 * * * Asia/Tokyo'
22
+ config.handlers.schedules.should_wake_up_at = '* 8 * * * Asia/Tokyo'
23
23
  end
24
24
  ```
25
25
 
@@ -35,7 +35,7 @@ Lita: misawa
35
35
 
36
36
  ## Contributing
37
37
 
38
- 1. Fork it ( http://github.com/<my-github-username>/lita-pebbles/fork )
38
+ 1. Fork it ( http://github.com/fukayatsu/lita-pebbles/fork )
39
39
  2. Create your feature branch (`git checkout -b my-new-feature`)
40
40
  3. Commit your changes (`git commit -am 'Add some feature'`)
41
41
  4. Push to the branch (`git push origin my-new-feature`)
data/lib/lita-pebbles.rb CHANGED
@@ -1,3 +1,7 @@
1
+ require "lita"
2
+ require 'lita/ext/message.rb'
3
+ require 'lita/ext/response.rb'
4
+
1
5
  require "lita/pebbles/version"
2
6
  require "lita/handlers/pebbles"
3
7
  require "lita/handlers/omikuji"
@@ -0,0 +1,15 @@
1
+ module Lita
2
+ class Message
3
+ def reply(*strings)
4
+ if Lita.config.robot.adapter == :twitter
5
+ reply_with_mention(*strings)
6
+ else
7
+ reply_without_mention(*strings)
8
+ end
9
+ end
10
+
11
+ def reply_without_mention(*strings)
12
+ @robot.send_messages(source, *strings)
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,5 @@
1
+ module Lita
2
+ class Response
3
+ def_delegators :message, :reply_without_mention
4
+ end
5
+ end
@@ -1,4 +1,3 @@
1
- require "lita"
2
1
  require 'flippy'
3
2
  require 'pebbles/suddenly_death_string'
4
3
 
@@ -36,6 +35,12 @@ module Lita
36
35
  response.reply "いきよう( ˘ω˘)"
37
36
  end
38
37
 
38
+ route /(はやい|かわいい|#承認)$/, :hokuhoku, command: false
39
+ def hokuhoku(response)
40
+ return if rand(3) == 0
41
+ response.reply_without_mention "ホクホク"
42
+ end
43
+
39
44
  route /\( ?˘ω˘\)\"?/, :suya, command: false # " this comment is workaround for sublime text syntax highlighting
40
45
  def suya(response)
41
46
  return if rand(2) == 0
@@ -44,4 +49,4 @@ module Lita
44
49
  end
45
50
  Lita.register_handler(Pebbles)
46
51
  end
47
- end
52
+ end
@@ -1,5 +1,5 @@
1
1
  module Lita
2
2
  module Pebbles
3
- VERSION = "0.0.8"
3
+ VERSION = "0.0.9"
4
4
  end
5
5
  end
data/lita-pebbles.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
21
  spec.require_paths = ["lib"]
22
22
 
23
- spec.add_runtime_dependency "lita", ">= 2.0"
23
+ spec.add_runtime_dependency "lita", ">= 3.1"
24
24
  spec.add_runtime_dependency 'pebbles-suddenly_death_string', '~> 0.0.4'
25
25
  spec.add_runtime_dependency 'flippy', '~> 0.1.2'
26
26
  spec.add_runtime_dependency 'rufus-scheduler', '~> 3.0.7'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-pebbles
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - fukayatsu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-01 00:00:00.000000000 Z
11
+ date: 2014-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '3.1'
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: '2.0'
26
+ version: '3.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pebbles-suddenly_death_string
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -122,6 +122,8 @@ files:
122
122
  - Rakefile
123
123
  - config/meigens.json
124
124
  - lib/lita-pebbles.rb
125
+ - lib/lita/ext/message.rb
126
+ - lib/lita/ext/response.rb
125
127
  - lib/lita/handlers/kansai.rb
126
128
  - lib/lita/handlers/misawa.rb
127
129
  - lib/lita/handlers/omikuji.rb