lita-corporate-bs-generator 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 17690dc900cc406303a614f108810cc55481e662
4
+ data.tar.gz: cc7925968447c9180369c6d3ebbbeee4a446499d
5
+ SHA512:
6
+ metadata.gz: b11b38d37292a7ac68fbf91d07a8ec2217c689736147703f1c12f8941d93498986dcc018c58b3f8cca6b50231c02a322f271070ee2a27b5f75b1b767fcb1412c
7
+ data.tar.gz: e5b5a400d765197e588f688f5833f4a05232a27551d32da913cd1d0821369e1ade5b5e9c68147cf46fd28ad5de0f933972a7f31b1555ad5ab21615e3af6c4b5f
@@ -0,0 +1,34 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /test/tmp/
9
+ /test/version_tmp/
10
+ /tmp/
11
+
12
+ ## Specific to RubyMotion:
13
+ .dat*
14
+ .repl_history
15
+ build/
16
+
17
+ ## Documentation cache and generated files:
18
+ /.yardoc/
19
+ /_yardoc/
20
+ /doc/
21
+ /rdoc/
22
+
23
+ ## Environment normalisation:
24
+ /.bundle/
25
+ /lib/bundler/man/
26
+
27
+ # for a library or gem, you might want to ignore these files since the code is
28
+ # intended to run in multiple environments; otherwise, check them in:
29
+ # Gemfile.lock
30
+ # .ruby-version
31
+ # .ruby-gemset
32
+
33
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
34
+ .rvmrc
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
@@ -0,0 +1,67 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ lita-corporate-bs-generator (1.0.0)
5
+ lita (>= 2.0)
6
+ nokogiri
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ diff-lcs (1.2.5)
12
+ faraday (0.9.1)
13
+ multipart-post (>= 1.2, < 3)
14
+ http_router (0.11.1)
15
+ rack (>= 1.0.0)
16
+ url_mount (~> 0.2.1)
17
+ i18n (0.7.0)
18
+ ice_nine (0.11.1)
19
+ lita (4.2.1)
20
+ bundler (>= 1.3)
21
+ faraday (>= 0.8.7)
22
+ http_router (>= 0.11.1)
23
+ i18n (>= 0.6.9)
24
+ ice_nine (>= 0.11.0)
25
+ multi_json (>= 1.7.7)
26
+ puma (>= 2.7.1)
27
+ rack (>= 1.5.2)
28
+ rb-readline (>= 0.5.1)
29
+ redis-namespace (>= 1.3.0)
30
+ thor (>= 0.18.1)
31
+ mini_portile (0.6.2)
32
+ multi_json (1.10.1)
33
+ multipart-post (2.0.0)
34
+ nokogiri (1.6.6.2)
35
+ mini_portile (~> 0.6.0)
36
+ puma (2.11.1)
37
+ rack (>= 1.1, < 2.0)
38
+ rack (1.6.0)
39
+ rake (10.4.2)
40
+ rb-readline (0.5.2)
41
+ redis (3.2.1)
42
+ redis-namespace (1.5.1)
43
+ redis (~> 3.0, >= 3.0.4)
44
+ rspec (3.0.0)
45
+ rspec-core (~> 3.0.0)
46
+ rspec-expectations (~> 3.0.0)
47
+ rspec-mocks (~> 3.0.0)
48
+ rspec-core (3.0.4)
49
+ rspec-support (~> 3.0.0)
50
+ rspec-expectations (3.0.4)
51
+ diff-lcs (>= 1.2.0, < 2.0)
52
+ rspec-support (~> 3.0.0)
53
+ rspec-mocks (3.0.4)
54
+ rspec-support (~> 3.0.0)
55
+ rspec-support (3.0.4)
56
+ thor (0.19.1)
57
+ url_mount (0.2.1)
58
+ rack
59
+
60
+ PLATFORMS
61
+ ruby
62
+
63
+ DEPENDENCIES
64
+ bundler (~> 1.3)
65
+ lita-corporate-bs-generator!
66
+ rake
67
+ rspec (~> 3.0.0)
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Andrew Hayworth
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.
22
+
@@ -0,0 +1,16 @@
1
+ # lita-corporate-bs-generator
2
+
3
+ **lita-corporate-bs-generator** is a handler that will spew some arbitrary corporate garbage at you, taken from the ever-amazing http://cbsg.sourceforge.net/cgi-bin/live .
4
+
5
+ Inspired heavily by (more or less copy-pasted from) [lita-pugbomb](https://github.com/killpack/lita-pugbomb).
6
+
7
+ ## Installation
8
+
9
+ Add `lita-corporate-bs-generator` to your Lita instance's Gemfile:
10
+ ``` ruby
11
+ gem "lita-corporate-bs-generator"
12
+ ```
13
+
14
+ ### Usage
15
+ `Lita: corporate bs` - display some corporate garbage
16
+
@@ -0,0 +1 @@
1
+ require "lita/handlers/corporate-bs-generator"
@@ -0,0 +1,25 @@
1
+ require 'lita'
2
+ require 'nokogiri'
3
+
4
+ module Lita
5
+ module Handlers
6
+ class CorporateBsGenerator < Handler
7
+ route(/\bcorporate bs( please)?/i, :bs, :command => true, :help => { "corporate bs (please)" => "Spew some corporate garbage" })
8
+
9
+ BASE_URL = "http://cbsg.sourceforge.net/cgi-bin/live"
10
+
11
+ def bs(response)
12
+ if (some_bs = redis.lpop("corporate-bs-generator"))
13
+ response.reply some_bs
14
+ else
15
+ data = Nokogiri::HTML.parse(http.post("http://cbsg.sourceforge.net/cgi-bin/live").body)
16
+ bs_list = data.xpath("//li").map(&:children).map { |x| x.text.strip }
17
+ redis.lpush("corporate-bs-generator", bs_list)
18
+ response.reply redis.lpop("corporate-bs-generator")
19
+ end
20
+ end
21
+ end
22
+
23
+ Lita.register_handler(CorporateBsGenerator)
24
+ end
25
+ end
@@ -0,0 +1,22 @@
1
+ Gem::Specification.new do |spec|
2
+ spec.name = "lita-corporate-bs-generator"
3
+ spec.version = "1.0.0"
4
+ spec.authors = ["Andrew Hayworth"]
5
+ spec.email = ["ahayworth@gmail.com"]
6
+ spec.description = %q{Lita handler to spout corporate bs}
7
+ spec.summary = %q{Lita handler to spout corporate bs}
8
+ spec.homepage = "https://github.com/ahayworth/lita-corporate-bs-generator"
9
+ spec.license = "MIT"
10
+
11
+ spec.files = `git ls-files`.split($/)
12
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
13
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
14
+ spec.require_paths = ["lib"]
15
+
16
+ spec.add_runtime_dependency "lita", ">= 2.0"
17
+ spec.add_runtime_dependency "nokogiri"
18
+
19
+ spec.add_development_dependency "bundler", "~> 1.3"
20
+ spec.add_development_dependency "rake"
21
+ spec.add_development_dependency "rspec", "~> 3.0.0"
22
+ end
metadata ADDED
@@ -0,0 +1,122 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: lita-corporate-bs-generator
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Andrew Hayworth
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-03-02 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: '2.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: nokogiri
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.3'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 3.0.0
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 3.0.0
83
+ description: Lita handler to spout corporate bs
84
+ email:
85
+ - ahayworth@gmail.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".gitignore"
91
+ - Gemfile
92
+ - Gemfile.lock
93
+ - LICENSE
94
+ - README.md
95
+ - lib/lita-corporate-bs-generator.rb
96
+ - lib/lita/handlers/corporate-bs-generator.rb
97
+ - lita-corporate-bs-generator.gemspec
98
+ homepage: https://github.com/ahayworth/lita-corporate-bs-generator
99
+ licenses:
100
+ - MIT
101
+ metadata: {}
102
+ post_install_message:
103
+ rdoc_options: []
104
+ require_paths:
105
+ - lib
106
+ required_ruby_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ required_rubygems_version: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ requirements: []
117
+ rubyforge_project:
118
+ rubygems_version: 2.4.5
119
+ signing_key:
120
+ specification_version: 4
121
+ summary: Lita handler to spout corporate bs
122
+ test_files: []