Ruby | Ruboty の gem を探知するソナー ruboty-sonar で Plugin を検索する #ruby

# Ruby | Ruboty の gem を探知するソナー ruboty-sonar で Plugin を検索する #ruby
## <i class="fa fa-cubes" style="font-size:1em;"></i> 概要
Ruboty の gem を探知するソナー ruboty-sonar で Plugin を検索します。
## <i class="fa fa-file-text-o" style="font-size:1em;"></i> 仕様
* CLI / require して直接利用の 2 つのユースケースをサポート

### ModuleName
RubotySonar
### gem name
ruboty-sonar
### Module Functions
|name|args|memo|
|:--|:--|:--|
|info|gem name|対象 gem の gem 名・概要・ダウンロード数・RubyGems URL・ホームページを返却|
|random|--|ランダムに1つの 「ruboty-」 で始まる gem の<br>gem 名・概要・ダウンロード数・RubyGems URL・ホームページを返却|
|ranking|limit|ダウンロード数順に N 件の gem 名・概要を返却。最大50件まで。デフォルトは5件|
|author_ranking|limit|ruboty-plugin の作成件数が多い author の author 名 ・ダウンロード数を順に N 件表示。デフォルトは5件|

## <i class="fa fa-cube" style="font-size:1em;"></i> Installation

~~~bash
$ gem install ruboty-sonar
~~~

## <i class="fa fa-files-o" style="font-size:1em;"></i> Usage

### <i class="fa fa-file" style="font-size:1em;"></i> info
~~~ruby
require 'ruboty-sonar'
print RubotySonar.info ruboty-megen
__END__
{
  :name => 'ruboty-megen',
  :desc => 'ruboty-megen generate ruboty README.md template.',
  :downloads => 364,
  :rubygems_uri => 'http://rubygems.org/gems/ruboty-megen',
  :homepage_uri => 'https://github.com/tbpgr/ruboty-megen'
}
~~~

### <i class="fa fa-random" style="font-size:1em;"></i> random
~~~ruby
require 'pp'
require 'ruboty-sonar'
pp RubotySonar.random
pp RubotySonar.random
__END__
# randome result
{:name=>"ruboty-response",
 :desc=>"Ruboty handler to register a response.",
 :downloads=>414,
 :rubygems_uri=>"http://rubygems.org/gems/ruboty-response",
 :homepage_uri=>"https://github.com/kaihar4/ruboty-response"}
{:name=>"ruboty-seppuku",
 :desc=>"ruboty plugin for seppuku.",
 :downloads=>310,
 :rubygems_uri=>"http://rubygems.org/gems/ruboty-seppuku",
 :homepage_uri=>"https://github.com/blockgiven/ruboty-seppuku"}
~~~

### <i class="fa fa-trophy" style="font-size:1em;"></i> ranking
~~~ruby
require 'pp'
require 'ruboty-sonar'
pp RubotySonar.ranking
__END__
[{:name=>"ruboty-redis", :downloads=>869, :authors=>"Ryo Nakamura"},
 {:name=>"ruboty-lgtm", :downloads=>827, :authors=>"negipo"},
 {:name=>"ruboty-twitter", :downloads=>626, :authors=>"Ryo Nakamura"},
 {:name=>"ruboty-japan_weather", :downloads=>551, :authors=>"Taiki ONO"},
 {:name=>"ruboty-trust_me", :downloads=>485, :authors=>"block_given?"}]
~~~

~~~ruby
require 'pp'
require 'ruboty-sonar'
pp RubotySonar.ranking(3)
__END__
[{:name=>"ruboty-redis", :downloads=>869, :authors=>"Ryo Nakamura"},
 {:name=>"ruboty-lgtm", :downloads=>827, :authors=>"negipo"},
 {:name=>"ruboty-twitter", :downloads=>626, :authors=>"Ryo Nakamura"}]
~~~

### <i class="fa fa-user" style="font-size:1em;"></i><i class="fa fa-trophy" style="font-size:1em;"></i> author_ranking
~~~ruby
require 'pp'
require 'ruboty-sonar'
pp RubotySonar.author_ranking
__END__
[{:authors=>"block_given?", :downloads=>4530},
 {:authors=>"Ryo Nakamura", :downloads=>1495},
 {:authors=>"kaihar4", :downloads=>1131},
 {:authors=>"negipo", :downloads=>827},
 {:authors=>"Yoshiori SHOJI", :downloads=>805}]
~~~

~~~bash
require 'ruboty-sonar'
print RubotySonar.author_ranking(3)
__END__
[{:authors=>"block_given?", :downloads=>4530},
 {:authors=>"Ryo Nakamura", :downloads=>1495},
 {:authors=>"kaihar4", :downloads=>1131}]
~~~

## <i class="fa fa-files-o" style="font-size:1em;"></i> Usage ( Command Line Interface)
### <i class="fa fa-file" style="font-size:1em;"></i> info
~~~bash
$ ruboty-sonar info ruboty-megen
name:ruboty-megen
desc:ruboty-megen generate ruboty README.md template.
downloads:365
rubygems_uri:http://rubygems.org/gems/ruboty-megen
homepage_uri:https://github.com/tbpgr/ruboty-megen
~~~

### <i class="fa fa-random" style="font-size:1em;"></i> random
~~~bash
$ ruboty-sonar random
name:ruboty-nullpo
desc:ruboty plugin for ぬるぽ ガッ.
downloads:136
rubygems_uri:http://rubygems.org/gems/ruboty-nullpo
homepage_uri:https://github.com/blockgiven/ruboty-nullpo

$ ruboty-sonar random
name:ruboty-megen
desc:ruboty-megen generate ruboty README.md template.
downloads:365
rubygems_uri:http://rubygems.org/gems/ruboty-megen
homepage_uri:https://github.com/tbpgr/ruboty-megen

$ ruboty-sonar random
name:ruboty-qiita_scouter
desc:An Ruboty Handler + Actions to analyze your Qiita power.
downloads:135
rubygems_uri:http://rubygems.org/gems/ruboty-qiita_scouter
homepage_uri:https://github.com/tbpgr/ruboty-qiita_scouter
~~~

### <i class="fa fa-trophy" style="font-size:1em;"></i> ranking
~~~bash
$ ruboty-sonar ranking
no:1,name:ruboty-redis,downloads:869
no:2,name:ruboty-lgtm,downloads:827
no:3,name:ruboty-twitter,downloads:626
no:4,name:ruboty-japan_weather,downloads:551
no:5,name:ruboty-trust_me,downloads:485

$ ruboty-sonar ranking  3
no:1,name:ruboty-redis,downloads:869
no:2,name:ruboty-lgtm,downloads:827
no:3,name:ruboty-twitter,downloads:626
~~~

### <i class="fa fa-user" style="font-size:1em;"></i><i class="fa fa-trophy" style="font-size:1em;"></i> author_ranking
~~~bash
$ ruboty-sonar author_ranking
no:1,author:block_given?,downloads:4530
no:2,author:Ryo Nakamura,downloads:1495
no:3,author:kaihar4,downloads:1131
no:4,author:negipo,downloads:827
no:5,author:Yoshiori SHOJI,downloads:805

$ ruboty-sonar author_ranking 3
no:1,author:block_given?,downloads:4530
no:2,author:Ryo Nakamura,downloads:1495
no:3,author:kaihar4,downloads:1131
~~~

## <i class="fa fa-arrow-circle-right" style="font-size:1em;"></i> 参照
<i class="fa fa-github" style="font-size:1em;"></i> [ruboty-sonar GitHub](https://github.com/tbpgr/ruboty-sonar)
<i class="fa fa-external-link" style="font-size:1em;"></i> [ruboty-sonar RubyGems](https://github.com/tbpgr/ruboty-sonar)