Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • portalmec/portalmec
  • rfhferreira/cleanning-portalmec
2 results
Show changes
Commits on Source (2857)
Showing with 1151 additions and 123 deletions
attributes:
- content
- foreign_key
- inheritance
disconnected: true
filename: erd
filetype: pdf
indirect: true
inheritance: true
markup: true
notation: bachman
orientation: horizontal
polymorphism: false
sort: true
warn: true
title: PortalMEC
exclude: null
only: null
prepend_primary: false
......@@ -22,6 +22,10 @@ Gemfile.lock
/public/assets
/config/orientdb.yml
/config/dspace.yml
/shared/*
dump.rdb
/public/system/*
# ignore server scripts
puma.sh
start_puma.sh
......@@ -30,3 +34,7 @@ portalmec.service
portalmec-sidekiq.service
sidekiq.sh
autocomplete-server.service
# ignore configs
/config/database.yml
/config/sidekiq.yml
\ No newline at end of file
image: ruby:2.7
services:
- postgres:11
- elasticsearch:6.5.1
- redis:latest
variables:
POSTGRES_DB: portalmec_test
POSTGRES_USER: portalmec
POSTGRES_PASSWORD: 123mudar
ELASTICSEARCH_URL: http://elasticsearch:9200
REDIS_HOST: redis:6379
REDIS_RATE_LIMIT_URL: redis://redis:6379/0
DSPACE_LOGIN: '$mecdb1_login'
DSPACE_PASS: '$mecdb1_password'
stages:
- test
- apidoc
- deploy
before_script:
- apt-get update -y
- apt-get install default-jre postgresql-client -y
- apt-get remove --purge --auto-remove redis-server -y
- apt-get install redis-server -y
- apt-get install nodejs -y
# official way to provide password to psql: http://www.postgresql.org/docs/9.3/static/libpq-envars.html
- export PGPASSWORD=$POSTGRES_PASSWORD
- psql -h "postgres" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "SELECT 'OK' AS status;"
# gems
- gem install bundler
- bundle install --jobs $(nproc) --path=/cache/bundler
test:
stage: test
script:
- export $BUNDLE_PATH='~/'
- export BUNDLE_PATH='~/'
- bundle install
- bundle exec rake db:migrate RAILS_ENV=test
- bundle exec rake test
\ No newline at end of file
- bundle exec rake db:migrate:reset RAILS_ENV=test
- bundle exec rake spec:acceptance
tags:
- ruby
- postgres
- elasticsearch
- redis
doc:
stage: apidoc
script:
- bundle exec rake db:migrate:reset RAILS_ENV=test
- bundle exec rake docs:generate
- ./docploy.sh
only:
- stable
tags:
- ruby
- postgres
- elasticsearch
- redis
# deploy:
# stage: deploy
# script:
# # - mina deploy
# only:
# - master
# tags:
# - ruby
# - postgres
# - elasticsearch
# - redis
Rails:
Enabled: true
AllCops:
Include:
- '**/Rakefile'
- '**/config.ru'
Exclude:
- 'db/**/*'
Metrics/LineLength:
Enabled: false
2.2
3.0.1
# v0.1.0
## Features
* Activities
* Show activities from a specific user
* Show all activities that logged user can see (feed)
* Show all users public activities
* Show logged user activities
* Bookmarks
* Create a bookmark
* Get a list of bookmarks
* Remove a bookmark
* Collections
* Add items to a collection
* Create a collection
* Destroy a collection
* Get a collection
* Get a list of collections
* Get all collection versions
* Like a collection
* Remove items from a collection
* Unlike a collection
* Update a collection
* Complaints
* Create a complaint
* Get a list of complaints
* Contacts
* Create contacts
* Destroy a contact
* Get a contact
* Get all contacts
* Update contacts
* Downloads
* Download the content (files) of a learning object or collection
* Educational Stages
* Create an educational stage
* Get a list of educational stages
* Remove an educational stage
* Follows
* Follow an user or collection
* Unfollow an user or collection
* Institutions
* Create an institution
* Destroy an institution
* Get a list of institutions
* Get an institution
* Update an institution
* Languages
* Create a language
* Destroy a language
* Get a language
* Get a list of languages
* Update languages
* Learning Objects
* Create a learning object draft
* Destroy an attachment (file) of a learning object
* Destroy a learning object
* Get a learning object
* Get a list of learning objects
* Get all learning object versions
* Like a learning object
* Publish a learning object
* Unlike a learning object
* Update a learning object
* Mime Types
* Create a mime type
* Destroy a mime type
* Get a mime type
* Get a list of mime types
* Update a mime type
* Object Type
* Create an object type
* Destroy an object type
* Get a list of object types
* Get an object type
* Update an object type
* Reviews
* Create a review
* Delete a review
* Get a list of reviews
* Rate a review
* Update a review
* Statistics
* Show statistics about the API usage
* Subjects
* Create a subject
* Get a list of subjects
* Remove a subject
* Suggestions
* Create suggestions
* Destroy suggestions
* Get a suggestion
* Get all suggestions
* Update suggestions
* Tags
* Create a tag
* Untag an object or collection
* Users
* Create an user
* Create an user by admin
* Login with an user account
* Logout of an user account
* Destroy an user
* Destroy an user by admin
* Get a list of users
* Get an user
* Get all user versions
* Show an user’s collections
* Show an user’s drafts
* Show an user’s learning objects
* Show an user’s liked collections
* Show an user’s liked learning objects
* Show an user’s own reviews
* Show an user’s received reviews
* Show what the user is following
* Update an user
FROM ruby:2.2.0
RUN apt-get update -qq && apt-get install -y build-essential nodejs
RUN mkdir /app
WORKDIR /tmp
COPY Gemfile Gemfile
COPY Gemfile.lock Gemfile.lock
RUN bundle install -j 3
WORKDIR /app
CMD ["rails", "server", "-b", "0.0.0.0"]
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.0'
gem 'rails', '>=6.0.0'
# Use postgresql as the database for Active Record
gem 'pg'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# Use jquery as the JavaScript library
gem 'jquery-rails'
# autocomplete for search
gem 'jquery-ui-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
gem 'jquery-turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'sdoc', '>= 0.4.0', group: :doc
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
# Use Unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
gem 'bcrypt', '>= 3.1.7'
# memcached
gem 'dalli'
gem 'orientdb4r'
# dalli multi thread gem
gem 'connection_pool'
# web server
gem 'puma'
# protection
gem 'rack-attack'
# scheduler
gem 'whenever', :require => false
gem 'whenever', require: false
# authentication
gem 'devise'
# files
gem 'paperclip'
gem 'kt-paperclip', github: 'kreeti/kt-paperclip', branch: 'master'
# enable login via rest
gem 'devise_token_auth'
gem 'devise_token_auth', github: 'lynndylanhurley/devise_token_auth', branch: 'master'
gem 'rack-cors', require: 'rack/cors'
#bootstrap
gem 'bootstrap-sass'
gem 'rmagick'
# select box used in search
gem 'select2-rails'
# Dspace REST API Integration
gem 'dspace_rest_client', github: 'c3sl/dspace-rest-client', branch: 'master'
#Gruff (graphs and charts)
gem 'rmagick'
#gem 'gruff'
# pretty logs
gem 'rainbow'
#RSolr - Search Engine used by DSpace
gem "rsolr", "~> 1.0.12"
# depoyment
gem 'mina'
#Dspace REST API Integration
gem 'dspace_rest_client', '~> 1.1.0'
# docs
gem 'rdoc'
gem 'stackprof'
# pretty logs
gem 'rainbow'
group :development do
gem 'annotate'
gem 'immigrant'
#Chart js
gem 'chart-js-rails'
gem 'derailed_benchmarks'
#depoyment
gem 'mina'
# Generate ER Diagram from database (use: rake erd)
# Github Page: https://github.com/voormedia/rails-erd
gem 'rails-erd'
# management visual framework
gem 'locastyle'
# Manage the database application (use: localhost:3000/rails/db)
# Github Page: https://github.com/igorkasyanchuk/rails_db
#gem 'rails_db'
# paginate results
gem 'kaminari'
# static analysis tool for security vulnerabilities
gem 'brakeman', require: false
gem 'dawnscanner', require: false
# evaluate source code
gem 'rubycritic', require: false
# evaluate source code
gem 'rubycritic', require: false
# docs
gem 'rdoc'
gem 'stackprof'
# ruby lint
gem 'rubocop', require: false
group :development, :test do
# profiler
gem 'rack-mini-profiler'
gem 'flamegraph'
# reduce queries - https://github.com/flyerhzm/bullet
gem 'bullet'
gem 'better_errors'
gem 'better_errors', '~>2.8.0'
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
gem 'web-console', '~>4.0.4'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'sqlite3'
#JavaScript runtime
# JavaScript runtime
gem 'execjs'
gem 'therubyracer'
# local mailbox
# gem 'mailcatcher'
end
group :test do
gem 'shoulda'
gem 'shoulda-callback-matchers', '~> 1.1.1'
gem 'minitest-reporters'
gem 'faker'
gem 'database_cleaner'
end
gem 'streamio-ffmpeg', '~> 1.0.0'
group :development, :test do
gem 'rspec-rails', '>= 3.8' #original is 3.6
gem 'rspec_api_documentation'
gem 'factory_bot_rails'
end
gem 'streamio-ffmpeg', '>= 1.0.0'
# sidekiq
gem 'sidekiq'
......@@ -129,10 +120,55 @@ gem 'sinatra', require: false
gem 'slim'
# CUrl
gem 'curb', '~> 0.8.8'
gem 'curb', '>= 0.8.8'
# libArchive (Zip, Rar, ...)
# C extension is required
# For Mac OSX: brew install libarchive && bundle config build.libarchive "--with-opt-dir=/usr/local/opt/libarchive"
#gem 'libarchive', '~> 0.1.2', :require => 'libarchive_ruby'
gem 'libarchive-static'
# gem 'libarchive', '~> 0.1.2', :require => 'libarchive_ruby'
gem 'ffi-libarchive'
gem 'gitlab'
# authorization
gem 'pundit'
# elasticsearch integration
gem 'searchkick'
# enable/disable features by enviroments
gem 'feature'
# mass insert in ActiveRecord
gem 'activerecord-import'
# social connect
gem 'omniauth-facebook'
gem 'omniauth-twitter'
gem 'omniauth-google-oauth2', '~>0.8.2'
# get mime type
gem 'mimemagic'
# html screenshot
gem 'screencap'
# model json serializer
gem 'active_model_serializers'
# zip files
gem 'rubyzip'
# user activity
gem 'public_activity'
# gem 'rails-observers'
# soft-deleted for active record models
#gem 'paranoia', github: 'rubysherpas/paranoia', branch: 'rails4'
gem 'paranoia'
# models versioning
gem 'paper_trail'
gem 'acts_as_list'
GIT
remote: https://github.com/c3sl/dspace-rest-client.git
revision: 07f49b52007160278e63b866a76e5f1cf800fa1b
branch: master
specs:
dspace_rest_client (3.1.0)
activesupport (>= 5.0)
faraday (>= 1.0.0)
json (>= 1.8.3, >= 1.8)
net-http-persistent (>= 2.9.4)
resource_kit (>= 0.1.4)
GIT
remote: https://github.com/kreeti/kt-paperclip.git
revision: ab1016d77336a8d7b9db72eb29b6bd19af4027fc
branch: master
specs:
kt-paperclip (6.4.1)
activemodel (>= 4.2.0)
activesupport (>= 4.2.0)
mime-types
mimemagic (~> 0.3.0)
terrapin (~> 0.6.0)
GIT
remote: https://github.com/lynndylanhurley/devise_token_auth.git
revision: 4c5245b88b39c1bb305e0cbdbfc2513eebdeda93
branch: master
specs:
devise_token_auth (1.2.0)
bcrypt (~> 3.0)
devise (> 3.5.2, < 5)
rails (>= 4.2.0, < 6.2)
GEM
remote: https://rubygems.org/
specs:
actioncable (6.1.4)
actionpack (= 6.1.4)
activesupport (= 6.1.4)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.4)
actionpack (= 6.1.4)
activejob (= 6.1.4)
activerecord (= 6.1.4)
activestorage (= 6.1.4)
activesupport (= 6.1.4)
mail (>= 2.7.1)
actionmailer (6.1.4)
actionpack (= 6.1.4)
actionview (= 6.1.4)
activejob (= 6.1.4)
activesupport (= 6.1.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.4)
actionview (= 6.1.4)
activesupport (= 6.1.4)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.4)
actionpack (= 6.1.4)
activerecord (= 6.1.4)
activestorage (= 6.1.4)
activesupport (= 6.1.4)
nokogiri (>= 1.8.5)
actionview (6.1.4)
activesupport (= 6.1.4)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_model_serializers (0.10.12)
actionpack (>= 4.1, < 6.2)
activemodel (>= 4.1, < 6.2)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
activejob (6.1.4)
activesupport (= 6.1.4)
globalid (>= 0.3.6)
activemodel (6.1.4)
activesupport (= 6.1.4)
activerecord (6.1.4)
activemodel (= 6.1.4)
activesupport (= 6.1.4)
activerecord-import (1.1.0)
activerecord (>= 3.2)
activestorage (6.1.4)
actionpack (= 6.1.4)
activejob (= 6.1.4)
activerecord (= 6.1.4)
activesupport (= 6.1.4)
marcel (~> 1.0.0)
mini_mime (>= 1.1.0)
activesupport (6.1.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
acts_as_list (1.0.4)
activerecord (>= 4.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
annotate (3.1.1)
activerecord (>= 3.2, < 7.0)
rake (>= 10.4, < 14.0)
ansi (1.5.0)
ast (2.4.2)
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
bcrypt (3.1.16)
benchmark-ips (2.9.1)
better_errors (2.8.3)
coderay (>= 1.0.0)
erubi (>= 1.0.0)
rack (>= 0.9.0)
bindex (0.8.1)
brakeman (5.0.1)
builder (3.2.4)
bullet (6.1.4)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.11)
byebug (11.1.3)
case_transform (0.2)
activesupport
choice (0.2.0)
chronic (0.10.2)
climate_control (0.2.0)
coderay (1.1.3)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
concurrent-ruby (1.1.9)
connection_pool (2.2.5)
crass (1.0.6)
curb (0.9.11)
cvss (0.99.0)
dalli (2.7.11)
database_cleaner (2.0.1)
database_cleaner-active_record (~> 2.0.0)
database_cleaner-active_record (2.0.1)
activerecord (>= 5.a)
database_cleaner-core (~> 2.0.0)
database_cleaner-core (2.0.1)
dawnscanner (1.6.9)
cvss
haml
justify
logger-colors
ptools
ruby_parser
sqlite3
sys-uname
terminal-table
dead_end (1.1.7)
derailed_benchmarks (2.1.0)
benchmark-ips (~> 2)
dead_end
get_process_mem (~> 0)
heapy (~> 0)
memory_profiler (>= 0, < 2)
mini_histogram (>= 0.3.0)
rack (>= 1)
rack-test
rake (> 10, < 14)
ruby-statistics (>= 2.1)
thor (>= 0.19, < 2)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
devise (4.8.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
diff-lcs (1.4.4)
docile (1.4.0)
elasticsearch (7.13.0)
elasticsearch-api (= 7.13.0)
elasticsearch-transport (= 7.13.0)
elasticsearch-api (7.13.0)
multi_json
elasticsearch-transport (7.13.0)
faraday (~> 1)
multi_json
equalizer (0.0.11)
erubi (1.10.0)
erubis (2.7.0)
execjs (2.8.1)
factory_bot (6.2.0)
activesupport (>= 5.0.0)
factory_bot_rails (6.2.0)
factory_bot (~> 6.2.0)
railties (>= 5.0.0)
faker (2.18.0)
i18n (>= 1.6, < 2)
faraday (1.4.2)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
multipart-post (>= 1.2, < 3)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.1.0)
feature (1.4.0)
ffi (1.15.1)
ffi-libarchive (1.0.17)
ffi (~> 1.0)
flamegraph (0.9.5)
flay (2.12.1)
erubis (~> 2.7.0)
path_expander (~> 1.0)
ruby_parser (~> 3.0)
sexp_processor (~> 4.0)
flog (4.6.4)
path_expander (~> 1.0)
ruby_parser (~> 3.1, > 3.1.0)
sexp_processor (~> 4.8)
get_process_mem (0.2.7)
ffi (~> 1.0)
gitlab (4.17.0)
httparty (~> 0.18)
terminal-table (~> 1.5, >= 1.5.1)
globalid (0.5.1)
activesupport (>= 5.0)
haml (5.2.1)
temple (>= 0.8.0)
tilt
hashie (4.1.0)
heapy (0.2.0)
thor
httparty (0.18.1)
mime-types (~> 3.0)
multi_xml (>= 0.5.2)
i18n (1.8.10)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
immigrant (0.3.6)
activerecord (>= 3.0)
json (2.5.1)
jsonapi-renderer (0.2.2)
justify (1.0.2)
jwt (2.2.3)
kwalify (0.7.2)
launchy (2.5.0)
addressable (~> 2.7)
logger-colors (1.0.0)
loofah (2.10.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (1.0.1)
memory_profiler (1.0.0)
method_source (1.0.0)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2021.0225)
mimemagic (0.3.10)
nokogiri (~> 1)
rake
mina (1.2.3)
open4 (~> 1.3.4)
rake
mini_histogram (0.3.1)
mini_mime (1.1.0)
mini_portile2 (2.5.3)
minitest (5.14.4)
minitest-reporters (1.4.3)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.1.1)
mustache (1.1.1)
mustermann (1.1.1)
ruby2_keywords (~> 0.0.1)
net-http-persistent (4.0.1)
connection_pool (~> 2.2)
nio4r (2.5.7)
nokogiri (1.11.7)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
oauth (0.5.6)
oauth2 (1.4.7)
faraday (>= 0.8, < 2.0)
jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
omniauth (2.0.4)
hashie (>= 3.4.6)
rack (>= 1.6.2, < 3)
rack-protection
omniauth-facebook (8.0.0)
omniauth-oauth2 (~> 1.2)
omniauth-google-oauth2 (1.0.0)
jwt (>= 2.0)
oauth2 (~> 1.1)
omniauth (~> 2.0)
omniauth-oauth2 (~> 1.7.1)
omniauth-oauth (1.2.0)
oauth
omniauth (>= 1.0, < 3)
omniauth-oauth2 (1.7.1)
oauth2 (~> 1.4)
omniauth (>= 1.9, < 3)
omniauth-twitter (1.4.0)
omniauth-oauth (~> 1.1)
rack
open4 (1.3.4)
orm_adapter (0.5.0)
paper_trail (12.0.0)
activerecord (>= 5.2)
request_store (~> 1.1)
parallel (1.20.1)
paranoia (2.4.3)
activerecord (>= 4.0, < 6.2)
parser (3.0.1.1)
ast (~> 2.4.1)
path_expander (1.1.0)
pg (1.2.3)
phantomjs (2.1.1.0)
psych (3.3.2)
ptools (1.4.2)
public_activity (1.6.4)
actionpack (>= 3.0.0)
activerecord (>= 3.0)
i18n (>= 0.5.0)
railties (>= 3.0.0)
public_suffix (4.0.6)
puma (5.3.2)
nio4r (~> 2.0)
pundit (2.1.0)
activesupport (>= 3.0.0)
racc (1.5.2)
rack (2.2.3)
rack-attack (6.5.0)
rack (>= 1.0, < 3)
rack-cors (1.1.1)
rack (>= 2.0.0)
rack-mini-profiler (2.3.2)
rack (>= 1.2.0)
rack-protection (2.1.0)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.1.4)
actioncable (= 6.1.4)
actionmailbox (= 6.1.4)
actionmailer (= 6.1.4)
actionpack (= 6.1.4)
actiontext (= 6.1.4)
actionview (= 6.1.4)
activejob (= 6.1.4)
activemodel (= 6.1.4)
activerecord (= 6.1.4)
activestorage (= 6.1.4)
activesupport (= 6.1.4)
bundler (>= 1.15.0)
railties (= 6.1.4)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-erd (1.6.1)
activerecord (>= 4.2)
activesupport (>= 4.2)
choice (~> 0.2.0)
ruby-graphviz (~> 1.2)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
railties (6.1.4)
actionpack (= 6.1.4)
activesupport (= 6.1.4)
method_source
rake (>= 0.13)
thor (~> 1.0)
rainbow (3.0.0)
rake (13.0.6)
rdoc (6.3.1)
redis (4.2.5)
reek (6.0.4)
kwalify (~> 0.7.0)
parser (~> 3.0.0)
psych (~> 3.1)
rainbow (>= 2.0, < 4.0)
regexp_parser (2.1.1)
request_store (1.5.0)
rack (>= 1.4)
resource_kit (0.1.7)
addressable (>= 2.3.6, < 3.0.0)
responders (3.0.1)
actionpack (>= 5.0)
railties (>= 5.0)
rexml (3.2.5)
rmagick (4.2.2)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-rails (5.0.1)
actionpack (>= 5.2)
activesupport (>= 5.2)
railties (>= 5.2)
rspec-core (~> 3.10)
rspec-expectations (~> 3.10)
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (3.10.2)
rspec_api_documentation (6.1.0)
activesupport (>= 3.0.0)
mustache (~> 1.0, >= 0.99.4)
rspec (~> 3.0)
rubocop (1.15.0)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.5.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.6.0)
parser (>= 3.0.1.1)
ruby-graphviz (1.2.5)
rexml
ruby-progressbar (1.11.0)
ruby-statistics (2.1.3)
ruby2_keywords (0.0.4)
ruby_parser (3.16.0)
sexp_processor (~> 4.15, >= 4.15.1)
rubycritic (4.6.1)
flay (~> 2.8)
flog (~> 4.4)
launchy (>= 2.0.0)
parser (>= 2.6.0)
rainbow (~> 3.0)
reek (~> 6.0, < 7.0)
ruby_parser (~> 3.8)
simplecov (>= 0.17.0)
tty-which (~> 0.4.0)
virtus (~> 1.0)
rubyzip (2.3.0)
screencap (0.1.4)
phantomjs
sdoc (2.2.0)
rdoc (>= 5.0)
searchkick (4.4.4)
activemodel (>= 5)
elasticsearch (>= 6)
hashie
sexp_processor (4.15.3)
shoulda (4.0.0)
shoulda-context (~> 2.0)
shoulda-matchers (~> 4.0)
shoulda-context (2.0.0)
shoulda-matchers (4.5.1)
activesupport (>= 4.2.0)
sidekiq (6.2.1)
connection_pool (>= 2.2.2)
rack (~> 2.0)
redis (>= 4.2.0)
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.3)
sinatra (2.1.0)
mustermann (~> 1.0)
rack (~> 2.2)
rack-protection (= 2.1.0)
tilt (~> 2.0)
slim (4.1.0)
temple (>= 0.7.6, < 0.9)
tilt (>= 2.0.6, < 2.1)
spring (2.1.1)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.4.2)
stackprof (0.2.17)
streamio-ffmpeg (3.0.2)
multi_json (~> 1.8)
sys-uname (1.2.2)
ffi (~> 1.1)
temple (0.8.2)
terminal-table (1.6.0)
terrapin (0.6.0)
climate_control (>= 0.0.3, < 1.0)
thor (1.1.0)
thread_safe (0.3.6)
tilt (2.0.10)
tty-which (0.4.2)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
unicode-display_width (2.0.0)
uniform_notifier (1.14.2)
virtus (1.0.5)
axiom-types (~> 0.1)
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9)
warden (1.2.9)
rack (>= 2.0.9)
web-console (4.0.4)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
whenever (1.0.0)
chronic (>= 0.6.3)
zeitwerk (2.4.2)
PLATFORMS
ruby
DEPENDENCIES
active_model_serializers
activerecord-import
acts_as_list
annotate
bcrypt (>= 3.1.7)
better_errors (~> 2.8.0)
brakeman
bullet
byebug
connection_pool
curb (>= 0.8.8)
dalli
database_cleaner
dawnscanner
derailed_benchmarks
devise
devise_token_auth!
dspace_rest_client!
execjs
factory_bot_rails
faker
feature
ffi-libarchive
flamegraph
gitlab
immigrant
kt-paperclip!
mimemagic
mina
minitest-reporters
omniauth-facebook
omniauth-google-oauth2
omniauth-twitter
paper_trail
paranoia
pg
public_activity
puma
pundit
rack-attack
rack-cors
rack-mini-profiler
rails (>= 6.0.0)
rails-erd
rainbow
rdoc
rmagick
rspec-rails (>= 3.8)
rspec_api_documentation
rubocop
rubycritic
rubyzip
screencap
sdoc (>= 0.4.0)
searchkick
shoulda
sidekiq
sinatra
slim
spring
stackprof
streamio-ffmpeg (>= 1.0.0)
web-console (~> 4.0.4)
whenever
BUNDLED WITH
2.2.15
# Portal MEC
[![build status](https://ci.gitlab.c3sl.ufpr.br/projects/19/status.png?ref=master)](https://ci.gitlab.c3sl.ufpr.br/projects/19?ref=master)
## License
Copyright (C) 2015 Centro de Computacao Cientifica e Software Livre
Departamento de Informatica - Universidade Federal do Parana
This file is part of portalmec.
portalmec is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
portalmec is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with portalmec. If not, see <http://www.gnu.org/licenses/>.
## Requirements
* ruby >=2.2
* rvm
* Dspace server, with solr access allowed
* Postgres
* OrientDB
* Using rvm you will install ruby "3.0.1"
* ruby "3.0.1"
* Dspace server "6.x"
* Postgres "13"
* Elasticsearch "6.8.13"
* Redis ">=5.0"
* nvm
* Using nvm you will install Node.js "14.15.1"
## Setup
To setup the rails app, will be needed run active record migrations,
orient db migrations and populate active record database:
``` ./bin/setup ```
## Definitions
Some definitions and vocabulary of project domain model.
## Deploy
Before deploy to production server, some env vars need be set:
### Application Secrets
The command 'rake secret' can be used for generate random string
* SECRET_TOKEN
* SECRET_KEY_BASE
### Postgres/Active Record credentials
* PORTALMEC_DB_NAME
* PORTALMEC_DB_USERNAME
* PORTALMEC_DB_PASSWORD
### OrientDB credentials
* PORTALMEC_ORIENTDB_HOST
* PORTALMEC_ORIENTDB_DATABASE
* PORTALMEC_ORIENTDB_USERNAME
* PORTALMEC_ORIENTDB_PASSWD
* PORTALMEC_ORIENTDB_PORT
### Dspace credentials
* PORTALMEC_DSPACE_SOLR
* PORTALMEC_DSPACE_REST
* PORTALMEC_DSPACE_PORT
* PORTALMEC_DSPACE_HOST
### Rails environment
* RAILS_SERVE_STATIC_FILES - default is FALSE
* RAILS_ENV: production, test or development
Run:
## NVM and Node.js
For install NVM and Node.js, use this follwing commands:
```
$ mina setup
$ mina deploy
```
\ No newline at end of file
$ wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.0/install.sh | bash
```
```
$ nvm install 14.15.1
```
## Postgres
After the first install, you can run this commands:
* ``` sudo passwd postgres ```
* ``` su postgres```
* ``` psql -c "ALTER USER postgres WITH PASSWORD '$PASSWORD'" -d template1 ```
* ``` createuser -h localhost -U postgres -d $USER_DB ```
* ``` psql -c "ALTER USER $USER_DB WITH PASSWORD '$PASSWORD'" -d template1 ```
Note: You can ask for the database dump for someone in the project.
You need to modify the file "/etc/postgresql/11/main/pg_hba.conf", the modification is
* comment the 1st and 2nd lines with "peer" and copy them replacing "peer" with "md5".
After this, run this command:
* ``` systemctl restart postgresql ```
## Rvm
After finish the installer, you will need to add in your ~/.bashrc this commands:
* ``` export PATH="$PATH:$HOME/.rvm/bin" ```
* ``` source /home/Your_user/.rvm/scripts/rvm ```
After this, run the command ```source ~/.bashrc```.
``` Note ``` : If does not work, you can try modify the commands above, for this:
* ```export PATH="$PATH:/usr/share/rvm/bin" ```
* ```source /usr/share/rvm/scripts/rvm```
## Setup
First of all, you need to configure the dspace, elasticsearch and redis servers. Create an user for postgres database.
After this setup, open the configuration files inside the project repository and update the following files:
* config/database.yml: change your postgres credentials for development and test environment.
* config/dspace.yml: change your dspace host and credentials for development and test environment.
* config/sidekiq.yml: change your redis hosts and ports.
* config/initializers/elasticsearch.rb: inside elsif Rails.env.test? change url 'elasticsearch:9200' to 'localhost:9200'.
* config/initializers/gitlab.rb: change your gitlab host for bug reports and set env var with private token. ( $ export GITLAB_PORTALMEC_PRIVATE_TOKEN=131237128937128937 )
## Install
After installed the requeriments, the first you will need to do is run:
* ``` bundle install ```
This command will install all required gems for the project.
```Note ```: Sometimes some gems throw errors. That is because there is a chance that you do not have all the required dependecies for the installation of the gem that failed to install. Please install the dependencies and try again.
After all gems were installed succesfuly. Please create the database using the following commands:
* ``` rake db:create ```
* If you have the dump of the database, use it before db:migrate.
* To use the dump, run this commands: ```psql -U $DATABASE_USER -d $DATABASE_NAME < $DATABASE_PATH/dump_name.sql ```
* ``` rake db:migrate ```
``` Note ``` : You need to load the dump in the database_dev.
This procedure will create and configure all table in the project database
For the search mechanism to works, execute the CMD in the portalmec directory ``` rake searchkick:reindex:all ```.
<!--### Development environment-->
<!-- Se algum dia o docker do projeto for arrumado, essa parte deve bastar como explicação -->
<!--
#### Using docker for development env
You can use docker for your development environment. For that, run:
./bin/docker-setup
Now, redis, elasticsearch and postgres are running as services and linked to PortalMEC application. Database migrations were execute and the configs (database.yml, sidekiq.yml was replaced by config/docker/...).
If all development and test vars are set, run:
* ```rake db:create```
This command will install the rubygems, create/reset your database schema, seed some default data and import all dspace data.-->
Once finished, your application is read to be used. To acess it, run CMD:
``` bundle exec rails s ```
<!--
Se a rotina de testes descrita pelo rake test for arrumada, o comando a baixo funcionara
### Running tests suite
For tests, TestUnit is used, and to run it
``` bundle exec rake test ```-->
For tests, run this commands:
* ``` export DSPACE_LOGIN=your_login ```
* ``` export DSPACE_PASS=your_password ```
* ``` source ~/.bashrc ```
* ``` bundle exec rake spec:acceptance ```
### Production environment
When working in the production environment, the environment variables must be set in the file config/env_vars.sh.
After setting the variables in the file, you must include the following line into your user's .bashrc file:
* ``` source /home/portalmec/portalmec/config/env_vars.sh ```
You will also need to make some other configurations:
* Redis vars need to be set on config/sidekiq.yml
* In config/initializers/devise.rb, change the e-mail addresses. (Ex.: config.mailer_sender = 'suporte@suporte.com')
* In app/services/learning_object_publisher.rb, in the create_dspace_item change the DSpace collection where the items are gonna be created.
* Change the paths in the *.sh and *.service files in the root of the project to the absolute path of the project in the production server.
* As root, copy the *.service files to the server's systemd directory (Ex.: /lib/systemd/system), then run systemctl enable portalmec and systemctl enable portalmec-sidekiq.
* As root, copy the sidekiq_log.conf file to the rsyslog directory (/etc/rsyslog.d/) and give the shared/logs/sidekiq.log file the same permissions and ownership as the /var/log/syslog file.
Now that your application is ready, you can run it with:
* ``` systemctl start portalmec portalmec-sidekiq ```
......@@ -2,5 +2,6 @@
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
require 'dawn/tasks'
Rails.application.load_tasks
app/assets/images/brasil.png

597 B

app/assets/images/cc.png

1.36 KiB

app/assets/images/colecoes.png

40.4 KiB

app/assets/images/colections.png

40.4 KiB

app/assets/images/contraste.png

2.23 KiB

app/assets/images/fnde.png

21.8 KiB

app/assets/images/fonte_inicial.png

2.44 KiB

app/assets/images/fonte_mais.png

2.18 KiB