Commit 4b324ac7 authored by Igor Steinmacher's avatar Igor Steinmacher

Merge branch 'development' into 'master'

Bringing fixes from development

See merge request !59
parents 397f824b d0e0ead4
Pipeline #76283357 passed with stage
in 7 minutes and 15 seconds
image: ruby:2.3
image: ruby:2.4
before_script:
- apt-get install imagemagick -y
- apt-get update -qq && apt-get install -y -qq sqlite3 libsqlite3-dev nodejs
- ruby -v
- which ruby
- gem install bundler --no-documentation
- gem install bundler --no-document
- bundle update
- bundle install --jobs $(nproc) "${FLAGS[@]}"
test:
......
......@@ -3,7 +3,7 @@ gem 'rails', '~> 5.0.0'
gem 'savon'
gem 'activeresource', github: 'rails/activeresource', branch: 'master'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
gem 'sqlite3', '~> 1.3.6'
#Login Authorization
gem 'omniauth-facebook'
gem 'omniauth-twitter'
......
GIT
remote: git://github.com/rails/activeresource.git
revision: 44c1325eb5a2aa4dd760c73ec6116a2184c600b5
branch: master
specs:
activeresource (5.0.0)
activemodel (>= 5.0, < 7)
activemodel-serializers-xml (~> 1.0)
activesupport (>= 5.0, < 7)
GIT
remote: https://github.com/activeadmin/inherited_resources
revision: 652686148f554fb9ce0ebee5d857b3d3decc0272
......@@ -18,6 +8,16 @@ GIT
railties (>= 4.2, <= 5.2)
responders
GIT
remote: https://github.com/rails/activeresource.git
revision: 64cedae3019f022a301aad301dc3b7984bb3a153
branch: master
specs:
activeresource (5.1.0)
activemodel (>= 5.0, < 7)
activemodel-serializers-xml (~> 1.0)
activesupport (>= 5.0, < 7)
GEM
remote: https://rubygems.org/
specs:
......@@ -371,11 +371,11 @@ DEPENDENCIES
savon
simple_form
spring
sqlite3
sqlite3 (~> 1.3.6)
summernote-rails (= 0.8.1.0)
therubyracer
turbolinks
uglifier
BUNDLED WITH
1.16.2
2.0.2
......@@ -6,6 +6,8 @@ about existing projects in a standardized way, making it easier for newcomer to
FLOSSCoach portal has individual project pages, foruns and messages where you can exchange relevant information about OSS with newcomers so they can start contributing
You can use FLOSScoach by accessing [www.flosscoach.com](http://www.flosscoach.com)
## Technologies used to build
FLOSScoach is build using:
......@@ -14,7 +16,12 @@ FLOSScoach is build using:
- [GitLab CI](https://about.gitlab.com/product/continuous-integration/)
## Want to help?
Want to contribute and not sure how to start? Please read the [Contribute.md](contribute.md)
Want to contribute and not sure how to start?
Although this is a software project, we welcome contributions with *documentation* (README, Contribution files, for example), simples *typo fixes*, *new issue* reports and *feature requests*.
Please read the **[contributing guidelines](contribute.md)** to find more about creating issues,
finding tasks, editing documentation, setting up the environment, contributing with code.
We are happy to welcome new contributors.
......@@ -25,21 +32,19 @@ Want to code? So, we try to follow [Rails-Style-Guide](https://github.com/ruboco
Want to understand the deployment process? Check our (Deploying.md)
### Build status
![Gitlab pipeline status](https://img.shields.io/gitlab/pipeline/flosscoach/flosscoach.svg)
![Gitlab pipeline status](https://img.shields.io/gitlab/pipeline/flosscoach/flosscoach.svg)
(The Build pipeline is faulty. The pipeline needs to be fixed. If you have the skills to do, your contribution is more than welcome)
## Authors and contacts
FLOSScoach was idealized as part of a research. The main contact points are:
- Igor Steinmacher @igorsteinmacher (igor.steinmacher [a] nau [] edu)
- Igor Wiese @igorwiese (igor [a] utfpr [] edu [] br)
- Felipe Fronchetti @fronchetti (fronchetti [a] usp [] br)
- Marco Gerosa (marco.gerosa [a] nau [] edu))
- Igor Steinmacher @igorsteinmacher (email: igor.steinmacher [a] nau [] edu)
- Igor Wiese @igorwiese (email: igor [a] utfpr [] edu [] br)
- Felipe Fronchetti @fronchetti (email: fronchetti [a] usp [] br)
- Marco Gerosa (email: marco.gerosa [a] nau [] edu))
Feel free to contact us, or to mention one of us in the issue tracker
Other developers, students, and colleagues also contributed to the project. We are thankful to all of them (https://gitlab.com/flosscoach/flosscoach/-/graphs/master)
......@@ -2,134 +2,67 @@
FLOSScoach is built as an academic effort to provide better organization to support newcomers.
We appreciate any community support, helping us with the following steps, interesting ideas,
bug fixing, document improvement. In summary, there are many ways you can support our community.
These are some of the options if you want to support us:
First, if you found something or had an idea:
- [File an issue (bug report or new feature request)](#file-an-issue)
- [Help us coding: adding features or fixing bugs](#help-us-with-code)
If you want to fix something already reported. You may first [find an issues to work with](#find-an-issue). You may find tasks related to:
- [Work on GitLab documentation](#work-on-documentation)
- [Help us coding: adding features or fixing bugs](#help-us-with-code)
# File an issue
## File an issue
- Did you find any problem while using FLOSScoach?
- Do you have any great idea of new feature that would make FLOSScoach nicer?
Don't keep it to yourself. Please let us know! Reporting issues and providing feature requests are one of the things that makes Open Source amazing.
Please help us by creating a new issue report in our GitLab repository (either bug report or feature request).
To do so, go to the list of issues in our GitLab page, create a ``New Issue'' and provide as much details as you can in your report.
Remember to stay tuned in your issue to provide more details as requested by other members in the follow up comments.
# Help us with code
Hi! if you're willing to contribute with code to **FLOSScoach** these are the simple setps you must follow to get your local machine ready for development. Tough easy and simple, these steps are estimated to take up to 30min.
## Step 0 - OS
We're focusing here on the Linux operational system (Ubuntu, Mint and other distributions) . Steps may vary in case of MacOS or Windows.
## Step 1- Rails Dependencies dependencies
There are some core dependencies that must be installed for the framework *Ruby on Rails* in which *FLOSScoach* is built on top of.
To do so:
1. go to the [issue list](https://gitlab.com/mariamgui/flosscoach-ia/issues) in our GitLab page
2. create a "New Issue" (Green button in the top left) and
3. provide as much details as you can in your report.
### 1.1 Adding Node.js and Yarn repositories
Running the following command will add NOde.js and Yarn repositories to your machine:
```bash
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
Remember to stay tuned in your issue to provide more details as requested by other members in the follow up comments.
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs yarn
```
## Find an issue
If you want to contribute fixing something that has already been reported, you should:
### 1.2 Installing Ruby through rbenv
rbenv (Ruby virtual environment) is a good, stable and simple way of installing the Ruby programming language interpreter. Here's how to do it:
'''
```bash
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
rbenv install 2.3
rbenv global 2.3
ruby -v
```
Please note that we're installing Ruby version 2.3
1. Take a look in our [issue list](https://gitlab.com/mariamgui/flosscoach-ia/issues)
2. Look for labels to guide you (bug, documentation, good for newcomers, etc.)
3. Find something that fits your goals or is appropriate for you
4. Ask for more details or inform the commuinity that you are interested in working with the issue (as a comment)
### 1.3 - Installing Bundler
Bundler is the last dependencie. SImply execute a
```bash
gem install bundler
```
and it's all done.
## Work on documentation
Another nice and easy way to start contributing to the project is by fixing issues or adding information to our documentation.
To do so, you just need to
1. navigate to the desired file (in this project they are usually markdown -- .md -- files);
2. edit in the GitLab editor (clicking the "Edit" button in the top-left corner of the file content);
- You will probably be requested to create a fork. Go ahead and do that (want to learn more about forks? It is a copy of the repository to your account. More? [Click here](https://docs.gitlab.com/ee/gitlab-basics/fork-project.html#how-to-fork-a-project))
3. edit the file and submit your merge request following the GitLab workflow (want to know more about the merge request workflow? [Click here](https://docs.gitlab.com/ee/gitlab-basics/add-merge-request.html)
4. your changes will be reviewed before going to production (and some changes may be required later)
## Step 2- Configuring Git
Version control is quintessential while contributing to open source projects and working with code in general. Here's how to set your *Git* configurations:
```bash
git config --global color.ui true
git config --global user.name "Insert your name here"
git config --global user.email "yourEmailAdress@here.com"
```
You might want to use the same email as the one used for yout Github/lab account.
## Help us with code
## Step 3 - Installing Node.js and Rails
```bash
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
```
```bash
gem install rails -v 5.2.1
```
Hi! if you're willing to contribute with code to **FLOSScoach**,
in addition to [find a task to contribute to](#find-an-issue), you will need to
**set up the project workspace on your local machine**, so you can make the appropriate
changes to the codebase.
We provide a simple set of steps you must follow to get your local machine ready for development.
Choose your Operating System:
- [Linux](workspace_setup_linux.md)
- [Mac](workspace_setup_mac.md)
- Windows -- Not available (Want to help us? Fix the [issue 149](https://gitlab.com/mariamgui/flosscoach-ia/issues/149), creating a step-by-step for setting up FLOSScoach in a Windows box)
## Step 4 - Database: Setting up Sqlite3 and Postgre SQL
Installing Postgre SQL can be done with the following commands:
```bash
sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-common
sudo apt-get install postgresql-9.5 libpq-dev
```
Lastly, you need to set an user and password so then *FLOSScoach* database setup will be albe to explore and modify the development database
```bash
# python is the username in the development set up.
sudo -u postgres createuser python -s
```
It's important to jnow that the default development password is **python** and you must set it just like this
```bash
# Setting password for the user named python:
sudo -u postgres psql
\password python
# And you will be prompted to type the new password
```
In case you want different user/passoword just be sure to match these with
the present in the *config/database.yml* file
**Though easy and simple, these steps are estimated to take up to 30min.**
## Step 5 - Cloning the FLOSScoach repository
Now that everything is ready, it's time to clone the repository of the project to run your local development server and start contributing
```bash
cd ~
# Cloning the development branchcan be done like so: git clone -b <branch> <remote_repo>
git clone -b development https://gitlab.com/flosscoach/flosscoach.git
#Navigate to the newly created repository clone:
cd flosscoach
```
Some final small adjustments:
```bash
rake db:migrate RAILS_ENV=development
rails server -p 8000
```
Finally done!! See your local server running on [localhost:8000](http://localhost:8000)
After that, hands on! Make your changes locally...
## Step 6 - Merging your contributions
After you have finished writting some code these are the steps for adding your contribution to FLOSScoach:
### Submitting your changes
After you have finished writting some code, or changings so these are the steps for adding your contribution to FLOSScoach:
### Step 6.1 - Add changes to GitLab
#### Add changes to git
```bash
#cd to the project directory
cd flossccoach
......@@ -141,8 +74,8 @@ git commit -m "Insert commit message here"
git push origin development
#You will be prompted to insert your Gitlab login credentials then
```
### Step 6.2 Merging changes
To merge the changes you've done on development to master branch you can follow the excelent instructions from [Gitlab official docs](https://docs.gitlab.com/ee/gitlab-basics/add-merge-request.html).
### Merging changes
To merge the changes you've done to the master branch of FLOSScoach project you can follow the excelent instructions
from [Gitlab official docs](https://docs.gitlab.com/ee/gitlab-basics/add-merge-request.html).
It's quite simple to be done.
FactoryBot.define do
factory :category do
name "MyString"
name {"MyString"}
end
end
FactoryBot.define do
factory :comment do
content "A simple content of a comment."
content {"A simple content of a comment."}
user
widget
end
......
FactoryBot.define do
factory :default_tip do
title "MyString"
content "MyText"
widget_slug "MyString"
title {"MyString"}
content {"MyText"}
widget_slug {"MyString"}
end
end
FactoryBot.define do
factory :open_hub_datum, class: 'OpenHubData' do
open_hub_id 1
name "MyString"
url "MyString"
description "MyText"
homepage_url "MyString"
logo_url "MyString"
vanity_url "MyString"
download_url "MyString"
open_hub_id {1}
name {"MyString"}
url {"MyString"}
description {"MyText"}
homepage_url {"MyString"}
logo_url {"MyString"}
vanity_url {"MyString"}
download_url {"MyString"}
end
end
FactoryBot.define do
factory :ownership_request do
user_id 1
project_id 1
approved false
user_id {1}
project_id {1}
approved {false}
end
end
FactoryBot.define do
factory :project do
sequence(:name) { |n| "Project #{n}"}
description "A simple project description."
description {"A simple project description."}
forum
end
end
FactoryBot.define do
factory :tag do
name "MyString"
name {"MyString"}
end
end
FactoryBot.define do
factory :topic do
sequence(:title) { |n| "Title of a Topic #{n}"}
locked false
locked {false}
forum
user
end
......
FactoryBot.define do
factory :user do
sequence(:name) { |n| "User #{n}"}
birth "04/11/1995"
birth {"04/11/1995"}
sequence(:email) { |n| "email#{n}@gmail.com"}
sequence(:username) {|n| "username#{n}"}
email_confirmed true
email_confirmed {true}
password {"password123"}
end
......
FactoryBot.define do
factory :widget do
sequence(:title) { |n| "Title widget #{n}"}
tab "about"
pos_x 0
pos_y 0
width 0
height 0
content "Random content."
tab {"about"}
pos_x {0}
pos_y {0}
width {0}
height {0}
content {"Random content."}
project
end
end
# Setup FLOSScoach in your Linux machine (Debian-based)
## Step 1- Rails Dependencies dependencies
First, there are some core dependencies that must be installed for the framework *Ruby on Rails* (a web framework for rails)
in which *FLOSScoach* is built on top of.
All the following commands need to be executed in the command line terminal of your machine.
### 1.1 Adding Node.js and Yarn repositories
First, we will need to install many dependencies that our application rely on.
To do so, we first need to add Node.js and Yarn package repositories to our repository list:
```bash
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
```
Then, we need to install the development libraries listed below:
```bash
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs yarn
```
### 1.2 Installing Ruby through rbenv
We will install and manage our Ruby version by using rbenv (Ruby virtual environment).
rbenv is a good, stable and simple way of installing the Ruby programming language interpreter.
Here's how to install it using your command line terminal:
'''
```bash
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
rbenv install 2.3
rbenv global 2.3
ruby -v
```
Please note that we're installing Ruby version 2.3
### 1.3 - Installing Bundler
Bundler is the last dependency.
Bundler is used to manage ruby on rails application's dependencies
by installing all the required gems listed for the project.
To install it, you need to execute:
```bash
gem install bundler
```
and it's all done.
## Step 2 - Installing Node.js and Rails
Straight to the point now, we need to make sure that our frameworks are installed.
FLOSScoach is built on the top of Node.js (a platform that enables running javascript on server-side) and
Ruby on Rails (a web framework for Rails)
To install them, execute the following:
```bash
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
```
```bash
gem install rails -v 5.4.0
```
## Step 3 - Database: Setting up PostgreSQL
For our development environment, we use PostgreSQL. Installing PostgreSQL can be done with the following commands:
```bash
sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-common
sudo apt-get install postgresql-9.5 libpq-dev
```
You need to set an user and password so then *FLOSScoach* database setup will be albe to explore and modify the development database
```bash
# python is the username in the development set up.
sudo -u postgres createuser python -s
```
It's important to jnow that the default development password is **python** and you must set it just like this
```bash
# Setting password for the user named python:
sudo -u postgres psql
\password python
# And you will be prompted to type the new password
```
In case you want different user/passoword just be sure to match these with
the present in the *config/database.yml* file
## Step 4 - Getting ready to submit changes: setup your local git
Version control is quintessential while contributing to open source projects and working with code in general.
Here's how to set your *Git* configurations to identify yourself in the repository:
```bash
git config --global color.ui true
git config --global user.name "Insert your name here"
git config --global user.email "yourEmailAdress@here.com"
```
You might want to use the same email as the one used for yout GitLab account.
## Step 5 - Cloning the FLOSScoach repository
Now that everything is ready, it's time to clone the repository of the project to run your local development server and start contributing
```bash
cd ~
# Cloning the development branchcan be done like so: git clone -b <branch> <remote_repo>
git clone -b development https://gitlab.com/flosscoach/flosscoach.git
#Navigate to the newly created repository clone:
cd flosscoach
```
Some final small adjustments:
```bash
rake db:migrate RAILS_ENV=development
rails server -p 8000
```
Finally done!! See your local server running on [localhost:8000](http://localhost:8000)
# Set up your workspace using a Mac
## Step 0 - OS / libraries
We're focusing here on MacOS.
Make sure that your MacOS is up-to-date, as well as your Xcode app (you can install it via App Store).
All the steps below need to be executed in a **command line terminal**.
## Step 1 - Install HomeBrew
Homebrew is an open source software package management system that simplifies the installation of software on macOS operating system.
To install it, run the following:
```bash
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```
## Step 2 - Install Ruby via renv
We will install and manage our Ruby version by using rbenv (Ruby virtual environment).
rbenv is a good, stable and simple way of installing the Ruby programming language interpreter.
Here's how to install it using your command line terminal:
```bash
brew install rbenv ruby-build
ruby -v
```
Please note that we're installing Ruby version 2.4.0.
If this is not the version you are running, please do:
```bash
rbenv install 2.4.0
rbenv global 2.4.0
```
Also run the following to avoid permission issues:
```bash
rbenv init
eval "$(rbenv init -)"
```
## Step 3 - Installing Bundler and Rails
Straight to the point now, we need to make sure that our frameworks are installed.
FLOSScoach is built on the top of Node.js (a platform that enables running javascript on server-side) and
Ruby on Rails (a web framework for Rails):
```bash
gem install bundler
gem install rails -v 5.2.1
```
## Step 4 - Database: Installing and setting up PostgreSQL
For our development environment, we use PostgreSQL. Installing PostgreSQL (in the version used in FLOSScoach) can be done with the following command:
```bash
brew install postgresql@9.5
```
Now...You need to have postgres up and running
```bash
export PATH="/usr/local/opt/postgresql@9.5/bin:$PATH"
brew services start postgresql@9.5
```
Lastly, you need to set a DB user and password so then *FLOSScoach* database setup will be able to explore and modify the development database
```bash
# python is the username (and the password) in the development set up.
createuser python -s -P
[It will prompt to enter a password: use python]
```
**AGAIN:** It is important to know that the default development password is **python** and you must set it just like this.
In case you want different user/passoword just be sure to match these with the present in the *config/database.yml* file in your project
## Step 5 - Setup you git (maybe this is already set on your machine)
Let's get our git set, to be ready to submit any contributions.
```bash
git config --global color.ui true
git config --global user.name "Insert your name here"
git config --global user.email "yourEmailAdress@here.com"
```
You might want to use the same email as the one used for yout GitLab account.
## Step 6 - Cloning the FLOSScoach repository
Now that everything is ready, it's time to clone the repository of the project to run your local development server and start contributing
```bash
cd ~
# Cloning the development branchcan be done like so: git clone -b <branch> <remote_repo>
git clone -b development https://gitlab.com/flosscoach/flosscoach.git
#Navigate to the newly created repository clone:
cd flosscoach
```
## Step 7 - MAKE IT RUN!!!
Let's get it on
```bash
bundle install
rake db:migrate RAILS_ENV=development
rails server -p 8000
```
Finally done!! See your local server running on [localhost:8000](http://localhost:8000)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment