LoginSignup
2
2

More than 5 years have passed since last update.

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

Posted at

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

概要

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

Itamae とは?

Itamae は Chef / Ansible / Puppet などと同じ プロビジョニングツール です。

  • Ruby 製
  • 軽量・高速
  • 学習コストが低い
  • 日本産

などの特徴を持ちます。

詳しくは下記記事を参照
軽量・高速版 Chef 「Itamae」 プロビジョニングツールの学習コスト低下。Berkshelfからの解放。Chef Solo から Chef Zero への移行からの解放

仕様

  • CLI / require して直接利用の 2 つのユースケースをサポート

ModuleName

ItamaeSonar

gem name

itamae-sonar

Module Functions

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

Installation

$ gem install itamae-sonar

Usage

info

require 'pp'
require 'itamae-sonar'
pp ItamaeSonar.info 'itamae'
__END__
{:name=>"itamae",
 :desc=>"Simple Configuration Management Tool",
 :downloads=>6894,
 :rubygems_uri=>"http://rubygems.org/gems/itamae",
 :homepage_uri=>"https://github.com/ryotarai/itamae"}

random

require 'pp'
require 'itamae-sonar'
pp ItamaeSonar.random
pp ItamaeSonar.random
__END__
# randome result
{:name=>"itamae-plugin-recipe-selinux",
 :desc=>"Itamae selinux recipe plugin",
 :downloads=>1065,
 :rubygems_uri=>"http://rubygems.org/gems/itamae-plugin-recipe-selinux",
 :homepage_uri=>""}
{:name=>"itamae-plugin-resource-ghq",
 :desc=>"Itamae resource plugin to manage repositories with ghq.",
 :downloads=>165,
 :rubygems_uri=>"http://rubygems.org/gems/itamae-plugin-resource-ghq",
 :homepage_uri=>"https://github.com/k0kubun/itamae-plugin-resource-ghq"}

ranking

require 'pp'
require 'itamae-sonar'
pp ItamaeSonar.ranking
__END__
[{:name=>"itamae-plugin-resource-mail_alias",
  :downloads=>1069,
  :authors=>"Gosuke Miyashita"},
 {:name=>"itamae-plugin-recipe-selinux",
  :downloads=>1065,
  :authors=>"Gosuke Miyashita"},
 {:name=>"itamae-plugin-resource-cask",
  :downloads=>628,
  :authors=>"Takashi Kokubun"},
 {:name=>"itamae-plugin-recipe-rtn_rbenv",
  :downloads=>308,
  :authors=>"Ru/MuckRu"},
 {:name=>"itamae-plugin-resource-ghq",
  :downloads=>165,
  :authors=>"Takashi Kokubun"}]
require 'pp'
require 'itamae-sonar'
pp ItamaeSonar.ranking(3)
__END__
[{:name=>"itamae-plugin-resource-mail_alias",
  :downloads=>1069,
  :authors=>"Gosuke Miyashita"},
 {:name=>"itamae-plugin-recipe-selinux",
  :downloads=>1065,
  :authors=>"Gosuke Miyashita"},
 {:name=>"itamae-plugin-resource-cask",
  :downloads=>628,
  :authors=>"Takashi Kokubun"}]

author_ranking

require 'pp'
require 'itamae-sonar'
pp ItamaeSonar.author_ranking
__END__
[{:authors=>"Gosuke Miyashita", :downloads=>2134},
 {:authors=>"Takashi Kokubun", :downloads=>915},
 {:authors=>"Ru/MuckRu", :downloads=>308},
 {:authors=>"Takatoshi Maeda", :downloads=>96}]
require 'itamae-sonar'
print ItamaeSonar.author_ranking(3)
__END__
[{:authors=>"Gosuke Miyashita", :downloads=>2134},
 {:authors=>"Takashi Kokubun", :downloads=>915},
 {:authors=>"Ru/MuckRu", :downloads=>308}]

Usage ( Command Line Interface)

info

$ itamae-sonar info itamae
name:itamae
desc:Simple Configuration Management Tool
downloads:6894
rubygems_uri:http://rubygems.org/gems/itamae
homepage_uri:https://github.com/ryotarai/itamae

random

$ itamae-sonar random
name:itamae-plugin-recipe-rtn_rbenv
desc:Itamae Recipe 'rbenv'
downloads:308
rubygems_uri:http://rubygems.org/gems/itamae-plugin-recipe-rtn_rbenv
homepage_uri:https://github.com/rutan/itamae-plugin-recipe-rtn_rbenv

$ itamae-sonar random
name:itamae-plugin-recipe-rtn_rbenv
desc:Itamae Recipe 'rbenv'
downloads:308
rubygems_uri:http://rubygems.org/gems/itamae-plugin-recipe-rtn_rbenv
homepage_uri:https://github.com/rutan/itamae-plugin-recipe-rtn_rbenv

$ itamae-sonar random
name:itamae-plugin-recipe-rbenv
desc:Itamae plugin to install ruby with rbenv
downloads:122
rubygems_uri:http://rubygems.org/gems/itamae-plugin-recipe-rbenv
homepage_uri:https://github.com/k0kubun/itamae-plugin-recipe-rbenv

ranking

$ itamae-sonar ranking
no:1,name:itamae-plugin-resource-mail_alias,downloads:1069
no:2,name:itamae-plugin-recipe-selinux,downloads:1065
no:3,name:itamae-plugin-resource-cask,downloads:628
no:4,name:itamae-plugin-recipe-rtn_rbenv,downloads:308
no:5,name:itamae-plugin-resource-ghq,downloads:165

$ itamae-sonar ranking 3
no:1,name:itamae-plugin-resource-mail_alias,downloads:1069
no:2,name:itamae-plugin-recipe-selinux,downloads:1065
no:3,name:itamae-plugin-resource-cask,downloads:628

author_ranking

$ itamae-sonar author_ranking
no:1,author:Gosuke Miyashita,downloads:2134
no:2,author:Takashi Kokubun,downloads:915
no:3,author:Ru/MuckRu,downloads:308
no:4,author:Takatoshi Maeda,downloads:96

$ itamae-sonar author_ranking 3
no:1,author:Gosuke Miyashita,downloads:2134
no:2,author:Takashi Kokubun,downloads:915
no:3,author:Ru/MuckRu,downloads:308

参照

itamae GitHub
itamae RubyGems
itamae-sonar GitHub
itamae-sonar RubyGems

2
2
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
2
2