lita-hangout 0.1.1 → 0.2.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 +4 -4
- data/.rspec +1 -0
- data/.rubocop.yml +8 -0
- data/.travis.yml +3 -3
- data/CHANGELOG.md +15 -4
- data/Gemfile +1 -1
- data/Rakefile +6 -3
- data/lib/lita-hangout.rb +4 -5
- data/lib/lita/handlers/hangout.rb +5 -4
- data/lita-hangout.gemspec +20 -19
- data/locales/en.yml +4 -0
- data/spec/lita/handlers/hangout_spec.rb +14 -16
- data/spec/spec_helper.rb +5 -9
- metadata +19 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df4c26fc5af1f709ab2740d5dd6fa6410eb78ed0
|
4
|
+
data.tar.gz: 48d5301fe0860955dd37308f9c26c95684545790
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02c4bfbb0d02befec9351186c1dc15b0678afacd8d92580a24c2c61d9be419770cabd62163c4b4fc20fa10f6ab1de62363a32ba04dcc6b9ab89653f197d53742
|
7
|
+
data.tar.gz: d70ce2d5f061d5935760737e4b75ed399dc70e21ec29615537be2b604244966042cf2852d3ebe21dc33e860ced604d73e816240d49c795b14287c78d911d9586
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color --profile 5
|
data/.rubocop.yml
ADDED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -4,12 +4,23 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
4
4
|
|
5
5
|
We follow [Keep a Changelog](http://keepachangelog.com/) format.
|
6
6
|
|
7
|
-
## 0.
|
7
|
+
## 0.2.0 - 2015-08-31
|
8
8
|
### Added
|
9
|
-
-
|
10
|
-
|
11
|
-
|
9
|
+
- Rubocop codestyle
|
10
|
+
- I18n translations for commands
|
11
|
+
|
12
|
+
## 0.1.2 - 2015-06-21
|
13
|
+
### Changed
|
14
|
+
- Better RSpec defaults (.rspec)
|
15
|
+
- Travis will test most recent patch-level version of ruby instead of fixed ones
|
16
|
+
- Removed Boxen specific spec patch
|
12
17
|
|
13
18
|
## 0.1.1 - 2015-04-15
|
14
19
|
### Changed
|
15
20
|
- Domain config is required and validates the correct type
|
21
|
+
|
22
|
+
## 0.1.0 - 2015-04-14
|
23
|
+
### Added
|
24
|
+
- Initial plugin import with hangout, hangout me and hangout me
|
25
|
+
<subject> commands support
|
26
|
+
- RSpec, Travis CI and Coveralls support
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -1,6 +1,9 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rspec/core/rake_task'
|
3
|
+
require 'rubocop/rake_task'
|
3
4
|
|
4
5
|
RSpec::Core::RakeTask.new(:spec)
|
6
|
+
RuboCop::RakeTask.new
|
5
7
|
|
6
|
-
task default: :spec
|
8
|
+
task default: [:spec, :lint]
|
9
|
+
task lint: [:rubocop]
|
data/lib/lita-hangout.rb
CHANGED
@@ -1,12 +1,11 @@
|
|
1
|
-
require
|
1
|
+
require 'lita'
|
2
2
|
|
3
3
|
Lita.load_locales Dir[File.expand_path(
|
4
|
-
File.join(
|
4
|
+
File.join('..', '..', 'locales', '*.yml'), __FILE__
|
5
5
|
)]
|
6
6
|
|
7
|
-
require
|
7
|
+
require 'lita/handlers/hangout'
|
8
8
|
|
9
9
|
Lita::Handlers::Hangout.template_root File.expand_path(
|
10
|
-
File.join(
|
11
|
-
__FILE__
|
10
|
+
File.join('..', '..', 'templates'), __FILE__
|
12
11
|
)
|
@@ -5,9 +5,10 @@ module Lita
|
|
5
5
|
|
6
6
|
config :domain, type: String, required: true
|
7
7
|
|
8
|
-
route(/hangout$/i, :hangout, command: true, help: {
|
9
|
-
route(/hangout me$/i, :hangout_me, command: true, help: {
|
10
|
-
route(/hangout me (.+)/i, :hangout_me, command: true,
|
8
|
+
route(/hangout$/i, :hangout, command: true, help: { 'hangout' => t('help.hangout') })
|
9
|
+
route(/hangout me$/i, :hangout_me, command: true, help: { 'hangout me' => t('help.hangout_me') })
|
10
|
+
route(/hangout me (.+)/i, :hangout_me, command: true,
|
11
|
+
help: { 'hangout me <topic>' => t('help.hangout_me_topic') })
|
11
12
|
|
12
13
|
def hangout(response)
|
13
14
|
response.reply hangout_url(Time.now.to_i)
|
@@ -27,7 +28,7 @@ module Lita
|
|
27
28
|
URI.join(HANGOUT_PREFIX, "#{config.domain}/", permalink(sufix)).to_s
|
28
29
|
end
|
29
30
|
|
30
|
-
def permalink(subject='')
|
31
|
+
def permalink(subject = '')
|
31
32
|
subject.to_s.gsub(/[^[:alnum:]]/, ' ').strip.gsub(/\W+/, '-')
|
32
33
|
end
|
33
34
|
end
|
data/lita-hangout.gemspec
CHANGED
@@ -1,26 +1,27 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
|
-
spec.name =
|
3
|
-
spec.version =
|
4
|
-
spec.authors = [
|
5
|
-
spec.email = [
|
6
|
-
spec.description =
|
7
|
-
spec.summary =
|
8
|
-
spec.homepage =
|
9
|
-
spec.license =
|
10
|
-
spec.metadata = {
|
2
|
+
spec.name = 'lita-hangout'
|
3
|
+
spec.version = '0.2.0'
|
4
|
+
spec.authors = ['Gabriel Mazetto']
|
5
|
+
spec.email = ['brodock@gmail.com']
|
6
|
+
spec.description = 'Generates Google+ Hangout URL for GoogleApps'
|
7
|
+
spec.summary = 'Google+ Hangout URL generator'
|
8
|
+
spec.homepage = 'http://github.com/brodock/lita-hangout'
|
9
|
+
spec.license = 'MIT'
|
10
|
+
spec.metadata = { 'lita_plugin_type' => 'handler' }
|
11
11
|
|
12
|
-
spec.files = `git ls-files`.split(
|
12
|
+
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
13
13
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
14
14
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
15
|
-
spec.require_paths = [
|
15
|
+
spec.require_paths = ['lib']
|
16
16
|
|
17
|
-
spec.add_runtime_dependency
|
17
|
+
spec.add_runtime_dependency 'lita', '>= 4.3'
|
18
18
|
|
19
|
-
spec.add_development_dependency
|
20
|
-
spec.add_development_dependency
|
21
|
-
spec.add_development_dependency
|
22
|
-
spec.add_development_dependency
|
23
|
-
spec.add_development_dependency
|
24
|
-
spec.add_development_dependency
|
25
|
-
spec.add_development_dependency
|
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
|
+
spec.add_development_dependency 'coveralls'
|
26
|
+
spec.add_development_dependency 'rubocop'
|
26
27
|
end
|
data/locales/en.yml
CHANGED
@@ -1,41 +1,39 @@
|
|
1
|
-
require
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Lita::Handlers::Hangout, lita_handler: true do
|
4
|
-
|
5
4
|
# Routes
|
6
|
-
it { is_expected.to route_command(
|
7
|
-
it { is_expected.to route_command(
|
8
|
-
it { is_expected.to route_command(
|
5
|
+
it { is_expected.to route_command('hangout').to(:hangout) }
|
6
|
+
it { is_expected.to route_command('hangout me').to(:hangout_me) }
|
7
|
+
it { is_expected.to route_command('hangout me whatever').to(:hangout_me) }
|
9
8
|
|
10
9
|
# Commands
|
11
10
|
before(:each) { robot.config.handlers.hangout.domain = 'example.com' }
|
12
11
|
let(:hangout_url) { Lita::Handlers::Hangout::HANGOUT_PREFIX + 'example.com/' }
|
13
12
|
|
14
|
-
describe
|
15
|
-
it
|
13
|
+
describe '#hangout' do
|
14
|
+
it 'replies with a hangout url' do
|
16
15
|
send_command('hangout')
|
17
16
|
expect(replies.last).to include(hangout_url)
|
18
17
|
end
|
19
18
|
end
|
20
19
|
|
21
|
-
describe
|
22
|
-
|
23
|
-
it "replies with a hangout url" do
|
20
|
+
describe '#hangout_me' do
|
21
|
+
it 'replies with a hangout url' do
|
24
22
|
send_command('hangout me')
|
25
23
|
expect(replies.last).to include(hangout_url)
|
26
24
|
end
|
27
25
|
|
28
|
-
context
|
29
|
-
it
|
26
|
+
context 'when no argument is informed' do
|
27
|
+
it 'replies with a hangout url and the username appended' do
|
30
28
|
send_command('hangout me')
|
31
|
-
expect(replies.last).to eq(hangout_url+'Test-User')
|
29
|
+
expect(replies.last).to eq(hangout_url + 'Test-User')
|
32
30
|
end
|
33
31
|
end
|
34
32
|
|
35
|
-
context
|
36
|
-
it
|
33
|
+
context 'when argument is informed' do
|
34
|
+
it 'replies with a hangout url and the username appended' do
|
37
35
|
send_command('hangout me whatever you say')
|
38
|
-
expect(replies.last).to eq(hangout_url+'whatever-you-say')
|
36
|
+
expect(replies.last).to eq(hangout_url + 'whatever-you-say')
|
39
37
|
end
|
40
38
|
end
|
41
39
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,18 +1,14 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require 'simplecov'
|
2
|
+
require 'coveralls'
|
3
3
|
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
4
4
|
SimpleCov::Formatter::HTMLFormatter,
|
5
5
|
Coveralls::SimpleCov::Formatter
|
6
6
|
]
|
7
|
-
SimpleCov.start { add_filter
|
7
|
+
SimpleCov.start { add_filter '/spec/' }
|
8
8
|
|
9
|
-
require
|
10
|
-
require
|
9
|
+
require 'lita-hangout'
|
10
|
+
require 'lita/rspec'
|
11
11
|
|
12
12
|
# A compatibility mode is provided for older plugins upgrading from Lita 3. Since this plugin
|
13
13
|
# was generated with Lita 4, the compatibility mode should be left disabled.
|
14
14
|
Lita.version_3_compatibility_mode = false
|
15
|
-
|
16
|
-
Lita.configure do |config|
|
17
|
-
config.redis = { host: ENV['BOXEN_REDIS_HOST'] || "127.0.0.1", port: ENV['BOXEN_REDIS_PORT'] || 6379 }
|
18
|
-
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-hangout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriel Mazetto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
125
139
|
description: Generates Google+ Hangout URL for GoogleApps
|
126
140
|
email:
|
127
141
|
- brodock@gmail.com
|
@@ -130,6 +144,8 @@ extensions: []
|
|
130
144
|
extra_rdoc_files: []
|
131
145
|
files:
|
132
146
|
- ".gitignore"
|
147
|
+
- ".rspec"
|
148
|
+
- ".rubocop.yml"
|
133
149
|
- ".travis.yml"
|
134
150
|
- CHANGELOG.md
|
135
151
|
- Gemfile
|
@@ -164,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
180
|
version: '0'
|
165
181
|
requirements: []
|
166
182
|
rubyforge_project:
|
167
|
-
rubygems_version: 2.4.
|
183
|
+
rubygems_version: 2.4.8
|
168
184
|
signing_key:
|
169
185
|
specification_version: 4
|
170
186
|
summary: Google+ Hangout URL generator
|