lita-timezone 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.rspec +1 -0
- data/.rubocop.yml +8 -0
- data/.travis.yml +13 -0
- data/CHANGELOG.md +16 -0
- data/Gemfile +3 -0
- data/LICENSE +21 -0
- data/README.md +44 -0
- data/Rakefile +6 -0
- data/lib/lita-timezone.rb +14 -0
- data/lib/lita/handlers/timezone.rb +98 -0
- data/lita-timezone.gemspec +29 -0
- data/locales/en.yml +12 -0
- data/spec/lita/handlers/timezone_spec.rb +132 -0
- data/spec/spec_helper.rb +15 -0
- data/templates/.gitkeep +0 -0
- data/templates/available_timezones.erb +3 -0
- data/templates/available_timezones.slack.erb +5 -0
- metadata +220 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2ffb017cd1a0fde029dfecf4a69417ecddd79af3
|
4
|
+
data.tar.gz: 6652bd83207cea84286f3e6324ef48d426da2336
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e5273b76078b003c1ad63324508c16cfc2467a8fca2a849c6e4f841cf2d7b0e1c76b0816ea4702a104f2000b4a8e0dab39c9e7c8e91cd98dca9c5fc3e9381416
|
7
|
+
data.tar.gz: 0dc0c823013dae85b469b5a5446bca998312e83c7c183bbc4c0c114f02186b145443a27a826d20b1c193663ffbd26155f492b9e23771befa70888250228e77fa
|
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.rubocop.yml
ADDED
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# Change Log
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
|
+
|
5
|
+
We follow [Keep a Changelog](http://keepachangelog.com/) format.
|
6
|
+
|
7
|
+
## 0.1.0 - 2015-12-24
|
8
|
+
### Added
|
9
|
+
- Initial plugin import with support for the following commands:
|
10
|
+
* lita time 12:00 in X
|
11
|
+
* lita time now in X
|
12
|
+
* lita time 09:00 from X to Y
|
13
|
+
* lita time now from X to Y
|
14
|
+
* lita available timezones
|
15
|
+
* lita available timezones containing X
|
16
|
+
- RSpec, Travis CI and Coveralls support
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Resultados Digitais
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# lita-timezone
|
2
|
+
|
3
|
+
[![Build Status](https://travis-ci.org/ResultadosDigitais/lita-timezone.png?branch=master)](https://travis-ci.org/ResultadosDigitais/lita-timezone)
|
4
|
+
[![Coverage Status](https://coveralls.io/repos/ResultadosDigitais/lita-timezone/badge.png)](https://coveralls.io/r/ResultadosDigitais/lita-timezone)
|
5
|
+
[![Code
|
6
|
+
Climate](https://codeclimate.com/github/ResultadosDigitais/lita-timezone/badges/gpa.svg)](https://codeclimate.com/github/ResultadosDigitais/lita-timezone)
|
7
|
+
|
8
|
+
Lita handler to convert time between timezones.
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
Add lita-timezone to your Lita instance's Gemfile:
|
13
|
+
|
14
|
+
``` ruby
|
15
|
+
gem "lita-timezone"
|
16
|
+
```
|
17
|
+
|
18
|
+
## Configuration
|
19
|
+
|
20
|
+
Setup your default timezone
|
21
|
+
|
22
|
+
``` ruby
|
23
|
+
config.handlers.timezone.default_zone = 'Brasilia'
|
24
|
+
```
|
25
|
+
Tip: See in the `initialize` method of the handler how to get all available timezones of your machine.
|
26
|
+
## Usage
|
27
|
+
|
28
|
+
`lita time now in Beijing`
|
29
|
+
- Returns the time in Beijing for current time
|
30
|
+
|
31
|
+
`lita time 14:00 in Beijing`
|
32
|
+
- Returns the time in Beijing for 14:00 in the default_zone
|
33
|
+
|
34
|
+
`lita time now from Buenos Aires to Beijing`
|
35
|
+
- Returns the time in Beijing for current time in Buenos Aires
|
36
|
+
|
37
|
+
`lita time 14:00 from Buenos Aires to Beijing`
|
38
|
+
- Returns the time in Beijing for 14:00 in Buenos Aires
|
39
|
+
|
40
|
+
`lita available timezones`
|
41
|
+
- Returns all timezones names available for use
|
42
|
+
|
43
|
+
`lita available timezones containing Pacific`
|
44
|
+
- Returns all timezones that contains Pacific in the name
|
data/Rakefile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'active_support'
|
2
|
+
require 'active_support/core_ext/time'
|
3
|
+
require 'lita'
|
4
|
+
|
5
|
+
Lita.load_locales Dir[File.expand_path(
|
6
|
+
File.join('..', '..', 'locales', '*.yml'), __FILE__
|
7
|
+
)]
|
8
|
+
|
9
|
+
require 'lita/handlers/timezone'
|
10
|
+
|
11
|
+
Lita::Handlers::Timezone.template_root File.expand_path(
|
12
|
+
File.join('..', '..', 'templates'),
|
13
|
+
__FILE__
|
14
|
+
)
|
@@ -0,0 +1,98 @@
|
|
1
|
+
module Lita
|
2
|
+
module Handlers
|
3
|
+
class Timezone < Handler
|
4
|
+
config :default_zone, type: String, required: true
|
5
|
+
|
6
|
+
route(/^time (?<time>([\d]{1,2}:[\d]{1,2})|now) in (?<zone1>.*)$/,
|
7
|
+
:time_in_other_timezone, command: :true, help:
|
8
|
+
{ 'time 10:00 in Brasilia' => 'Time in Brasilia for 10:00 in the default_zone',
|
9
|
+
'time now in Brasilia' => 'Time in Brasilia for current time' })
|
10
|
+
|
11
|
+
route(/^time (?<time>([\d]{1,2}:[\d]{1,2})|now) from (?<zone1>.*) to (?<zone2>.*)$/,
|
12
|
+
:time_between_locations, command: :true, help:
|
13
|
+
{ 'time 10:00 from Brasilia to Beijing' => 'Time in Beijing for 10:00 in Brasilia',
|
14
|
+
'time now from Brasilia to Beijing' => 'Time in Beijing for current time in Brasilia' })
|
15
|
+
|
16
|
+
route(/^available timezones( containing (?<filter>\w+))?$/,
|
17
|
+
:list_timezones, command: :true, help:
|
18
|
+
{ 'available timezones' => 'All timezones names available for use',
|
19
|
+
'available timezones containing Pacific' => 'Timezones that contains Pacific in the name' })
|
20
|
+
|
21
|
+
def initialize(robot)
|
22
|
+
super
|
23
|
+
Time.zone = config.default_zone
|
24
|
+
@all_zones = ActiveSupport::TimeZone.zones_map.keys + TZInfo::Timezone.all_identifiers
|
25
|
+
end
|
26
|
+
|
27
|
+
def time_in_other_timezone(response)
|
28
|
+
requested_time = time_from_response(response)
|
29
|
+
requested_zone = ActiveSupport::TimeZone[response.match_data[:zone1]]
|
30
|
+
|
31
|
+
if requested_time.blank?
|
32
|
+
response.reply t('messages.invalid_time')
|
33
|
+
elsif requested_zone.blank?
|
34
|
+
response.reply t('messages.invalid_zone')
|
35
|
+
else
|
36
|
+
time_in_new_time_zone = requested_time.in_time_zone(requested_zone)
|
37
|
+
response.reply t('messages.response_in_zone', time: format_time(time_in_new_time_zone))
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def time_between_locations(response)
|
42
|
+
requested_time = time_from_response(response)
|
43
|
+
first_zone = ActiveSupport::TimeZone[response.match_data[:zone1]]
|
44
|
+
second_zone = ActiveSupport::TimeZone[response.match_data[:zone2]]
|
45
|
+
|
46
|
+
if requested_time.blank?
|
47
|
+
response.reply t('messages.invalid_time')
|
48
|
+
elsif first_zone.blank?
|
49
|
+
response.reply t('messages.invalid_first_zone')
|
50
|
+
elsif second_zone.blank?
|
51
|
+
response.reply t('messages.invalid_second_zone')
|
52
|
+
else
|
53
|
+
original_time = first_zone.parse(requested_time.asctime)
|
54
|
+
time_in_new_time_zone = original_time.in_time_zone(second_zone)
|
55
|
+
|
56
|
+
response.reply t('messages.response_from_to_zone',
|
57
|
+
time: format_time(time_in_new_time_zone),
|
58
|
+
zone1: first_zone.name,
|
59
|
+
zone2: second_zone.name
|
60
|
+
)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def list_timezones(response)
|
65
|
+
zone_filter = (response.match_data[:filter] rescue nil)
|
66
|
+
zones = zone_filter ? @all_zones.select { |name| name.include? zone_filter } : @all_zones
|
67
|
+
|
68
|
+
if zones.empty?
|
69
|
+
response.reply t('messages.no_zones_found', zone: zone_filter)
|
70
|
+
else
|
71
|
+
response.reply render_template('available_timezones', zones: zones)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
private
|
76
|
+
|
77
|
+
def time_from_response(response)
|
78
|
+
time = response.match_data[:time]
|
79
|
+
return Time.current if time == 'now'
|
80
|
+
|
81
|
+
parse_time(time)
|
82
|
+
end
|
83
|
+
|
84
|
+
def format_time(time_response)
|
85
|
+
time_format = time_response.today? ? '%R' : '%F %R'
|
86
|
+
time_response.strftime(time_format)
|
87
|
+
end
|
88
|
+
|
89
|
+
def parse_time(time, default = nil)
|
90
|
+
Time.zone.parse(time)
|
91
|
+
rescue ArgumentError
|
92
|
+
default
|
93
|
+
end
|
94
|
+
|
95
|
+
Lita.register_handler(self)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
Gem::Specification.new do |spec|
|
2
|
+
spec.name = 'lita-timezone'
|
3
|
+
spec.version = '0.1.0'
|
4
|
+
spec.authors = ['Thiago von Sydow']
|
5
|
+
spec.email = ['dev@resultadosdigitais.com.br']
|
6
|
+
spec.description = 'Lita handler to convert time between timezones'
|
7
|
+
spec.summary = 'Lita handler to convert time between timezones'
|
8
|
+
spec.homepage = 'https://github.com/ResultadosDigitais/lita-timezone'
|
9
|
+
spec.license = 'MIT'
|
10
|
+
spec.metadata = { 'lita_plugin_type' => 'handler' }
|
11
|
+
|
12
|
+
spec.files = `git ls-files`.split($RS)
|
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.6'
|
18
|
+
spec.add_runtime_dependency 'activesupport', '~> 4.2'
|
19
|
+
spec.add_runtime_dependency 'tzinfo', '~> 1.2'
|
20
|
+
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.11'
|
22
|
+
spec.add_development_dependency 'pry-byebug'
|
23
|
+
spec.add_development_dependency 'rake'
|
24
|
+
spec.add_development_dependency 'rack-test'
|
25
|
+
spec.add_development_dependency 'rspec', '~> 3.4'
|
26
|
+
spec.add_development_dependency 'simplecov'
|
27
|
+
spec.add_development_dependency 'coveralls'
|
28
|
+
spec.add_development_dependency 'timecop'
|
29
|
+
end
|
data/locales/en.yml
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
en:
|
2
|
+
lita:
|
3
|
+
handlers:
|
4
|
+
timezone:
|
5
|
+
messages:
|
6
|
+
invalid_time: 'You must inform a valid time in the hh:mm format'
|
7
|
+
invalid_zone: 'You must inform a valid timezone'
|
8
|
+
invalid_first_zone: 'You must inform a valid "from" timezone'
|
9
|
+
invalid_second_zone: 'You must inform a valid "to" timezone'
|
10
|
+
response_in_zone: "Right now it's %{time}"
|
11
|
+
response_from_to_zone: "Right now it's %{time} in %{zone2} using %{zone1} as reference"
|
12
|
+
no_zones_found: 'No timezones found containing %{zone}'
|
@@ -0,0 +1,132 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Lita::Handlers::Timezone, lita_handler: true do
|
4
|
+
|
5
|
+
# Routes
|
6
|
+
it { is_expected.to route_command('time 12:00 in Brasilia').to(:time_in_other_timezone) }
|
7
|
+
it { is_expected.to route_command('time 14:00 in Pacific Time (US & Canada)').to(:time_in_other_timezone) }
|
8
|
+
|
9
|
+
it { is_expected.to route_command('time 09:00 from Brasilia to Pacific Time (US & Canada)').to(:time_between_locations) }
|
10
|
+
it { is_expected.to route_command('time 09:00 from Pacific Time (US & Canada) to Brasilia').to(:time_between_locations) }
|
11
|
+
|
12
|
+
let(:room) { Lita::Room.new(1, name: 'my-channel') }
|
13
|
+
|
14
|
+
before { Lita.config.handlers.timezone.default_zone = 'Pacific Time (US & Canada)' }
|
15
|
+
|
16
|
+
# Commands
|
17
|
+
describe '#time_in_other_timezone' do
|
18
|
+
context 'with valid parameters' do
|
19
|
+
it 'replies with correct time in the specified timezone' do
|
20
|
+
send_command('time 10:00 in Brasilia', from: room)
|
21
|
+
expect(replies.last).to include '16:00'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
context 'when time is invalid' do
|
26
|
+
it 'replies with a message telling to send a time in correct format' do
|
27
|
+
send_command('time 25:01 in Brasilia', from: room)
|
28
|
+
expect(replies.last).to eq I18n.t('lita.handlers.timezone.messages.invalid_time')
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
context 'when specified TimeZone is invalid' do
|
33
|
+
it 'replies with a message telling to send a valid Timezone' do
|
34
|
+
send_command('time 10:00 in Xunda', from: room)
|
35
|
+
expect(replies.last).to eq I18n.t('lita.handlers.timezone.messages.invalid_zone')
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context 'when result is in another day' do
|
40
|
+
it 'replies with a message including the date' do
|
41
|
+
send_command('time 10:00 in Beijing', from: room)
|
42
|
+
date = Time.current.tomorrow.strftime('%F')
|
43
|
+
expect(replies.last).to include "#{date} 02:00"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
context 'when time is now' do
|
48
|
+
it 'replies with correct time in the specified timezone' do
|
49
|
+
Timecop.freeze(Time.zone.parse('10:00')) do
|
50
|
+
send_command('time now in Beijing', from: room)
|
51
|
+
date = Time.current.tomorrow.strftime('%F')
|
52
|
+
expect(replies.last).to include "#{date} 02:00"
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
describe '#time_between_locations' do
|
59
|
+
context 'with valid parameters' do
|
60
|
+
it 'replies with correct time using "from" as base Timezone' do
|
61
|
+
send_command('time 10:00 from Buenos Aires to Berlin', from: room)
|
62
|
+
expect(replies.last).to include '14:00'
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
context 'when time is invalid' do
|
67
|
+
it 'replies with a message telling to send a time in correct format' do
|
68
|
+
send_command('time 25:00 from Brasilia to Berlin', from: room)
|
69
|
+
expect(replies.last).to eq I18n.t('lita.handlers.timezone.messages.invalid_time')
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
context 'when first TimeZone is invalid' do
|
74
|
+
it 'replies with a message telling to send a valid first Timezone' do
|
75
|
+
send_command('time 10:00 from Xunda to Berlin', from: room)
|
76
|
+
expect(replies.last).to eq I18n.t('lita.handlers.timezone.messages.invalid_first_zone')
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
context 'when second TimeZone is invalid' do
|
81
|
+
it 'replies with a message telling to send a valid second Timezone' do
|
82
|
+
send_command('time 10:00 from Berlin to Xunda', from: room)
|
83
|
+
expect(replies.last).to eq I18n.t('lita.handlers.timezone.messages.invalid_second_zone')
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
context 'when result is in another day' do
|
88
|
+
it 'replies with a message including the date' do
|
89
|
+
send_command('time 15:00 from Brasilia to Beijing', from: room)
|
90
|
+
date = Time.current.in_time_zone('Brasilia').tomorrow.strftime('%F')
|
91
|
+
expect(replies.last).to include "#{date} 01:00"
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
context 'when time is now' do
|
96
|
+
it 'replies with correct time in the specified timezone' do
|
97
|
+
Timecop.freeze(Time.zone.parse('16:00')) do
|
98
|
+
send_command('time now from Brasilia to Beijing', from: room)
|
99
|
+
date = Time.current.in_time_zone('Brasilia').tomorrow.strftime('%F')
|
100
|
+
expect(replies.last).to include "#{date} 02:00"
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
describe '#list_timezones' do
|
107
|
+
context 'without filtering results' do
|
108
|
+
it 'replies with all timezones' do
|
109
|
+
send_command('available timezones', from: room)
|
110
|
+
expect(replies.last.lines).to_not be_empty
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
context 'filtering results' do
|
115
|
+
context 'when filter matches something' do
|
116
|
+
it 'replies only with timezones that matches the filter' do
|
117
|
+
send_command('available timezones containing Pacific', from: room)
|
118
|
+
pacific_lines = replies.last.lines.select { |line| line.include? 'Pacific' }
|
119
|
+
expect(replies.last.lines.size).to eq pacific_lines.size
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
context 'when filter matches nothing' do
|
124
|
+
it 'replies with a zero zones message' do
|
125
|
+
send_command('available timezones containing Xunda', from: room)
|
126
|
+
expect(replies.last).to eq I18n.t('lita.handlers.timezone.messages.no_zones_found', zone: 'Xunda')
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
require 'coveralls'
|
3
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
|
4
|
+
SimpleCov::Formatter::HTMLFormatter,
|
5
|
+
Coveralls::SimpleCov::Formatter
|
6
|
+
])
|
7
|
+
SimpleCov.start { add_filter '/spec/' }
|
8
|
+
|
9
|
+
require 'lita-timezone'
|
10
|
+
require 'lita/rspec'
|
11
|
+
require 'timecop'
|
12
|
+
|
13
|
+
# A compatibility mode is provided for older plugins upgrading from Lita 3. Since this plugin
|
14
|
+
# was generated with Lita 4, the compatibility mode should be left disabled.
|
15
|
+
Lita.version_3_compatibility_mode = false
|
data/templates/.gitkeep
ADDED
File without changes
|
metadata
ADDED
@@ -0,0 +1,220 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: lita-timezone
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Thiago von Sydow
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-12-24 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.6'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '4.2'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '4.2'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: tzinfo
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.2'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.2'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.11'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.11'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry-byebug
|
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: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rack-test
|
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
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3.4'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '3.4'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: simplecov
|
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'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: coveralls
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: timecop
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
description: Lita handler to convert time between timezones
|
168
|
+
email:
|
169
|
+
- dev@resultadosdigitais.com.br
|
170
|
+
executables: []
|
171
|
+
extensions: []
|
172
|
+
extra_rdoc_files: []
|
173
|
+
files:
|
174
|
+
- ".gitignore"
|
175
|
+
- ".rspec"
|
176
|
+
- ".rubocop.yml"
|
177
|
+
- ".travis.yml"
|
178
|
+
- CHANGELOG.md
|
179
|
+
- Gemfile
|
180
|
+
- LICENSE
|
181
|
+
- README.md
|
182
|
+
- Rakefile
|
183
|
+
- lib/lita-timezone.rb
|
184
|
+
- lib/lita/handlers/timezone.rb
|
185
|
+
- lita-timezone.gemspec
|
186
|
+
- locales/en.yml
|
187
|
+
- spec/lita/handlers/timezone_spec.rb
|
188
|
+
- spec/spec_helper.rb
|
189
|
+
- templates/.gitkeep
|
190
|
+
- templates/available_timezones.erb
|
191
|
+
- templates/available_timezones.slack.erb
|
192
|
+
homepage: https://github.com/ResultadosDigitais/lita-timezone
|
193
|
+
licenses:
|
194
|
+
- MIT
|
195
|
+
metadata:
|
196
|
+
lita_plugin_type: handler
|
197
|
+
post_install_message:
|
198
|
+
rdoc_options: []
|
199
|
+
require_paths:
|
200
|
+
- lib
|
201
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
202
|
+
requirements:
|
203
|
+
- - ">="
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: '0'
|
206
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
207
|
+
requirements:
|
208
|
+
- - ">="
|
209
|
+
- !ruby/object:Gem::Version
|
210
|
+
version: '0'
|
211
|
+
requirements: []
|
212
|
+
rubyforge_project:
|
213
|
+
rubygems_version: 2.4.8
|
214
|
+
signing_key:
|
215
|
+
specification_version: 4
|
216
|
+
summary: Lita handler to convert time between timezones
|
217
|
+
test_files:
|
218
|
+
- spec/lita/handlers/timezone_spec.rb
|
219
|
+
- spec/spec_helper.rb
|
220
|
+
has_rdoc:
|