Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.18.0 #619

Merged
merged 61 commits into from
Apr 12, 2020
Merged

Release 1.18.0 #619

merged 61 commits into from
Apr 12, 2020

Conversation

DeeDeeG
Copy link
Contributor

@DeeDeeG DeeDeeG commented Apr 8, 2020

Context

  • Update some dependencies
  • Update the Dockerfile config

Changes

Checklist

  • Tested Mobile Responsiveness
  • Added Unit Tests
  • CI Passes
  • Deploys to Heroku on test Correctly (Maintainers will handle)
  • Added Documentation (Service and Code when required)

DeeDeeG and others added 30 commits March 31, 2019 16:33
Only applies during development and testing
when we use the "db/export.csv" data.

Doesn't affect production, which uses the real data in its db.
Also, clarify that there are two containers, web and db,
rather than just one; these can be viewed using
docker ps
Add border bottom to give each menu item more separation
Make filter with "focus" class more readable
Does effectively the same things as before,
but now in a simpler/faster way.

Some of the changes take inspiration from
@btyy77c's dockerAlpine branch:
https://github.com/btyy77c/refugerestrooms/blob/dockerAlpine/Dockerfile

The PhantomJS install is based on (mostly copy-pasted from)
@nkovacs' phantomjs image from Docker Hub:
https://github.com/nkovacs/selenium-standalone-phantomjs/blob/c5f6bba218472270/Dockerfile#L19-L22
(Also installs Node.js in /usr/local/
instead of installing Node.js in the root directory.)

With this updated script, we specify just a major version
and the script picks the latest minor/patch version within that.

--

Nodejs.org does most of the work by maintaining the "latest-v[MAJOR]"
folders; We only need to parse the "SHASUMS256.txt" file from there,
and pick the "linux-x64" variant, which works with our Docker setup.

At this point we can use the known directory URL, plus the filename
extracted from "SHASUMS256.txt", and download with curl, or wget, etc.

(e.g. "curl -L https://nodejs.org/dist/latest-v10.x/node-v10.16.0-linux-x64.tar.xz -o nodejs.tar.xz")

--

There is no "latest-LTS" folder or similar, so automatically getting
the latest LTS version would be more difficult.

We could search "nodejs.org/dist/" for folders with
the name "latest-[LETTERS-ONLY-STRING]", which would be the folders
of all the LTS codenames. Among these, the one with
the alphabetically last name is the latest LTS.

This would work at least until around 2040, when they may have
to loop around and re-use some earlier letters (a, b, c, etc.)
* yarn.lock: Update Node.js packages

* Gemfile.lock: Update gems
To fufill the open source agreement, we have to link to bugsnag now in our readme.
We do all the setup/build steps inside a Docker container,
so we don't need ruby tools outside of Docker
(on the Travis CI virtual machine instances).

Should save about 20 seconds of Travis CI build time.

--

Inspired by @btyy77c who did this first at their dockerAlpine branch:
  - btyy77c@393cf46

Documentation at Travis re: minimal/generic images:
  - https://docs.travis-ci.com/user/languages/minimal-and-generic/
This (the Alpine Linux-based postgresql image) is a smaller image
than the debian-based postgresql image,
so it should be marginally faster to download.

Seems like a good idea in general,
to speed up build times (even outside of Travis CI).

Also should save some disk space for developers.

--

Inspired by the general concept of @btyy77c's dockerAlpine branch:
  - https://github.com/btyy77c/refugerestrooms/commits/dockerAlpine

Docker Hub documentation on the alpine vs debian postgres images:
  - https://hub.docker.com/_/postgres#image-variants
This isn't needed anymore,
since we have removed the tumblr link from the footer.
Remove tumblr link from footer html, related places in the code
I noticed we were removing tumblr, here's one more instance
* Create devise.fil.yml

* Update devise.fil.yml

* Update for devise.fil.yml @100% Translation

* Update and rename devise.fil.yml to devise.fl.yml

* Update and rename devise.fl.yml to devise.fil.yml
Translated files from EN to FIL #451
* switched sass-rails gem (sass-rails --> sassc-rails)
DeeDeeG and others added 19 commits October 26, 2019 13:43
When running the tests, cliver tries to check that PhantomJS's version
is within a certain range, by running "phantomjs --version".

The "phantomjs --version" command fails for some reason
on the new ruby:2.5.7-slim Docker base image.

Perhaps because the new Docker image is based on Debian 10 "Buster,"
whereas the old Docker image was based on Debian 9 "Stretch"?

This commit's workaround allows "phantomjs --version" to work again.
Ruby: Upgrade from 2.5.3 to 2.5.7
* Revert ".travis.yml: Set "dist" to "trusty" (#600)"

This reverts commit ac8f6ab.

Doing this to run tests on Travis to investigate why they
aren't passing.

* Explicitly require locations.rb in rspec.rb

Tentative fix for tests not passing in xenial but passing in trusty.
This might be because different distributions load files in a
different order. In xenial, `rspec.rb` might get loaded before
`locations.rb`, making `Locations` uninitialized. Explicit require
fixes this.
Node 12 "Erbium" is the newest Long Term Service release.

We should either pin a version of Node in our package.json file,
or stay on the latest LTS version of Node;

Heroku will use the latest LTS version of Node 
in production if we don't have any versions pinned in our package.json
* Updated webpacker gem

* Upgraded yarn packages

* Ran webpack:install process.  Working without rails-erb-loader

* Added rails-erb-loader to webpack

* Fixed include PgSearch warning

* Added .dockerignore
- Adjust Gemfile[.lock] to specify webpacker within the 4.x series,
  rather than any version 4.0 or greater.

- Delete some duplicate entries in the .gitignore file
The "Cmd + C" keyboard shortcut is for copying text,
not quitting programs in the terminal.

The proper way to quit programs in the terminal
under macOS is "Ctrl + C", the same as Linux.

Referring to "Cmd + C" here was based on
a mistaken assumption that "Ctrl" on Windows or Linux
always gets translated to "Cmd" on macOS.

(In fact, some uses of "Ctrl" on Windows/Linux
are preserved as-is on macOS. It's a mixed bag.)

Deleting the reference to "Ctrl + C", to make the guidance clearer.
The date gets underscores added automatically
when running migrations on the database.

Committing with the underscores so the change isn't flagged by git
when no code has been changed.
Background:

The Mission Creek Cafe in San Francisco has been closed for some time.

Google Maps API now resolves "Mission Creek Cafe"
to a coffee shop in Washington state.

Washington is too far away from our stub restroom entries;
No stub restrooms are located near Washington,
so no restroom results are shown on our results page for this search.

The test expects to see a stub restroom entry on the reults page,
but does not see it, and so the test fails.

---

Fix:

search the Maps API for "San Francisco," not "Mission Creek Cafe"

(This returns a lat/long associated with San Francisco not Washington)
* Gemfile[.lock]: Update simplecov

Fixes a deprecation warning

* restrooms_spec.rb: Use 'successful' not 'success'

Rspec's `be_success` and `.success?` are deprecated.

Rspec's `be_successful` and `.successful?`
are the non-deprecated versions of this check.

(This fixes the associated deprecation warning)

* Gemfile.lock: Bump some dependencies

Upgraded loofah, puma, rack, and rack-cors,
plus their dependencies.
* CSS: Add some styles for narrow screens

For screen widths ~340px or narrower.

(Such a narrow screen is found, for example, on the original iPhone
through to the iPhone 5S and iPhone SE.)

- Makes the "+" icon on the "Add A Restroom" button
  appear in a more correct-looking position.

- Fixes the overlap of the "Refuge Restrooms" text
  with the "hamburger" drop-down menu button in the header/nav section.

- Adds a class via the haml source (.nav-column)
  to make applying one of the style rules easier.

* CSS: No double-padding on nested `.container`s

Eliminate double-padding in cases of
an [element].container immediately inside another [element].container.

(Doing this only directly under the header div, just to be conservative.)

The 15px + 15px = 30px of padding on both sides
seemed unintentionally wide. Also, I think this looks nicer.
Helps with the tight fit on mobile devices, too.

(Should affect the header/nav on all pages other than the home page,
aka the splash page, due to the way the pages are coded.)
* _mobile.scss: Lower logo/brand on narrow screens

Adjust the CSS "top" property to set the logo and "brand name"
("Refuge Restrooms") slightly lower within the navbar on narrow
screens.

This is to adjust for the navbar being responsively taller
on narrower screens. "767px screen width" happens to be the responsive
threshold for that height change for the navbar.

* _mobile.scss: Move 342px rules, adjust whitespace

Moved the "max 342px" rules to the bottom, so all screen-width-related
style rules are in descending order of the sizes that they apply to.
(For consistency).

Adjusted the use of newlines in this stylesheet to be more consitent.
* Dockerfile: Use better PhantomJS URL

GitHub's CDN is more reliable than BitBucket's.

(This is the URL we originally used as of PR #435,
which was the initial implementation of our Docker setup.)

* docker-compose.yml: Add password for PostgreSQL db

This is in response to a recent change in the PostgreSQL Docker image.

Either the database must be configured to not check passwords, i.e.
`POSTGRESQL_HOST_AUTH_METHOD=trust`, or a password must now be set.

For explanation and context, see:

- docker-library/postgres#658
- docker-library/postgres#681
- docker-library/postgres#580
- https://discuss.circleci.com/t/postgresql-image-password-not-specified-issue/34555
* Gemfile[.lock]: Update rails to 5.2.4.2

Also update its dependencies, as required.

* Gemfile[.lock]: Update grape and grape-swagger

Also update their dependencies, as needed.

* Gemfile[.lock]: Update activeadmin

* Gemfile: Pin sprockets to "< 4"

The 4.x major version upgrade requires some configuration changes.

Pinning keeps the app from breaking when doing `bundle update`.

* Gemfile.lock: Update all packages

* yarn.lock: Update all packages
@DeeDeeG
Copy link
Contributor Author

DeeDeeG commented Apr 8, 2020

PLEASE use the following text for the squashed commit message, thanks:

Squashed commit of the following:

commit a3ba4b7e1a12bc5f4836849d4e46fdb53187fcca
Author: DeeDeeG <DeeDeeG@users.noreply.github.com>
Date:   Fri Apr 3 22:10:09 2020 -0400

    Update Node.JS and Ruby Dependencies (#617)
    
    * Gemfile[.lock]: Update rails to 5.2.4.2
    
    Also update its dependencies, as required.
    
    * Gemfile[.lock]: Update grape and grape-swagger
    
    Also update their dependencies, as needed.
    
    * Gemfile[.lock]: Update activeadmin
    
    * Gemfile: Pin sprockets to "< 4"
    
    The 4.x major version upgrade requires some configuration changes.
    
    Pinning keeps the app from breaking when doing `bundle update`.
    
    * Gemfile.lock: Update all packages
    
    * yarn.lock: Update all packages

commit 15fe9f72c134e145deee2e4e8d1662f9997a0dec
Author: DeeDeeG <DeeDeeG@users.noreply.github.com>
Date:   Thu Apr 2 16:02:39 2020 -0400

    Ruby: Update from 2.5.7 to 2.5.8 (#618)

commit cc9f2a7c6128b88429e28bec633c07c4c5d8e733
Author: DeeDeeG <DeeDeeG@users.noreply.github.com>
Date:   Tue Mar 17 15:02:57 2020 -0400

    Update docker config (#616)
    
    * Dockerfile: Use better PhantomJS URL
    
    GitHub's CDN is more reliable than BitBucket's.
    
    (This is the URL we originally used as of PR #435,
    which was the initial implementation of our Docker setup.)
    
    * docker-compose.yml: Add password for PostgreSQL db
    
    This is in response to a recent change in the PostgreSQL Docker image.
    
    Either the database must be configured to not check passwords, i.e.
    `POSTGRESQL_HOST_AUTH_METHOD=trust`, or a password must now be set.
    
    For explanation and context, see:
    
    - https://github.com/docker-library/postgres/pull/658
    - https://github.com/docker-library/postgres/issues/681
    - https://github.com/docker-library/postgres/issues/580
    - https://discuss.circleci.com/t/postgresql-image-password-not-specified-issue/34555

On the other hand, I'm happy to squash and merge myself with that commit message, preferably after an "approved" review from somebody else.

@DeeDeeG
Copy link
Contributor Author

DeeDeeG commented Apr 10, 2020

Looks good on staging. I'm planning to merge in an hour or two.

@DeeDeeG DeeDeeG changed the title Release 1.18.0 [DRAFT] Release 1.18.0 Apr 10, 2020
@DeeDeeG DeeDeeG closed this Apr 10, 2020
@DeeDeeG DeeDeeG reopened this Apr 12, 2020
@DeeDeeG DeeDeeG changed the title [DRAFT] Release 1.18.0 Release 1.18.0 Apr 12, 2020
@DeeDeeG DeeDeeG merged commit 775c67a into master Apr 12, 2020
@DeeDeeG DeeDeeG deleted the release-1.18.0 branch April 12, 2020 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants