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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37e48a6a3b78db3b2a1c1539dbdc6ce4f823a68d
4
- data.tar.gz: 0fe0db7d1677bd354d3a36783a23d800e4d2dd75
3
+ metadata.gz: df4c26fc5af1f709ab2740d5dd6fa6410eb78ed0
4
+ data.tar.gz: 48d5301fe0860955dd37308f9c26c95684545790
5
5
  SHA512:
6
- metadata.gz: c89df063426fe35fd16c27dfd6f5b67b86b90eb5b8f2fe5ed3eb1e05653fbf43c440bcdfbe1d95ed7219d9057b380717b1d1dd5579f5cc3f1681289b942302cd
7
- data.tar.gz: 28dfd7b8bccd519f9401dce2a1007c4db748705b3faa28d833984b191d297ca1e20e31157b167a8ee93a5676f365eff2d9d3bc362314b3b26c7a7e589e15d71c
6
+ metadata.gz: 02c4bfbb0d02befec9351186c1dc15b0678afacd8d92580a24c2c61d9be419770cabd62163c4b4fc20fa10f6ab1de62363a32ba04dcc6b9ab89653f197d53742
7
+ data.tar.gz: d70ce2d5f061d5935760737e4b75ed399dc70e21ec29615537be2b604244966042cf2852d3ebe21dc33e860ced604d73e816240d49c795b14287c78d911d9586
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color --profile 5
@@ -0,0 +1,8 @@
1
+ Metrics/LineLength:
2
+ Max: 120
3
+
4
+ Style/FileName:
5
+ Enabled: false
6
+
7
+ Style/Documentation:
8
+ Enabled: false
@@ -1,8 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.0.0
4
- - 2.1.5
5
- - 2.2.2
3
+ - 2.0
4
+ - 2.1
5
+ - 2.2
6
6
  script: bundle exec rake
7
7
  before_install:
8
8
  - gem update --system
@@ -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.1.0 - 2015-04-14
7
+ ## 0.2.0 - 2015-08-31
8
8
  ### Added
9
- - Initial plugin import with hangout, hangout me and hangout me
10
- <subject> commands support
11
- - RSpec, Travis CI and Coveralls support
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
@@ -1,3 +1,3 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
data/Rakefile CHANGED
@@ -1,6 +1,9 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
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]
@@ -1,12 +1,11 @@
1
- require "lita"
1
+ require 'lita'
2
2
 
3
3
  Lita.load_locales Dir[File.expand_path(
4
- File.join("..", "..", "locales", "*.yml"), __FILE__
4
+ File.join('..', '..', 'locales', '*.yml'), __FILE__
5
5
  )]
6
6
 
7
- require "lita/handlers/hangout"
7
+ require 'lita/handlers/hangout'
8
8
 
9
9
  Lita::Handlers::Hangout.template_root File.expand_path(
10
- File.join("..", "..", "templates"),
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: {"hangout" => "Generates a random Google+ Hangout URL"})
9
- route(/hangout me$/i, :hangout_me, command: true, help: {"hangout me" => "Generates a Google+ Hangout URL based on user name"})
10
- route(/hangout me (.+)/i, :hangout_me, command: true, help: {"hangout me" => "Generates a Google+ Hangout URL based on user name"})
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
@@ -1,26 +1,27 @@
1
1
  Gem::Specification.new do |spec|
2
- spec.name = "lita-hangout"
3
- spec.version = "0.1.1"
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" }
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 = ["lib"]
15
+ spec.require_paths = ['lib']
16
16
 
17
- spec.add_runtime_dependency "lita", ">= 4.3"
17
+ spec.add_runtime_dependency 'lita', '>= 4.3'
18
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
- spec.add_development_dependency "coveralls"
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
@@ -2,3 +2,7 @@ en:
2
2
  lita:
3
3
  handlers:
4
4
  hangout:
5
+ help:
6
+ hangout: 'Generates a random Google+ Hangout URL'
7
+ hangout_me: 'Generates a Google+ Hangout URL based on user name'
8
+ hangout_me_topic: 'Generates a Google+ Hangout URL based on informed topic'
@@ -1,41 +1,39 @@
1
- require "spec_helper"
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("hangout").to(:hangout) }
7
- it { is_expected.to route_command("hangout me").to(:hangout_me) }
8
- it { is_expected.to route_command("hangout me whatever").to(:hangout_me) }
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 "#hangout" do
15
- it "replies with a hangout url" do
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 "#hangout_me" do
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 "when no argument is informed" do
29
- it "replies with a hangout url and the username appended" do
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 "when argument is informed" do
36
- it "replies with a hangout url and the username appended" do
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
@@ -1,18 +1,14 @@
1
- require "simplecov"
2
- require "coveralls"
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 "/spec/" }
7
+ SimpleCov.start { add_filter '/spec/' }
8
8
 
9
- require "lita-hangout"
10
- require "lita/rspec"
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.1.1
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-04-15 00:00:00.000000000 Z
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.3
183
+ rubygems_version: 2.4.8
168
184
  signing_key:
169
185
  specification_version: 4
170
186
  summary: Google+ Hangout URL generator