Skip to content

Commit

Permalink
more master => main changes (#8096)
Browse files Browse the repository at this point in the history
  • Loading branch information
jywarren authored Jun 30, 2020
1 parent fafb7df commit f905c7a
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/--weekly-check-in.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Hi everybody! 👏

We all at Public Lab 🎈 - learn, grow, work, brainstorm ideas, contribute together so why not share about our weekly goals and the awesome work we have done at Public Lab with each other, so we can support and collaborate with each other better. We have a Community Check-In each week, where every community member can share something about their work from the past week and about their current week's goal 🎯 . You are also welcome to share fun-fact 😄 , new ideas 💡 , your learning goals ☑️.

We believe in collaborative efforts to support our community. We are running a learning platform which helps a newcomer to become master of tomorrow. 💯
We believe in collaborative efforts to support our community. We are running a learning platform which helps a newcomer to become a leader of tomorrow. 💯

## Title <!-- Apt title for this weeks check-in discussion -->

Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ after_script:

branches:
only:
- master
- main
- unstable
- codecov
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ Learn more about contributing to Public Lab code projects on these pages:

If you are submitting a bug/issue , please go to https://github.com/publiclab/plots2/issues/new

Follow the [First Timers Issue Template](https://github.com/publiclab/plots2/blob/master/.github/first-timers-issue-template.md) for submitting First Timers Only issues.
Follow the [First Timers Issue Template](https://github.com/publiclab/plots2/blob/main/.github/first-timers-issue-template.md) for submitting First Timers Only issues.

Follow this standard [Issue Template](https://github.com/publiclab/plots2/blob/master/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md) for other issues.
Follow this standard [Issue Template](https://github.com/publiclab/plots2/blob/main/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md) for other issues.
6 changes: 3 additions & 3 deletions Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
if ENV['TASK'] == "rails test:system"
message "@#{github.pr_author} Thank you for your pull request! I'm here to help with some tips and recommendations. Please take a look at the list provided and help us review and accept your contribution! And **don't be discouraged if you see errors** -- we're here to help."

message "Your pull request is on the `master` branch. Please [make a separate feature branch](https://publiclab.org/wiki/contributing-to-public-lab-software#A+sample+git+workflow)) with a descriptive name like `new-blog-design` while making PRs in the future." if github.branch_for_head == 'master'
message "Your pull request is on the `main` branch. Please [make a separate feature branch](https://publiclab.org/wiki/contributing-to-public-lab-software#A+sample+git+workflow)) with a descriptive name like `new-blog-design` while making PRs in the future." if github.branch_for_head == 'main'

unless git.commits.any? { |c| c.message =~ /#[\d]+/ } || github.pr_body =~ /#[\d]+/
message "This pull request doesn't link to a issue number. Please refer to the issue it fixes (if any) in the body of your PR, in the format: `Fixes #123`."
Expand All @@ -16,8 +16,8 @@ if ENV['TASK'] == "rails test:system"
warn "New migrations added. Please update `schema.rb.example` by overwriting it with a copy of the up-to-date `db/schema.rb`. Also, be aware to preserve the MySQL-specific conditions for full-text indices."
end

if git.commits.any? { |c| c.message =~ /^Merge branch 'master'/ }
warn "It looks like you merged from master in this pull request. Please [rebase](https://help.github.com/articles/about-git-rebase/) to get rid of the merge commits -- you may want to [rewind the master branch and rebase](https://publiclab.org/wiki/contributing-to-public-lab-software#Rewinding+the+master+branch) instead of merging in from master, which can cause problems when accepting new code!"
if git.commits.any? { |c| c.message =~ /^Merge branch 'main'/ }
warn "It looks like you merged from main in this pull request. Please [rebase](https://help.github.com/articles/about-git-rebase/) to get rid of the merge commits -- you may want to [rewind the main branch and rebase](https://publiclab.org/wiki/contributing-to-public-lab-software#Rewinding+the+main+branch) instead of merging in from main, which can cause problems when accepting new code!"
end

can_merge = github.pr_json["mergeable"]
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ PublicLab.org
[![first-timers-only-friendly](http://img.shields.io/badge/first--timers--only-friendly-blue.svg?style=flat-square)](https://code.publiclab.org#r=all)
[![Join the chat at https://publiclab.org/chat](https://img.shields.io/badge/chat-in%20different%20ways-blue.svg)](https://publiclab.org/chat)
[![Code Climate](https://codeclimate.com/github/publiclab/plots2/badges/gpa.svg)](https://codeclimate.com/github/publiclab/plots2)
[![codecov](https://codecov.io/gh/publiclab/plots2/branch/master/graph/badge.svg)](https://codecov.io/gh/publiclab/plots2)
[![codecov](https://codecov.io/gh/publiclab/plots2/branch/main/graph/badge.svg)](https://codecov.io/gh/publiclab/plots2)
[![View performance data on Skylight](https://badges.skylight.io/typical/GZDPChmcfm1Q.svg)](https://oss.skylight.io/app/applications/GZDPChmcfm1Q)
[![Newcomers welcome](https://img.shields.io/badge/newcomers-welcome-pink.svg)](https://code.publiclab.org) [![GitHub license](https://img.shields.io/github/license/publiclab/plots2?logo=gpl)](https://github.com/publiclab/plots2/blob/master/LICENSE)
[![Newcomers welcome](https://img.shields.io/badge/newcomers-welcome-pink.svg)](https://code.publiclab.org) [![GitHub license](https://img.shields.io/github/license/publiclab/plots2?logo=gpl)](https://github.com/publiclab/plots2/blob/main/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](https://github.com/publiclab/plots2/blob/master/doc/DATA_MODEL.md).
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](https://github.com/publiclab/plots2/blob/main/doc/DATA_MODEL.md).

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](https://github.com/publiclab/plots2/issues/956) 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)](https://publiclab.org/wiki/gsoc), Rails Girls Summer of Code (RGSoC), Outreachy and Google Code-In (GCI).
Some key features include:
Expand All @@ -20,7 +20,7 @@ Some key features include:
* [Wiki editing](https://publiclab.org/wiki) and revision tracking
* Tagging and [topically-based groups and content organization](http://publiclab.org/tags)
* Email notification subscriptions for topics and comments
* A search interface built out of [our growing API](https://github.com/publiclab/plots2/blob/master/doc/API.md)
* A search interface built out of [our growing API](https://github.com/publiclab/plots2/blob/main/doc/API.md)
* A user dashboard [presenting recent activity](https://publiclab.org/dashboard)
* A privacy-sensitive, Leaflet-based [location tagging system](https://github.com/publiclab/leaflet-blurred-location/) and [community map](http://publiclab.org/people)

Expand All @@ -42,7 +42,7 @@ We are developing a draft Roadmap for `plots2` and our broader Public Lab code p
7. [Login](#login)
8. [Testing](#testing)
9. [Maintainers](#maintainers)
10. [API](https://github.com/publiclab/plots2/blob/master/doc/API.md)
10. [API](https://github.com/publiclab/plots2/blob/main/doc/API.md)
11. [Bundle Exec](#bundle-exec)
12. [Reply-by-email](#reply-by-email)
13. [Bugs and Support](#bugs-and-support)
Expand All @@ -69,7 +69,7 @@ Our mutual aims of democratizing inexpensive and accessible do-it-yourself techn

![Diagram](https://user-images.githubusercontent.com/24359/50705765-d84ae000-1029-11e9-9e4c-f166a0c0d5d1.png)

_(Above: draft of our [Data model](https://github.com/publiclab/plots2/blob/master/doc/DATA_MODEL.md))_
_(Above: draft of our [Data model](https://github.com/publiclab/plots2/blob/main/doc/DATA_MODEL.md))_

## Contributing

Expand All @@ -81,7 +81,7 @@ Please read and abide by our [Code of Conduct](https://publiclab.org/conduct); o

## Prerequisites

For installation, prerequisites include sqlite3 and rvm. [Click here for a complete list and instructions](https://github.com/publiclab/plots2/blob/master/doc/PREREQUISITES.md).
For installation, prerequisites include sqlite3 and rvm. [Click here for a complete list and instructions](https://github.com/publiclab/plots2/blob/main/doc/PREREQUISITES.md).

## Installation

Expand Down Expand Up @@ -149,11 +149,11 @@ For more on the login systems, see [this page](https://github.com/publiclab/plot

## Testing

Click [here](https://github.com/publiclab/plots2/blob/master/doc/TESTING.md) for a comprehensive description of testing and [here](SYSTEM_TESTS.md) to learn about system tests.
Click [here](https://github.com/publiclab/plots2/blob/main/doc/TESTING.md) for a comprehensive description of testing and [here](SYSTEM_TESTS.md) to learn about system tests.

## Maintainers

+ See [/doc/MAINTAINERS.md](https://github.com/publiclab/plots2/blob/master/doc/MAINTAINERS.md) for Public Lab's policy on feature maintainers!
+ See [/doc/MAINTAINERS.md](https://github.com/publiclab/plots2/blob/main/doc/MAINTAINERS.md) for Public Lab's policy on feature maintainers!

## How to start and modify cron jobs

Expand All @@ -176,7 +176,7 @@ Adding `bundle exec` ensures you're using the version of passenger you just inst

## Reply-by-email

Public Lab now supports reply by email to comment feature. For more details regarding it go to the [email documentation](https://github.com/publiclab/plots2/blob/master/doc/EMAIL.md)
Public Lab now supports reply by email to comment feature. For more details regarding it go to the [email documentation](https://github.com/publiclab/plots2/blob/main/doc/EMAIL.md)


## Bugs and support
Expand All @@ -187,16 +187,16 @@ For additional support, join the Public Lab website and mailing list at http://p

## Recaptcha

This application uses RECAPTCHA via the recaptcha gem in production only. For more information, click [here](https://github.com/publiclab/plots2/blob/master/doc/RECAPTCHA.md).
This application uses RECAPTCHA via the recaptcha gem in production only. For more information, click [here](https://github.com/publiclab/plots2/blob/main/doc/RECAPTCHA.md).

## Internationalization

Publiclab.org now supports Internationalization and localization, though we are in the initial stages. This has been accomplished with [rails-I8n](https://github.com/svenfuchs/rails-i18n).

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](http://guides.rubyonrails.org/i18n.html).

Translations are arranged in the YAML files [here](https://github.com/publiclab/plots2/tree/master/config/locales), which are
set in a similar way to [views](https://github.com/publiclab/plots2/tree/master/app/views) files. An example for adding translations can be found [here](http://guides.rubyonrails.org/i18n.html#adding-translations).
Translations are arranged in the YAML files [here](https://github.com/publiclab/plots2/tree/main/config/locales), which are
set in a similar way to [views](https://github.com/publiclab/plots2/tree/main/app/views) files. An example for adding translations can be found [here](http://guides.rubyonrails.org/i18n.html#adding-translations).

Since the implementation of our new [Translation system](https://github.com/publiclab/plots2/issues/5737), we now use the `translation()` helper, [found here](https://github.com/publiclab/plots2/blob/438b649669b2029d01437bec9eb2826cf764851b/app/helpers/application_helper.rb#L141-L153). This provides some extra translation features such as inserting a prompt visible to site visitors if no translation exists yet.

Expand All @@ -218,8 +218,8 @@ Help improve Public Lab software!
* Some devs hang out in http://publiclab.org/chat (irc webchat)
* Join our gitter chat at https://gitter.im/publiclab/publiclab
* Try out some supportive tasks https://github.com/publiclab/plots2/wiki/Supportive-Tasks
* Get involved with our weekly community check-ins. For guidelines: [https://github.com/publiclab/plots2/tree/master/doc/CHECKINS.md
](https://github.com/publiclab/plots2/tree/master/doc/CHECKINS.md)
* Get involved with our weekly community check-ins. For guidelines: [https://github.com/publiclab/plots2/tree/main/doc/CHECKINS.md
](https://github.com/publiclab/plots2/tree/main/doc/CHECKINS.md)
* You can help us by opening first timers issues or fto. The template for opening an issue can be found https://docs.google.com/document/d/1dO-CAgModEGM5cOaMmcnBh2pEON0hv_rH3P2ou2r1eE/edit

## First Time?
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def page_not_found
render file: "#{Rails.root}/public/404.html", layout: false, status: :not_found
end

# TODO: make less redundant with https://github.com/publiclab/plots2/blob/master/app/helpers/application_helper.rb#L3
# TODO: make less redundant with https://github.com/publiclab/plots2/blob/main/app/helpers/application_helper.rb#L3
def logged_in_as(roles)
return false unless current_user

Expand Down
16 changes: 8 additions & 8 deletions doc/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,25 +128,25 @@ All the endpoints have the optional parameter `limit` (10 by default) where you

## API code

We are beginning to consolidate API methods into the [srch](https://github.com/publiclab/plots2/blob/master/app/api/srch) namespace, to reduce complexity in the non-API codebase and make the API more predictable and maintainable.
We are beginning to consolidate API methods into the [srch](https://github.com/publiclab/plots2/blob/main/app/api/srch) namespace, to reduce complexity in the non-API codebase and make the API more predictable and maintainable.

API methods are found on the [Search class](https://github.com/publiclab/plots2/blob/master/app/api/srch/search.rb). This Search class is responsible to package the results into a [DocResult](https://github.com/publiclab/plots2/blob/master/app/models/doc_result.rb).
API methods are found on the [Search class](https://github.com/publiclab/plots2/blob/main/app/api/srch/search.rb). This Search class is responsible to package the results into a [DocResult](https://github.com/publiclab/plots2/blob/main/app/models/doc_result.rb).

We also have 3 services that aim to maintain the code more easier to change/maintain:

* [ExecuteSearch](https://github.com/publiclab/plots2/blob/master/app/services/execute_search.rb): responsible to execute the requested endpoint from the params.
* [ExecuteSearch](https://github.com/publiclab/plots2/blob/main/app/services/execute_search.rb): responsible to execute the requested endpoint from the params.

* [SearchCriteria](https://github.com/publiclab/plots2/blob/master/app/services/search_criteria.rb): responsible to validate the params.
* [SearchCriteria](https://github.com/publiclab/plots2/blob/main/app/services/search_criteria.rb): responsible to validate the params.

* [SearchService](https://github.com/publiclab/plots2/blob/master/app/services/search_service.rb): responsible to perform the endpoints queries.
* [SearchService](https://github.com/publiclab/plots2/blob/main/app/services/search_service.rb): responsible to perform the endpoints queries.

We also have a [Planning Issue](https://github.com/publiclab/plots2/issues/3520) if you want to contribute to the API.

## Token based API for creating comment

This feature allows a logged user or bot to post comments via API with a token. You can generate your token to use this feature accessing your Profile on https://publiclab.org/profile/your-username (just make sure you are logged in).

This API method can be found [here](https://github.com/publiclab/plots2/blob/master/app/controllers/comment_controller.rb#L48-L73). You can see how to use this below:
This API method can be found [here](https://github.com/publiclab/plots2/blob/main/app/controllers/comment_controller.rb#L48-L73). You can see how to use this below:

* **URL**: `/comment/create/token/id.:format`
* **Method:** `POST`
Expand Down Expand Up @@ -198,7 +198,7 @@ This API method can be found [here](https://github.com/publiclab/plots2/blob/mas

### RSS feeds

RSS feeds can be found [here](https://github.com/publiclab/plots2/blob/master/app/views/tag/rss.rss.builder).
RSS feeds can be found [here](https://github.com/publiclab/plots2/blob/main/app/views/tag/rss.rss.builder).

* Authors: https://publiclab.org/feed/authorname.rss
* Tagged notes: https://publiclab.org/feed/tag/tagname.rss
Expand All @@ -217,4 +217,4 @@ To these last, you can do a wildcard tag search using the `*` character, like th

* https://publiclab.org/tag/event:*.json

Several tag-based JSON/XML listings are generated [directly from controllers](https://github.com/publiclab/plots2/blob/master/app/controllers/tag_controller.rb#L97-L108), as alternate responses to various requests, ending in `.json` or `.xml`.
Several tag-based JSON/XML listings are generated [directly from controllers](https://github.com/publiclab/plots2/blob/main/app/controllers/tag_controller.rb#L97-L108), as alternate responses to various requests, ending in `.json` or `.xml`.
2 changes: 1 addition & 1 deletion doc/DATA_MODEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Answers are similar to Comments, but are used in Question-type Notes, and may ea
Our primary user type is User. Users can login via email using the [Authlogic gem (a simple ruby authentication
solution)](https://github.com/binarylogic/authlogic). Also, recently we have added the option to login via Twitter, Github, Facebook and Google using the
[Omniauth gem](https://github.com/publiclab/plots2/blob/master/doc/Omniauth.md).
[Omniauth gem](https://github.com/publiclab/plots2/blob/main/doc/Omniauth.md).
Users each have a profile at `/profile/USERNAME`, which displays content stored in the `user.bio` text field.
Expand Down
Loading

0 comments on commit f905c7a

Please sign in to comment.