mbleigh-ruby-github 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +5 -0
- data/README.txt +4 -2
- data/lib/ruby-github.rb +4 -1
- data/ruby-github.gemspec +2 -2
- metadata +3 -3
data/History.txt
CHANGED
data/README.txt
CHANGED
@@ -10,8 +10,7 @@ Gem:
|
|
10
10
|
|
11
11
|
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.
|
12
12
|
|
13
|
-
gem
|
14
|
-
sudo gem install mbleigh-ruby-github
|
13
|
+
sudo gem install mbleigh-ruby-github --source=http://gems.github.com
|
15
14
|
|
16
15
|
GitHub Clone:
|
17
16
|
|
@@ -32,6 +31,9 @@ GitHub Clone:
|
|
32
31
|
user.repositories.last.name # => "ruby-github"
|
33
32
|
user.repositories.last.url # => "http://GitHub::API.com/mbleigh/ruby-github"
|
34
33
|
user.repositories.last.commits # => requests array of commits (see below)
|
34
|
+
|
35
|
+
repository = GitHub::API.repository('mbleigh','ruby-github')
|
36
|
+
# => <GitHub::Repository name="ruby-github">
|
35
37
|
|
36
38
|
commits = GitHub::API.commits('mbleigh','ruby-github')
|
37
39
|
commits.first.message # => "Moved GitHub::API.rb to ruby-GitHub::API.rb..."
|
data/lib/ruby-github.rb
CHANGED
@@ -20,6 +20,10 @@ module GitHub
|
|
20
20
|
GitHub::Commit.new(c.merge(:user => user, :repository => repository))
|
21
21
|
}
|
22
22
|
end
|
23
|
+
|
24
|
+
def self.repository(user,repository)
|
25
|
+
GitHub::API.user(user).repositories.select{|r| r.name == repository}.first
|
26
|
+
end
|
23
27
|
|
24
28
|
# Fetches a single commit for a repository.
|
25
29
|
def self.commit(user,repository,commit)
|
@@ -41,7 +45,6 @@ module GitHub
|
|
41
45
|
end
|
42
46
|
|
43
47
|
def repositories=(repo_array)
|
44
|
-
puts self.inspect
|
45
48
|
self["repositories"] = repo_array.collect{|r| ::GitHub::Repository.new(r.merge(:user => login || @user))}
|
46
49
|
end
|
47
50
|
end
|
data/ruby-github.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "ruby-github"
|
3
|
-
s.version = "0.0.
|
3
|
+
s.version = "0.0.5"
|
4
4
|
s.date = "2008-04-26"
|
5
5
|
s.summary = "Simple Ruby library to access the GitHub API."
|
6
6
|
s.email = "michael@intridea.com"
|
@@ -11,5 +11,5 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.files = ["History.txt", "Manifest.txt", "README.txt", "Rakefile", "ruby-github.gemspec", "lib/ruby-github.rb"]
|
12
12
|
s.rdoc_options = ["--main", "README.txt"]
|
13
13
|
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt"]
|
14
|
-
s.add_dependency("mash", [">= 0.0.
|
14
|
+
s.add_dependency("mbleigh-mash", [">= 0.0.5"])
|
15
15
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mbleigh-ruby-github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Bleigh
|
@@ -13,13 +13,13 @@ date: 2008-04-26 00:00:00 -07:00
|
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
|
-
name: mash
|
16
|
+
name: mbleigh-mash
|
17
17
|
version_requirement:
|
18
18
|
version_requirements: !ruby/object:Gem::Requirement
|
19
19
|
requirements:
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.0.
|
22
|
+
version: 0.0.5
|
23
23
|
version:
|
24
24
|
description: Ruby-GitHub is a small library that provides simple access to GitHub's evolving API.
|
25
25
|
email: michael@intridea.com
|