From 08306d6f4a0ce90dc75051c5118a83c0efbb10b2 Mon Sep 17 00:00:00 2001 From: Michael Glass Date: Tue, 4 May 2021 13:02:11 +0200 Subject: [PATCH] drop to ruby 2.7.1 all around --- .travis.yml | 12 ++++---- README.markdown | 76 ++++++++++++++++++++++++++++--------------------- 2 files changed, 50 insertions(+), 38 deletions(-) diff --git a/.travis.yml b/.travis.yml index aaecfdc05..0467ace6d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: ruby rvm: - - 2.7.2 + - 2.7.1 cache: bundler: true yarn: true @@ -17,17 +17,17 @@ env: matrix: include: - - env: FORCE_POSTGRES=true - services: - - postgresql - - env: DO_NOT_FORCE_POSTGRES=true + - env: FORCE_POSTGRES=true + services: + - postgresql + - env: DO_NOT_FORCE_POSTGRES=true before_install: - env - nvm install 12 - yarn install - google-chrome-stable --version - - 'echo ''gem: --no-document'' > ~/.gemrc' + - "echo 'gem: --no-document' > ~/.gemrc" - gem update --system - gem install bundler - bundle config set --local deployment 'true' diff --git a/README.markdown b/README.markdown index 91cdd42e1..7fa4ecde0 100644 --- a/README.markdown +++ b/README.markdown @@ -1,5 +1,5 @@ # Bridge Troll -  + [![Build Status](https://travis-ci.com/railsbridge/bridge_troll.svg?branch=master)](https://travis-ci.com/railsbridge/bridge_troll) [![codecov](https://codecov.io/gh/railsbridge/bridge_troll/branch/master/graph/badge.svg)](https://codecov.io/gh/railsbridge/bridge_troll) @@ -14,20 +14,23 @@ Prospective organizers and attendees can sign up right now at [www.bridgetroll.o New? Keep reading this, and then read the [contributor guidelines](CONTRIBUTING.md). ### Where is it? -* The real live production application lives at [bridgetroll.herokuapp.com](http://bridgetroll.herokuapp.com/) or [www.bridgetroll.org](http://www.bridgetroll.org/) -* The staging server lives at [bridgetroll-staging.herokuapp.com](http://bridgetroll-staging.herokuapp.com/) -* The continuous integration server is at [travis-ci.org/railsbridge/bridge_troll](http://travis-ci.org/railsbridge/bridge_troll) + +- The real live production application lives at [bridgetroll.herokuapp.com](http://bridgetroll.herokuapp.com/) or [www.bridgetroll.org](http://www.bridgetroll.org/) +- The staging server lives at [bridgetroll-staging.herokuapp.com](http://bridgetroll-staging.herokuapp.com/) +- The continuous integration server is at [travis-ci.org/railsbridge/bridge_troll](http://travis-ci.org/railsbridge/bridge_troll) For details on how production and staging are setup, see the [deployment docs](doc/deploy.md). ### Features & Bugs -* We use [GitHub Issues](https://github.com/railsbridge/bridge_troll/issues?state=open) for tracking bugs and features. - * Issues marked as [Help Wanted](https://github.com/railsbridge/bridge_troll/issues?q=is%3Aissue+is%3Aopen+label%3A%22Help+Wanted%22) are ready to go, so pick one up! - * Bugs are, naturally, [marked as bugs](https://github.com/railsbridge/bridge_troll/labels/bug). - * Issues marked with the [Discussion label](https://github.com/railsbridge/bridge_troll/labels/Discussion) are currently being refined. If you're interested in working on one, comment and ask what needs to be finalized before it's ready to be worked on. - * We also mark issues as [beginner friendly](https://github.com/railsbridge/bridge_troll/labels/Beginner%20Friendly), so if you're new to Rails, check those out. + +- We use [GitHub Issues](https://github.com/railsbridge/bridge_troll/issues?state=open) for tracking bugs and features. +- Issues marked as [Help Wanted](https://github.com/railsbridge/bridge_troll/issues?q=is%3Aissue+is%3Aopen+label%3A%22Help+Wanted%22) are ready to go, so pick one up! +- Bugs are, naturally, [marked as bugs](https://github.com/railsbridge/bridge_troll/labels/bug). +- Issues marked with the [Discussion label](https://github.com/railsbridge/bridge_troll/labels/Discussion) are currently being refined. If you're interested in working on one, comment and ask what needs to be finalized before it's ready to be worked on. +- We also mark issues as [beginner friendly](https://github.com/railsbridge/bridge_troll/labels/Beginner%20Friendly), so if you're new to Rails, check those out. ### Want to help out? + Join the [google group](https://groups.google.com/forum/?fromgroups#!forum/bridge-troll) and send a quick note introducing yourself. Then, have a look at our [GitHub Issues](https://github.com/railsbridge/bridge_troll/issues?state=open). Pick a feature to work on, fork the project, code some code, and send a [really good pull request](http://railsbridge.github.com/bridge_troll/). Not sure what to do? Ask the [google group](https://groups.google.com/forum/?fromgroups#!forum/bridge-troll) for advice! @@ -36,25 +39,28 @@ Curious about the longer-term? We have something of a roadmap [here](https://git ## Setting up for your local development environment -You'll need a version manager for Ruby. A version manager is a command-line tool which allows you to easily install, manage, and work with multiple ruby environments. We recommend [rvm](http://rvm.io), but [rbenv](https://github.com/sstephenson/rbenv) will work. +You'll need a version manager for Ruby. A version manager is a command-line tool which allows you to easily install, manage, and work with multiple ruby environments. We recommend [rvm](http://rvm.io), but [rbenv](https://github.com/sstephenson/rbenv) will work. ### Quickstart -We're using a fork & pull model (see [Fork A Repo](https://help.github.com/articles/fork-a-repo) for an example), so fork this repo then clone the *forked* repo. -(Note: change *username* below to be *your* repo.) +We're using a fork & pull model (see [Fork A Repo](https://help.github.com/articles/fork-a-repo) for an example), so fork this repo then clone the _forked_ repo. +(Note: change _username_ below to be _your_ repo.) + ``` git clone https://github.com/username/bridge_troll.git cd bridge_troll ``` -Make sure you have the correct version of ruby before installing the gems for this repo. If you are using rvm, run: `rvm install 2.7.2`. For rbenv, run: `rbenv install 2.7.2`. +Make sure you have the correct version of ruby before installing the gems for this repo. If you are using rvm, run: `rvm install 2.7.1`. For rbenv, run: `rbenv install 2.7.1`. Finish setting up your environment + ``` bin/setup ``` To verify your environment is set up correctly, run the server + ``` rails s ``` @@ -62,8 +68,9 @@ rails s Go to http://localhost:3000/ and verify your success! You can play with the app locally to become more familiar with it. Pro-tip: Confirming Users Locally -* outgoing emails are logged, so if you scroll back in your terminal window, you can see the contents of the confirmation email and copy/paste the confirmation link into your browser -* or create a valid user for most recent signup, run `rails console`: `User.last.confirm!` + +- outgoing emails are logged, so if you scroll back in your terminal window, you can see the contents of the confirmation email and copy/paste the confirmation link into your browser +- or create a valid user for most recent signup, run `rails console`: `User.last.confirm!` ### Running tests @@ -98,18 +105,21 @@ All the created users have easyish-to-remember logins, so a great way to test ou Doing `rake db:seed` again will destroy all those sample persons and create the event again. The exact details of what is created can be found in `seed_event.rb`. #### Anonymizing Data + You can replace sensitive personal information about events and participants from the data with a Rake task. Note that it will not run if your Rails environment is set to `production`. -```` + +``` rake db:anonymize -```` +``` Restore the original data to your database with -```` -rake db:restore -```` +``` +rake db:restore +``` ### Styling Guidelines + We have created a living style guide to keep track of HTML components and their styling across the site. See it at http://localhost:3000/style_guide. We're still working on adding every element to the page, so if you see missing components, add it to the erb template ([style_guide.html.erb](app/views/static_pages/style_guide.html.erb)) @@ -126,15 +136,15 @@ You can see rendered versions of all emails the application can send at http://l #### Mailcatcher - To receive/develop emails locally, install the MailCatcher gem at http://mailcatcher.me. The process is as follows: +To receive/develop emails locally, install the MailCatcher gem at http://mailcatcher.me. The process is as follows: - 1. `gem install mailcatcher` -- installs MailCatcher in your current gemset - 1. `mailcatcher` -- start the MailCatcher server if it isn't running already - 1. Visit http://localhost:1080/ in your web browser. This is your MailCatcher mailbox, where mails will appear. - 1. Do something in your local Bridge Troll app that would send a mail, like signing up for a new account. - 1. You should see the mail that Rails sent in the MailCatcher window. Woo! +1. `gem install mailcatcher` -- installs MailCatcher in your current gemset +1. `mailcatcher` -- start the MailCatcher server if it isn't running already +1. Visit http://localhost:1080/ in your web browser. This is your MailCatcher mailbox, where mails will appear. +1. Do something in your local Bridge Troll app that would send a mail, like signing up for a new account. +1. You should see the mail that Rails sent in the MailCatcher window. Woo! - Note that MailCatcher just makes it easy to see the HTML output of your mails: it doesn't guarantee that the way the mail looks like in MailCatcher is how it will look in Gmail or Outlook. Beware! +Note that MailCatcher just makes it easy to see the HTML output of your mails: it doesn't guarantee that the way the mail looks like in MailCatcher is how it will look in Gmail or Outlook. Beware! ### Working with external services @@ -158,12 +168,12 @@ With the `.env` file in place, the environment variables will be set every time Bridge Troll uses [Omniauth](https://github.com/intridea/omniauth) to allow external authentication to a number of services. -* Twitter through [omniauth-twitter](https://github.com/arunagw/omniauth-twitter) - [set up a consumer here](https://apps.twitter.com/) -* Facebook through [omniauth-facebook](https://github.com/mkdynamic/omniauth-facebook) - [set up a consumer here](https://developers.facebook.com/apps/) -* GitHub through [omniauth-github](https://github.com/intridea/omniauth-github) - [set up a consumer here](https://github.com/settings/applications) -* Meetup through [omniauth-meetup](https://github.com/tapster/omniauth-meetup) - [set up a consumer here](http://www.meetup.com/meetup_api/oauth_consumers/) +- Twitter through [omniauth-twitter](https://github.com/arunagw/omniauth-twitter) - [set up a consumer here](https://apps.twitter.com/) +- Facebook through [omniauth-facebook](https://github.com/mkdynamic/omniauth-facebook) - [set up a consumer here](https://developers.facebook.com/apps/) +- GitHub through [omniauth-github](https://github.com/intridea/omniauth-github) - [set up a consumer here](https://github.com/settings/applications) +- Meetup through [omniauth-meetup](https://github.com/tapster/omniauth-meetup) - [set up a consumer here](http://www.meetup.com/meetup_api/oauth_consumers/) -To set up external authentication, create an oauth consumer on the site you want to authenticate with, then add [PROVIDER]_OAUTH_KEY and [PROVIDER]_OAUTH_SECRET value to the app environment. +To set up external authentication, create an oauth consumer on the site you want to authenticate with, then add [PROVIDER]\_OAUTH_KEY and [PROVIDER]\_OAUTH_SECRET value to the app environment. When developing locally, it is often helpful to set up **local.bridgetroll.org** to point at your localhost server via your [hosts file](https://en.wikipedia.org/wiki/Hosts_%28file%29). You can then tell the OAuth provider to use the url local.bridgetroll.org. Often, a separate OAuth consumer needs to be set up for each environment (localhost/staging/production), but some providers (like Facebook) allow a consumer set up as "www.bridgetroll.org" to function for any subdomain (like "local.bridgetroll.org"). @@ -176,7 +186,9 @@ When you add a new OAuth consumer, set the _Website_ as `http://www.bridgetroll. The values for _key_ and _secret_ on the OAuth consumers page should be added to your local environment as MEETUP_OAUTH_KEY and MEETUP_OAUTH_SECRET, respectively. ## Contributors + One billion thanks to our [super awesome contributors](https://github.com/railsbridge/bridge_troll/contributors). ## License + The code is licensed under an [MIT license](https://github.com/railsbridge/bridge_troll/blob/master/LICENSE.md). Copyright (c) 2016 by RailsBridge.