-
-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pulls over some final configuration details from previous app.
- Loading branch information
Showing
7 changed files
with
176 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Contributing | ||
|
||
We ♥ contributors! By participating in this project, you agree to abide by the | ||
Ruby for Good [code of conduct]. | ||
|
||
[code of conduct]: https://github.com/rubyforgood/code-of-conduct | ||
|
||
Here are the basic steps to submit a pull request. Make sure that you're working | ||
on an [open issue]–if the relevant issue doesn't exist, open it! | ||
|
||
[open issue]: https://github.com/rubyforgood/diaper/issues | ||
|
||
1. Claim an issue on [our issue tracker][open issue] by assigning it to yourself | ||
(core team member) or commenting. If the issue doesn't exist yet, open it. | ||
|
||
2. Fork the repo. | ||
|
||
3. Run `./bin/setup`. | ||
|
||
4. Run the tests. We only take pull requests with passing tests, and it's great | ||
to know that you have a clean slate: `bundle exec rake` | ||
|
||
5. Add a test for your change. If you are adding functionality or fixing a | ||
bug, you should add a test! | ||
|
||
6. Make the test pass. | ||
|
||
7. Push to your fork and submit a pull request. Include the issue number | ||
(ex. `Resolves #1`) in the PR description. | ||
|
||
At this point you're waiting on us–we'll try to respond to your PR quickly. | ||
We may suggest some changes or improvements or alternatives. | ||
|
||
Some things that will increase the chance that your pull request is accepted: | ||
|
||
* Use Rails idioms and helpers | ||
* Include tests that fail without your code, and pass with it | ||
* Update the documentation, the surrounding one, examples elsewhere, guides, | ||
whatever is affected by your contribution |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# A sample Guardfile | ||
# More info at https://github.com/guard/guard#readme | ||
|
||
## Uncomment and set this to only include directories you want to watch | ||
# directories %w(app lib config test spec features) \ | ||
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")} | ||
|
||
## Note: if you are using the `directories` clause above and you are not | ||
## watching the project directory ('.'), then you will want to move | ||
## the Guardfile to a watched dir and symlink it back, e.g. | ||
# | ||
# $ mkdir config | ||
# $ mv Guardfile config/ | ||
# $ ln -s config/Guardfile . | ||
# | ||
# and, you'll have to watch "config/Guardfile" instead of "Guardfile" | ||
|
||
# Note: The cmd option is now required due to the increasing number of ways | ||
# rspec may be run, below are examples of the most common uses. | ||
# * bundler: 'bundle exec rspec' | ||
# * bundler binstubs: 'bin/rspec' | ||
# * spring: 'bin/rspec' (This will use spring if running and you have | ||
# installed the spring binstubs per the docs) | ||
# * zeus: 'zeus rspec' (requires the server to be started separately) | ||
# * 'just' rspec: 'rspec' | ||
|
||
guard :rspec, cmd: "bundle exec rspec" do | ||
require "guard/rspec/dsl" | ||
dsl = Guard::RSpec::Dsl.new(self) | ||
|
||
# Feel free to open issues for suggestions and improvements | ||
|
||
# RSpec files | ||
rspec = dsl.rspec | ||
watch(rspec.spec_helper) { rspec.spec_dir } | ||
watch(rspec.spec_support) { rspec.spec_dir } | ||
watch(rspec.spec_files) | ||
|
||
# Ruby files | ||
ruby = dsl.ruby | ||
dsl.watch_spec_files_for(ruby.lib_files) | ||
|
||
# Rails files | ||
rails = dsl.rails(view_extensions: %w(erb haml slim)) | ||
dsl.watch_spec_files_for(rails.app_files) | ||
dsl.watch_spec_files_for(rails.views) | ||
|
||
watch(rails.controllers) do |m| | ||
[ | ||
rspec.spec.call("routing/#{m[1]}_routing"), | ||
rspec.spec.call("controllers/#{m[1]}_controller"), | ||
rspec.spec.call("acceptance/#{m[1]}") | ||
] | ||
end | ||
|
||
# Rails config changes | ||
watch(rails.spec_helper) { rspec.spec_dir } | ||
watch(rails.routes) { "#{rspec.spec_dir}/routing" } | ||
watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" } | ||
|
||
# Capybara features specs | ||
watch(rails.view_dirs) { |m| rspec.spec.call("features/#{m[1]}") } | ||
watch(rails.layouts) { |m| rspec.spec.call("features/#{m[1]}") } | ||
|
||
# Turnip features and steps | ||
watch(%r{^spec/acceptance/(.+)\.feature$}) | ||
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m| | ||
Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2016 Ruby for Good | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
# README | ||
|
||
This README would normally document whatever steps are necessary to get the | ||
application up and running. | ||
[![Build Status](https://travis-ci.org/rubyforgood/pdx_diaper.svg?branch=master)](https://travis-ci.org/rubyforgood/pdx_diaper) | ||
|
||
Things you may want to cover: | ||
## Ruby Version | ||
This app uses Ruby version 2.3.0, indicated in `/.ruby-version`, which will be auto-selected if you use a Ruby versioning manager like `rvm` or `rbenv`. | ||
|
||
* Ruby version | ||
## Database Configuration | ||
*Note: The app currently uses SQLite3 for dev/test, but should be reconfigured to work as below, using PG.* | ||
|
||
* System dependencies | ||
This app uses PostgreSQL for all environments. When you first clone this app, you will need to create a `.env` file in the root of the application, and populate it with: | ||
|
||
* Configuration | ||
``` | ||
DEV_DB_USERNAME=dev_username | ||
DEV_DB_PASSWORD=dev_password | ||
TEST_DB_USERNAME=test_username | ||
TEST_DB_PASSWORD=test_password | ||
``` | ||
|
||
* Database creation | ||
You'll also need to create the `dev` and `test` databases, the app is expecting them to be named `diaper_development` and `diaper_test`, respectively. | ||
|
||
* Database initialization | ||
## Contributing | ||
Please feel free to contribute! While we welcome all contributions to this app, pull-requests that address outstanding Issues *and* have appropriate test coverage for them will be strongly prioritized. In particular, addressing issues that are tagged with the next milestone should be prioritized higher. | ||
|
||
* How to run the test suite | ||
|
||
* Services (job queues, cache servers, search engines, etc.) | ||
|
||
* Deployment instructions | ||
|
||
* ... | ||
Standard Github community processes apply -- fork the repo, make your changes, submit a pull-request with your change. Please indicate which issue it addresses in your pull-request title. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
PrawnRails.config do |config| | ||
config.page_layout = :portrait | ||
config.page_size = "A4" | ||
config.skip_page_creation = false | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters