lita-flip 0.0.2 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 364970439452914ae635773a85277693dbc693a9
4
- data.tar.gz: c3e82dd03798e3eca3d1f07e32c5a761fd22ed7a
3
+ metadata.gz: 7babc80f6dcfb2b4783e604329be02321ae2728f
4
+ data.tar.gz: 2098e446ffd2a0c2a7cfae9b5aa644aad4c44868
5
5
  SHA512:
6
- metadata.gz: c01567bbaf4849ca0242c7190dd5cf0375d73b15bec48a08c7fa74456c167c987d853cb997b99c3998d7c8acfe7cadf7926147602a22715bc3f42b25e3a2d8a2
7
- data.tar.gz: e77424d5a11997daa6785269a9db816f83847073a9f6cc74f6103e41d832bc1808e6effd9d0f2eb4ab838e228b1c25b9d19129f2ff336736b79a15fb1430010a
6
+ metadata.gz: c7af7ccd650606b803e75dff459e1aacceeca55dea528b44464e046a1dbcbf6ce3aecc00af90834aff1a54eb0967b122debc371bda4b284ac2f77d7e097e7d14
7
+ data.tar.gz: 3dfcad583a59def823e97aefaefb961765fbb55736d6258b1f88187bbd13ee441e907e39210490776aee43032f93ac27df087ce10047c0038b8c7b8cbea0103d
data/.travis.yml CHANGED
@@ -4,3 +4,5 @@ rvm:
4
4
  script: bundle exec rake
5
5
  before_install:
6
6
  - gem update --system
7
+ services:
8
+ - redis-server
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # lita-flip
2
2
 
3
+ [![Build Status](https://travis-ci.org/zacstewart/lita-flip.png?branch=master)](https://travis-ci.org/zacstewart/lita-flip)
4
+
3
5
  A handler for [Lita][1] that angrily flips your text.
4
6
 
5
7
  ## Installation
@@ -13,7 +15,7 @@ gem "lita-flip"
13
15
  ## Usage
14
16
 
15
17
  Lita: flip mondays
16
- > (╯°□°)╯︵sʎɐpuoɯ
18
+ > (╯°□°)╯︵ sʎɐpuoɯ
17
19
 
18
20
  ## License
19
21
 
@@ -3,7 +3,7 @@ require "lita"
3
3
  module Lita
4
4
  module Handlers
5
5
  class Flip < Handler
6
- FLIPPER = '(╯°□°)╯︵'.freeze
6
+ FLIPPER = '(╯°□°)╯︵ '.freeze
7
7
  FLIP_HASH = {
8
8
  '!' => '¡',
9
9
  '?' => '¿',
@@ -47,7 +47,7 @@ module Lita
47
47
  '\'' => ',',
48
48
  }
49
49
 
50
- route %r{\Aflip(?:\s+me)\s+(.*)\Z}, :flip, command: true
50
+ route %r{\Aflip(?:\s+me)?\s+(.*)\Z}, :flip, command: true
51
51
 
52
52
  def flip(response)
53
53
  sentence = response.matches.first.first.downcase
data/lita-flip.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-flip"
3
- spec.version = "0.0.2"
3
+ spec.version = "1.0.0"
4
4
  spec.authors = ["Zac Stewart"]
5
5
  spec.email = ["zgstewart@gmail.com"]
6
6
  spec.description = %q{A handler for Lita that angrily flips your text.}
@@ -1,11 +1,22 @@
1
1
  require "spec_helper"
2
2
 
3
3
  describe Lita::Handlers::Flip, lita_handler: true do
4
+
4
5
  it { routes_command('flip me Nerdbot').to(:flip) }
6
+ it { routes_command('flip Nerdbot').to(:flip) }
7
+
8
+ context 'with a "me"' do
9
+ it 'flips the words' do
10
+ send_command('flip me Nerdbot ftw')
11
+ expect(replies.last).to eq('(╯°□°)╯︵ ʍʇɟ ʇoqpɹǝu')
12
+ end
13
+ end
5
14
 
6
- it 'flips the words' do
7
- send_command('flip me Nerdbot ftw')
8
- expect(replies.last).to eq('(╯°□°)╯︵ʍʇɟ ʇoqpɹǝu')
15
+ context 'without a "me"' do
16
+ it 'flips the words' do
17
+ send_command('flip Nerdbot ftw')
18
+ expect(replies.last).to eq('(╯°□°)╯︵ ʍʇɟ ʇoqpɹǝu')
19
+ end
9
20
  end
10
21
 
11
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-flip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zac Stewart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-27 00:00:00.000000000 Z
11
+ date: 2014-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita
@@ -139,3 +139,4 @@ summary: A handler for Lita that angrily flips your text.
139
139
  test_files:
140
140
  - spec/lita/handlers/flip_spec.rb
141
141
  - spec/spec_helper.rb
142
+ has_rdoc: