Skip to content

Commit

Permalink
fix: Fixup ruby warnings (#262)
Browse files Browse the repository at this point in the history
```
…/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
```
  • Loading branch information
ojab authored Mar 27, 2022
1 parent ce1c9bc commit 3640593
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/pact/provider/configuration/message_provider_dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def honours_pact_with consumer_name, options = {}, &block
end

def honours_pacts_from_pact_broker &block
create_pact_verification_from_broker &block
create_pact_verification_from_broker(&block)
end

def builder &block
Expand Down
2 changes: 1 addition & 1 deletion lib/pact/provider/configuration/service_provider_dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def honours_pact_with consumer_name, options = {}, &block
end

def honours_pacts_from_pact_broker &block
create_pact_verification_from_broker &block
create_pact_verification_from_broker(&block)
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/pact/provider/pact_uri.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Provider
class PactURI
attr_reader :uri, :options, :metadata

def initialize (uri, options = nil, metadata = nil)
def initialize(uri, options = nil, metadata = nil)
@uri = uri
@options = options || {}
@metadata = metadata || {} # make sure it's not nil if nil is passed in
Expand Down
10 changes: 5 additions & 5 deletions lib/pact/provider/state/provider_state.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ def provider_state name, &block
end

def set_up &block
ProviderStates.base_provider_state.register.register_set_up &block
ProviderStates.base_provider_state.register.register_set_up(&block)
end

def tear_down &block
ProviderStates.base_provider_state.register_tear_down &block
ProviderStates.base_provider_state.register_tear_down(&block)
end

def provider_states_for name, &block
Expand Down Expand Up @@ -60,7 +60,7 @@ def self.get_base opts = {}
end

def self.namespaced_name name, options = {}
fullname = options[:for] ? "#{options[:for]}.#{name}" : name
options[:for] ? "#{options[:for]}.#{name}" : name
end
end

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

dsl do
def set_up &block
self.register_set_up &block
self.register_set_up(&block)
end

def tear_down &block
self.register_tear_down &block
self.register_tear_down(&block)
end

def no_op
Expand Down

0 comments on commit 3640593

Please sign in to comment.