Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

0.0.5 - Added repository command and trying to clean up dependencies …

…on Mash etc. for GitHub Gem Repo.
  • Loading branch information...
commit 88ea0f699b21db9223e890ab98e29ce72122c672 1 parent 0d1e660
@mbleigh mbleigh authored
View
5 History.txt
@@ -1,3 +1,8 @@
+=== 0.0.5 / 2008-05-26
+
+* Added "repository" command
+* Improved compatibility with GitHub-based Mash
+
=== 0.0.4 / 2008-04-26
* Trying to change the version number to fix broken dependency.
View
6 README.txt
@@ -10,8 +10,7 @@ Gem:
The gem is hosted on GitHub so you will need to execute the first line if you have not installed any gems from GitHub before.
- gem sources -a http://gems.github.com/
- sudo gem install mbleigh-ruby-github
+ sudo gem install mbleigh-ruby-github --source=http://gems.github.com
GitHub Clone:
@@ -32,6 +31,9 @@ GitHub Clone:
user.repositories.last.name # => "ruby-github"
user.repositories.last.url # => "http://GitHub::API.com/mbleigh/ruby-github"
user.repositories.last.commits # => requests array of commits (see below)
+
+ repository = GitHub::API.repository('mbleigh','ruby-github')
+ # => <GitHub::Repository name="ruby-github">
commits = GitHub::API.commits('mbleigh','ruby-github')
commits.first.message # => "Moved GitHub::API.rb to ruby-GitHub::API.rb..."
View
5 lib/ruby-github.rb
@@ -20,6 +20,10 @@ def self.commits(user,repository,branch="master")
GitHub::Commit.new(c.merge(:user => user, :repository => repository))
}
end
+
+ def self.repository(user,repository)
+ GitHub::API.user(user).repositories.select{|r| r.name == repository}.first
+ end
# Fetches a single commit for a repository.
def self.commit(user,repository,commit)
@@ -41,7 +45,6 @@ def initialize(hash = nil)
end
def repositories=(repo_array)
- puts self.inspect
self["repositories"] = repo_array.collect{|r| ::GitHub::Repository.new(r.merge(:user => login || @user))}
end
end
View
4 ruby-github.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "ruby-github"
- s.version = "0.0.4"
+ s.version = "0.0.5"
s.date = "2008-04-26"
s.summary = "Simple Ruby library to access the GitHub API."
s.email = "michael@intridea.com"
@@ -11,5 +11,5 @@ Gem::Specification.new do |s|
s.files = ["History.txt", "Manifest.txt", "README.txt", "Rakefile", "ruby-github.gemspec", "lib/ruby-github.rb"]
s.rdoc_options = ["--main", "README.txt"]
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt"]
- s.add_dependency("mash", [">= 0.0.3"])
+ s.add_dependency("mbleigh-mash", [">= 0.0.5"])
end
Please sign in to comment.
Something went wrong with that request. Please try again.