Skip to content

Commit

Permalink
Merge pull request #269 from ericproulx/frozen_string_literal
Browse files Browse the repository at this point in the history
# frozen string literal: true
  • Loading branch information
grosser authored Apr 17, 2018
2 parents 2ef3b8f + bc4b9c5 commit c1dfc9e
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,12 @@ Lint/NonLocalExitFromIterator:
Style/IfInsideElse:
Enabled: false

Style/FrozenStringLiteralComment:
Exclude:
- 'test/**/*'

AllCops:
TargetRubyVersion: 2.1
TargetRubyVersion: 2.3
Include:
- 'Rakefile'
- 'Gemfile'
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

source 'https://rubygems.org'

gemspec
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "bundler/setup"
require "bundler/gem_tasks"
require "rake/testtask"
Expand Down
2 changes: 2 additions & 0 deletions lib/recaptcha.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'recaptcha/configuration'
require 'uri'
require 'net/http'
Expand Down
6 changes: 4 additions & 2 deletions lib/recaptcha/client_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Recaptcha
module ClientHelper
# Your public API can be specified in the +options+ hash or preferably
Expand Down Expand Up @@ -57,9 +59,9 @@ def invisible_recaptcha_tags(options = {})
end

def self.recaptcha_components(options = {})
html = ""
html = ''.dup
attributes = {}
fallback_uri = ""
fallback_uri = ''.dup

# Since leftover options get passed directly through as tag
# attributes, we must unconditionally delete all our options
Expand Down
2 changes: 2 additions & 0 deletions lib/recaptcha/configuration.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Recaptcha
# This class enables detailed configuration of the recaptcha services.
#
Expand Down
2 changes: 2 additions & 0 deletions lib/recaptcha/railtie.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Recaptcha
class Railtie < Rails::Railtie
initializer :recaptcha do
Expand Down
2 changes: 2 additions & 0 deletions lib/recaptcha/verify.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'json'

module Recaptcha
Expand Down
4 changes: 3 additions & 1 deletion lib/recaptcha/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Recaptcha
VERSION = "4.8.0".freeze
VERSION = '4.8.0'
end
2 changes: 2 additions & 0 deletions recaptcha.gemspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "./lib/recaptcha/version"

Gem::Specification.new do |s|
Expand Down

0 comments on commit c1dfc9e

Please sign in to comment.