Skip to content

Commit

Permalink
Release 1.17.0
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit dd5441e
Author: DeeDeeG <DeeDeeG@users.noreply.github.com>
Date:   Tue Jan 28 15:47:41 2020 -0500

    CSS: Center logo and brand name on narrow screens (RefugeRestrooms#611)

    * _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.

commit 61e5df4
Author: DeeDeeG <DeeDeeG@users.noreply.github.com>
Date:   Sun Jan 5 12:18:29 2020 -0500

    Tweak CSS a bit for narrow screens (e.g. mobile phones) (RefugeRestrooms#610)

    * 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.)

commit 89c8355
Author: DeeDeeG <DeeDeeG@users.noreply.github.com>
Date:   Sun Jan 5 11:54:01 2020 -0500

    Update some dependencies, fix some deprecation warnings (RefugeRestrooms#609)

    * 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.

commit 3714303
Author: DeeDeeG <DeeDeeG@users.noreply.github.com>
Date:   Tue Dec 24 17:55:25 2019 -0500

    restrooms_spec.rb: Fix a test (RefugeRestrooms#608)

    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)

commit 297980c
Author: DeeDeeG <DeeDeeG@users.noreply.github.com>
Date:   Mon Dec 23 21:37:00 2019 -0500

    db/schema.rb: Commit with underscores in date

    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.

commit da6e0e2
Author: DeeDeeG <DeeDeeG@users.noreply.github.com>
Date:   Fri Dec 20 22:46:56 2019 -0500

    CONTRIBUTING.md: Remove the reference to "Cmd + C"

    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.

commit c6dc441
Author: DeeDeeG <DeeDeeG@users.noreply.github.com>
Date:   Fri Dec 20 20:08:17 2019 -0500

    PR RefugeRestrooms#607: Minor tweaks/cleanup

    - 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

commit 01c3c21
Author: Emily Ring <emily_ring@ymail.com>
Date:   Fri Dec 20 19:53:08 2019 -0500

    Webpack Upgrade (RefugeRestrooms#607)

    * 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

commit 5154cd1
Author: DeeDeeG <DeeDeeG@users.noreply.github.com>
Date:   Fri Nov 1 16:58:40 2019 -0400

    Dockerfile: Upgrade Node from v10.x to v12.x (RefugeRestrooms#603)

    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

commit 6c96368
Author: Jason Chen <kbtpodifo@gmail.com>
Date:   Fri Nov 1 16:52:29 2019 -0400

    Fix Travis tests failing on distributions other than trusty (RefugeRestrooms#606)

    * Revert ".travis.yml: Set "dist" to "trusty" (RefugeRestrooms#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.
  • Loading branch information
DeeDeeG committed Feb 8, 2020
1 parent 7381796 commit 5a3efd2
Show file tree
Hide file tree
Showing 26 changed files with 2,411 additions and 2,227 deletions.
18 changes: 0 additions & 18 deletions .babelrc

This file was deleted.

1 change: 1 addition & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
defaults
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/.DS_Store
**/.git
**/.github
**/node_modules
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,6 @@ ruby
/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ env:
global:
- CC_TEST_REPORTER_ID=c18df080592f9c99ca8080a6d5e052aa5fd3964044a0fe0b71e48f8e18998dc2
language: minimal
dist: trusty
services: docker
install:
- docker-compose build
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ In another terminal window, run:
```
docker-compose down
```
_(Shutting down the container in this way is safer than exiting with `Ctrl + C` or `Cmd + C`, and prevents issues with breaking the `db` container.)_
_(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:
To clean up encoding problems in the safe2pee data, run (Use `rake db:fix_accents[dry_run]` to preview the changes.):
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN curl -L https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linu
ENV OPENSSL_CONF=/etc/ssl/

# Specify a major version of Node.js to download and install
ENV NODEJS_MAJOR_VERSION=10
ENV NODEJS_MAJOR_VERSION=12

# Download and extract Node.js from archive supplied by nodejs.org
RUN curl -L https://nodejs.org/dist/latest-v$NODEJS_MAJOR_VERSION\.x/SHASUMS256.txt -O \
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ gem 'sassc-rails'
gem 'simple_form', '~> 5.0'
gem 'turbolinks'
gem 'uglifier', '>= 1.3.0'
gem 'webpacker', '~> 3.5'
gem 'webpacker', '~> 4'

group :development, :test do
gem 'better_errors', '~> 2.4.0'
Expand All @@ -51,7 +51,7 @@ group :test do
gem 'capybara'
gem 'database_cleaner'
gem 'poltergeist'
gem 'simplecov', '~> 0.7.1', require: false
gem 'simplecov', '~> 0.17.1', require: false
gem 'webmock', '~> 3.2.1'
end

Expand Down
33 changes: 18 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ GEM
sort_alphabetical (~> 1.0)
crack (0.4.3)
safe_yaml (~> 1.0.0)
crass (1.0.4)
crass (1.0.5)
database_cleaner (1.7.0)
debug_inspector (0.0.3)
descendants_tracker (0.0.4)
Expand All @@ -121,6 +121,7 @@ GEM
responders
warden (~> 1.2.3)
diff-lcs (1.3)
docile (1.3.2)
dotenv (2.2.2)
dotenv-rails (2.2.2)
dotenv (= 2.2.2)
Expand Down Expand Up @@ -178,6 +179,7 @@ GEM
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.3.0)
kaminari (1.1.1)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.1.1)
Expand All @@ -197,7 +199,7 @@ GEM
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.3.0)
loofah (2.4.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
Expand All @@ -213,12 +215,11 @@ GEM
mini_portile2 (2.4.0)
minitest (5.12.2)
msgpack (1.3.1)
multi_json (1.13.1)
mustermann (1.0.3)
mustermann-grape (1.0.0)
mustermann (~> 1.0.0)
nio4r (2.4.0)
nokogiri (1.10.4)
nio4r (2.5.2)
nokogiri (1.10.7)
mini_portile2 (~> 2.4.0)
orm_adapter (0.5.0)
pg (1.1.4)
Expand All @@ -235,12 +236,13 @@ GEM
coderay (~> 1.1.0)
method_source (~> 0.9.0)
public_suffix (3.1.1)
puma (4.1.0)
puma (4.3.1)
nio4r (~> 2.0)
rack (2.0.7)
rack (2.0.8)
rack-accept (0.4.5)
rack (>= 0.4)
rack-cors (1.0.3)
rack-cors (1.1.0)
rack (>= 2.0.0)
rack-jsonp (1.3.1)
rack
rack-proxy (0.6.5)
Expand Down Expand Up @@ -324,10 +326,11 @@ GEM
simple_form (5.0.1)
actionpack (>= 5.0)
activemodel (>= 5.0)
simplecov (0.7.1)
multi_json (~> 1.0)
simplecov-html (~> 0.7.1)
simplecov-html (0.7.1)
simplecov (0.17.1)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
sixarm_ruby_unaccent (1.2.0)
sort_alphabetical (1.1.0)
unicode_utils (>= 1.2.2)
Expand Down Expand Up @@ -361,7 +364,7 @@ GEM
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
webpacker (3.6.0)
webpacker (4.2.2)
activesupport (>= 4.2)
rack-proxy (>= 0.6.1)
railties (>= 4.2)
Expand Down Expand Up @@ -414,12 +417,12 @@ DEPENDENCIES
sassc-rails
sdoc
simple_form (~> 5.0)
simplecov (~> 0.7.1)
simplecov (~> 0.17.1)
turbolinks
tzinfo-data
uglifier (>= 1.3.0)
webmock (~> 3.2.1)
webpacker (~> 3.5)
webpacker (~> 4)

RUBY VERSION
ruby 2.5.7p206
Expand Down
19 changes: 18 additions & 1 deletion app/assets/stylesheets/_mobile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

// Screen Width-Related Rules

@media only screen and (max-width: 767px), only screen and (max-device-width: 767px) {
.navbar-default .toiletLogo {
top: 8px;
}
}

@media only screen and (max-width: 640px), only screen and (max-device-width: 640px) {
main, main .container {
padding-left: 0;
Expand Down Expand Up @@ -42,9 +48,9 @@
}
.showPageContent {
padding: 10px;

}
}

@media only screen and (max-width: 480px), only screen and (max-device-width: 480px) {
.container {
width: 100%;
Expand Down Expand Up @@ -78,6 +84,17 @@
font-size: 15px;
}
}

@media only screen and (max-width: 342px), only screen and (max-device-width: 344px) {
button.splash-add-restroom-btn > i.fa-plus-square-o {
margin-left: 2%;
}
.nav-column {
padding-left: 0;
padding-right: 0;
}
}

a.iconLink:hover {
text-decoration: none;
}
6 changes: 6 additions & 0 deletions app/assets/stylesheets/framework_and_overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,9 @@ header {
margin-left: auto;
margin-right: auto;
}

// Eliminates double-padding due to nested .container divs
.header > .container > .container {
padding-left: 0;
padding-right: 0;
}
3 changes: 2 additions & 1 deletion app/javascript/packs/application.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Vendor
import { } from 'jquery-ujs'
require('@rails/ujs').start()
require('jquery')
import 'bootstrap/dist/js/bootstrap'

// Views
Expand Down
2 changes: 1 addition & 1 deletion app/models/restroom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class Restroom < ApplicationRecord

include PgSearch
include PgSearch::Model
pg_search_scope :search, against: {
:name => 'A',
:street => 'B',
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/_navigation.html.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.container
.row.min-headroom
.col-xs-12
.col-xs-12.nav-column
%nav.nav.navbar-default{:role => "navigation"}
/ Brand and toggle get grouped for better mobile display
.navbar-header
Expand Down
72 changes: 72 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
module.exports = function(api) {
var validEnv = ['development', 'test', 'production']
var currentEnv = api.env()
var isDevelopmentEnv = api.env('development')
var isProductionEnv = api.env('production')
var isTestEnv = api.env('test')

if (!validEnv.includes(currentEnv)) {
throw new Error(
'Please specify a valid `NODE_ENV` or ' +
'`BABEL_ENV` environment variables. Valid values are "development", ' +
'"test", and "production". Instead, received: ' +
JSON.stringify(currentEnv) +
'.'
)
}

return {
presets: [
isTestEnv && [
'@babel/preset-env',
{
targets: {
node: 'current'
}
}
],
(isProductionEnv || isDevelopmentEnv) && [
'@babel/preset-env',
{
forceAllTransforms: true,
useBuiltIns: 'entry',
corejs: 3,
modules: false,
exclude: ['transform-typeof-symbol']
}
]
].filter(Boolean),
plugins: [
'babel-plugin-macros',
'@babel/plugin-syntax-dynamic-import',
isTestEnv && 'babel-plugin-dynamic-import-node',
'@babel/plugin-transform-destructuring',
[
'@babel/plugin-proposal-class-properties',
{
loose: true
}
],
[
'@babel/plugin-proposal-object-rest-spread',
{
useBuiltIns: true
}
],
[
'@babel/plugin-transform-runtime',
{
helpers: false,
regenerator: true,
corejs: false
}
],
[
'@babel/plugin-transform-regenerator',
{
async: false
}
]
].filter(Boolean)
}
}
7 changes: 5 additions & 2 deletions bin/webpack
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require "rubygems"
require "bundler/setup"

require "webpacker"
require "webpacker/webpack_runner"
Webpacker::WebpackRunner.run(ARGV)

APP_ROOT = File.expand_path("..", __dir__)
Dir.chdir(APP_ROOT) do
Webpacker::WebpackRunner.run(ARGV)
end
7 changes: 5 additions & 2 deletions bin/webpack-dev-server
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require "rubygems"
require "bundler/setup"

require "webpacker"
require "webpacker/dev_server_runner"
Webpacker::DevServerRunner.run(ARGV)

APP_ROOT = File.expand_path("..", __dir__)
Dir.chdir(APP_ROOT) do
Webpacker::DevServerRunner.run(ARGV)
end
18 changes: 11 additions & 7 deletions config/webpack/environment.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
const { environment } = require('@rails/webpacker')
const erb = require('./loaders/erb')
const webpack = require("webpack")

environment.plugins.append('Provide', new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
Popper: ['popper.js', 'default'],
}))
// jQuery
const webpack = require('webpack')
environment.plugins.prepend('Provide',
new webpack.ProvidePlugin({
$: 'jquery/src/jquery',
jQuery: 'jquery/src/jquery'
})
)

// rails-erb-loader
const erb = require('./loaders/erb')
environment.loaders.append('erb', erb)

module.exports = environment
Loading

0 comments on commit 5a3efd2

Please sign in to comment.