github-api-client 0.1.2.1 → 0.1.2.2
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/lib/github_api/base.rb +1 -1
- data/lib/github_api/repo.rb +2 -1
- metadata +2 -2
data/lib/github_api/base.rb
CHANGED
@@ -39,7 +39,7 @@ module GitHub
|
|
39
39
|
hash = case resource
|
40
40
|
when :user_get then {:public_repo_count => :nil, :public_gist_count => :nil, :created => :nil, :permission => :nil, :followers_count => :nil, :following_count => :nil}
|
41
41
|
when :user_search then {:name => :login, :username => :login, :fullname => :name, :followers => :nil, :repos => :public_repo_count, :created => :nil, :permission => :nil}
|
42
|
-
|
42
|
+
when :repo then {:fork => :"fork?".to_s}
|
43
43
|
end
|
44
44
|
hash.each do |k, v|
|
45
45
|
unless v == :nil
|
data/lib/github_api/repo.rb
CHANGED
@@ -4,7 +4,8 @@ module GitHub
|
|
4
4
|
belongs_to :parent, :class_name => 'GitHub::Repo'
|
5
5
|
|
6
6
|
def self.get(information)
|
7
|
-
|
7
|
+
#FIXME: permalink column must be present, comparing url's is surely not the most efficient way for the db
|
8
|
+
GitHub::Repo.find_or_create_by_url(YAML::load(GitHub::Browser.get("/repos/show/#{information}"))['repository'])
|
8
9
|
end
|
9
10
|
|
10
11
|
|