Browse files

Make documentation more consistent

  • Loading branch information...
1 parent fb86e2b commit 86361925de2407f0ca4c867bf989fa2b9a8a9223 @sferik committed Jul 2, 2011
Showing with 11 additions and 11 deletions.
  1. +2 −2 README.md
  2. +9 −9 lib/gems/client.rb
View
4 README.md
@@ -28,11 +28,11 @@ Usage Examples
# Returns an array of version details for coulda.
puts Gems.versions 'coulda'
- # Returns the number of downloads by day for a particular gem version for the past 90 days.
+ # Returns the number of downloads by day for coulda 0.6.3 for the past 90 days.
# Defaults to the latest version if no version is specified.
puts Gems.downloads 'coulda', '0.6.3'
- # Returns the number of downloads by day for a particular gem version for the past year.
+ # Returns the number of downloads by day for coulda 0.6.3 for the past year.
puts Gems.downloads 'coulda', '0.6.3', Date.today - 365, Date.today
# Returns an array of gem dependency details for all versions of all the given gems.
View
18 lib/gems/client.rb
@@ -104,7 +104,7 @@ def gems
# @param gem_name [String] The name of a gem.
# @return [Array]
# @example
- # Gems.owners('gemcutter')
+ # Gems.owners 'gemcutter'
def owners(gem_name)
get("/api/v1/gems/#{gem_name}/owners")
end
@@ -115,7 +115,7 @@ def owners(gem_name)
# @param owner [String] The email address of the user you want to add.
# @return [String]
# @example
- # Gems.add_owner("gemcutter", "josh@technicalpickles.com")
+ # Gems.add_owner 'gemcutter', 'josh@technicalpickles.com'
def add_owner(gem_name, owner)
post("/api/v1/gems/#{gem_name}/owners", {:email => owner}, :raw)
end
@@ -126,7 +126,7 @@ def add_owner(gem_name, owner)
# @param owner [String] The email address of the user you want to remove.
# @return [String]
# @example
- # Gems.remove_owner("gemcutter", "josh@technicalpickles.com")
+ # Gems.remove_owner 'gemcutter', 'josh@technicalpickles.com'
def remove_owner(gem_name, owner)
delete("/api/v1/gems/#{gem_name}/owners", {:email => owner}, :raw)
end
@@ -146,7 +146,7 @@ def web_hooks
# @param url [String] The URL of the web hook.
# @return [String]
# @example
- # Gems.add_web_hook("rails", "http://example.com")
+ # Gems.add_web_hook 'rails', 'http://example.com'
def add_web_hook(gem_name, url)
post("/api/v1/web_hooks", {:gem_name => gem_name, :url => url}, :raw)
end
@@ -157,7 +157,7 @@ def add_web_hook(gem_name, url)
# @param url [String] The URL of the web hook.
# @return [String]
# @example
- # Gems.remove_web_hook("rails", "http://example.com")
+ # Gems.remove_web_hook 'rails', 'http://example.com'
def remove_web_hook(gem_name, url)
delete("/api/v1/web_hooks/remove", {:gem_name => gem_name, :url => url}, :raw)
end
@@ -168,7 +168,7 @@ def remove_web_hook(gem_name, url)
# @param url [String] The URL of the web hook.
# @return [String]
# @example
- # Gems.fire_web_hook("rails", "http://example.com")
+ # Gems.fire_web_hook 'rails', 'http://example.com'
def fire_web_hook(gem_name, url)
post("/api/v1/web_hooks/fire", {:gem_name => gem_name, :url => url}, :raw)
end
@@ -178,7 +178,7 @@ def fire_web_hook(gem_name, url)
# @param gem [File] A built gem.
# @return [String]
# @example
- # Gems.push(File.new("pkg/gemcutter-0.2.1.gem"))
+ # Gems.push File.new 'pkg/gemcutter-0.2.1.gem', 'rb'
def push(gem)
post("/api/v1/gems", gem.read, :raw, 'application/octet-stream')
end
@@ -191,7 +191,7 @@ def push(gem)
# @option options [String] :platform
# @return [String]
# @example
- # Gems.yank("gemcutter", "0.2.1", {:platform => "x86-darwin-10"})
+ # Gems.yank "gemcutter", "0.2.1", {:platform => "x86-darwin-10"}
def yank(gem_name, gem_version=nil, options={})
gem_version ||= info(gem_name)['version']
delete("/api/v1/gems/yank", options.merge(:gem_name => gem_name, :version => gem_version), :raw)
@@ -205,7 +205,7 @@ def yank(gem_name, gem_version=nil, options={})
# @option options [String] :platform
# @return [String]
# @example
- # Gems.unyank("gemcutter", "0.2.1", {:platform => "x86-darwin-10"})
+ # Gems.unyank "gemcutter", "0.2.1", {:platform => "x86-darwin-10"}
def unyank(gem_name, gem_version=nil, options={})
gem_version ||= info(gem_name)['version']
put("/api/v1/gems/unyank", options.merge(:gem_name => gem_name, :version => gem_version), :raw)

0 comments on commit 8636192

Please sign in to comment.