Skip to content

Commit 3640593

Browse files
authored
fix: Fixup ruby warnings (#262)
``` …/configuration/service_provider_dsl.rb:67: warning: `&' interpreted as argument prefix …/pact_uri.rb:6: warning: parentheses after method name is interpreted as an argument list, not a decomposed argument …/configuration/message_provider_dsl.rb:49: warning: `&' interpreted as argument prefix …/state/provider_state.rb:15: warning: `&' interpreted as argument prefix …/state/provider_state.rb:19: warning: `&' interpreted as argument prefix …/state/provider_state.rb:63: warning: assigned but unused variable - fullname …/state/provider_state.rb:84: warning: `&' interpreted as argument prefix …/state/provider_state.rb:88: warning: `&' interpreted as argument prefix ```
1 parent ce1c9bc commit 3640593

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

lib/pact/provider/configuration/message_provider_dsl.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def honours_pact_with consumer_name, options = {}, &block
4646
end
4747

4848
def honours_pacts_from_pact_broker &block
49-
create_pact_verification_from_broker &block
49+
create_pact_verification_from_broker(&block)
5050
end
5151

5252
def builder &block

lib/pact/provider/configuration/service_provider_dsl.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def honours_pact_with consumer_name, options = {}, &block
6464
end
6565

6666
def honours_pacts_from_pact_broker &block
67-
create_pact_verification_from_broker &block
67+
create_pact_verification_from_broker(&block)
6868
end
6969
end
7070

lib/pact/provider/pact_uri.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module Provider
33
class PactURI
44
attr_reader :uri, :options, :metadata
55

6-
def initialize (uri, options = nil, metadata = nil)
6+
def initialize(uri, options = nil, metadata = nil)
77
@uri = uri
88
@options = options || {}
99
@metadata = metadata || {} # make sure it's not nil if nil is passed in

lib/pact/provider/state/provider_state.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ def provider_state name, &block
1212
end
1313

1414
def set_up &block
15-
ProviderStates.base_provider_state.register.register_set_up &block
15+
ProviderStates.base_provider_state.register.register_set_up(&block)
1616
end
1717

1818
def tear_down &block
19-
ProviderStates.base_provider_state.register_tear_down &block
19+
ProviderStates.base_provider_state.register_tear_down(&block)
2020
end
2121

2222
def provider_states_for name, &block
@@ -60,7 +60,7 @@ def self.get_base opts = {}
6060
end
6161

6262
def self.namespaced_name name, options = {}
63-
fullname = options[:for] ? "#{options[:for]}.#{name}" : name
63+
options[:for] ? "#{options[:for]}.#{name}" : name
6464
end
6565
end
6666

@@ -81,11 +81,11 @@ def initialize name, namespace, &block
8181

8282
dsl do
8383
def set_up &block
84-
self.register_set_up &block
84+
self.register_set_up(&block)
8585
end
8686

8787
def tear_down &block
88-
self.register_tear_down &block
88+
self.register_tear_down(&block)
8989
end
9090

9191
def no_op

0 commit comments

Comments
 (0)