Skip to content

Commit

Permalink
Bundle Update on 2017-12-15 (#179)
Browse files Browse the repository at this point in the history
* Bundle Update on 2017-12-15

* Resolve issues with rubocop breaking build

[Deppbot](https://www.deppbot.com/) has updated rubocop and this has caused a break in the build due to new errors being found.

The one cop we have had to disable is `Style/FormatStringToken` which was introduced in 0.49.0.

<rubocop/rubocop#3438>

The only issue its highlighting in the code is `strftime()`, and we feel the way we are using it is as expected so are choosing to disable this cop for now.

* Update FactoryGirl to FactoryBot

The people behind ThoughtBot have decided to change the name of this gem, which breaks build if we don't rename it in our code. This change updates the gem and the code to use the new name.

* Fix error following rubocop change

We didn't implement a rubocop fix properly. This change corrects that mistake.

* Update flood_risk_engine to latest
  • Loading branch information
deppbot authored and Cruikshanks committed Dec 15, 2017
1 parent 03c59a8 commit 0838e5d
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 88 deletions.
35 changes: 21 additions & 14 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ AllCops:
- "**/db/migrate/*"
- "**/vendor/**/*"

# We believe it looks cluttered not having the ability to have empty lines after
# the module, class, and block declarations
Layout/EmptyLinesAroundBlockBody:
Enabled: false
Layout/EmptyLinesAroundModuleBody:
Enabled: false
Layout/EmptyLinesAroundClassBody:
Enabled: false

# TODO: Understand what the issue is and whether this needs to be more formally disabled (i.e. the dev team agree)
# We don't understand this for now - seems to prevent perfectly reasonable meta-programming
Lint/NestedMethodDefinition:
Expand Down Expand Up @@ -83,20 +92,18 @@ Style/CaseIndentation:
Style/Documentation:
Enabled: false

# We believe it looks cluttered not having the ability to have empty lines after
# the module, class, and block declarations
Style/EmptyLinesAroundBlockBody:
Enabled: false
Style/EmptyLinesAroundModuleBody:
Enabled: false
Style/EmptyLinesAroundClassBody:
Enabled: false

# We've found the sprintf style for formatting strings can be useful when storing a formatted string as a template,
# and passing in strings that can vary with context. Therefore we chose to disable this rule.
Style/FormatString:
Enabled: false

# This rule was added in version 0.49.0. We have nothing against the rule
# however the code we have it doesn't like is anything that uses strftime().
# We feel the way we are using that is as expected, so have taken the decision
# to turn off this cop. https://github.com/bbatsov/rubocop/issues/3438
Style/FormatStringToken:
Enabled: false

# When using Ruby >= 2.3, Rubocop wants to add a comment to the top of *.rb
# to aid migration to frozen literals in Ruby 3.0. We are not interested in
# modifying every file at this point, so this cop is disabled for now.
Expand All @@ -110,12 +117,12 @@ Style/MethodCalledOnDoEndBlock:
Exclude:
- "**/spec/**/*_spec.rb"

# There are no relative performance improvements using '' over "", therefore we believe there is more
# value in using "" for all strings irrespective of whether string interpolation is used
Style/StringLiterals:
EnforcedStyle: double_quotes

# Rubocop 0.42 introduced this cop - disabling for now until we have time to resolve
# the issues it raises.
Style/MethodMissing:
Enabled: false

# There are no relative performance improvements using '' over "", therefore we believe there is more
# value in using "" for all strings irrespective of whether string interpolation is used
Style/StringLiterals:
EnforcedStyle: double_quotes
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ gem "flood_risk_engine",
# Automatically loads environment variables from .env into ENV. Specified here
# rather than in the group in case any of the gems we add depend on env
# variables being available
gem "dotenv-rails", "~> 2.1.1", groups: [:development, :test]
gem "dotenv-rails", "~> 2.1.1", groups: %i[development test]

group :development do
# Pretty prints objects in console. Usage `$ ap some_object`
Expand All @@ -48,10 +48,10 @@ group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger
# console
gem "byebug"
# Provides Rails integration for factory_girl. Enables "build_dummy_data"
# Provides Rails integration for factory_bot. Enables "build_dummy_data"
# functionality in dev
# N.B require is false so factories aren't loaded during e.g db:migrate
gem "factory_girl_rails", "~> 4.6", require: false
gem "factory_bot_rails", "~> 4.7", require: false
# Used to generate fake data e.g. in the specs
gem "faker", "~> 1.7"
gem "rspec-rails", "~> 3.4.2"
Expand Down
136 changes: 76 additions & 60 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/DEFRA/flood-risk-engine
revision: 74a4e3dd126457dec9084f77e8266d1dca705aee
revision: 6eb9403216f1508c38de25905eccbd912ae04eb1
branch: master
specs:
flood_risk_engine (1.0.2)
Expand Down Expand Up @@ -58,34 +58,35 @@ GEM
activemodel (= 4.2.7.1)
activesupport (= 4.2.7.1)
arel (~> 6.0)
activerecord-session_store (1.0.0)
actionpack (>= 4.0, < 5.1)
activerecord (>= 4.0, < 5.1)
activerecord-session_store (1.1.0)
actionpack (>= 4.0, < 5.2)
activerecord (>= 4.0, < 5.2)
multi_json (~> 1.11, >= 1.11.2)
rack (>= 1.5.2, < 3)
railties (>= 4.0, < 5.1)
railties (>= 4.0, < 5.2)
activesupport (4.2.7.1)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.4.0)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
airbrake (5.3.0)
airbrake-ruby (~> 1.3)
airbrake-ruby (1.3.2)
arel (6.0.4)
ast (2.3.0)
awesome_print (1.7.0)
awesome_print (1.8.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)
bullet (5.1.1)
bullet (5.7.0)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.10.0)
byebug (9.0.5)
byebug (9.1.0)
capybara (2.6.2)
addressable
mime-types (>= 1.16)
Expand All @@ -106,20 +107,21 @@ GEM
simplecov (>= 0.7.1, < 1.0.0)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
concurrent-ruby (1.0.4)
daemons (1.2.4)
declarative (0.0.9)
concurrent-ruby (1.0.5)
crass (1.0.3)
daemons (1.2.5)
declarative (0.0.10)
declarative-option (0.1.0)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
dibber (0.5.0)
diff-lcs (1.2.5)
dibber (0.6.0)
diff-lcs (1.3)
disposable (0.2.6)
declarative (~> 0.0.6)
representable (>= 2.4.0, <= 3.1.0)
uber
docile (1.1.5)
domain_name (0.5.20161129)
domain_name (0.5.20170404)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.1.2)
dotenv-rails (2.1.2)
Expand All @@ -135,16 +137,17 @@ GEM
erubis (2.7.0)
eventmachine (1.0.9.1)
execjs (2.7.0)
factory_girl (4.5.0)
factory_bot (4.8.2)
activesupport (>= 3.0.0)
factory_girl_rails (4.6.0)
factory_girl (~> 4.5.0)
factory_bot_rails (4.8.2)
factory_bot (~> 4.8.2)
railties (>= 3.0.0)
faker (1.7.3)
i18n (~> 0.5)
faker (1.8.5)
i18n (~> 0.9.1)
ffi (1.9.18)
finite_machine (0.11.3)
globalid (0.3.7)
activesupport (>= 4.1.0)
globalid (0.4.1)
activesupport (>= 4.2.0)
govuk_elements_rails (1.2.1)
govuk_frontend_toolkit (>= 4.12.0)
rails (>= 4.1.0)
Expand All @@ -159,17 +162,19 @@ GEM
high_voltage (3.0.0)
http-cookie (1.0.3)
domain_name (~> 0.5)
i18n (0.8.0)
i18n (0.9.1)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
jquery-rails (4.1.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.6)
loofah (2.0.3)
loofah (2.1.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.6.4)
mime-types (>= 1.16, < 4)
mail (2.7.0)
mini_mime (>= 0.1.1)
mailcatcher (0.6.5)
eventmachine (= 1.0.9.1)
mail (~> 2.3)
Expand All @@ -181,32 +186,35 @@ GEM
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_mime (1.0.0)
mini_portile2 (2.1.0)
minitest (5.10.1)
multi_json (1.12.1)
minitest (5.10.3)
multi_json (1.12.2)
nesty (1.0.2)
netrc (0.11.0)
nokogiri (1.6.8.1)
mini_portile2 (~> 2.1.0)
os_map_ref (0.4.1)
parser (2.4.0.0)
ast (~> 2.2)
passenger (5.0.28)
os_map_ref (0.4.2)
parallel (1.12.0)
parser (2.4.0.2)
ast (~> 2.3)
passenger (5.0.30)
rack
rake (>= 0.8.1)
pg (0.18.4)
phonelib (0.6.9)
phonelib (0.6.17)
poltergeist (1.9.0)
capybara (~> 2.1)
cliver (~> 0.3.1)
multi_json (~> 1.0)
websocket-driver (>= 0.2.0)
powerpack (0.1.1)
public_suffix (3.0.1)
pundit (1.1.0)
activesupport (>= 3.0.0)
quiet_assets (1.1.0)
railties (>= 3.1, < 5.0)
rack (1.6.5)
rack (1.6.8)
rack-protection (1.5.3)
rack
rack-test (0.6.3)
Expand Down Expand Up @@ -240,18 +248,21 @@ GEM
activesupport (= 4.2.7.1)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (2.2.1)
rake (12.0.0)
rainbow (3.0.0)
rake (12.3.0)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
reform (2.1.0)
disposable (>= 0.2.2, < 0.3.0)
representable (>= 2.4.0, < 3.1.0)
uber (~> 0.0.11)
reform-rails (0.1.0)
representable (3.0.3)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
uber (< 0.2.0)
rest-client (2.0.0)
rest-client (2.0.2)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
Expand All @@ -276,15 +287,20 @@ GEM
rspec-mocks (~> 3.4.0)
rspec-support (~> 3.4.0)
rspec-support (3.4.1)
rubocop (0.47.1)
parser (>= 2.3.3.1, < 3.0)
rubocop (0.52.0)
parallel (~> 1.10)
parser (>= 2.4.0.2, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.8.1)
sass (3.4.22)
sass-rails (5.0.5)
ruby-progressbar (1.9.0)
sass (3.5.3)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.0.7)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
Expand All @@ -294,7 +310,7 @@ GEM
docile (~> 1.1.0)
json (~> 1.8)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
simplecov-html (0.10.2)
sinatra (1.4.8)
rack (~> 1.5)
rack-protection (~> 1.4)
Expand All @@ -305,30 +321,30 @@ GEM
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.0)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.13)
sucker_punch (2.0.2)
sucker_punch (2.0.4)
concurrent-ruby (~> 1.0.0)
thin (1.5.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.19.4)
thread_safe (0.3.5)
tilt (2.0.5)
tzinfo (1.2.2)
thor (0.20.0)
thread_safe (0.3.6)
tilt (2.0.8)
tzinfo (1.2.4)
thread_safe (~> 0.1)
uber (0.0.15)
uglifier (3.0.0)
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)
uk_postcode (2.1.1)
uk_postcode (2.1.2)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.2)
unicode-display_width (1.1.3)
unf_ext (0.0.7.4)
unicode-display_width (1.3.0)
uniform_notifier (1.10.0)
validates_email_format_of (1.6.3)
i18n
Expand All @@ -337,10 +353,10 @@ GEM
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9)
websocket-driver (0.6.4)
websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
xpath (2.0.0)
websocket-extensions (0.1.3)
xpath (2.1.0)
nokogiri (~> 1.3)

PLATFORMS
Expand All @@ -356,7 +372,7 @@ DEPENDENCIES
ci_reporter_rspec (~> 1.0.0)
codeclimate-test-reporter (~> 0.5.2)
dotenv-rails (~> 2.1.1)
factory_girl_rails (~> 4.6)
factory_bot_rails (~> 4.7)
faker (~> 1.7)
flood_risk_engine!
govuk_elements_rails (~> 1.2.1)
Expand All @@ -382,4 +398,4 @@ RUBY VERSION
ruby 2.3.1p112

BUNDLED WITH
1.13.6
1.16.0
Loading

0 comments on commit 0838e5d

Please sign in to comment.