Skip to content

Commit 6735375

Browse files
ivoanjodblock
authored andcommitted
Enable warnings during spec execution and fix warnings (#110)
1 parent 1a518db commit 6735375

19 files changed

+22
-29
lines changed

.rubocop_todo.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2016-12-21 15:49:54 +0000 using RuboCop version 0.42.0.
3+
# on 2016-12-21 20:00:37 +0000 using RuboCop version 0.42.0.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -9,7 +9,7 @@
99
# Offense count: 1
1010
# Configuration parameters: CountComments.
1111
Metrics/ClassLength:
12-
Max: 108
12+
Max: 109
1313

1414
# Offense count: 89
1515
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
* [#105](https://github.com/codegram/hyperclient/pull/105), [#108](https://github.com/codegram/hyperclient/pull/108): Added Danger, PR linter - [@dblock](https://github.com/dblock).
66
* [#109](https://github.com/codegram/hyperclient/pull/109): Allow disabling asynchronous behavior per-instance - [@Talkdesk](https://github.com/Talkdesk).
7+
* [#110](https://github.com/codegram/hyperclient/pull/110): Fixed ruby warnings - [@ivoanjo](https://github.com/ivoanjo).
78
* Your contribution here.
89

910
### 0.8.1 (March 15, 2016)

Rakefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Rake::TestTask.new(:test) do |t|
2929
t.libs << 'test'
3030
t.pattern = 'test/**/*_test.rb'
3131
t.verbose = false
32+
t.warning = true
3233
end
3334

3435
desc 'runs the whole spinach suite'

lib/hyperclient.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1+
require 'hyperclient/collection'
2+
require 'hyperclient/link'
3+
require 'hyperclient/attributes'
4+
require 'hyperclient/curie'
15
require 'hyperclient/entry_point'
6+
require 'hyperclient/link_collection'
7+
require 'hyperclient/resource'
8+
require 'hyperclient/resource_collection'
29
require 'hyperclient/version'
310

411
# Public: Hyperclient namespace.

lib/hyperclient/attributes.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
require 'hyperclient/collection'
2-
31
module Hyperclient
42
# Public: A wrapper class to easily acces the attributes in a Resource.
53
#

lib/hyperclient/curie.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
require 'hyperclient/resource'
2-
31
module Hyperclient
42
# Internal: Curies are named tokens that you can define in the document and use
53
# to express curie relation URIs in a friendlier, more compact fashion.

lib/hyperclient/entry_point.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require 'hyperclient/link'
21
require 'faraday_middleware'
32
require 'faraday_hal_middleware'
43
require_relative '../faraday/connection'
@@ -31,7 +30,7 @@ class EntryPoint < Link
3130
extend Forwardable
3231

3332
# Public: Delegates common methods to be used with the Faraday connection.
34-
def_delegators :connection, :basic_auth, :digest_auth, :token_auth, :headers, :headers=, :params, :params=
33+
def_delegators :connection, :basic_auth, :digest_auth, :token_auth, :params, :params=
3534

3635
# Public: Initializes an EntryPoint.
3736
#
@@ -40,6 +39,7 @@ def initialize(url, &_block)
4039
@link = { 'href' => url }
4140
@entry_point = self
4241
@options = { async: true }
42+
@connection = nil
4343
yield self if block_given?
4444
end
4545

lib/hyperclient/link.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require 'hyperclient/resource'
21
require 'uri_template'
32
require 'futuroscope'
43

@@ -18,6 +17,7 @@ def initialize(key, link, entry_point, uri_variables = nil)
1817
@link = link
1918
@entry_point = entry_point
2019
@uri_variables = uri_variables
20+
@resource = nil
2121
end
2222

2323
# Public: Indicates if the link is an URITemplate or a regular URI.

lib/hyperclient/link_collection.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
require 'hyperclient/collection'
2-
require 'hyperclient/link'
3-
require 'hyperclient/curie'
4-
51
module Hyperclient
62
# Public: A wrapper class to easily acces the links in a Resource.
73
#

lib/hyperclient/resource.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
require 'forwardable'
2-
require 'hyperclient/attributes'
3-
require 'hyperclient/link_collection'
4-
require 'hyperclient/resource_collection'
52

63
module Hyperclient
74
# Public: Represents a resource from your API. Its responsability is to

0 commit comments

Comments
 (0)