Skip to content

Commit

Permalink
Merge pull request #527 from RefugeRestrooms/develop
Browse files Browse the repository at this point in the history
Release 1.13.0
  • Loading branch information
mi-wood authored Nov 11, 2018
2 parents b35db04 + 31b554c commit 052dd71
Show file tree
Hide file tree
Showing 99 changed files with 7,993 additions and 775 deletions.
18 changes: 18 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": "> 1%",
"uglify": true
},
"useBuiltIns": true
}]
],

"plugins": [
"syntax-dynamic-import",
"transform-object-rest-spread",
["transform-class-properties", { "spec": true }]
]
}
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/generic-proposal-issue-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Generic Proposal Issue Template
about: Generic issue template for any proposed change. Has sections to add context
and guidance for how to implement the proposal. Designed to make issues clear and
easy to understand/work on.

---

_(This is a template. Please fill in the areas under each heading. Thanks!)_

_(You may delete this text at the top when done!)_

## Scope / difficulty

A concise description of what files this will change, or what topic areas this proposal includes.

If you think this proposal is easy or hard, you can say so here, so contributors will know what to expect.

## Impact

A concise description of what benefits and changes this proposal would introduce when complete.

_(Helps convey what this means to the Refuge Restrooms project, and why this proposal is worth working on.)_

## Rationale

What motivated you to make this proposal. Why this proposal is needed, why it makes sense, why it is the right thing to do, etc.

_(The human side of the reason for this proposal. Optional, but always nice to include!)_

## Proposal

The main proposal.

Include info (including background and context) people will need to understand your proposal.

Links and documentation that help explain parts of your proposal are welcome.

## How to actually do this:

Any guidance on how to complete the proposal. Can be a concrete set of steps such as "Just need to edit this file [link-to-file-on-our-GitHub]", "This guide should help: [link]", etc.

Links and documentation that help explain how to actually fix this problem/implement the proposal, if you have them, are welcome.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ rerun.txt
pickle-email-*.html
config/initializers/secret_token.rb
config/secrets.yml
geocoder.rb
config/initializers/new_framework_defaults_5_1.rb
config/initializers/application_controller_renderer.rb
config/cable.yml
Expand All @@ -54,3 +53,9 @@ ruby

## zsh rake pugin
.rake_tasks

/public/packs
/public/packs-test
/node_modules
yarn-debug.log*
.yarn-integrity
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.1
2.3.7
11 changes: 10 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
env:
global:
- CC_TEST_REPORTER_ID=c18df080592f9c99ca8080a6d5e052aa5fd3964044a0fe0b71e48f8e18998dc2
language: ruby
services: docker
before_install:
install:
- docker-compose build
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- 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
46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
46 changes: 37 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,69 @@
https://help.github.com/articles/fork-a-repo/

### 2 Install Docker.
https://docs.docker.com/install/
- **Windows 10:** https://store.docker.com/editions/community/docker-ce-desktop-windows
- **macOS El Capitan 10.11 and newer:** https://store.docker.com/editions/community/docker-ce-desktop-mac

_(Older Mac or Windows PC? See [instructions for Docker Toolbox](https://github.com/RefugeRestrooms/refugerestrooms/wiki/How-to-use-Docker-Toolbox-with-Refuge-Restrooms).)_

_(Running Linux? See [instructions for Docker CE on Linux](https://github.com/RefugeRestrooms/refugerestrooms/wiki/How-to-use-Docker-CE-on-Linux-with-Refuge-Restrooms).)_

### 3 Build the Docker Container
Build the container
Build the container from any [terminal](https://github.com/RefugeRestrooms/refugerestrooms/wiki/What-is-a-Terminal-(or-%22Terminal-Emulator%22)%3F-How-do-I-run-text-based-commands-on-my-computer%3F) program with:
```
docker-compose build
```

### 4 Run the Docker Container

You can now run and shutdown the app with:
You can now run the app with:
```
docker-compose up
docker-compose down
```

It will be available at localhost:3000
The container will be reachable at this address: `localhost:3000`

_(Point your web browser at `localhost:3000` or `127.0.0.1:3000`, or even `[IP address of computer running the container]:3000` from any computer on the same LAN. The last method is useful for testing the app/site on smart phones and tablets.)_

### 5 Run the Tests
### 5 Do some Development

Files are shared between your computer and the Docker machine. If you update a file on your computer, the change should show up on the Docker machine, and vice-versa.

If you need to run commands on the Docker container directly, run this:
```
docker-compose run web bash
```
_(This will give you a full interactive terminal session running on the Docker machine. You can (for example) run `bundle update` to update the Gems in the Gemfile to more recent versions.)_

Occasionally, you might need to rebuild the Docker machine so it picks up major updates (such as a new version of Ruby, or an updated Gemfile). To do so, run `docker-compose down` and `docker-compose build`.

### 6 Run the Tests
```
docker-compose run -e "RAILS_ENV=test" web rake db:test:prepare spec
```
_(If you want to know if your changes pass our automated testing, before even submitting your changes to RefugeRestrooms on Github, this will let you know.)_

### 6 Optional tasks:
### 7 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` or `Cmd + 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.):
```
docker-compose run rake db:fixaccents
```

### 7 Assets
### Assets
* [Assets Repo](https://github.com/RefugeRestrooms/refuge_assets)

## Testing

Please cover any new code with specs. We prefer code to be covered using RSpec or Capybara.
Please cover any new code with specs. We prefer code to be covered using [RSpec](https://github.com/RefugeRestrooms/refugerestrooms/wiki/What-is-RSpec%3F-How-do-I-create-unit-tests-for-Ruby-code%3F) or [Capybara](https://github.com/RefugeRestrooms/refugerestrooms/wiki/What-is-Capybara%3F-What-is-PhantomJS%3F-What-is-Poltergeist%3F).

## Now What?
Checkout our [Wiki](https://github.com/RefugeRestrooms/refugerestrooms/wiki) and specifically the [newcomers guide](https://github.com/RefugeRestrooms/refugerestrooms/wiki/Maintainers'-Manual-%5C--Newcomers'-Guide).

Please also read our [Code of Conduct](https://github.com/RefugeRestrooms/refugerestrooms/blob/develop/CODE_OF_CONDUCT.md), which gives guidance on our standards of community and interaction.
31 changes: 25 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,38 @@
FROM ruby:2.3.1
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
FROM ruby:2.3.7-slim
ENV PHANTOM_JS=2.1.1
RUN apt-get update && \
apt-get install build-essential chrpath libssl-dev libxft-dev -y && \

# Add basic binaries
RUN apt-get update \
&& apt-get install -y bzip2 curl gnupg wget

# Add the apt repository for yarn
RUN curl -sS http://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list

# Add the apt-repository for the latest node.js
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -

RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
RUN apt-get install build-essential chrpath libssl-dev libxft-dev -y && \
apt-get install libfreetype6 libfreetype6-dev -y && \
apt-get install libfontconfig1 libfontconfig1-dev -y && \
cd ~ && \
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64" && \
wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/$PHANTOM_JS.tar.bz2 && \
tar xvjf $PHANTOM_JS.tar.bz2 && \
mv $PHANTOM_JS /usr/local/share && \
ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin && \
apt-get install -y yarn

# Clean up the apt cache
RUN rm -rf /var/lib/apt/lists/*

RUN mkdir /refugerestrooms
WORKDIR /refugerestrooms

COPY Gemfile /refugerestrooms/Gemfile
COPY Gemfile.lock /refugerestrooms/Gemfile.lock
RUN bundle install
COPY . /refugerestrooms

COPY package.json yarn.lock /refugerestrooms/
RUN yarn --pure-lockfile
58 changes: 29 additions & 29 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
source 'https://rubygems.org'
ruby '2.3.1'
ruby '2.3.7'

gem 'rails', '5.1.4'
gem 'pg'
gem 'pg_search'
gem 'sass-rails'
gem 'rails', '5.2.1'

gem 'activeadmin', '~> 1.3'
gem 'bootsnap', require: false
gem 'bootstrap-sass'
gem 'haml'
gem 'uglifier', '>= 1.3.0'
gem 'bugsnag'
gem 'coffee-rails', '~> 4.2'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.5'
gem 'geocoder', '~> 1.2.1'
gem 'devise', '~> 4.3'
gem 'rakismet'
gem 'country_select'
gem 'mail_form', '>= 1.7.0'
gem 'simple_form', '~> 3.5'
gem 'grape', '0.7.0'
gem 'devise', '~> 4.3'
gem 'geocoder', '~> 1.2.1'
gem 'grape', '~> 0.7.0'
gem 'grape-swagger', '~> 0.7.2'
gem 'grape-kaminari'
gem 'kaminari', '~> 0.17.0'
gem 'haml'
gem 'high_voltage', '~> 3.0.0'
gem 'bugsnag'
gem 'rack-cors', :require => 'rack/cors'
gem 'rack-jsonp'
gem 'http_accept_language'
gem 'jbuilder', '~> 2.5'
gem 'kaminari', '~> 0.17.0'
gem 'mail_form', '>= 1.7.0'
gem 'pg'
gem 'pg_search'
gem 'puma'

# Upgraded to 1.0.0 for Rails 5.1.4
gem 'activeadmin', '~> 1.0.0'
gem 'rack-cors', :require => 'rack/cors'
gem 'rack-jsonp'
gem 'rakismet'
gem 'sass-rails'
gem 'simple_form', '~> 4.0'
gem 'turbolinks'
gem 'uglifier', '>= 1.3.0'
gem 'webpacker', '~> 3.5'

group :production do
gem 'rails_12factor'
end

group :development, :test do
gem 'rspec-rails'
gem 'factory_bot_rails', '~> 4.8.2'
gem 'dotenv-rails', '~> 2.2.1'
gem 'pry'
gem 'better_errors', '~> 2.4.0'
gem 'binding_of_caller'
gem 'dotenv-rails', '~> 2.2.1'
gem 'factory_bot_rails', '~> 4.8.2'
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'pry'
gem 'rspec-rails'
end

group :development do
gem 'i18n-debug'
end

group :test do
gem 'rake'
gem 'capybara'
gem 'database_cleaner'
gem 'simplecov', '~> 0.7.1', require: false
gem 'poltergeist'
gem 'simplecov', '~> 0.7.1', require: false
gem 'webmock', '~> 1.18.0'
end

Expand Down
Loading

0 comments on commit 052dd71

Please sign in to comment.