ruboty-sushiyuki 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d30f0faaf8dcf37d6510954582826049733db386
4
+ data.tar.gz: 68d25a0cbc6853744d4fda16411dac68fc1c2257
5
+ SHA512:
6
+ metadata.gz: 0c73b27dce5c1dda9759011943ffd80a6d024e9c81b5e514f2fe205930bface67dbe0af09c14bbcb66cc5eda036c25da5ecce3b01cb55652e152c2e17d589e7b
7
+ data.tar.gz: 999c3c79730fad6beccec6a838d358f5c4e35ade14cd24948d4786be8624fde22a49f7085d4f6fa0cf27325d8d4ec1fb81feb93d324530af037534995e01d329
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in ruboty-sushiyuki.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 chiastolite
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,30 @@
1
+ # Ruboty::Sushiyuki
2
+
3
+ Ruboty :heart: Sushiyuki
4
+
5
+ ## Installation
6
+
7
+ ```Gemfile
8
+ gem "ruboty"
9
+ gem "ruboty-sushiyuki" # add this line
10
+ ```
11
+ ## Usage
12
+
13
+ ```
14
+ @ruboty sushi me <emotion>
15
+ ```
16
+
17
+ ## Contributing
18
+
19
+ 1. Fork it ( https://github.com/chiastolite/ruboty-sushiyuki/fork )
20
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
21
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
22
+ 4. Push to the branch (`git push origin my-new-feature`)
23
+ 5. Create a new Pull Request
24
+
25
+ ## See Also
26
+
27
+ - [寿司ゆき/Sushiyuki](http://awayuki.net/sushiyuki/)
28
+ - [ruboty](http://github.com/r7kamura/ruboty)
29
+ - [hubot-sushiyuki](http://github.com/naoya/hubot-sushiyuki)
30
+
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,54 @@
1
+ "yes": 1
2
+ "no": 2
3
+ "ok": 3
4
+ "thanks": 4
5
+ "thank you": 4
6
+ "gyoku": 4
7
+ "sorry": 5
8
+ "sigh": 6
9
+ "angry": 7
10
+ "no comment": 8
11
+ "cool": 9
12
+ "kappa": 10
13
+ "help": 11
14
+ "what": 12
15
+ "question": 12
16
+ "sleep": 13
17
+ "sleeply": 13
18
+ "oh no": 14
19
+ "love": 15
20
+ "grin": 16
21
+ "bye": 17
22
+ "sneak": 18
23
+ "hide": 19
24
+ "peel": 20
25
+ "hot": 21
26
+ "fail": 22
27
+ "dip": 22
28
+ "too much": 23
29
+ "ikura": 23
30
+ "happy": 24
31
+ "smile": 25
32
+ "boom": 25
33
+ "wat": 26
34
+ "anago": 26
35
+ "tea": 27
36
+ "content": 27
37
+ "agari": 27
38
+ "gari": 28
39
+ "don't forget": 28
40
+ "wasabi": 29
41
+ "sabi": 29
42
+ "come on": 30
43
+ "c'mon": 30
44
+ "sparkles": 31
45
+ "sweat": 32
46
+ "cry": 33
47
+ "surprised": 34
48
+ "idea": 35
49
+ "sad": 36
50
+ "sob": 36
51
+ "chat": 37
52
+ "phone": 38
53
+ "call": 38
54
+ "hello": 39
@@ -0,0 +1,30 @@
1
+ require 'yaml'
2
+
3
+ module Ruboty
4
+ module Handlers
5
+ class Sushiyuki < Base
6
+ @@map = nil
7
+ def self.map
8
+ unless @@map
9
+ map_file = "#{File.dirname(__FILE__)}/../../../data/map.yml"
10
+ @@map = YAML.load_file(map_file)
11
+ end
12
+ @@map
13
+ end
14
+
15
+ on /sushi( me)? ?(?<keyword>.+)?/, name: 'sushi', description: 'Generate sushiyuki image matching with the keyword'
16
+
17
+ def sushi(message = {})
18
+ keyword = message[:keyword] || 'wat'
19
+ url = generate(keyword)
20
+ message.reply(url) if url
21
+ end
22
+
23
+ private
24
+ def generate(query)
25
+ s = Sushiyuki.map[query]
26
+ "https://raw.githubusercontent.com/chiastolite/ruboty-sushiyuki/resources/images/%02d.png" % s
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,2 @@
1
+ require "ruboty/sushiyuki/version"
2
+ require "ruboty/handlers/sushiyuki"
@@ -0,0 +1,5 @@
1
+ module Ruboty
2
+ module Sushiyuki
3
+ VERSION = "0.0.2"
4
+ end
5
+ end
@@ -0,0 +1,22 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'ruboty/sushiyuki/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "ruboty-sushiyuki"
8
+ spec.version = Ruboty::Sushiyuki::VERSION
9
+ spec.authors = ["chiastolite"]
10
+ spec.email = ["chiastolite.1980@gmail.com"]
11
+ spec.summary = %q{Ruboty handler for sushiyuki}
12
+ spec.homepage = "http://github.com/chiastolite/ruboty-sushiyuki"
13
+ spec.license = "MIT"
14
+
15
+ spec.files = `git ls-files -z`.split("\x0")
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_development_dependency "bundler", "~> 1.6"
21
+ spec.add_development_dependency "rake"
22
+ end
metadata ADDED
@@ -0,0 +1,83 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruboty-sushiyuki
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - chiastolite
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-07-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description:
42
+ email:
43
+ - chiastolite.1980@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - Gemfile
50
+ - LICENSE.txt
51
+ - README.md
52
+ - Rakefile
53
+ - data/map.yml
54
+ - lib/ruboty/handlers/sushiyuki.rb
55
+ - lib/ruboty/sushiyuki.rb
56
+ - lib/ruboty/sushiyuki/version.rb
57
+ - ruboty-sushiyuki.gemspec
58
+ homepage: http://github.com/chiastolite/ruboty-sushiyuki
59
+ licenses:
60
+ - MIT
61
+ metadata: {}
62
+ post_install_message:
63
+ rdoc_options: []
64
+ require_paths:
65
+ - lib
66
+ required_ruby_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ requirements: []
77
+ rubyforge_project:
78
+ rubygems_version: 2.2.2
79
+ signing_key:
80
+ specification_version: 4
81
+ summary: Ruboty handler for sushiyuki
82
+ test_files: []
83
+ has_rdoc: