lita-gems 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -0
- data/README.md +24 -4
- data/lib/lita/handlers/gems.rb +5 -5
- data/lita-gems.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7fe6e4c634183ccafb8fc6960cfa54a5fbc6ef2
|
4
|
+
data.tar.gz: abf79d1223d37c5cc9f1ae9937f6cc67cfadf1ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de5c3ff39a62ef83442f7fcdf3b44dfae8fe4a5e238fe5d87697ab74218308ed58dc3af5b19ca26ecedb7bc2ee48912a6270c822d9cc35188793ac64aa26b45f
|
7
|
+
data.tar.gz: 4e72fe07bb4611fa2f717007a5038ee26d136d276ec6fa78be34c23731c7b611a5ef42c38ba23b380268ede197ee0263ee4c56155c9d1875959b0284e3d06112
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# lita-gems
|
2
2
|
|
3
|
-
|
3
|
+
[![Build Status](https://travis-ci.org/marsz/lita-gems.png?branch=master)](https://travis-ci.org/marsz/lita-gems)
|
4
|
+
|
5
|
+
Lita (robot) handler for querying RubyGems.org through official API gem (https://github.com/rubygems/gems).
|
4
6
|
|
5
7
|
## Installation
|
6
8
|
|
@@ -12,11 +14,29 @@ gem "lita-gems"
|
|
12
14
|
|
13
15
|
## Configuration
|
14
16
|
|
15
|
-
TODO: Describe any configuration attributes the plugin exposes.
|
16
|
-
|
17
17
|
## Usage
|
18
18
|
|
19
|
-
|
19
|
+
`lita gem rails` : get infomation of gem 'rails' from rubygems.org
|
20
|
+
|
21
|
+
```
|
22
|
+
version: 4.0.2
|
23
|
+
rubygems: http://rubygems.org/gems/rails
|
24
|
+
homepage: http://www.rubyonrails.org
|
25
|
+
documentation: http://api.rubyonrails.org
|
26
|
+
source code: http://github.com/rails/rails
|
27
|
+
```
|
28
|
+
|
29
|
+
`lita gem q cache` : search gems with keyword 'cache' from rubygems.org
|
30
|
+
|
31
|
+
```
|
32
|
+
http://rubygems.org/search?query=cache
|
33
|
+
rack-cache( 1.2 ) : http://rubygems.org/gems/rack-cache
|
34
|
+
linecache( 0.46 ) : http://rubygems.org/gems/linecache
|
35
|
+
memcache-client( 1.8.5 ) : http://rubygems.org/gems/memcache-client
|
36
|
+
linecache19( 0.5.12 ) : http://rubygems.org/gems/linecache19
|
37
|
+
memcached( 1.7.2 ) : http://rubygems.org/gems/memcached
|
38
|
+
...
|
39
|
+
```
|
20
40
|
|
21
41
|
## License
|
22
42
|
|
data/lib/lita/handlers/gems.rb
CHANGED
@@ -4,8 +4,8 @@ require 'open-uri'
|
|
4
4
|
module Lita
|
5
5
|
module Handlers
|
6
6
|
class Gems < Handler
|
7
|
-
route
|
8
|
-
"gem q
|
7
|
+
route /^gem\s+q[ ]+(.+)/i, :search, :help => {
|
8
|
+
"gem q KEYWORDS" => "search rubygems by KEYWORDS"
|
9
9
|
}
|
10
10
|
def search(response)
|
11
11
|
keyword = response.matches[0][0]
|
@@ -18,9 +18,9 @@ module Lita
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
route
|
22
|
-
"gem
|
23
|
-
}
|
21
|
+
route(/^gem\s+([^ ]+)/i, :info, :help => {
|
22
|
+
"gem GEM_NAME" => "fetch gem's information"
|
23
|
+
})
|
24
24
|
def info(response)
|
25
25
|
gem_name = response.args[0]
|
26
26
|
return if gem_name == "q"
|
data/lita-gems.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-gems
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- marsz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|
@@ -89,6 +89,7 @@ extra_rdoc_files: []
|
|
89
89
|
files:
|
90
90
|
- .gitignore
|
91
91
|
- .rspec
|
92
|
+
- .travis.yml
|
92
93
|
- Gemfile
|
93
94
|
- LICENSE
|
94
95
|
- README.md
|