Skip to content

Commit

Permalink
Merge pull request #5 from podemos-info/fix/security-update
Browse files Browse the repository at this point in the history
Dependencies security update.
  • Loading branch information
leio10 committed Apr 6, 2018
2 parents 31e1df7 + 81fcc1e commit 2ca0826
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 83 deletions.
15 changes: 8 additions & 7 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -523,9 +523,6 @@ Style/HashSyntax:
# Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style
PreferHashRocketsForNonAlnumEndingSymbols: false

Style/IfUnlessModifier:
MaxLineLength: 80

Layout/IndentationConsistency:
# The difference between `rails` and `normal` is that the `rails` style
# prescribes that in classes and modules the `protected` and `private`
Expand Down Expand Up @@ -964,7 +961,14 @@ Style/TrailingCommaInArguments:
# for all parenthesized method calls with arguments.
EnforcedStyleForMultiline: no_comma

Style/TrailingCommaInLiteral:
Style/TrailingCommaInArrayLiteral:
# If `comma`, the cop requires a comma after the last item in an array or
# hash, but only when each item is on its own line.
# If `consistent_comma`, the cop requires a comma after the last item of all
# non-empty array and hash literals.
EnforcedStyleForMultiline: no_comma

Style/TrailingCommaInHashLiteral:
# If `comma`, the cop requires a comma after the last item in an array or
# hash, but only when each item is on its own line.
# If `consistent_comma`, the cop requires a comma after the last item of all
Expand Down Expand Up @@ -1026,9 +1030,6 @@ Naming/VariableNumber:
- normalcase
- non_integer

Style/WhileUntilModifier:
MaxLineLength: 80

# WordArray enforces how array literals of word-like strings should be expressed.
Style/WordArray:
EnforcedStyle: percent
Expand Down
131 changes: 65 additions & 66 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,154 +1,153 @@
PATH
remote: .
specs:
iban_bic (1.4.1)
iban_bic (1.4.2)
rails (~> 5.1)
regexp-examples (~> 1.3)

GEM
remote: https://rubygems.org/
specs:
actioncable (5.1.4)
actionpack (= 5.1.4)
actioncable (5.1.6)
actionpack (= 5.1.6)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.1.4)
actionpack (= 5.1.4)
actionview (= 5.1.4)
activejob (= 5.1.4)
actionmailer (5.1.6)
actionpack (= 5.1.6)
actionview (= 5.1.6)
activejob (= 5.1.6)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.1.4)
actionview (= 5.1.4)
activesupport (= 5.1.4)
actionpack (5.1.6)
actionview (= 5.1.6)
activesupport (= 5.1.6)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.1.4)
activesupport (= 5.1.4)
actionview (5.1.6)
activesupport (= 5.1.6)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.1.4)
activesupport (= 5.1.4)
activejob (5.1.6)
activesupport (= 5.1.6)
globalid (>= 0.3.6)
activemodel (5.1.4)
activesupport (= 5.1.4)
activerecord (5.1.4)
activemodel (= 5.1.4)
activesupport (= 5.1.4)
activemodel (5.1.6)
activesupport (= 5.1.6)
activerecord (5.1.6)
activemodel (= 5.1.6)
activesupport (= 5.1.6)
arel (~> 8.0)
activesupport (5.1.4)
activesupport (5.1.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
arel (8.0.0)
ast (2.3.0)
ast (2.4.0)
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
builder (3.2.3)
byebug (9.1.0)
byebug (10.0.2)
codecov (0.1.10)
json
simplecov
url
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
concurrent-ruby (1.0.5)
crass (1.0.2)
crass (1.0.3)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
diff-lcs (1.3)
docile (1.1.5)
docile (1.3.0)
equalizer (0.0.11)
erubi (1.7.0)
erubi (1.7.1)
generator_spec (0.9.4)
activesupport (>= 3.0.0)
railties (>= 3.0.0)
globalid (0.4.1)
activesupport (>= 4.2.0)
i18n (0.9.1)
i18n (1.0.0)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
json (2.1.0)
loofah (2.1.1)
loofah (2.2.2)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.0)
mini_mime (>= 0.1.1)
method_source (0.9.0)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
minitest (5.10.3)
nio4r (2.1.0)
nokogiri (1.8.1)
minitest (5.11.3)
nio4r (2.3.0)
nokogiri (1.8.2)
mini_portile2 (~> 2.3.0)
parallel (1.12.0)
parser (2.4.0.0)
ast (~> 2.2)
parallel (1.12.1)
parser (2.5.0.5)
ast (~> 2.4.0)
powerpack (0.1.1)
rack (2.0.3)
rack-test (0.7.0)
rack (2.0.4)
rack-test (1.0.0)
rack (>= 1.0, < 3)
rails (5.1.4)
actioncable (= 5.1.4)
actionmailer (= 5.1.4)
actionpack (= 5.1.4)
actionview (= 5.1.4)
activejob (= 5.1.4)
activemodel (= 5.1.4)
activerecord (= 5.1.4)
activesupport (= 5.1.4)
rails (5.1.6)
actioncable (= 5.1.6)
actionmailer (= 5.1.6)
actionpack (= 5.1.6)
actionview (= 5.1.6)
activejob (= 5.1.6)
activemodel (= 5.1.6)
activerecord (= 5.1.6)
activesupport (= 5.1.6)
bundler (>= 1.3.0)
railties (= 5.1.4)
railties (= 5.1.6)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (5.1.4)
actionpack (= 5.1.4)
activesupport (= 5.1.4)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (5.1.6)
actionpack (= 5.1.6)
activesupport (= 5.1.6)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (2.2.2)
rake
rake (12.2.1)
regexp-examples (1.4.1)
rspec-core (3.7.0)
rainbow (3.0.0)
rake (12.3.1)
regexp-examples (1.4.2)
rspec-core (3.7.1)
rspec-support (~> 3.7.0)
rspec-expectations (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-mocks (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-rails (3.7.1)
rspec-rails (3.7.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.7.0)
rspec-expectations (~> 3.7.0)
rspec-mocks (~> 3.7.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.0)
rubocop (0.51.0)
rspec-support (3.7.1)
rubocop (0.54.0)
parallel (~> 1.10)
parser (>= 2.3.3.1, < 3.0)
parser (>= 2.5)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 3.0)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.9.0)
simplecov (0.15.1)
docile (~> 1.1.0)
simplecov (0.16.1)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
Expand All @@ -162,7 +161,7 @@ GEM
sqlite3 (1.3.13)
thor (0.20.0)
thread_safe (0.3.6)
tzinfo (1.2.4)
tzinfo (1.2.5)
thread_safe (~> 0.1)
unicode-display_width (1.3.0)
url (0.3.2)
Expand All @@ -184,9 +183,9 @@ DEPENDENCIES
generator_spec (~> 0.9.3)
iban_bic!
rspec-rails (~> 3.6)
rubocop (~> 0.50)
rubocop (~> 0.54.0)
sqlite3 (~> 1.3)
virtus (~> 1.0)

BUNDLED WITH
1.16.0
1.16.1
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ $ bundle exec rails generate iban_bic:install --with-static-data
4. Customize initializer if needed, adding validations for new countries, or overriding YAML files.

## Changelog
#### 1.4.2

* Dependencies security update.

#### 1.4.1

* Fixed BIC validation, don't allow less 1 or 2 characters for the office code and don't allow to add extra characters at the begining or at the end of the string.
Expand Down
2 changes: 1 addition & 1 deletion bin/test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

test = File.expand_path("../../test", __FILE__)
test = File.expand_path("../test", __dir__)
$LOAD_PATH.unshift(test) unless $LOAD_PATH.include?(test)

require "bundler/setup"
Expand Down
4 changes: 2 additions & 2 deletions iban_bic.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

lib = File.expand_path("../lib", __FILE__)
lib = File.expand_path("lib", __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

# Maintain your gem's version:
Expand All @@ -25,7 +25,7 @@ Gem::Specification.new do |s|
s.add_development_dependency "codecov", "~> 0.1"
s.add_development_dependency "generator_spec", "~> 0.9.3"
s.add_development_dependency "rspec-rails", "~> 3.6"
s.add_development_dependency "rubocop", "~> 0.50"
s.add_development_dependency "rubocop", "~> 0.54.0"
s.add_development_dependency "sqlite3", "~> 1.3"
s.add_development_dependency "virtus", "~> 1.0"
end
4 changes: 1 addition & 3 deletions lib/active_model/validations/bic_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ module Validations
class BicValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
country_field = options[:country] ? record[options[:country]] : "[A-Z]{2}"
unless /^[A-Z]{4}#{country_field}[0-9A-Z]{2}([0-9A-Z]{3})?$/.match? value.upcase
record.errors.add(attribute, :invalid_format)
end
record.errors.add(attribute, :invalid_format) unless /^[A-Z]{4}#{country_field}[0-9A-Z]{2}([0-9A-Z]{3})?$/.match? value.upcase
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/iban_bic/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module IbanBic
class InstallGenerator < ::Rails::Generators::Base
include ::Rails::Generators::Migration

source_root File.expand_path("../templates", __FILE__)
source_root File.expand_path("templates", __dir__)

class_option(
:with_static_bics,
Expand Down
2 changes: 1 addition & 1 deletion lib/iban_bic/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module IbanBic
VERSION = "1.4.1"
VERSION = "1.4.2"
end
4 changes: 2 additions & 2 deletions spec/generators/install_generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

require "rails_helper"
require "generator_spec/test_case"
require File.expand_path("../../../lib/generators/iban_bic/install_generator", __FILE__)
require File.expand_path("../../lib/generators/iban_bic/install_generator", __dir__)

RSpec.describe IbanBic::InstallGenerator, type: :generator do
include GeneratorSpec::TestCase
destination File.expand_path("../tmp", __FILE__)
destination File.expand_path("tmp", __dir__)

after(:all) { prepare_destination } # cleanup the tmp directory

Expand Down

0 comments on commit 2ca0826

Please sign in to comment.