3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

RubotyAdvent Calendar 2014

Day 7

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

Posted at

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

概要

Ruboty の gem を探知するソナー ruboty-sonar で Plugin を検索します。

仕様

  • 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 の
gem 名・概要・ダウンロード数・RubyGems URL・ホームページを返却
ranking limit ダウンロード数順に N 件の gem 名・概要を返却。最大50件まで。デフォルトは5件
author_ranking limit ruboty-plugin の作成件数が多い author の author 名 ・ダウンロード数を順に N 件表示。デフォルトは5件

Installation

$ gem install ruboty-sonar

Usage

info

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'
}

random

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"}

ranking

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?"}]
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"}]

author_ranking

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

Usage ( Command Line Interface)

info

$ 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

random

$ 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

ranking

$ 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

author_ranking

$ 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

参照

ruboty-sonar GitHub
ruboty-sonar RubyGems

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?