Sha256: f44d27f9ed2597157db7fac5fe2f319ead6efc673b409ba37901d1d06b73c883
Contents?: true
Size: 814 Bytes
Versions: 1
Compression:
Stored size: 814 Bytes
Contents
AnythingHub.command_set do command :starred do |input| _, username = input.split(':') fetch_from_api_or_cache(input) do github.starred(username || github.client.login).map do |repo| "(#{repo.full_name}) #{repo.description} [#{repo.html_url}]" end end end command :search do |input| _, query = input.split(':') fetch_from_api_or_cache(input) do github.search_repositories(query).map do |repo| "(#{repo.username}/#{repo.name}) #{repo.description} [http://github.com/#{repo.username}/#{repo.name}]" end end end command :token do |input| puts token nil end command :cache do |input| _, target_cmd = input.split(':', 2) cache.write target_cmd, nil cache.write target_cmd, command(target_cmd).to_json nil end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
anything-hub-0.0.1 | lib/anything-hub/commands.rb |