Skip to content

Commit

Permalink
Release 1.20.0 (#655)
Browse files Browse the repository at this point in the history
* Finish Upgrading Webpacker to v5 (#637)
  - Gemfile[.lock]: Update webpacker to 5.2.1
  - Webpacker: Update config files
      Ran "rails webpacker:install" and committed the changes.

      In "config/webpacker.yml,"
      kept the ".js.erb" entry under "extensions:"
      so that "app/javascript/packs/lib/maps.js.erb" is included.

      In "config/webpack/environment.js,"
      kept jQuery and rails-erb-loader configs,
      as we are still using these.
  - JS dependencies: Upgrade webpack-dev-server
      Commit the changes from running `rails webpacker:install`,
      but using a caret "^" semver range for "@rails/webpacker",
      rather than an exact version.

      (So that we get updates in the 5.x series)


* Update dependencies for September 2020 (#636)
  - dependencies: Remove `swagger` node module
      We don't actually use this.

      Also removes 200 sub-dependencies,
      and makes our yarn.lock file about 1270 lines shorter!
  - yarn.lock: Upgrade bootstrap to 4.5.2
      (Was at version 4.4.1)
  - dependencies: Resolve node-fetch to ^2.6.1
  - yarn.lock: Upgrade "selfsigned" and "node-forge"
  - Gemfile[.lock]: Update Rails and dependencies
      rails was 5.2.4.3, now it's version 5.2.4.4


* Keeping filters state on pagination (#638)
  - Keeping filters state on pagination
  - Fix Code Climates complaints.
  - Fixed active issue on ada filter buttons
  - Fixed undefined function problem when run rspec.


* Add rubocop and resolve lint errors (#644)
  - Initialize rubocop
  - Run rubocop with --fix
  - Don't require magic comment
      This will affect every file and have potential side effects, so I'm
      going to start with this turned off.
  - Resolve lint errors in `app`
  - RSpec linting
  - Resolve remaining
  - Fix wrong change
  - Singleton method for verify
  - New lint rules
  - Add rubocop to travis config
  - Correct docker compose command
  - Check for geo
      The condition was actually supposed to be `if geo = results.first`,
      because that's not always obvious the intention and fails lint, I'm just
      doing a truthy check for it which should be the same.
  - Fix typo
  - Add contributing docs for rubocop


* Applying ADA filters for the Map view of search. (#651)
  - Applying ADA filters for the Map view of search.
  - Changed comment for polyfill URLSearchParams
  - Fixed bug of map marker content not showing.


* Add a standard EditorConfig configuration for every contributor to follow (#649)


* Enhancement/i18n thread safe (#647)
  - Provide a way to respond requests without thread-safe issues
      As rails docs says https://guides.rubyonrails.org/i18n.html#managing-the-locale-across-requests
      When we use 'I18n.locale =' the current locale could leak into following requests
      this is a standard and recommended way to deal with it :)
  - Create a shared_example to test I18n locale switching
  - Update spec/controllers/pages_controller_spec.rb


* Upgrade puma to latest version 5.x (#641)


* yarn.lock: Update "http-proxy" to v1.18.1 (fe195d7)


Co-authored-by: Lucas <[email protected]>
Co-authored-by: Tegan Rauh <[email protected]>
Co-authored-by: Bruno Casali <[email protected]>
  • Loading branch information
4 people authored Nov 1, 2020
1 parent 493d36d commit 6d072be
Show file tree
Hide file tree
Showing 41 changed files with 2,142 additions and 3,137 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{md,markdown}]
trim_trailing_whitespace = false
54 changes: 54 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# The behavior of RuboCop can be controlled via the .rubocop.yml
# configuration file. It makes it possible to enable/disable
# certain cops (checks) and to alter their behavior if they accept
# any parameters. The file can be placed either in your home
# directory or in some project directory.
#
# RuboCop will start looking for the configuration file in the directory
# where the inspected file is and continue its way up to the root directory.
#
# See https://docs.rubocop.org/rubocop/configuration

require:
- rubocop-rails
- rubocop-rspec

AllCops:
NewCops: enable
Exclude:
- 'Gemfile'
- '**/*.rake'
- 'bin/**/*'
- 'config/**/*'
- 'db/**/*'
- 'node_modules/**/*'
- 'vendor/**/*'
- 'tmp/**/*'
- 'Rakefile'
- 'config.rb'
- 'config.ru'

Style/Documentation:
Enabled: false

Style/FrozenStringLiteralComment:
Enabled: false

Style/StringLiterals:
Enabled: false

Metrics/BlockLength:
ExcludedMethods:
- describe
- context
- factory
- define

RSpec/ExampleLength:
Enabled: false

RSpec/MultipleExpectations:
Enabled: false

Style/RegexpLiteral:
AllowInnerSlashes: true
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ before_script:
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- docker-compose run web rubocop
- docker-compose run -e "RAILS_ENV=test" web rake db:test:prepare spec
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT --prefix /refugerestrooms
17 changes: 15 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,27 @@ This is equivalent, but slower during a code-test-code-test development cycle:
docker-compose run web rspec spec/models/restroom_spec.rb
```

### 7 Shut down the Docker Container:
### 7 Linting Code
Ruby code is linted with [rubocop](https://docs.rubocop.org/).

If you want to lint your code before pushing it, you can run:
```
docker-compose run web rubocop
```

Some lint issues can be resolved automatically by running:
```
docker-compose run web rubocop --auto-correct
```

### 8 Shut down the Docker Container:
In another terminal window, run:
```
docker-compose down
```
_(Shutting down the container in this way is safer than exiting with `Ctrl + C`, and prevents issues with breaking the `db` container.)_

### 8 Optional tasks:
### 9 Optional tasks:
To clean up encoding problems in the safe2pee data, run (Use `rake db:fix_accents[dry_run]` to preview the changes.):
```
docker-compose run rake db:fixaccents
Expand Down
7 changes: 5 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
ruby '2.5.8'

gem 'rails', '5.2.4.3'
gem 'rails', '5.2.4.4'

gem 'activeadmin', '~> 2.1'
gem 'bootsnap', require: false
Expand Down Expand Up @@ -32,7 +32,7 @@ gem 'simple_form', '~> 5.0'
gem 'sprockets', '< 4'
gem 'turbolinks'
gem 'uglifier', '>= 1.3.0'
gem 'webpacker', '~> 4'
gem 'webpacker', '~> 5'

group :development, :test do
gem 'better_errors', '~> 2.4.0'
Expand All @@ -42,6 +42,9 @@ group :development, :test do
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'pry'
gem 'rspec-rails'
gem 'rubocop', require: false
gem 'rubocop-rails', require: false
gem 'rubocop-rspec', require: false
end

group :development do
Expand Down
Loading

0 comments on commit 6d072be

Please sign in to comment.