Skip to content

Commit f07a406

Browse files
committed
Rename gem from github -> github_api for rubygems deployment, update version includes.
1 parent 15c2bc6 commit f07a406

48 files changed

Lines changed: 61 additions & 28 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

github.gemspec renamed to github_api.gemspec

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
require File.expand_path('../lib/github/version', __FILE__)
1+
require File.expand_path('../lib/github_api/version', __FILE__)
22

33
Gem::Specification.new do |gem|
4-
gem.name = 'github-api'
4+
gem.name = 'github_api'
55
gem.authors = [ "Piotr Murach" ]
66
gem.email = ""
77
gem.homepage = 'https://github.com/peter-murach/github'
88
gem.require_paths = ['lib']
99
gem.summary = %q{ Ruby wrapper for the GitHub API v3}
10-
gem.description = %q{ Ruby wrapper for the GitHub API v3}
11-
gem.version = Github::Version::STRING.dup
10+
gem.description = %q{ Ruby wrapper that supports all of the GitHub API methods(nearly 200). It's build in a modular way, that is, you can either instantiate the whole api wrapper Github.new or use parts of it e.i. Github::Repos.new if working solely with repositories is your main concern. }
11+
gem.version = Github::VERSION::STRING.dup
1212

13-
gem.files = `git ls-files`.split("\n")
13+
#gem.files = `git ls-files`.split("\n")
14+
gem.files = Dir['Rakefile', '{features,lib,spec}/**/*', 'README*', 'LICENSE*']
1415
gem.require_paths = %w[ lib ]
1516

1617
gem.add_dependency 'hashie', '~> 1.1.0'

lib/github.rb renamed to lib/github_api.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# encoding: utf-8
22

3-
require 'github/configuration'
4-
require 'github/connection'
3+
require 'github_api/version'
4+
require 'github_api/configuration'
5+
require 'github_api/connection'
56

67
module Github
78
extend Configuration
@@ -37,7 +38,7 @@ def autoload_all(prefix, options)
3738

3839
extend AutoloadHelper
3940

40-
autoload_all 'github',
41+
autoload_all 'github_api',
4142
:API => 'api',
4243
:Client => 'client',
4344
:Repos => 'repos',
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# encoding: utf-8
22

3-
require 'github/configuration'
4-
require 'github/connection'
5-
require 'github/request'
3+
require 'github_api/configuration'
4+
require 'github_api/connection'
5+
require 'github_api/request'
66

77
module Github
88
# @private
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# encoding: utf-8
2+
3+
class Hash
4+
def extractable_options?
5+
instance_of?(Hash)
6+
end
7+
end
8+
9+
class Array
10+
def extract_options!
11+
if last.is_a?(Hash) && last.extractable_options?
12+
pop
13+
else
14+
{}
15+
end
16+
end
17+
end

lib/github_api/api/mime.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Github
2+
class Mime < API
3+
4+
end
5+
end

lib/github_api/api/utils.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module Github
2+
class API
3+
module Utils
4+
5+
private
6+
7+
end
8+
end
9+
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module Configuration
3333
DEFAULT_ENDPOINT = 'https://api.github.com/'.freeze
3434

3535
# The value sent in the http header for 'User-Agent' if none is set
36-
DEFAULT_USER_AGENT = "Github Ruby Gem #{Github::Version::STRING}".freeze
36+
DEFAULT_USER_AGENT = "Github Ruby Gem #{Github::VERSION::STRING}".freeze
3737

3838
DEFAULT_FORMAT = :json
3939

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# encoding: utf-8
22

33
require 'faraday'
4-
require 'github/response'
5-
require 'github/response/mashify'
6-
require 'github/response/jsonize'
7-
require 'github/response/raise_error'
8-
require 'github/request/oauth2'
4+
require 'github_api/response'
5+
require 'github_api/response/mashify'
6+
require 'github_api/response/jsonize'
7+
require 'github_api/response/raise_error'
8+
require 'github_api/request/oauth2'
99

1010
module Github
1111
module Connection

0 commit comments

Comments
 (0)