ruboty-choose 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
  SHA1:
3
- metadata.gz: 91e47061de6a487f69e9b40d86b2b88a0a6a8192
4
- data.tar.gz: bfc7512633b3390784c3f4634dd47664faac88b8
3
+ metadata.gz: 5109160734b1db29f22eeae4b3a960066e3a21ed
4
+ data.tar.gz: 6e98c45d0ce11721dcaff7c89d614a114833ca97
5
5
  SHA512:
6
- metadata.gz: f3a17a44e23832642bd807f451ddbe7702d717cf99d357246a048e53db8cf2d9c35538b894b3f6f96abff0359ad5939844c6355f4b045cf5bae7f44ab3d74df1
7
- data.tar.gz: f391c79b1e7d5a33ea0d3a0df1688c6423927cb713a14b3f7dcbe93042e62a363bd0354d46272c3858ff1e0681b8697140e5a3fb69877a3cfe402ca86920e78c
6
+ metadata.gz: 19b5d29706f4cd7892a79994fc168463712604806b9c4db6916db3a0a3123acd9f5af8c927136c855791d3816a4a53a7da1f01fe073953f89fc65371dc55b1bd
7
+ data.tar.gz: 0605216d4d73ac56eb4c068b4ccede7a46668e94e6c8e2140e153c13f55e54837e6bea706a72b09b29542dfc3cc4826a62f89a4b2ae5dcd3f95ab8a9464ad7c7
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ # rspec failure tracking
12
+ .rspec_status
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at hiromi19860101@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 kimromi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,24 @@
1
+ # Ruboty::Choose
2
+
3
+ Choose tool for Ruboty.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'ruboty-choose'
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ Select one of multiple parameters.
16
+
17
+ ```
18
+ @ruboty choose A B C => I chose B!
19
+ ```
20
+
21
+ ## License
22
+
23
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
24
+
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,8 @@
1
+ require "ruboty"
2
+ require "ruboty/choose/version"
3
+ require "ruboty/handlers/choose"
4
+
5
+ module Ruboty
6
+ module Choose
7
+ end
8
+ end
@@ -0,0 +1,12 @@
1
+ module Ruboty
2
+ module Choose
3
+ module Actions
4
+ class Choose < Ruboty::Actions::Base
5
+ def call
6
+ items = message[:items].strip.split(/\s/)
7
+ message.reply("I chose #{items.sample}!") if items.size >= 1
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,5 @@
1
+ module Ruboty
2
+ module Choose
3
+ VERSION = "0.1.2"
4
+ end
5
+ end
@@ -0,0 +1,17 @@
1
+ require "ruboty/choose/actions/choose"
2
+
3
+ module Ruboty
4
+ module Handlers
5
+ class Choose < Base
6
+ on(
7
+ /choose (?<items>.*)\z/,
8
+ name: 'choose',
9
+ description: 'choose'
10
+ )
11
+
12
+ def choose(message)
13
+ Ruboty::Choose::Actions::Choose.new(message).call
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,23 @@
1
+ lib = File.expand_path('../lib', __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'ruboty/choose/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "ruboty-choose"
7
+ spec.version = Ruboty::Choose::VERSION
8
+ spec.authors = ["kimromi"]
9
+ spec.email = ["kimromi4@gmail.com"]
10
+
11
+ spec.summary = %q{choose tool for Ruboty.}
12
+ spec.description = %q{choose tool for Ruboty.}
13
+ spec.homepage = "https://github.com/kimromi/ruboty-choose"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_dependency "ruboty"
21
+ spec.add_development_dependency "bundler", "~> 1.14"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruboty-choose
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
  - kimromi
@@ -58,7 +58,18 @@ email:
58
58
  executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
- files: []
61
+ files:
62
+ - ".gitignore"
63
+ - CODE_OF_CONDUCT.md
64
+ - Gemfile
65
+ - LICENSE.txt
66
+ - README.md
67
+ - Rakefile
68
+ - lib/ruboty/choose.rb
69
+ - lib/ruboty/choose/actions/choose.rb
70
+ - lib/ruboty/choose/version.rb
71
+ - lib/ruboty/handlers/choose.rb
72
+ - ruboty-choose.gemspec
62
73
  homepage: https://github.com/kimromi/ruboty-choose
63
74
  licenses:
64
75
  - MIT