lita-morin 0.0.1

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: 5356f7065c924f2aec62737fb33ec69bc0621ac2
4
+ data.tar.gz: 3935b9c181af8d9a3728f12517d6567bf80ca92b
5
+ SHA512:
6
+ metadata.gz: da6cadd61ef11e0a2760b6f9d07894cb16eb233b71d0f48f0ff3acdd2741f6d6214029050cbdb38bb269b74e733b70f5699d8eb7dd9313c929dce9415082ac88
7
+ data.tar.gz: 404c55afa2693763b9d924e7b5b057725362ed7f6a57696f5fd0d677ef4b01af6a47f989f3aa91f308821102f09535b2fce27a5085e5d06bf0e5e27742f4c2cd
@@ -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/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2014 Taylor Lapeyre
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
@@ -0,0 +1,21 @@
1
+ # lita-morin
2
+
3
+ Shows a Super Normal quote from Dave Morin when you mention him.
4
+
5
+ ## Installation
6
+
7
+ Add lita-morin to your Lita instance's Gemfile:
8
+
9
+ ``` ruby
10
+ gem "lita-morin"
11
+ ```
12
+ ## Usage
13
+
14
+ ```
15
+ You: Anyone else like Dave Morin's writing?
16
+ bot: You make it Super Normal.
17
+ ```
18
+
19
+ ## License
20
+
21
+ [MIT](http://opensource.org/licenses/MIT)
@@ -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
@@ -0,0 +1,7 @@
1
+ require "lita"
2
+
3
+ Lita.load_locales Dir[File.expand_path(
4
+ File.join("..", "..", "locales", "*.yml"), __FILE__
5
+ )]
6
+
7
+ require "lita/handlers/morin"
@@ -0,0 +1,68 @@
1
+ module Lita
2
+ module Handlers
3
+ class Morin < Handler
4
+ TWATTERY = [
5
+ 'I regularly get asked the question: What do you think of <insert social app here>?',
6
+ 'This question is usually followed up by another question which goes something like: How would you design a great social app?',
7
+ 'Usually I answer this question by telling the story of “Super Normal,” one of my favorite Japanese design philosophies.',
8
+ 'When you set out to create a new product, you usually do not start by trying to think of something completely new.',
9
+ 'You think of a product or concept that is already “normal” to the world, and then try to make it better.',
10
+ 'You make it Super Normal.',
11
+ 'For example, imagine that you are an innovator in the world of simple tools for around the home.',
12
+ 'Today you are interested in creating a new and innovative version of the everyday metal bucket.',
13
+ 'At the outset, you would not start your design by thinking of anything other than a bucket.',
14
+ 'Imagine a basic metal bucket in your mind.',
15
+ 'The design we know today has evolved over the years to include a few simple features.',
16
+ 'The bucket is made of durable metal for longevity.',
17
+ 'It has ripples on the sides to make it easy to grasp with the hands.',
18
+ 'It has a curved metal handle making it possible to carry with one hand.',
19
+ 'The bucket design of today serves its function well.',
20
+ 'To apply Super Normal thinking we start by looking at what is normal and then ask the question: What are the key problems?',
21
+ 'In the case of our basic metal bucket we can find a few.',
22
+ 'First, the metal handle cuts into your hand when carrying a bucket full of cold water.',
23
+ 'Second, when picking up a bucket of cold water the metal is freezing to the touch.',
24
+ 'Third, when pouring the water out, it’s hard to control the stream of water, causing you to lose water.',
25
+ 'In thinking through these problems we can come up with some simple innovations that would make the bucket better.',
26
+ 'First, we can add a wood or plastic wrap to the metal handle, creating more surface area and thus a more comfortable carry.',
27
+ 'Second, we can wrap the entire bucket in a thin layer of plastic creating insulation when carrying hot or cold water.',
28
+ 'Third, we can add a spout to the side, making it easy to control the pour, causing you to lose less water.',
29
+ 'When we finish our design, and put it in front of our customer, the bucket looks like a bucket.',
30
+ 'It is comfortably familiar and ordinary at a glance.',
31
+ 'But as the customer interacts with the bucket, what is familiar fades away, and what is left is something new.',
32
+ 'The customer is delighted because we have changed their perspective of what a bucket can be.',
33
+ 'The same rules apply to design and innovation in social software.',
34
+ 'Often times I find that we start in the wrong place.',
35
+ 'To increase your chance of success, start with concepts that are normal to users.',
36
+ 'A simple list of these concepts might be: friending, following, tagging, posting, sending, sharing, liking, commenting, chatting, listening, watching, writing, uploading, downloading.',
37
+ 'Each of these concepts has been put to work billions and billions of times by social software systems time and time again over the last couple of decades.',
38
+ 'A good place to start when creating a new social app for the first time is to build upon these normal concepts, and then add your own twist.',
39
+ 'Much success has been seen on the Internet by doing this.',
40
+ 'In each of these cases, the innovator did not invent the category.',
41
+ 'They simply took what was “normal”, and added a twist.',
42
+ 'They added an innovation.',
43
+ 'The innovation solved a key problem of the “normal” use case that we all already understood.',
44
+ 'Sometimes these problems were in how the human interfaced with the technology.',
45
+ 'Sometimes utility or creativity could be enhanced by adding a constraint.',
46
+ 'Sometimes, a previous constraint was no longer necessary.',
47
+ 'And, sometimes the technology enabled interaction in a whole new context.',
48
+ 'In each case, the innovator built on top of concepts which had already been iterated upon billions and billions of times in social systems.',
49
+ 'Too often we make the mistake of trying to use concepts in our products, and thus words in our interfaces, which have no current meaning to users.',
50
+ 'As an innovator with limited resources, building a new concept is not something you can usually afford to do.',
51
+ 'By removing friction for the user to interact in a new way, each of these products unlocked massive value.',
52
+ 'As creators, we feel constant demand for innovation from the world.',
53
+ 'This puts immense pressure on the creative process and often times can have a dampening effect.',
54
+ 'I find it useful to keep in mind this simple philosophy when starting each new creative project and always remember to ask the questions: What is normal? How can we make it Super Normal?'
55
+ ]
56
+
57
+ route(/[Mm]orin/, :show_quote, command: false, help: {
58
+ "morin" => "Show some twattery"
59
+ })
60
+
61
+ def show_quote(response)
62
+ response.reply TWATTERY.sample
63
+ end
64
+ end
65
+
66
+ Lita.register_handler(Morin)
67
+ end
68
+ end
@@ -0,0 +1,23 @@
1
+ Gem::Specification.new do |spec|
2
+ spec.name = "lita-morin"
3
+ spec.version = "0.0.1"
4
+ spec.authors = ["Taylor Lapeyre"]
5
+ spec.email = ["taylorlapeyre@gmail.com"]
6
+ spec.description = %q{Shows a Super Normal quote from Dave Morin when you mention him.}
7
+ spec.summary = %q{Shows a Super Normal quote from Dave Morin when you mention him.}
8
+ spec.homepage = "https://github.com/taylorlapeyre/lita-morin"
9
+ spec.license = "MIT"
10
+ spec.metadata = { "lita_plugin_type" => "handler" }
11
+
12
+ spec.files = `git ls-files`.split($/)
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.0"
18
+
19
+ spec.add_development_dependency "bundler", "~> 1.3"
20
+ spec.add_development_dependency "rake"
21
+ spec.add_development_dependency "rack-test"
22
+ spec.add_development_dependency "rspec", ">= 3.0.0"
23
+ end
@@ -0,0 +1,4 @@
1
+ en:
2
+ lita:
3
+ handlers:
4
+ morin:
@@ -0,0 +1,14 @@
1
+ require "spec_helper"
2
+
3
+ describe Lita::Handlers::Morin, lita_handler: true do
4
+ it { is_expected.to route("morin") }
5
+ it { is_expected.to route("morin").to(:show_quote) }
6
+
7
+ it { is_expected.to route("Morin") }
8
+ it { is_expected.to route("Morin").to(:show_quote) }
9
+
10
+ it "can show a Dave Morin quote when his name is mentioned" do
11
+ send_message("I wish I was Dave Morin")
12
+ expect(Lita::Handlers::Morin::TWATTERY).to include(replies.last)
13
+ end
14
+ end
@@ -0,0 +1,6 @@
1
+ require "lita-morin"
2
+ require "lita/rspec"
3
+
4
+ # A compatibility mode is provided for older plugins upgrading from Lita 3. Since this plugin
5
+ # was generated with Lita 4, the compatibility mode should be left disabled.
6
+ Lita.version_3_compatibility_mode = false
metadata ADDED
@@ -0,0 +1,128 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: lita-morin
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Taylor Lapeyre
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-12-20 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.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '4.0'
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: rake
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: rack-test
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: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 3.0.0
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 3.0.0
83
+ description: Shows a Super Normal quote from Dave Morin when you mention him.
84
+ email:
85
+ - taylorlapeyre@gmail.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".gitignore"
91
+ - Gemfile
92
+ - LICENSE
93
+ - README.md
94
+ - Rakefile
95
+ - lib/lita-morin.rb
96
+ - lib/lita/handlers/morin.rb
97
+ - lita-morin.gemspec
98
+ - locales/en.yml
99
+ - spec/lita/handlers/morin_spec.rb
100
+ - spec/spec_helper.rb
101
+ homepage: https://github.com/taylorlapeyre/lita-morin
102
+ licenses:
103
+ - MIT
104
+ metadata:
105
+ lita_plugin_type: handler
106
+ post_install_message:
107
+ rdoc_options: []
108
+ require_paths:
109
+ - lib
110
+ required_ruby_version: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: '0'
115
+ required_rubygems_version: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ requirements: []
121
+ rubyforge_project:
122
+ rubygems_version: 2.2.2
123
+ signing_key:
124
+ specification_version: 4
125
+ summary: Shows a Super Normal quote from Dave Morin when you mention him.
126
+ test_files:
127
+ - spec/lita/handlers/morin_spec.rb
128
+ - spec/spec_helper.rb