Skip to content
a collaborative knowledge-exchange platform in Rails; we welcome first-time contributors! 🎈
Ruby HTML JavaScript CSS Makefile Dockerfile
Branch: master
Clone or download

Latest commit

dependabot-preview Bump omniauth-github from 1.3.0 to 1.4.0
Bumps [omniauth-github](https://github.com/intridea/omniauth-github) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/intridea/omniauth-github/releases)
- [Commits](omniauth/omniauth-github@v1.3.0...v1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Latest commit a8ce8ec Feb 11, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.dependabot Keep yarn updated with dependabot Feb 13, 2019
.github Create MAINTAINERS.md for feature maintainers (#7271) Jan 28, 2020
app I have updated translation on users/photo (#7779) Apr 3, 2020
bin Development script for quick and reliable setup (#2395) Mar 12, 2018
config Add capybara wait time on tests (#7568) Feb 28, 2020
containers Make test screenshots only upload from system test process in Travis (#… Jun 26, 2019
db changing column type in csvfiles (#6192) Aug 22, 2019
doc Create MAINTAINERS.md for feature maintainers (#7271) Jan 28, 2020
lib Update related_and_hyphenated_terms.dict.txt (#5503) Apr 17, 2019
public New homepage design (#6497) Nov 20, 2019
script turn off begin/rescue loop in mailman_server script (#5840) Jun 5, 2019
spec Likes Fix (button mashing and initial negative likes) (#4852) Mar 16, 2019
static Update style.css (#7102) Jan 13, 2020
test Modify toast message to be more user friendly for tag follow (#7761) Apr 2, 2020
vendor/assets rake tasks nicely failing Apr 4, 2013
.codeclimate.yml Fix NoMethodError: undefined method +status+ for nil:NilClass (#5028) Mar 12, 2019
.dockerignore Upgrade to Ruby 2.4.4 (fixes #2824) (#3253) Aug 27, 2018
.eslintignore Add code coverage (#1193) Jan 24, 2017
.eslintrc Added debounce for typeahead search optimization (#4904) Mar 9, 2019
.gitignore Add package.json, package-lock and test.sqlite-journal to gitingore #… Nov 8, 2019
.gitlab-ci.yml Use js libs from container in testing (#3306) Mar 31, 2019
.rubocop.yml Complete some Rubocop todo items (#5057) Mar 13, 2019
.rubocop_shopify_styleguide.yml Tiny refactor (#5779) May 24, 2019
.rubocop_todo.yml Complete some Rubocop todo items (#5057) Mar 13, 2019
.simplecov Remove coveralls, add codecov (#5954) Jan 2, 2020
.travis.yml Map Popups (#7715) Mar 26, 2020
.yarnrc Move yarn configuration into yarnrc (#3775) Oct 26, 2018
CODE_OF_CONDUCT.md Update CODE_OF_CONDUCT.md as per new revision (#6235) Sep 3, 2019
CONTRIBUTING.md fixed the broken link in readme (#5219) Mar 21, 2019
Dangerfile Make test screenshots only upload from system test process in Travis (#… Jun 26, 2019
Dockerfile Add capybara wait time on tests (#7568) Feb 28, 2020
Gemfile Bump omniauth-github from 1.3.0 to 1.4.0 Apr 3, 2020
Gemfile.lock Bump omniauth-github from 1.3.0 to 1.4.0 Apr 3, 2020
LICENSE adding license file Feb 23, 2015
Makefile Put yarn before precompile step (#4968) Mar 9, 2019
README.md DOCUMENT: System Tests (#7378) Feb 4, 2020
Rakefile Remove coveralls, add codecov (#5954) Jan 2, 2020
SYSTEM_TESTS.md DOCUMENT: System Tests (#7378) Feb 4, 2020
codecov.yml Shipcy banned users (#7181) Jan 10, 2020
config.ru Rails 5.0 upgrade (#2726) (#2783) Jun 7, 2018
install_cloudnine.sh Remove yarn installs (#5060) Mar 18, 2019
nodesource.gpg.key Trim container build process. (#5730) May 21, 2019
package.json bumped versions of LEL and others (#7771) Mar 31, 2020
scroll-func.js Scroll top fix @publiclab (#6944) Jan 3, 2020
start.sh Trim container build process. (#5730) May 21, 2019
yarn.lock bumped versions of LEL and others (#7771) Mar 31, 2020

README.md

PublicLab.org

Code of Conduct Build Status first-timers-only-friendly Join the chat at https://publiclab.org/chat Code Climate codecov View performance data on Skylight Newcomers welcome GitHub license

The content management system for the Public Lab research community, the plots2 web application is a combination of a group research blog of what we call "research notes" and a wiki. Read more about the data model here.

It showcases a variety of features that help the Public Lab community collaborate on environmental technology design and documentation, as well as community organizing. Originally a Drupal site, it was rewritten in 2012 in Ruby on Rails and has since extended but not yet entirely replaced the legacy Drupal data model and database design. We ❤️ Open Source and actively participate in various OSS programs such as Google Summer of Code(GSoC), Rails Girls Summer of Code (RGSoC), Outreachy and Google Code-In (GCI). Some key features include:

Roadmap

We are developing a draft Roadmap for plots2 and our broader Public Lab code projects; read more and comment here.

Table of Contents

  1. What Makes This Project Different
  2. Data model
  3. Contributing
  4. Prerequisites
  5. Installation
  6. SSL in Development
  7. Login
  8. Testing
  9. Maintainers
  10. API
  11. Bundle Exec
  12. Reply-by-email
  13. Bugs and Support
  14. Recaptcha
  15. Internationalization
  16. Security
  17. Developers
  18. First Time?

What makes this project different

The people who create our platform make very different design and technology decisions from other projects, and this stems from our deep belief that, to see a change in the world, we must build and maintain systems that reflect our values and principles.

From design to system architecture to basic vocabulary and communication patterns, our systems have grown organically since 2010 to support a powerful, diverse, and cooperative network of people capable of taking on environmental problems that affect communities around the world. The platform we have built together speaks to this shared history in many ways, big and small. It reflects input from people facing serious health issues, on-the-ground organizers, policy specialists, hardware hackers, educators, and civil servants.

This broad community, and the Public Lab team have facilitated a space where we can discuss, break down, construct, prototype, and critique real-world projects. Together we have shaped a platform that incorporates familiar pieces, but ultimately looks and feels quite different from anywhere else on the internet. Our platform continues to grow and be refined, but it also reflects a commitment to listening to one another, to mutual respect and support, to an awareness of the barriers and challenges presented by gaps in expertise and knowledge, and a sensitivity to the inequalities and power imbalances perpetuated by many mainstream modes of knowledge production and technological and scientific development.

Our mutual aims of democratizing inexpensive and accessible do-it-yourself techniques has allowed us to create a collaborative network of practitioners who actively re-imagine the human relationship with the environment. Our goals are supported and facilitated by a system which questions and even challenges how collaborative work can happen.

Data Model

Diagram

(Above: draft of our Data model)

Contributing

We welcome contributions, and are especially interested in welcoming first time contributors. Read more about how to contribute below! We especially welcome contributions from people belonging to groups under-represented in free and open source software!

Code of Conduct

Please read and abide by our Code of Conduct; our community aspires to be a respectful place both during online and in-­person interactions.

Prerequisites

For installation, prerequisites include sqlite3 and rvm. Click here for a complete list and instructions.

Installation

Installation for Cloud9

For information on how to install for use with the cloud environment, please see here.

Standard Installation

  1. Fork our repo from https://github.com/publiclab/plots2.
  2. In the console, download a copy of your forked repo with git clone https://github.com/your_username/plots2.git where your_username is your GitHub username.
  3. Enter the new plots2 directory with cd plots2.
  4. Steps to install gems:
    • You may need to first run bundle install if you have older gems in your environment from previous Rails work. If you get an error message like Your Ruby version is 2.x.x, but your Gemfile specified 2.4.4 then you need to install the ruby version 2.4.4 using rvm or rbenv.
      • Using rvm: rvm install 2.4.4 followed by rvm use 2.4.4
      • Using rbenv: rbenv install 2.4.4 followed by rbenv local 2.4.4
    • Install gems with bundle install --without production mysql from the rails root folder, to install the gems you'll need, excluding those needed only in production.
  5. Run cp db/schema.rb.example db/schema.rb to make a copy of db/schema.rb.example in db/schema.rb.
  6. Run cp config/database.yml.sqlite.example config/database.yml to make a copy of config/database.yml.sqlite.example in config/database.yml.
  7. Run rake db:setup to set up the database
  8. Install static assets (like external javascript libraries, fonts) with yarn install
  9. By default, start rails with passenger start from the Rails root and open http://localhost:3000 in a web browser. (for local SSL work, see SSL below)
  10. Wheeeee! You're up and running! Log in with test usernames "user", "moderator", or "admin", and password "password".
  11. Run rails test to confirm that your install is working properly. Or rails test:system for system tests.

Windows Installation

We recommend you either work in a virtual environment, or on a dual booted system to avoid dependencies issues and also Unix system works smoother with Ruby and Rails. This will not only benefit you now for plots2, but also in future while working on other Ruby projects, a Linux or Mac based OS will make your development so much smoother.

  1. Dual Booting, option2, video guide
  2. Setting up a linux virtual env

Redis Installation

Public Lab uses Redis and may be required for some functionality when running the application locally.

  1. Install Redis if you haven't already:
  • Using MacOS: brew install redis
  • Using Linux: sudo yum -y install redis
  1. Run Redis server:
  • Using MacOS: brew services start redis
  • Using Linux: redis-server
  1. Run SideKiq: bundle exec sidekiq
  2. If SideKiq started correctly Redis is now configured and working!

SSL in Development

We, at Public Lab use openssl gem to provide SSL (Secure Sockets Layer) for the secure connection in the development mode. You can run the https connection on the localhost by following the following steps:

  1. Use passenger start --ssl --ssl-certificate config/localhost.crt --ssl-certificate-key config/localhost.key --ssl-port 3001.
  2. Open up https://localhost:3001.
  3. Add security exceptions from the advance settings of the browser. You can also use http (unsecure connection) on the port number 3000 by going to 'http://localhost:3000'. We use port number 3001 for 'https' and port number 3000 for 'http' connection. Secure connection is needed for OAuth authentication etc.

Login

Once you complete the installation, use any of these credentials to login in to the PL website in your local development / testing environment to gain additional permissions for only logged in users. Each one comes with its own set of permissions, but besides that the experience across them is pretty much the same.

username: admin, moderator, or user

password: password

For more on the login systems, see this page

Testing

Click here for a comprehensive description of testing and here to learn about system tests.

Maintainers

How to start and modify cron jobs

  1. We are using Whenever gem to schedule cron jobs.
  2. All the cron jobs are written in easy ruby syntax using this gem and can be found in config/schedule.rb.
  3. Go to the config/schedule.rb file to create and modify the cron jobs.
  4. Click here to know about how to write cron jobs.
  5. After updating config/schedule.rb file run the command whenever --update-crontab to update the cron jobs.
  6. To see the installed list of cron jobs use command crontab -l
  7. For more details about this gem, visit the official repository of whenever gem.

Bundle exec

For some, it will be necessary to prepend your gem-related commands with bundle exec. For example, bundle exec passenger start. Adding bundle exec ensures you're using the version of passenger you just installed with Bundler. bundle exec rake db:setup, bundle exec rake db:seed are other examples of where this might be necessary.

Reply-by-email

Public Lab now supports reply by email to comment feature. For more details regarding it go to the email documentation

Bugs and support

To report bugs and request features, please use the GitHub issue tracker provided at https://github.com/publiclab/plots2/issues

For additional support, join the Public Lab website and mailing list at http://publiclab.org/lists or for urgent requests, email web@publiclab.org

Recaptcha

This application uses RECAPTCHA via the recaptcha gem in production only. For more information, click here.

Internationalization

Publiclab.org now supports Internationalization and localization, though we are in the initial stages. This has been accomplished with rails-I8n.

To see it in action, click on the 'Language' drop-down located in the footer section of the page. All the guidelines and best practices for I18n can be found here.

Translations are arranged in the YAML files here, which are set in a similar way to views files. An example for adding translations can be found here.

To add new languages or for additional support, please write to plots-dev@googlegroups.com

Security

To report security vulnerabilities or for questions about security, please contact web@publiclab.org. Our Web Working Group will assess and respond promptly.

Developers

Help improve Public Lab software!

First Time?

New to open source/free software? Here is a selection of issues we've made especially for first-timers. We're here to help, so just ask if one looks interesting : https://code.publiclab.org

Here is a link to our Git workflow.

Let the code be with you.

Happy opensourcing. 😄


Platforms that ❤️ OSS

Twitter Follow

You can’t perform that action at this time.