Skip to content

Commit

Permalink
Some style violations, purposely
Browse files Browse the repository at this point in the history
  • Loading branch information
skalee committed Dec 18, 2017
1 parent ff8802b commit 2de61e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/attr_masker/attribute.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def should_mask?(model_instance)
# returning.
def mask(model_instance)
value = unmarshal_data(model_instance.send(name))
masker_value = options[:masker].call(options.merge!(value: value))
masker_value = options[:masker].call(options.merge!({value: value}))
model_instance.send("#{name}=", marshal_data(masker_value))
end

Expand Down
5 changes: 3 additions & 2 deletions lib/attr_masker/performer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ def mask
#
if Rails.env.production?
unless ENV['FORCE_MASK']
raise AttrMasker::Error, "Attempted to run in production environment."
msg = 'Attempted to run in production environment.'
raise AttrMasker::Error, msg
end
end

Expand Down Expand Up @@ -52,7 +53,7 @@ def progressbar_for_model(klass)
title: klass.name,
total: klass.unscoped.count,
throttle_rate: 0.1,
format: %q[%t %c/%C (%j%%) %B %E],
format: %q[%t %c/%C (%j%%) %B %E]
)

yield bar
Expand Down

0 comments on commit 2de61e3

Please sign in to comment.