From f3400d4654bfacecf7873d1064df607c287c09e2 Mon Sep 17 00:00:00 2001 From: mix irving Date: Sun, 8 Mar 2015 20:21:25 +1300 Subject: [PATCH 1/9] install dotenv to help managed env vars --- .example-env | 18 ++++++++++++++++++ .gitignore | 1 + Gemfile | 1 + Gemfile.lock | 2 ++ 4 files changed, 22 insertions(+) create mode 100644 .example-env diff --git a/.example-env b/.example-env new file mode 100644 index 00000000..3e8752fb --- /dev/null +++ b/.example-env @@ -0,0 +1,18 @@ +RAILS_ENV=development + +AWS_ACCESS_KEY_ID +AWS_SECRET_ACCESS_KEY +BUNDLE_GEMFILE +SMTP_DOMAIN +SMTP_PASSWORD +SMTP_PORT +SMTP_SERVER +SMTP_USERNAME +SSO_KEY + +## find the ENV currently in use in the app using : +## grep -rIso -P "(?<=ENV)(\.fetch\(|\[).[A-Z_]+.(\)|\])" + +# for a uniq ordered list of env vars: +## grep -rIsoh -P "(?<=ENV)(\.fetch\(|\[).[A-Z_]+.(\)|\])" | grep -oP "[A-Z_]+" | sort -u > temp + diff --git a/.gitignore b/.gitignore index d1889d2c..75aa3c26 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ realtime/node_modules config/database.yml +.env #public/assets # Ignore bundler config diff --git a/Gemfile b/Gemfile index e21cca7e..9489f21d 100644 --- a/Gemfile +++ b/Gemfile @@ -17,6 +17,7 @@ gem 'rails3-jquery-autocomplete' gem 'best_in_place' #in-place editing gem 'kaminari' # pagination gem 'uservoice-ruby' +gem 'dotenv' gem 'paperclip' gem 'aws-sdk' diff --git a/Gemfile.lock b/Gemfile.lock index e46dfc6b..98a5e233 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -59,6 +59,7 @@ GEM responders thread_safe (~> 0.1) warden (~> 1.2.3) + dotenv (2.0.0) erubis (2.7.0) execjs (2.2.1) ezcrypto (0.7.2) @@ -165,6 +166,7 @@ DEPENDENCIES cancan coffee-rails (~> 3.2.1) devise + dotenv formtastic formula jbuilder (= 0.8.2) From 678ec1bbab5214db821520f0a4d0514b25f8badc Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Fri, 20 Nov 2015 14:34:05 +0800 Subject: [PATCH 2/9] Update windows installer docs --- README.md | 3 ++- WindowsInstallation.md | 16 ++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 1e23d33b..9d3bfc90 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,8 @@ OR create a new account at `/join`, and use access code `qwertyui` Start mapping and programming! -While we are still figuring out vagrant for Windows, there is an older set of instructions below +We haven't figured out Vagrant for Windows yet, but we have a set of manual instructions here: + - [For Windows][windows-installation] ## Contributing diff --git a/WindowsInstallation.md b/WindowsInstallation.md index 42364b44..fed11893 100644 --- a/WindowsInstallation.md +++ b/WindowsInstallation.md @@ -1,17 +1,13 @@ -First off, Metamaps runs on Ruby On Rails. Ruby 2.1.3 and Rails 3.2. You'll need to get Ruby and Rails installed on your computer if you don't already have it. Go to here for Ruby http://rubyinstaller.org/downloads/ +If you have any trouble with this process, contact us at team@metamaps.cc, and one of our developers may be able to help you out. -You'll also need GIT: http://git-scm.com/download/win +First, http://railsinstaller.org/en. This will install Ruby, Rails, and Git for you. -It uses postgreSQL 9.2 as a database. You can install that for your computer from here: http://www.enterprisedb.com/products-services-training/pgdownload . During installation you can choose whatever database password you like. Make sure to note it down! +Once you've done that, you will need to download PostgreSQL and node.js: -Once you install those, open a 'command prompt with ruby'. + - http://nodejs.org/en/download/ + - http://www.postgresql.org/download/windows/ -to install rails - gem install rails -v 3.2 - -also download node.js, which is also needed http://nodejs.org/download/ - -Navigate to the folder that you want to download the metamaps files to and run the following: (use your forked git repository address if it's different than this repo. You will also need to go to your Github account settings and add the SSH key that was placed in your clipboard earlier) +Now open a terminal, and navigate to the folder that you want to download the metamaps files to and run the following: git clone https://github.com/metamaps/metamaps_gen002.git --branch develop cd metamaps_gen002 From c9ebfee96830dcc3f244765e854efdd30fcc3d6d Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Mon, 25 Jan 2016 17:19:53 +0800 Subject: [PATCH 3/9] default branch to develop in README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4a74151a..8be8a147 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ Copyright (c) 2015 Connor Turland [site-blog]: http://blog.metamaps.cc [site-beta]: http://metamaps.cc [community]: https://plus.google.com/u/0/communities/115060009262157699234 -[license]: https://github.com/metamaps/metamaps_gen002/blob/master/LICENSE -[contributing]: https://github.com/metamaps/metamaps_gen002/blob/master/doc/CONTRIBUTING.md -[contributing-issues]: https://github.com/metamaps/metamaps_gen002/blob/master/doc/CONTRIBUTING.md#reporting-bugs-and-other-issues -[windows-installation]: https://github.com/metamaps/metamaps_gen002/blob/master/doc/WindowsInstallation.md +[license]: https://github.com/metamaps/metamaps_gen002/blob/develop/LICENSE +[contributing]: https://github.com/metamaps/metamaps_gen002/blob/develop/doc/CONTRIBUTING.md +[contributing-issues]: https://github.com/metamaps/metamaps_gen002/blob/develop/doc/CONTRIBUTING.md#reporting-bugs-and-other-issues +[windows-installation]: https://github.com/metamaps/metamaps_gen002/blob/develop/doc/WindowsInstallation.md From 38f46bd8c40155ec985fc1d10a7c29512c748f31 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Tue, 26 Jan 2016 16:58:15 +0800 Subject: [PATCH 4/9] add jenkins-test.sh script --- bin/jenkins-test.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 bin/jenkins-test.sh diff --git a/bin/jenkins-test.sh b/bin/jenkins-test.sh new file mode 100755 index 00000000..193b109f --- /dev/null +++ b/bin/jenkins-test.sh @@ -0,0 +1,21 @@ +#!/bin/bash -l + +#prerequisites +#sudo aptitude -q -y install libpq-dev + +source "$HOME/.rvm/scripts/rvm" +rvm install $(cat .ruby-version) +rvm gemset use $(cat .ruby-gemset) +gem install bundler + +set -x + +#configure environment +export RAILS_ENV=test +cp .example-env .env +sed -i -e "s/DB_USERNAME='.*'/DB_USERNAME='jenkins'/" .env + +#test +bundle install +rake db:create db:test:prepare +bundle exec rspec From 5ec77b44cd8dc25a690753d1f5378696982733d5 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Tue, 26 Jan 2016 18:54:04 +0800 Subject: [PATCH 5/9] add develop branch build status badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8be8a147..76444337 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ Metamaps ======= [![Join the chat at https://gitter.im/metamaps/metamaps_gen002](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/metamaps/metamaps_gen002?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +![Build Status](https://jenkins.devinhoward.ca/job/metamaps_gen002.develop/badge/icon) Welcome to the Metamaps GitHub repo. From c8d6563f45f22907ff05238fb749336958b76b0d Mon Sep 17 00:00:00 2001 From: poietic Date: Fri, 29 Jan 2016 16:00:30 -0800 Subject: [PATCH 6/9] changed links from old uservoice url. links to support forum were pointed towards our expired custom domain from service, renamed them all so that they link up. --- app/assets/images/.DS_Store | Bin 8196 -> 8196 bytes app/views/layouts/_lightboxes.html.erb | 4 +-- app/views/shared/_cheatsheet.html.erb | 34 ++++++++++++------------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/app/assets/images/.DS_Store b/app/assets/images/.DS_Store index a709ceac29c17d88261eec715123fe19f4265504..5dbe43d02555e42ebdfb413463dfc67feb75069f 100644 GIT binary patch delta 39 vcmZp1XmOa}&&akhU^hP_+h!gCb4Hf5l;Y&g27(9JHnU57W7+&ngq;}x@t-GSbH>e4f@|3(Hi&O#m-xoASw!?R)5Hc500i?50RR91 diff --git a/app/views/layouts/_lightboxes.html.erb b/app/views/layouts/_lightboxes.html.erb index 1ea13866..fbe757c0 100644 --- a/app/views/layouts/_lightboxes.html.erb +++ b/app/views/layouts/_lightboxes.html.erb @@ -142,7 +142,7 @@
  • Google Analytics

Support

-
  • Uservoice *
+
  • Uservoice *
@@ -155,7 +155,7 @@ Firefox Safari <% # TODO https for blog.metamaps.cc %> -

While it's downloading, explore our blog,
watch the tutorials, or visit our knowledge base! +

While it's downloading, explore our blog,
watch the tutorials, or visit our knowledge base! diff --git a/app/views/shared/_cheatsheet.html.erb b/app/views/shared/_cheatsheet.html.erb index 7332a1c7..1f57e6f9 100644 --- a/app/views/shared/_cheatsheet.html.erb +++ b/app/views/shared/_cheatsheet.html.erb @@ -38,7 +38,7 @@

Esc: Hides auto-suggestion results
Enter: create a new topic
Gear Icon: open up metacode settings
- +
@@ -70,7 +70,7 @@ Open 'Context Menu': Right-click/alt+click on topic icon or synapse
*Hide/Remove/Delete topic within context menu
- + @@ -81,7 +81,7 @@
Create new Topic with Synapse: Right-click + drag from topic to open canvas
Enter: Create topic
Enter: Create synapse
- + @@ -94,7 +94,7 @@
Browse synapses / change visible synapse click on arrow icon and select desired synapse
Open 'Context Menu': Right-click/alt-click on Synapse
*Hide/Remove/Delete synapse within context menu
- + @@ -102,7 +102,7 @@
Move around Canvas: Click and drag
Zoom in/out: Scroll OR click on
&
Zoom to see all: Click
OR Ctrl + E
- + @@ -151,42 +151,42 @@

For more information about Metamaps.cc, visit our Knowledge Base or skip directly to a section by clicking on one of the categories below.

From e73ade044291512e44625e6aff8c7c8dde916051 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Fri, 5 Feb 2016 11:29:05 +0800 Subject: [PATCH 7/9] tag v2.7 --- app/views/layouts/_lightboxes.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/_lightboxes.html.erb b/app/views/layouts/_lightboxes.html.erb index fbe757c0..00b923f6 100644 --- a/app/views/layouts/_lightboxes.html.erb +++ b/app/views/layouts/_lightboxes.html.erb @@ -18,7 +18,7 @@

PRIVATE BETA

-

2.6

+

2.7

Nov 29, 2014

From 85290d0e70477c787892886972be376b6266174e Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Tue, 29 Dec 2015 10:47:51 +0800 Subject: [PATCH 8/9] Update CONTRIBUTING.md --- doc/CONTRIBUTING.md | 99 +++++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 48 deletions(-) diff --git a/doc/CONTRIBUTING.md b/doc/CONTRIBUTING.md index 73d2bb58..e7d1eef2 100644 --- a/doc/CONTRIBUTING.md +++ b/doc/CONTRIBUTING.md @@ -1,84 +1,87 @@ # Contributing to Metamaps -Active involvement from the community is essential to help make Metamaps as beneficial for communities as it can be. You can help by reporting bugs, fixing bugs, adding features, contributing new modules and by providing feedback. - +Active involvement from the community is essential to help make Metamaps as +beneficial for communities as it can be. You can help by reporting bugs, fixing +bugs, adding features, contributing new modules and by providing feedback. ## Reporting bugs and other issues If you think you've encountered a bug, do the following: -1. Make sure you are working with the latest version of the Metamaps `master` branch. -2. Browse through the [issues][metamaps-issues] to check if - anyone else has already reported. If someone has, feel free to add more - information to that issue to help us solve it. -3. If no one has yet submitted the issue you are encountering, add it in! Please be sure - to include as much information as possible, include errors, warnings, +1. Make sure you are working with the latest version of the Metamaps `develop` + branch. +2. Browse through the [issues][metamaps-issues] to check if anyone else has + already reported. If someone has, feel free to add more information to that + issue to help us solve it. +3. If no one has yet submitted the issue you are encountering, add it in! Please + be sure to include as much information as possible, include errors, warnings, screenshots, links to a video showing the problem or code that can reproduce the issue. - ## Contributing code -Metamaps is made possible by open source -contributors like you. We're very interested in getting help from the greater -community, but before you start it's important that you become acquainted with -our workflow. Following these guidelines below will make collaboration much -smoother and increase the chances that we will accept your pull request without -hiccups. - +Metamaps is made possible by open source contributors like you. We're very +interested in getting help from the greater community, but before you start it's +important that you become acquainted with our workflow. Following these +guidelines below will make collaboration much smoother and increase the chances +that we will accept your pull request without hiccups. ### Development Process -Our development process is very similar to the approach -described in the well-known article [A Successful Git Branching Model by Vincent -Driessen][git-branching-model]. Here's an overview: +Our development process is very similar to the approach described in the +well-known article [A Successful Git Branching Model by Vincent Driessen +][git-branching-model]. Here's an overview: -* Our `master` branch is the branch upon which - Metamaps developers should be basing their work on. The `master` branch is not guaranteed to be stable. -* All commits intended for `master` should take place on your own personal - fork, and be submitted via pull request when ready. -* Only maintainers can accept pull requests from forks into the core Metamaps.cc - repository. -* Please squash your commits into a single commit before making a pull request. +* The `master` branch is the current base for our deployed instances. This + branch *must* remain stable and always work. +* The `develop` branch is the current state of development. Metamaps + developers base their work on this branch. It is not guaranteed to be + stable. +* All code must be reviewed before being committed to develop or master. This + means all commits should take place on your own personal branch, and + submitted via a Github pull request when ready. +* Only maintainers can accept pull requests from forks into the core + Metamaps.cc repository. ### Getting started 1. Make sure you have a [GitHub account](https://github.com/signup/free) 2. [Fork metamaps][fork-metamaps] -3. Keep your fork up to date. Metamaps is a fast moving project, and things are - changing all the time. It's important that any changes you make are based on - the most recent version of metamaps, since it's possible that something may - have changed that breaks your pull request or invalidates its need. -4. Make sure you have a [Contributor License Agreement](http://caa.metamaps.cc) on file. +3. Keep your fork up to date. Metamaps is a fast moving project, and things + are changing all the time. It's important that any changes you make are + based on the most recent version of metamaps, since it's possible that + something may have changed that breaks your pull request or invalidates it. +4. Make sure you have a [Contributor License Agreement](http://caa.metamaps.cc + ) on file. 5. Read on ... ### Contributor License Agreement Before we can accept any contributions to Metamaps, we first require that all -individuals or companies agree to our Contributor License Agreement (CLA). The e-mail -address used in the pull request will be used to check if a CLA has already been -filed, so be sure to list all email addresses that you might use to submit your -pull requests when filling it out. Our CLA can be found [here](http://caa.metamaps.cc). +individuals or companies agree to our Contributor License Agreement (CLA). The +e-mail address used in the pull request will be used to check if a CLA has +already been filed, so be sure to list all email addresses that you might use to +submit your pull requests when filling it out. [Our CLA can be found here]( +http://caa.metamaps.cc). ### Testing and Linting -TODO - +Please run `rspec` in the Metamaps root directory before submitting your pull +request. ### Branch grouping tokens -All pull requests submitted to Metamaps.cc should occur on a new branch. For these -branches, we at metamaps use a short token indicating the nature of the branch in -question followed by a solidus (`/`) and a kebab-cased string describing the -branch. We are using the following tokens: -**NOTE: Not sure the above is right, but also not sure what to change it to ** +All pull requests submitted to Metamaps.cc should occur on a new branch. For +these branches, please use a short token indicating the nature of the branch in +question followed by a `/` and then a very concise string describing the branch. +This isn't a very important part of the workflow, but we are currently using the +following branch prefixes: - bug // bug fixes - wip // work in progress - feat // feature - -Bug fixes follow a [slightly different format](#bug-fixes). + fix // bug fixes + wip // work in progress (not suitable for a pull request) + instance // (internal) Tracks customizations made to metamaps instances + feature // All other new features ### Bug fixes @@ -87,7 +90,7 @@ If you'd like to contribute a fix for a bug you've encountered, first read up on aware of the issue. By filing the issue first, we may be able to provide you with some insight that guides you in the right direction. -[metamaps-issues]: https://github.com/metamaps/metamaps_gen002/issues +[metamaps-issues]: https://github.com/metamaps/metamaps_gen002/labels/bug [git-branching-model]: http://nvie.com/posts/a-successful-git-branching-model/ [fork-metamaps]: https://github.com/metamaps/metamaps_gen002/fork [cla]: http://metamaps.cc/cla From c80efac7de7c64f9b94d3c6a5e11e7e87be40857 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Fri, 5 Feb 2016 11:32:52 +0800 Subject: [PATCH 9/9] tag v2.8 --- app/views/layouts/_lightboxes.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/_lightboxes.html.erb b/app/views/layouts/_lightboxes.html.erb index 00b923f6..e2c9de50 100644 --- a/app/views/layouts/_lightboxes.html.erb +++ b/app/views/layouts/_lightboxes.html.erb @@ -18,7 +18,7 @@

PRIVATE BETA

-

2.7

+

2.8

Nov 29, 2014