lita-do-it 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5e4d06ba6b6dafd412ae763cd617726cb6a30420
4
+ data.tar.gz: 724a186ca58f9e89de3c460cac933a62da32ee66
5
+ SHA512:
6
+ metadata.gz: 13a1f8129a50de1ab405196a72a079e99fbff2cb4cac7dd92e293849269e9cf5d0af9f6e3a5197a9197c2fee384e9f138239570a9aab3c8c30cbadefbe29764a
7
+ data.tar.gz: b7c9d9020764b74ab3aac4c409da0f55a4193f50c9b10ce2f0730cb4d5db90a85e2cf7121b211177573f9212ee06dd8ee972c710f730b79299e5b563de74dff4
data/.gitignore ADDED
@@ -0,0 +1,17 @@
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
data/.rubocop.yml ADDED
@@ -0,0 +1,4 @@
1
+ AllCops:
2
+ Exclude:
3
+ - '**lita-do-it.rb'
4
+ TargetRubyVersion: 2.0
data/.travis.yml ADDED
@@ -0,0 +1,10 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0.0
4
+ script:
5
+ - bundle exec rspec
6
+ - bundle exec rubocop
7
+ before_install:
8
+ - gem update --system
9
+ services:
10
+ - redis-server
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Testing libraries
4
+ gem 'rubocop', require: false
5
+
6
+ gemspec
data/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # lita-do-it
2
+
3
+ [![Build Status](https://travis-ci.org/thattacoguy/lita-do-it.svg?branch=master)](https://travis-ci.org/devacademyla/lita-do-it)
4
+
5
+ Just... DO IT.
6
+
7
+ ## Installation
8
+
9
+ Add lita-do-it to your Lita instance's Gemfile:
10
+
11
+ ``` ruby
12
+ gem 'lita-do-it'
13
+ ```
14
+
15
+ ## Configuration
16
+
17
+ None.
18
+
19
+ ## Usage
20
+
21
+ ```
22
+ taco: just... do it
23
+ lita: http://i.giphy.com/10FUfTApAeoZK8.gif
24
+ ```
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
data/lib/lita-do-it.rb ADDED
@@ -0,0 +1,12 @@
1
+ require 'lita'
2
+
3
+ Lita.load_locales Dir[File.expand_path(
4
+ File.join('..', '..', 'locales', '*.yml'), __FILE__
5
+ )]
6
+
7
+ require 'lita/handlers/do_it'
8
+
9
+ Lita::Handlers::DoIt.template_root File.expand_path(
10
+ File.join('..', '..', 'templates'),
11
+ __FILE__
12
+ )
@@ -0,0 +1,24 @@
1
+ module Lita
2
+ # Load Lita Handlers.
3
+ module Handlers
4
+ # Provide Leboufian motivation.
5
+ class DoIt < Handler
6
+ SHIAS = [
7
+ 'http://i.giphy.com/10FUfTApAeoZK8.gif',
8
+ 'http://i.giphy.com/qvdqF0PGFPfyg.gif',
9
+ 'http://i.giphy.com/wCiFka9RsSW9W.gif',
10
+ 'http://i.giphy.com/ypO01RIuQ3tHW.gif',
11
+ 'http://i.giphy.com/87xihBthJ1DkA.gif'
12
+ ].freeze
13
+
14
+ def doit(response)
15
+ response.reply SHIAS.sample
16
+ end
17
+
18
+ route(/do\s*it/i, :doit, command: false, help: {
19
+ 'do it' => 'Display a motivational Shia'
20
+ })
21
+ end
22
+ Lita.register_handler(DoIt)
23
+ end
24
+ end
@@ -0,0 +1,25 @@
1
+ Gem::Specification.new do |spec|
2
+ spec.name = 'lita-do-it'
3
+ spec.version = '0.1.0'
4
+ spec.authors = ['Daniel Gallegos']
5
+ spec.email = ['daniel@tacowolf.net']
6
+ spec.description = 'A Lita plugin for motivating your team.'
7
+ spec.summary = 'Motivate your team to DO IT.'
8
+ spec.homepage = 'https://devacademy.la'
9
+ spec.license = 'MIT'
10
+ spec.metadata = { 'lita_plugin_type' => 'handler' }
11
+
12
+ spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
13
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
14
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
15
+ spec.require_paths = ['lib']
16
+
17
+ spec.add_runtime_dependency 'lita', '>= 4.7'
18
+
19
+ spec.add_development_dependency 'bundler', '~> 1.3'
20
+ spec.add_development_dependency 'pry-byebug'
21
+ spec.add_development_dependency 'rake'
22
+ spec.add_development_dependency 'rack-test'
23
+ spec.add_development_dependency 'rspec', '>= 3.0.0'
24
+ spec.add_development_dependency 'simplecov'
25
+ end
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ describe Lita::Handlers::DoIt, lita_handler: true do
4
+ it { is_expected.to route('do it').to(:doit) }
5
+ it { is_expected.to route('JUST DO IT').to(:doit) }
6
+ # Don't let your dreams be dreams.
7
+ # Yesterday, you said tomorrow.
8
+ it { is_expected.to route('SO, JUST... DO IT').to(:doit) }
9
+ it 'motivates with a shia' do
10
+ send_message('do it')
11
+ expect(Lita::Handlers::DoIt::SHIAS).to include(replies.last)
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require 'simplecov'
2
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
3
+ SimpleCov::Formatter::HTMLFormatter
4
+ ]
5
+ SimpleCov.start { add_filter '/spec/' }
6
+
7
+ require 'lita-do-it'
8
+ require 'lita/rspec'
9
+
10
+ # A compatibility mode is provided for older plugins upgrading from
11
+ # Lita 3. Since this plugin was generated with Lita 4, the
12
+ # compatibility mode should be left disabled.
13
+ Lita.version_3_compatibility_mode = false
metadata ADDED
@@ -0,0 +1,156 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: lita-do-it
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Daniel Gallegos
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-04-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: lita
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '4.7'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '4.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.3'
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry-byebug
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
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: rack-test
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'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 3.0.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 3.0.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: simplecov
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description: A Lita plugin for motivating your team.
112
+ email:
113
+ - daniel@tacowolf.net
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - ".gitignore"
119
+ - ".rubocop.yml"
120
+ - ".travis.yml"
121
+ - Gemfile
122
+ - README.md
123
+ - Rakefile
124
+ - lib/lita-do-it.rb
125
+ - lib/lita/handlers/do_it.rb
126
+ - lita-do-it.gemspec
127
+ - spec/lita/handlers/do_it_spec.rb
128
+ - spec/spec_helper.rb
129
+ homepage: https://devacademy.la
130
+ licenses:
131
+ - MIT
132
+ metadata:
133
+ lita_plugin_type: handler
134
+ post_install_message:
135
+ rdoc_options: []
136
+ require_paths:
137
+ - lib
138
+ required_ruby_version: !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
143
+ required_rubygems_version: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - ">="
146
+ - !ruby/object:Gem::Version
147
+ version: '0'
148
+ requirements: []
149
+ rubyforge_project:
150
+ rubygems_version: 2.5.1
151
+ signing_key:
152
+ specification_version: 4
153
+ summary: Motivate your team to DO IT.
154
+ test_files:
155
+ - spec/lita/handlers/do_it_spec.rb
156
+ - spec/spec_helper.rb