lita-livenation 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b02ff99c1ac46c172ac3a8e1eab418770eef2a1a
4
- data.tar.gz: cabb8be3580d1c051d5afb82906e69cc6a6648e2
3
+ metadata.gz: 85e6dc06274b3d96533b4173daee6d9374e2351e
4
+ data.tar.gz: 4d257a1ca4d77e6cc6dccdc42e80ceab20b712dc
5
5
  SHA512:
6
- metadata.gz: c3d4d02fe42423a546126f81051080b47f8c644f5ca25033c57c0e390f4b937403f9f1c698e0254e037e852fe5b2ee8905b523106684a4850dcda8a2099788e5
7
- data.tar.gz: 995a80cabdd43d06bd99468c5522f1731f8ea4f5f56f3cf227661ba653be82d91a697e4252ebf8210985281f2209a88958755b848a983d14c06d55c4e12b57a3
6
+ metadata.gz: 8ae8a6ee32a60611c0355aca0d0220fe1001d5cb9ced65aef61267f32d9f710c047a6c7c5731ea842dd51656a697ec531e83d4c34b40b63ad41c7f82c8aa3377
7
+ data.tar.gz: 4ffba7d1ccb7dd4b6eff123d2f31c7c99520d38c37041bfcd40dc4a32379e1276fc6feabb1958ff1db8470e13207afcc90a101b4c11ac7f4b79a7eab76ed58f0
data/Gemfile.lock ADDED
@@ -0,0 +1,77 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ lita-livenation (0.0.5)
5
+ i18n
6
+ lita (>= 2.7)
7
+ octokit
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ addressable (2.3.6)
13
+ coderay (1.0.9)
14
+ diff-lcs (1.2.5)
15
+ faraday (0.9.0)
16
+ multipart-post (>= 1.2, < 3)
17
+ http_router (0.11.1)
18
+ rack (>= 1.0.0)
19
+ url_mount (~> 0.2.1)
20
+ i18n (0.6.9)
21
+ ice_nine (0.11.0)
22
+ lita (3.2.0)
23
+ bundler (>= 1.3)
24
+ faraday (>= 0.8.7)
25
+ http_router (>= 0.11.1)
26
+ i18n (>= 0.6.9)
27
+ ice_nine (>= 0.11.0)
28
+ multi_json (>= 1.7.7)
29
+ puma (>= 2.7.1)
30
+ rack (>= 1.5.2)
31
+ redis-namespace (>= 1.3.0)
32
+ thor (>= 0.18.1)
33
+ method_source (0.8.2)
34
+ multi_json (1.10.0)
35
+ multipart-post (2.0.0)
36
+ octokit (3.1.0)
37
+ sawyer (~> 0.5.3)
38
+ pry (0.9.12.2)
39
+ coderay (~> 1.0.5)
40
+ method_source (~> 0.8)
41
+ slop (~> 3.4)
42
+ puma (2.8.2)
43
+ rack (>= 1.1, < 2.0)
44
+ rack (1.5.2)
45
+ rake (10.3.2)
46
+ redis (3.0.7)
47
+ redis-namespace (1.4.1)
48
+ redis (~> 3.0.4)
49
+ rspec (3.0.0.beta2)
50
+ rspec-core (= 3.0.0.beta2)
51
+ rspec-expectations (= 3.0.0.beta2)
52
+ rspec-mocks (= 3.0.0.beta2)
53
+ rspec-core (3.0.0.beta2)
54
+ rspec-support (= 3.0.0.beta2)
55
+ rspec-expectations (3.0.0.beta2)
56
+ diff-lcs (>= 1.2.0, < 2.0)
57
+ rspec-support (= 3.0.0.beta2)
58
+ rspec-mocks (3.0.0.beta2)
59
+ rspec-support (= 3.0.0.beta2)
60
+ rspec-support (3.0.0.beta2)
61
+ sawyer (0.5.4)
62
+ addressable (~> 2.3.5)
63
+ faraday (~> 0.8, < 0.10)
64
+ slop (3.4.6)
65
+ thor (0.19.1)
66
+ url_mount (0.2.1)
67
+ rack
68
+
69
+ PLATFORMS
70
+ ruby
71
+
72
+ DEPENDENCIES
73
+ bundler
74
+ lita-livenation!
75
+ pry
76
+ rake
77
+ rspec (>= 3.0.0.beta2)
@@ -1 +1,3 @@
1
- require "lita/handlers/livenation"
1
+ require 'lita/handlers/livenation'
2
+ require 'lita/behaviors/github'
3
+ require 'octokit'
@@ -0,0 +1,12 @@
1
+ class Github
2
+ USERNAME = ENV['GITHUB_USERNAME']
3
+ PASSWORD = ENV['GITHUB_PASSWORD']
4
+
5
+ def initialize
6
+ @client = Octokit::Client.new #(login: USERNAME, password: PASSWORD)
7
+ end
8
+
9
+ def readme(repo)
10
+ @client.readme(repo, accept: 'application/vnd.github.raw')
11
+ end
12
+ end
@@ -5,6 +5,7 @@ module Lita
5
5
  class Livenation < Handler
6
6
  route /standup/, :standup
7
7
  route /lunch/, :lunch
8
+ route /github\sreadme/, :github_readme
8
9
 
9
10
  def standup(response)
10
11
  response.reply "https://zoom.us/j/8820814772"
@@ -14,6 +15,11 @@ module Lita
14
15
  lunch_spots = ['Shin Ya', "Hoy's Wok", 'Fresh n Easy', 'Baja Fresh', "Zankou's Chicken", 'Mendocino Farms', 'Chipotle']
15
16
  response.reply "You should eat at #{lunch_spots.sample} today."
16
17
  end
18
+
19
+ def github_readme(response)
20
+ readme = Github.new.readme(response.args[1])
21
+ response.reply readme
22
+ end
17
23
  end
18
24
 
19
25
  Lita.register_handler(Livenation)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-livenation"
3
- spec.version = "0.0.3"
3
+ spec.version = "0.0.5"
4
4
  spec.authors = ["Peter Tran"]
5
5
  spec.email = ["peter@livenationlabs.com"]
6
6
  spec.description = %q{Plugin for Lita that responds to standup with a zoom link.}
@@ -14,9 +14,12 @@ Gem::Specification.new do |spec|
14
14
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
15
15
  spec.require_paths = ["lib"]
16
16
 
17
+ spec.add_runtime_dependency "i18n"
17
18
  spec.add_runtime_dependency "lita", ">= 2.7"
19
+ spec.add_runtime_dependency "octokit"
18
20
 
19
- spec.add_development_dependency "bundler", "~> 1.3"
21
+ spec.add_development_dependency "bundler"
20
22
  spec.add_development_dependency "rake"
21
- spec.add_development_dependency "rspec", ">= 2.14"
23
+ spec.add_development_dependency "rspec", ">= 3.0.0.beta2"
24
+ spec.add_development_dependency "pry"
22
25
  end
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+
3
+ # TODO: use webmock
4
+
5
+ describe Github do
6
+ let(:github) { Github.new }
7
+
8
+ describe '#readme' do
9
+ it 'retrieves a repos readme' do
10
+ response = github.readme('proc/spirit')
11
+ expect(response).to_not be_nil
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ describe Lita::Handlers::Livenation, lita_handler: true do
4
+ describe '#pull_requests' do
5
+
6
+ it 'returns all available pull requests from github' do
7
+ send_command 'github readme proc/spirit'
8
+ expect(replies).to_not be_empty
9
+ end
10
+ end
11
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,2 +1,3 @@
1
1
  require "lita-livenation"
2
2
  require "lita/rspec"
3
+ require 'pry'
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-livenation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Tran
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-12 00:00:00.000000000 Z
11
+ date: 2014-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: i18n
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: lita
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -24,20 +38,34 @@ dependencies:
24
38
  - - ">="
25
39
  - !ruby/object:Gem::Version
26
40
  version: '2.7'
41
+ - !ruby/object:Gem::Dependency
42
+ name: octokit
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: bundler
29
57
  requirement: !ruby/object:Gem::Requirement
30
58
  requirements:
31
- - - "~>"
59
+ - - ">="
32
60
  - !ruby/object:Gem::Version
33
- version: '1.3'
61
+ version: '0'
34
62
  type: :development
35
63
  prerelease: false
36
64
  version_requirements: !ruby/object:Gem::Requirement
37
65
  requirements:
38
- - - "~>"
66
+ - - ">="
39
67
  - !ruby/object:Gem::Version
40
- version: '1.3'
68
+ version: '0'
41
69
  - !ruby/object:Gem::Dependency
42
70
  name: rake
43
71
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +86,28 @@ dependencies:
58
86
  requirements:
59
87
  - - ">="
60
88
  - !ruby/object:Gem::Version
61
- version: '2.14'
89
+ version: 3.0.0.beta2
62
90
  type: :development
63
91
  prerelease: false
64
92
  version_requirements: !ruby/object:Gem::Requirement
65
93
  requirements:
66
94
  - - ">="
67
95
  - !ruby/object:Gem::Version
68
- version: '2.14'
96
+ version: 3.0.0.beta2
97
+ - !ruby/object:Gem::Dependency
98
+ name: pry
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'
69
111
  description: Plugin for Lita that responds to standup with a zoom link.
70
112
  email:
71
113
  - peter@livenationlabs.com
@@ -74,12 +116,16 @@ extensions: []
74
116
  extra_rdoc_files: []
75
117
  files:
76
118
  - Gemfile
119
+ - Gemfile.lock
77
120
  - LICENSE
78
121
  - README.md
79
122
  - Rakefile
80
123
  - lib/lita-livenation.rb
124
+ - lib/lita/behaviors/github.rb
81
125
  - lib/lita/handlers/livenation.rb
82
126
  - lita-livenation.gemspec
127
+ - spec/behaviors/github_spec.rb
128
+ - spec/handlers/livenation_spec.rb
83
129
  - spec/lita/handlers/livenation_spec.rb
84
130
  - spec/spec_helper.rb
85
131
  homepage: http://www.livenation.com
@@ -108,5 +154,7 @@ signing_key:
108
154
  specification_version: 4
109
155
  summary: Plugin for Lita that responds to standup with a zoom link.
110
156
  test_files:
157
+ - spec/behaviors/github_spec.rb
158
+ - spec/handlers/livenation_spec.rb
111
159
  - spec/lita/handlers/livenation_spec.rb
112
160
  - spec/spec_helper.rb