Skip to content

Commit 5a6ad02

Browse files
committed
Change to load files directly
1 parent 4ad4a43 commit 5a6ad02

7 files changed

Lines changed: 15 additions & 11 deletions

File tree

lib/github_api/error.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,3 @@ def backtrace
3030
end # GithubError
3131
end # Error
3232
end # Github
33-
34-
require 'github_api/error/service_error'
35-
require 'github_api/error/client_error'

lib/github_api/error/client_error.rb

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

3+
require_relative '../error'
4+
35
module Github #:nodoc
46
# Raised when Github returns the HTTP status code 404
57
module Error

lib/github_api/error/service_error.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
require 'json'
44

5+
require_relative '../error'
6+
57
module Github
68
# Raised when GitHub returns any of the HTTP status codes
79
module Error

lib/github_api/validations.rb

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

3+
require_relative 'validations/format'
4+
require_relative 'validations/presence'
5+
require_relative 'validations/required'
6+
require_relative 'validations/token'
7+
38
module Github
49
module Validations
5-
6-
Github::require_all 'github_api/validations',
7-
'presence',
8-
'token',
9-
'format',
10-
'required'
11-
1210
include Presence
1311
include Format
1412
include Token
@@ -20,6 +18,5 @@ module Validations
2018
'auto_pagination',
2119
'jsonp_callback'
2220
]
23-
2421
end # Validation
2522
end # Github

lib/github_api/validations/format.rb

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

3+
require_relative '../error/client_error'
4+
35
module Github
46
module Validations
57
module Format

lib/github_api/validations/presence.rb

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

3+
require_relative '../error/client_error'
4+
35
module Github
46
module Validations
57
# A mixin to help validate presence of non-empty values

lib/github_api/validations/required.rb

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

3+
require_relative '../error/client_error'
4+
35
module Github
46
module Validations
57
module Required

0 commit comments

Comments
 (0)