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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 48ac7c06bd8dab500df24a6e4ed6775bd4e7db3b
4
- data.tar.gz: 950f3d9e8a70e8fe9e3ae9a9fedb9d66f0de7c1a
3
+ metadata.gz: a7fe6e4c634183ccafb8fc6960cfa54a5fbc6ef2
4
+ data.tar.gz: abf79d1223d37c5cc9f1ae9937f6cc67cfadf1ce
5
5
  SHA512:
6
- metadata.gz: 53a34a293ebc11497958ca652982fa5303d0e56477d47945a1e006a6525d765ac0e472081617e729116fc1d177430b043162b98f362b0204dcffc596a41542a2
7
- data.tar.gz: ee8470d8a48e439a8674d74ecfc9d1906dcd4f121c8bab8785525a6c46d8ad3c25023a0fd4af3921100c8fdd325671ed88aa8249c08a4a73466dc92412937fbd
6
+ metadata.gz: de5c3ff39a62ef83442f7fcdf3b44dfae8fe4a5e238fe5d87697ab74218308ed58dc3af5b19ca26ecedb7bc2ee48912a6270c822d9cc35188793ac64aa26b45f
7
+ data.tar.gz: 4e72fe07bb4611fa2f717007a5038ee26d136d276ec6fa78be34c23731c7b611a5ef42c38ba23b380268ede197ee0263ee4c56155c9d1875959b0284e3d06112
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0.0
4
+ services:
5
+ - redis-server
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # lita-gems
2
2
 
3
- TODO: Add a description of the plugin.
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
- TODO: Describe the plugin's features and how to use them.
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
 
@@ -4,8 +4,8 @@ require 'open-uri'
4
4
  module Lita
5
5
  module Handlers
6
6
  class Gems < Handler
7
- route /\Agem[ ]+q[ ]+(.+)/i, :search, :command => true, :help => {
8
- "gem q cache model" => "search rubygems with 'cache model'"
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 /\Agem[ ]+([^ ]+)/i, :info, :command => true, :help => {
22
- "gem devise" => "get gem 'devise' information"
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-gems"
3
- spec.version = "1.0.1"
3
+ spec.version = "1.0.2"
4
4
  spec.authors = ["marsz"]
5
5
  spec.email = ["marsz330@gmail.com"]
6
6
  spec.description = "lita handler for rubygems.org querying"
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.1
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: 2013-12-28 00:00:00.000000000 Z
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