first commit
95
.gitignore
vendored
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
# ---> Rails
|
||||||
|
*.rbc
|
||||||
|
capybara-*.html
|
||||||
|
.rspec
|
||||||
|
/log
|
||||||
|
/tmp
|
||||||
|
/db/*.sqlite3
|
||||||
|
/db/*.sqlite3-journal
|
||||||
|
/public/system
|
||||||
|
/public/assets/*
|
||||||
|
/coverage/
|
||||||
|
/spec/tmp
|
||||||
|
**.orig
|
||||||
|
rerun.txt
|
||||||
|
pickle-email-*.html
|
||||||
|
/node_modules/*
|
||||||
|
|
||||||
|
# TODO Comment out this rule if you are OK with secrets being uploaded to the repo
|
||||||
|
config/initializers/secret_token.rb
|
||||||
|
|
||||||
|
# Only include if you have production secrets in this file, which is no longer a Rails default
|
||||||
|
# config/secrets.yml
|
||||||
|
|
||||||
|
# dotenv
|
||||||
|
# TODO Comment out this rule if environment variables can be committed
|
||||||
|
.env
|
||||||
|
|
||||||
|
## Environment normalization:
|
||||||
|
/.bundle
|
||||||
|
/vendor/bundle
|
||||||
|
|
||||||
|
# these should all be checked in to normalize the environment:
|
||||||
|
# Gemfile.lock, .ruby-version, .ruby-gemset
|
||||||
|
|
||||||
|
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
||||||
|
.rvmrc
|
||||||
|
|
||||||
|
# if using bower-rails ignore default bower_components path bower.json files
|
||||||
|
/vendor/assets/bower_components
|
||||||
|
*.bowerrc
|
||||||
|
bower.json
|
||||||
|
|
||||||
|
# Ignore pow environment settings
|
||||||
|
.powenv
|
||||||
|
|
||||||
|
# Ignore Byebug command history file.
|
||||||
|
.byebug_history
|
||||||
|
|
||||||
|
# ---> JetBrains
|
||||||
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||||
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|
||||||
|
# User-specific stuff:
|
||||||
|
.idea/**/workspace.xml
|
||||||
|
.idea/**/tasks.xml
|
||||||
|
.idea/dictionaries
|
||||||
|
|
||||||
|
# Sensitive or high-churn files:
|
||||||
|
.idea/**/dataSources/
|
||||||
|
.idea/**/dataSources.ids
|
||||||
|
.idea/**/dataSources.xml
|
||||||
|
.idea/**/dataSources.local.xml
|
||||||
|
.idea/**/sqlDataSources.xml
|
||||||
|
.idea/**/dynamic.xml
|
||||||
|
.idea/**/uiDesigner.xml
|
||||||
|
|
||||||
|
# Gradle:
|
||||||
|
.idea/**/gradle.xml
|
||||||
|
.idea/**/libraries
|
||||||
|
|
||||||
|
# Mongo Explorer plugin:
|
||||||
|
.idea/**/mongoSettings.xml
|
||||||
|
|
||||||
|
## File-based project format:
|
||||||
|
*.iws
|
||||||
|
|
||||||
|
## Plugin-specific files:
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
/out/
|
||||||
|
|
||||||
|
# mpeltonen/sbt-idea plugin
|
||||||
|
.idea_modules/
|
||||||
|
|
||||||
|
# JIRA plugin
|
||||||
|
atlassian-ide-plugin.xml
|
||||||
|
|
||||||
|
# Cursive Clojure plugin
|
||||||
|
.idea/replstate.xml
|
||||||
|
|
||||||
|
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||||
|
com_crashlytics_export_strings.xml
|
||||||
|
crashlytics.properties
|
||||||
|
crashlytics-build.properties
|
||||||
|
fabric.properties
|
8
.idea/.generators
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Settings><!--This file was automatically generated by Ruby plugin.
|
||||||
|
You are allowed to:
|
||||||
|
1. Reorder generators
|
||||||
|
2. Remove generators
|
||||||
|
3. Add installed generators
|
||||||
|
To add new installed generators automatically delete this file and reload the project.
|
||||||
|
--><GeneratorsGroup><Generator name="active_record:migration" /><Generator name="active_record:model" /><Generator name="active_record:observer" /><Generator name="active_record:session_migration" /><Generator name="controller" /><Generator name="erb:controller" /><Generator name="erb:mailer" /><Generator name="erb:scaffold" /><Generator name="generator" /><Generator name="helper" /><Generator name="integration_test" /><Generator name="mailer" /><Generator name="metal" /><Generator name="migration" /><Generator name="model" /><Generator name="model_subclass" /><Generator name="observer" /><Generator name="performance_test" /><Generator name="plugin" /><Generator name="resource" /><Generator name="scaffold" /><Generator name="scaffold_controller" /><Generator name="session_migration" /><Generator name="stylesheets" /><Generator name="test_unit:controller" /><Generator name="test_unit:helper" /><Generator name="test_unit:integration" /><Generator name="test_unit:mailer" /><Generator name="test_unit:model" /><Generator name="test_unit:observer" /><Generator name="test_unit:performance" /><Generator name="test_unit:plugin" /><Generator name="test_unit:scaffold" /></GeneratorsGroup></Settings>
|
7
.idea/.rakeTasks
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<state>
|
||||||
|
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||||
|
</state>
|
||||||
|
</component>
|
7
.idea/inspectionProfiles/Project_Default.xml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="Rubocop" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="RubyArgCount" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||||
|
</profile>
|
||||||
|
</component>
|
7
.idea/misc.xml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="JavaScriptSettings">
|
||||||
|
<option name="languageLevel" value="ES6" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" project-jdk-name="ruby-2.5.3-p105" project-jdk-type="RUBY_SDK" />
|
||||||
|
</project>
|
8
.idea/modules.xml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/tuxWebROR.iml" filepath="$PROJECT_DIR$/.idea/tuxWebROR.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
120
.idea/tuxWebROR.iml
Normal file
|
@ -0,0 +1,120 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="RUBY_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="RailsFacetType" name="Ruby on Rails">
|
||||||
|
<configuration>
|
||||||
|
<RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_SUPPORT_REMOVED" VALUE="false" />
|
||||||
|
<RAILS_FACET_CONFIG_ID NAME="RAILS_TESTS_SOURCES_PATCHED" VALUE="true" />
|
||||||
|
<RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_APPLICATION_ROOT" VALUE="$MODULE_DIR$" />
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="ModuleRunConfigurationManager">
|
||||||
|
<shared />
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/.bundle" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/components" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/public/system" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/vendor/bundle" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/vendor/cache" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="actioncable (v5.2.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="actionmailer (v5.2.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="actionpack (v5.2.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="actionview (v5.2.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="activejob (v5.2.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="activemodel (v5.2.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="activerecord (v5.2.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="activestorage (v5.2.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="activesupport (v5.2.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="addressable (v2.5.2, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="archive-zip (v0.11.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="arel (v9.0.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="bindex (v0.5.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="bootsnap (v1.3.2, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.3, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.17.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="byebug (v10.0.2, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="capybara (v3.10.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="childprocess (v0.9.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="chromedriver-helper (v2.1.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="coffee-rails (v4.2.2, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="coffee-script (v2.4.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="coffee-script-source (v1.12.2, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.0.5, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="crass (v1.0.4, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="erubi (v1.7.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="execjs (v2.7.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="ffi (v1.9.25, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="globalid (v0.4.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="i18n (v1.1.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="io-like (v0.3.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="jbuilder (v2.7.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="kaminari (v1.1.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="kaminari-actionview (v1.1.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="kaminari-activerecord (v1.1.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="kaminari-core (v1.1.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="libv8 (v3.16.14.19, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="listen (v3.1.5, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="loofah (v2.2.2, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="mail (v2.7.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="marcel (v0.3.3, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="method_source (v0.9.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="mimemagic (v0.3.2, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="mini_mime (v1.0.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="mini_portile2 (v2.3.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.11.3, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="msgpack (v1.2.4, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.13.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="mysql2 (v0.5.2, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="nio4r (v2.3.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.8.5, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="public_suffix (v3.0.3, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="puma (v3.12.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="rack (v2.0.5, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="rack-test (v1.1.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="rails (v5.2.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.0.3, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.0.4, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="railties (v5.2.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="rake (v12.3.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="rb-fsevent (v0.10.3, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="rb-inotify (v0.9.10, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="redcarpet (v3.4.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="ref (v2.0.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="regexp_parser (v1.2.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="ruby_dep (v1.5.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="rubyzip (v1.2.2, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="sass (v3.6.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="sass-listen (v4.0.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="sass-rails (v5.0.7, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="selenium-webdriver (v3.14.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="spring (v2.0.2, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="spring-watcher-listen (v2.0.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="sprockets (v3.7.2, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="sprockets-rails (v3.2.1, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="therubyracer (v0.12.3, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="thor (v0.20.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.6, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="tilt (v2.0.8, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="turbolinks (v5.2.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="turbolinks-source (v5.2.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="tzinfo (v1.2.5, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="uglifier (v4.1.19, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="web-console (v3.7.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="websocket-driver (v0.7.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="websocket-extensions (v0.1.3, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="xpath (v3.2.0, ruby-2.5.3-p105) [gem]" level="application" />
|
||||||
|
</component>
|
||||||
|
<component name="RModuleSettingsStorage">
|
||||||
|
<LOAD_PATH number="0" />
|
||||||
|
<I18N_FOLDERS number="1" string0="$MODULE_DIR$/config/locales" />
|
||||||
|
</component>
|
||||||
|
</module>
|
6
.idea/vcs.xml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
1
.ruby-version
Normal file
|
@ -0,0 +1 @@
|
||||||
|
ruby-2.5.3
|
66
Gemfile
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
source 'https://rubygems.org'
|
||||||
|
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
||||||
|
|
||||||
|
ruby '2.5.3'
|
||||||
|
|
||||||
|
gem 'redcarpet', '~> 3.4'
|
||||||
|
gem 'therubyracer'
|
||||||
|
gem 'kaminari'
|
||||||
|
|
||||||
|
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
||||||
|
gem 'rails', '~> 5.2.1'
|
||||||
|
# Use mysql as the database for Active Record
|
||||||
|
gem 'mysql2', '>= 0.4.4', '< 0.6.0'
|
||||||
|
# Use Puma as the app server
|
||||||
|
gem 'puma', '~> 3.11'
|
||||||
|
# Use SCSS for stylesheets
|
||||||
|
gem 'sass-rails', '~> 5.0'
|
||||||
|
# Use Uglifier as compressor for JavaScript assets
|
||||||
|
gem 'uglifier', '>= 1.3.0'
|
||||||
|
# See https://github.com/rails/execjs#readme for more supported runtimes
|
||||||
|
# gem 'mini_racer', platforms: :ruby
|
||||||
|
|
||||||
|
# Use CoffeeScript for .coffee assets and views
|
||||||
|
gem 'coffee-rails', '~> 4.2'
|
||||||
|
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
|
||||||
|
gem 'turbolinks', '~> 5'
|
||||||
|
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
||||||
|
gem 'jbuilder', '~> 2.5'
|
||||||
|
# Use Redis adapter to run Action Cable in production
|
||||||
|
# gem 'redis', '~> 4.0'
|
||||||
|
# Use ActiveModel has_secure_password
|
||||||
|
# gem 'bcrypt', '~> 3.1.7'
|
||||||
|
|
||||||
|
# Use ActiveStorage variant
|
||||||
|
# gem 'mini_magick', '~> 4.8'
|
||||||
|
|
||||||
|
# Use Capistrano for deployment
|
||||||
|
# gem 'capistrano-rails', group: :development
|
||||||
|
|
||||||
|
# Reduces boot times through caching; required in config/boot.rb
|
||||||
|
gem 'bootsnap', '>= 1.1.0', require: false
|
||||||
|
|
||||||
|
group :development, :test do
|
||||||
|
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
||||||
|
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
|
||||||
|
end
|
||||||
|
|
||||||
|
group :development do
|
||||||
|
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
|
||||||
|
gem 'web-console', '>= 3.3.0'
|
||||||
|
gem 'listen', '>= 3.0.5', '< 3.2'
|
||||||
|
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
||||||
|
gem 'spring'
|
||||||
|
gem 'spring-watcher-listen', '~> 2.0.0'
|
||||||
|
end
|
||||||
|
|
||||||
|
group :test do
|
||||||
|
# Adds support for Capybara system testing and selenium driver
|
||||||
|
gem 'capybara', '>= 2.15'
|
||||||
|
gem 'selenium-webdriver'
|
||||||
|
# Easy installation and use of chromedriver to run system tests with Chrome
|
||||||
|
gem 'chromedriver-helper'
|
||||||
|
end
|
||||||
|
|
||||||
|
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||||
|
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
240
Gemfile.lock
Normal file
|
@ -0,0 +1,240 @@
|
||||||
|
GEM
|
||||||
|
remote: https://rubygems.org/
|
||||||
|
specs:
|
||||||
|
actioncable (5.2.1)
|
||||||
|
actionpack (= 5.2.1)
|
||||||
|
nio4r (~> 2.0)
|
||||||
|
websocket-driver (>= 0.6.1)
|
||||||
|
actionmailer (5.2.1)
|
||||||
|
actionpack (= 5.2.1)
|
||||||
|
actionview (= 5.2.1)
|
||||||
|
activejob (= 5.2.1)
|
||||||
|
mail (~> 2.5, >= 2.5.4)
|
||||||
|
rails-dom-testing (~> 2.0)
|
||||||
|
actionpack (5.2.1)
|
||||||
|
actionview (= 5.2.1)
|
||||||
|
activesupport (= 5.2.1)
|
||||||
|
rack (~> 2.0)
|
||||||
|
rack-test (>= 0.6.3)
|
||||||
|
rails-dom-testing (~> 2.0)
|
||||||
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
||||||
|
actionview (5.2.1)
|
||||||
|
activesupport (= 5.2.1)
|
||||||
|
builder (~> 3.1)
|
||||||
|
erubi (~> 1.4)
|
||||||
|
rails-dom-testing (~> 2.0)
|
||||||
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
||||||
|
activejob (5.2.1)
|
||||||
|
activesupport (= 5.2.1)
|
||||||
|
globalid (>= 0.3.6)
|
||||||
|
activemodel (5.2.1)
|
||||||
|
activesupport (= 5.2.1)
|
||||||
|
activerecord (5.2.1)
|
||||||
|
activemodel (= 5.2.1)
|
||||||
|
activesupport (= 5.2.1)
|
||||||
|
arel (>= 9.0)
|
||||||
|
activestorage (5.2.1)
|
||||||
|
actionpack (= 5.2.1)
|
||||||
|
activerecord (= 5.2.1)
|
||||||
|
marcel (~> 0.3.1)
|
||||||
|
activesupport (5.2.1)
|
||||||
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
|
i18n (>= 0.7, < 2)
|
||||||
|
minitest (~> 5.1)
|
||||||
|
tzinfo (~> 1.1)
|
||||||
|
addressable (2.5.2)
|
||||||
|
public_suffix (>= 2.0.2, < 4.0)
|
||||||
|
archive-zip (0.11.0)
|
||||||
|
io-like (~> 0.3.0)
|
||||||
|
arel (9.0.0)
|
||||||
|
bindex (0.5.0)
|
||||||
|
bootsnap (1.3.2)
|
||||||
|
msgpack (~> 1.0)
|
||||||
|
builder (3.2.3)
|
||||||
|
byebug (10.0.2)
|
||||||
|
capybara (3.10.0)
|
||||||
|
addressable
|
||||||
|
mini_mime (>= 0.1.3)
|
||||||
|
nokogiri (~> 1.8)
|
||||||
|
rack (>= 1.6.0)
|
||||||
|
rack-test (>= 0.6.3)
|
||||||
|
regexp_parser (~> 1.2)
|
||||||
|
xpath (~> 3.2)
|
||||||
|
childprocess (0.9.0)
|
||||||
|
ffi (~> 1.0, >= 1.0.11)
|
||||||
|
chromedriver-helper (2.1.0)
|
||||||
|
archive-zip (~> 0.10)
|
||||||
|
nokogiri (~> 1.8)
|
||||||
|
coffee-rails (4.2.2)
|
||||||
|
coffee-script (>= 2.2.0)
|
||||||
|
railties (>= 4.0.0)
|
||||||
|
coffee-script (2.4.1)
|
||||||
|
coffee-script-source
|
||||||
|
execjs
|
||||||
|
coffee-script-source (1.12.2)
|
||||||
|
concurrent-ruby (1.0.5)
|
||||||
|
crass (1.0.4)
|
||||||
|
erubi (1.7.1)
|
||||||
|
execjs (2.7.0)
|
||||||
|
ffi (1.9.25)
|
||||||
|
globalid (0.4.1)
|
||||||
|
activesupport (>= 4.2.0)
|
||||||
|
i18n (1.1.1)
|
||||||
|
concurrent-ruby (~> 1.0)
|
||||||
|
io-like (0.3.0)
|
||||||
|
jbuilder (2.7.0)
|
||||||
|
activesupport (>= 4.2.0)
|
||||||
|
multi_json (>= 1.2)
|
||||||
|
kaminari (1.1.1)
|
||||||
|
activesupport (>= 4.1.0)
|
||||||
|
kaminari-actionview (= 1.1.1)
|
||||||
|
kaminari-activerecord (= 1.1.1)
|
||||||
|
kaminari-core (= 1.1.1)
|
||||||
|
kaminari-actionview (1.1.1)
|
||||||
|
actionview
|
||||||
|
kaminari-core (= 1.1.1)
|
||||||
|
kaminari-activerecord (1.1.1)
|
||||||
|
activerecord
|
||||||
|
kaminari-core (= 1.1.1)
|
||||||
|
kaminari-core (1.1.1)
|
||||||
|
libv8 (3.16.14.19)
|
||||||
|
listen (3.1.5)
|
||||||
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||||
|
rb-inotify (~> 0.9, >= 0.9.7)
|
||||||
|
ruby_dep (~> 1.2)
|
||||||
|
loofah (2.2.2)
|
||||||
|
crass (~> 1.0.2)
|
||||||
|
nokogiri (>= 1.5.9)
|
||||||
|
mail (2.7.1)
|
||||||
|
mini_mime (>= 0.1.1)
|
||||||
|
marcel (0.3.3)
|
||||||
|
mimemagic (~> 0.3.2)
|
||||||
|
method_source (0.9.0)
|
||||||
|
mimemagic (0.3.2)
|
||||||
|
mini_mime (1.0.1)
|
||||||
|
mini_portile2 (2.3.0)
|
||||||
|
minitest (5.11.3)
|
||||||
|
msgpack (1.2.4)
|
||||||
|
multi_json (1.13.1)
|
||||||
|
mysql2 (0.5.2)
|
||||||
|
nio4r (2.3.1)
|
||||||
|
nokogiri (1.8.5)
|
||||||
|
mini_portile2 (~> 2.3.0)
|
||||||
|
public_suffix (3.0.3)
|
||||||
|
puma (3.12.0)
|
||||||
|
rack (2.0.5)
|
||||||
|
rack-test (1.1.0)
|
||||||
|
rack (>= 1.0, < 3)
|
||||||
|
rails (5.2.1)
|
||||||
|
actioncable (= 5.2.1)
|
||||||
|
actionmailer (= 5.2.1)
|
||||||
|
actionpack (= 5.2.1)
|
||||||
|
actionview (= 5.2.1)
|
||||||
|
activejob (= 5.2.1)
|
||||||
|
activemodel (= 5.2.1)
|
||||||
|
activerecord (= 5.2.1)
|
||||||
|
activestorage (= 5.2.1)
|
||||||
|
activesupport (= 5.2.1)
|
||||||
|
bundler (>= 1.3.0)
|
||||||
|
railties (= 5.2.1)
|
||||||
|
sprockets-rails (>= 2.0.0)
|
||||||
|
rails-dom-testing (2.0.3)
|
||||||
|
activesupport (>= 4.2.0)
|
||||||
|
nokogiri (>= 1.6)
|
||||||
|
rails-html-sanitizer (1.0.4)
|
||||||
|
loofah (~> 2.2, >= 2.2.2)
|
||||||
|
railties (5.2.1)
|
||||||
|
actionpack (= 5.2.1)
|
||||||
|
activesupport (= 5.2.1)
|
||||||
|
method_source
|
||||||
|
rake (>= 0.8.7)
|
||||||
|
thor (>= 0.19.0, < 2.0)
|
||||||
|
rake (12.3.1)
|
||||||
|
rb-fsevent (0.10.3)
|
||||||
|
rb-inotify (0.9.10)
|
||||||
|
ffi (>= 0.5.0, < 2)
|
||||||
|
redcarpet (3.4.0)
|
||||||
|
ref (2.0.0)
|
||||||
|
regexp_parser (1.2.0)
|
||||||
|
ruby_dep (1.5.0)
|
||||||
|
rubyzip (1.2.2)
|
||||||
|
sass (3.6.0)
|
||||||
|
sass-listen (~> 4.0.0)
|
||||||
|
sass-listen (4.0.0)
|
||||||
|
rb-inotify (>= 0.9.7, >= 0.9)
|
||||||
|
sass-rails (5.0.7)
|
||||||
|
railties (>= 4.0.0, < 6)
|
||||||
|
sass (~> 3.1)
|
||||||
|
sprockets (>= 2.8, < 4.0)
|
||||||
|
sprockets-rails (>= 2.0, < 4.0)
|
||||||
|
tilt (>= 1.1, < 3)
|
||||||
|
selenium-webdriver (3.14.1)
|
||||||
|
childprocess (~> 0.5)
|
||||||
|
rubyzip (~> 1.2, >= 1.2.2)
|
||||||
|
spring (2.0.2)
|
||||||
|
activesupport (>= 4.2)
|
||||||
|
spring-watcher-listen (2.0.1)
|
||||||
|
listen (>= 2.7, < 4.0)
|
||||||
|
spring (>= 1.2, < 3.0)
|
||||||
|
sprockets (3.7.2)
|
||||||
|
concurrent-ruby (~> 1.0)
|
||||||
|
rack (> 1, < 3)
|
||||||
|
sprockets-rails (3.2.1)
|
||||||
|
actionpack (>= 4.0)
|
||||||
|
activesupport (>= 4.0)
|
||||||
|
sprockets (>= 3.0.0)
|
||||||
|
therubyracer (0.12.3)
|
||||||
|
libv8 (~> 3.16.14.15)
|
||||||
|
ref
|
||||||
|
thor (0.20.0)
|
||||||
|
thread_safe (0.3.6)
|
||||||
|
tilt (2.0.8)
|
||||||
|
turbolinks (5.2.0)
|
||||||
|
turbolinks-source (~> 5.2)
|
||||||
|
turbolinks-source (5.2.0)
|
||||||
|
tzinfo (1.2.5)
|
||||||
|
thread_safe (~> 0.1)
|
||||||
|
uglifier (4.1.19)
|
||||||
|
execjs (>= 0.3.0, < 3)
|
||||||
|
web-console (3.7.0)
|
||||||
|
actionview (>= 5.0)
|
||||||
|
activemodel (>= 5.0)
|
||||||
|
bindex (>= 0.4.0)
|
||||||
|
railties (>= 5.0)
|
||||||
|
websocket-driver (0.7.0)
|
||||||
|
websocket-extensions (>= 0.1.0)
|
||||||
|
websocket-extensions (0.1.3)
|
||||||
|
xpath (3.2.0)
|
||||||
|
nokogiri (~> 1.8)
|
||||||
|
|
||||||
|
PLATFORMS
|
||||||
|
ruby
|
||||||
|
|
||||||
|
DEPENDENCIES
|
||||||
|
bootsnap (>= 1.1.0)
|
||||||
|
byebug
|
||||||
|
capybara (>= 2.15)
|
||||||
|
chromedriver-helper
|
||||||
|
coffee-rails (~> 4.2)
|
||||||
|
jbuilder (~> 2.5)
|
||||||
|
kaminari
|
||||||
|
listen (>= 3.0.5, < 3.2)
|
||||||
|
mysql2 (>= 0.4.4, < 0.6.0)
|
||||||
|
puma (~> 3.11)
|
||||||
|
rails (~> 5.2.1)
|
||||||
|
redcarpet (~> 3.4)
|
||||||
|
sass-rails (~> 5.0)
|
||||||
|
selenium-webdriver
|
||||||
|
spring
|
||||||
|
spring-watcher-listen (~> 2.0.0)
|
||||||
|
therubyracer
|
||||||
|
turbolinks (~> 5)
|
||||||
|
tzinfo-data
|
||||||
|
uglifier (>= 1.3.0)
|
||||||
|
web-console (>= 3.3.0)
|
||||||
|
|
||||||
|
RUBY VERSION
|
||||||
|
ruby 2.5.3p105
|
||||||
|
|
||||||
|
BUNDLED WITH
|
||||||
|
1.17.1
|
10
README.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# TuxWebROR
|
||||||
|
|
||||||
|
## Pré-requis:
|
||||||
|
* `ruby` >= 2.5.3 (pour la 2.5.1, il faut modifier le fichier Gemfile)
|
||||||
|
* `rake`
|
||||||
|
* un serveur sql
|
||||||
|
* un serveur http
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
Ce [lien](https://www.phusionpassenger.com/docs/tutorials/what_is_passenger/) expliquera surement mieux que moi donc bon...
|
6
Rakefile
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
||||||
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
||||||
|
|
||||||
|
require_relative 'config/application'
|
||||||
|
|
||||||
|
Rails.application.load_tasks
|
3
app/assets/config/manifest.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
//= link_tree ../images
|
||||||
|
//= link_directory ../javascripts .js
|
||||||
|
//= link_directory ../stylesheets .css
|
0
app/assets/images/.keep
Normal file
BIN
app/assets/images/default.png
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
app/assets/images/icones/android.png
Normal file
After Width: | Height: | Size: 518 B |
BIN
app/assets/images/icones/antergos.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
app/assets/images/icones/arch.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
app/assets/images/icones/bsd.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
app/assets/images/icones/debian.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
app/assets/images/icones/elementaryOS.png
Normal file
After Width: | Height: | Size: 478 B |
BIN
app/assets/images/icones/fedora.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
app/assets/images/icones/gentoo.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
app/assets/images/icones/macos.png
Normal file
After Width: | Height: | Size: 610 B |
BIN
app/assets/images/icones/manjaro.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
app/assets/images/icones/mint.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
app/assets/images/icones/opensuse.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
app/assets/images/icones/other.png
Normal file
After Width: | Height: | Size: 917 B |
BIN
app/assets/images/icones/rhel.png
Executable file
After Width: | Height: | Size: 1.6 KiB |
BIN
app/assets/images/icones/ubuntu.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
app/assets/images/icones/void.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
app/assets/images/icones/windows.png
Normal file
After Width: | Height: | Size: 261 B |
BIN
app/assets/images/tux.png
Executable file
After Width: | Height: | Size: 11 KiB |
58
app/assets/javascripts/application.js
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
||||||
|
// listed below.
|
||||||
|
//
|
||||||
|
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
|
||||||
|
// vendor/assets/javascripts directory can be referenced here using a relative path.
|
||||||
|
//
|
||||||
|
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
||||||
|
// compiled file. JavaScript code in this file should be added after the last require_* statement.
|
||||||
|
//
|
||||||
|
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
||||||
|
// about supported directives.
|
||||||
|
//
|
||||||
|
//= require rails-ujs
|
||||||
|
//= require activestorage
|
||||||
|
//= require turbolinks
|
||||||
|
//= require jquery
|
||||||
|
//= require_tree .
|
||||||
|
|
||||||
|
$(document).on('turbolinks:load', () => {
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
$(window).scroll(function () {
|
||||||
|
if ($(this).scrollTop() > 100) {
|
||||||
|
$('#scrollTop').show();
|
||||||
|
} else {
|
||||||
|
$('#scrollTop').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
$('#scrollTop').click(function () {
|
||||||
|
$('html, body').animate({scrollTop: 0}, 200);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.modal-button').click(function () {
|
||||||
|
$('html').addClass('is-clipped');
|
||||||
|
$(`#${this.dataset.target}`).addClass('is-active')
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.modal-background, .modal-close, .modal-card-head .delete, .modal-card-foot .button').click(function () {
|
||||||
|
$('html').removeClass('is-clipped');
|
||||||
|
$('.modal').removeClass('is-active')
|
||||||
|
});
|
||||||
|
|
||||||
|
$('html').keydown(function (e) {
|
||||||
|
if (e.keyCode === 27) {
|
||||||
|
$('html').removeClass('is-clipped');
|
||||||
|
$('.modal').removeClass('is-active')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
console.log('%c[Application.js]', 'font-weight: bold; color: #17a2b8', 'loaded!')
|
||||||
|
});
|
13
app/assets/javascripts/cable.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
// Action Cable provides the framework to deal with WebSockets in Rails.
|
||||||
|
// You can generate new channels where WebSocket features live using the `rails generate channel` command.
|
||||||
|
//
|
||||||
|
//= require action_cable
|
||||||
|
//= require_self
|
||||||
|
//= require_tree ./channels
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
this.App || (this.App = {});
|
||||||
|
|
||||||
|
App.cable = ActionCable.createConsumer();
|
||||||
|
|
||||||
|
}).call(this);
|
0
app/assets/javascripts/channels/.keep
Normal file
2
app/assets/javascripts/jquery.js
vendored
Normal file
3
app/assets/javascripts/users.coffee
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Place all the behaviors and hooks related to the matching controller here.
|
||||||
|
# All this logic will automatically be available in application.js.
|
||||||
|
# You can use CoffeeScript in this file: http://coffeescript.org/
|
52
app/assets/stylesheets/application.scss
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
||||||
|
* listed below.
|
||||||
|
*
|
||||||
|
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
|
||||||
|
* vendor/assets/stylesheets directory can be referenced here using a relative path.
|
||||||
|
*
|
||||||
|
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
||||||
|
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
||||||
|
* files in this directory. Styles in this file should be added after the last require_* statement.
|
||||||
|
* It is generally better to create a new file per style scope.
|
||||||
|
*
|
||||||
|
*= require_tree .
|
||||||
|
*= require bulma/bulma
|
||||||
|
*= require_self
|
||||||
|
*/
|
||||||
|
@import url('https://fonts.googleapis.com/css?family=Ubuntu+Mono');
|
||||||
|
@import url('https://use.fontawesome.com/releases/v5.5.0/css/all.css');
|
||||||
|
@import url('https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.2.1/css/flag-icon.min.css');
|
||||||
|
|
||||||
|
@import "src/variables";
|
||||||
|
|
||||||
|
@import "bulma/_all";
|
||||||
|
@import "src/pad-mar";
|
||||||
|
|
||||||
|
html {
|
||||||
|
background: $sombre_mais-pas-noir;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app {
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
@import "src/layouts/header";
|
||||||
|
|
||||||
|
@import "src/layouts/content";
|
||||||
|
|
||||||
|
@import "src/layouts/footer";
|
||||||
|
}
|
||||||
|
|
||||||
|
.turbolinks-progress-bar {
|
||||||
|
height: 5px;
|
||||||
|
border-top-right-radius: 2.5px;
|
||||||
|
border-bottom-right-radius: 2.5px;
|
||||||
|
background-color: darken($bleu-violet, 10%);
|
||||||
|
|
||||||
|
top: auto;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
2
app/assets/stylesheets/bulma/_all.scss
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
@import "bulma-extensions/_all";
|
||||||
|
@import "bulma-fixes";
|
2
app/assets/stylesheets/bulma/bulma-extensions/_all.scss
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
@import "bulma-divider";
|
||||||
|
@import "bulma-tooltip";
|
321
app/assets/stylesheets/bulma/bulma-extensions/bulma-divider.scss
Normal file
|
@ -0,0 +1,321 @@
|
||||||
|
@-webkit-keyframes spinAround {
|
||||||
|
from {
|
||||||
|
-webkit-transform: rotate(0);
|
||||||
|
transform: rotate(0)
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: rotate(359deg);
|
||||||
|
transform: rotate(359deg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes spinAround {
|
||||||
|
from {
|
||||||
|
-webkit-transform: rotate(0);
|
||||||
|
transform: rotate(0)
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: rotate(359deg);
|
||||||
|
transform: rotate(359deg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.is-divider,
|
||||||
|
.is-divider-vertical {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
border-top: .1rem solid #dbdbdb;
|
||||||
|
height: .1rem;
|
||||||
|
margin: 2rem 0;
|
||||||
|
text-align: center
|
||||||
|
}
|
||||||
|
.is-divider-vertical[data-content]::after,
|
||||||
|
.is-divider[data-content]::after {
|
||||||
|
background: #fff;
|
||||||
|
color: #b5b5b5;
|
||||||
|
content: attr(data-content);
|
||||||
|
display: inline-block;
|
||||||
|
font-size: .75rem;
|
||||||
|
padding: .4rem .8rem;
|
||||||
|
-webkit-transform: translateY(-1.1rem);
|
||||||
|
transform: translateY(-1.1rem);
|
||||||
|
text-align: center
|
||||||
|
}
|
||||||
|
@media screen and (min-width:769px),
|
||||||
|
print {
|
||||||
|
.is-divider-vertical {
|
||||||
|
display: block;
|
||||||
|
flex: none;
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
padding: 2rem;
|
||||||
|
margin: 0;
|
||||||
|
position: relative;
|
||||||
|
border-top: none;
|
||||||
|
min-height: 2rem
|
||||||
|
}
|
||||||
|
.is-divider-vertical::before {
|
||||||
|
border-left: .1rem solid #dbdbdb;
|
||||||
|
bottom: 1rem;
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
left: 50%;
|
||||||
|
position: absolute;
|
||||||
|
top: 1rem;
|
||||||
|
-webkit-transform: translateX(-50%);
|
||||||
|
transform: translateX(-50%)
|
||||||
|
}
|
||||||
|
.is-divider-vertical[data-content]::after {
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
padding: .1rem;
|
||||||
|
-webkit-transform: translateY(-50%) translateX(-50%);
|
||||||
|
transform: translateY(-50%) translateX(-50%)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-white,
|
||||||
|
.is-divider.is-white {
|
||||||
|
border-top-color: #fff
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-white[data-content]::after,
|
||||||
|
.is-divider.is-white[data-content]::after {
|
||||||
|
background: #0a0a0a;
|
||||||
|
color: #fff
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-white::before,
|
||||||
|
.is-divider.is-white::before {
|
||||||
|
border-left-color: #fff
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-black,
|
||||||
|
.is-divider.is-black {
|
||||||
|
border-top-color: #0a0a0a
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-black[data-content]::after,
|
||||||
|
.is-divider.is-black[data-content]::after {
|
||||||
|
background: #fff;
|
||||||
|
color: #0a0a0a
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-black::before,
|
||||||
|
.is-divider.is-black::before {
|
||||||
|
border-left-color: #0a0a0a
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-light,
|
||||||
|
.is-divider.is-light {
|
||||||
|
border-top-color: #f5f5f5
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-light[data-content]::after,
|
||||||
|
.is-divider.is-light[data-content]::after {
|
||||||
|
background: #363636;
|
||||||
|
color: #f5f5f5
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-light::before,
|
||||||
|
.is-divider.is-light::before {
|
||||||
|
border-left-color: #f5f5f5
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-dark,
|
||||||
|
.is-divider.is-dark {
|
||||||
|
border-top-color: #363636
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-dark[data-content]::after,
|
||||||
|
.is-divider.is-dark[data-content]::after {
|
||||||
|
background: #f5f5f5;
|
||||||
|
color: #363636
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-dark::before,
|
||||||
|
.is-divider.is-dark::before {
|
||||||
|
border-left-color: #363636
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-primary,
|
||||||
|
.is-divider.is-primary {
|
||||||
|
border-top-color: #00d1b2
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-primary[data-content]::after,
|
||||||
|
.is-divider.is-primary[data-content]::after {
|
||||||
|
background: #fff;
|
||||||
|
color: #00d1b2
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-primary::before,
|
||||||
|
.is-divider.is-primary::before {
|
||||||
|
border-left-color: #00d1b2
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-link,
|
||||||
|
.is-divider.is-link {
|
||||||
|
border-top-color: #3273dc
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-link[data-content]::after,
|
||||||
|
.is-divider.is-link[data-content]::after {
|
||||||
|
background: #fff;
|
||||||
|
color: #3273dc
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-link::before,
|
||||||
|
.is-divider.is-link::before {
|
||||||
|
border-left-color: #3273dc
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-info,
|
||||||
|
.is-divider.is-info {
|
||||||
|
border-top-color: #209cee
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-info[data-content]::after,
|
||||||
|
.is-divider.is-info[data-content]::after {
|
||||||
|
background: #fff;
|
||||||
|
color: #209cee
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-info::before,
|
||||||
|
.is-divider.is-info::before {
|
||||||
|
border-left-color: #209cee
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-success,
|
||||||
|
.is-divider.is-success {
|
||||||
|
border-top-color: #23d160
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-success[data-content]::after,
|
||||||
|
.is-divider.is-success[data-content]::after {
|
||||||
|
background: #fff;
|
||||||
|
color: #23d160
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-success::before,
|
||||||
|
.is-divider.is-success::before {
|
||||||
|
border-left-color: #23d160
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-warning,
|
||||||
|
.is-divider.is-warning {
|
||||||
|
border-top-color: #ffdd57
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-warning[data-content]::after,
|
||||||
|
.is-divider.is-warning[data-content]::after {
|
||||||
|
background: rgba(0, 0, 0, .7);
|
||||||
|
color: #ffdd57
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-warning::before,
|
||||||
|
.is-divider.is-warning::before {
|
||||||
|
border-left-color: #ffdd57
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-danger,
|
||||||
|
.is-divider.is-danger {
|
||||||
|
border-top-color: #ff3860
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-danger[data-content]::after,
|
||||||
|
.is-divider.is-danger[data-content]::after {
|
||||||
|
background: #fff;
|
||||||
|
color: #ff3860
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-danger::before,
|
||||||
|
.is-divider.is-danger::before {
|
||||||
|
border-left-color: #ff3860
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-black-bis,
|
||||||
|
.is-divider.is-black-bis {
|
||||||
|
border-top-color: #121212
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-black-bis[data-content]::after,
|
||||||
|
.is-divider.is-black-bis[data-content]::after {
|
||||||
|
background: #fff;
|
||||||
|
color: #121212
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-black-bis::before,
|
||||||
|
.is-divider.is-black-bis::before {
|
||||||
|
border-left-color: #121212
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-black-ter,
|
||||||
|
.is-divider.is-black-ter {
|
||||||
|
border-top-color: #242424
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-black-ter[data-content]::after,
|
||||||
|
.is-divider.is-black-ter[data-content]::after {
|
||||||
|
background: #fff;
|
||||||
|
color: #242424
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-black-ter::before,
|
||||||
|
.is-divider.is-black-ter::before {
|
||||||
|
border-left-color: #242424
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-grey-darker,
|
||||||
|
.is-divider.is-grey-darker {
|
||||||
|
border-top-color: #363636
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-grey-darker[data-content]::after,
|
||||||
|
.is-divider.is-grey-darker[data-content]::after {
|
||||||
|
background: #fff;
|
||||||
|
color: #363636
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-grey-darker::before,
|
||||||
|
.is-divider.is-grey-darker::before {
|
||||||
|
border-left-color: #363636
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-grey-dark,
|
||||||
|
.is-divider.is-grey-dark {
|
||||||
|
border-top-color: #4a4a4a
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-grey-dark[data-content]::after,
|
||||||
|
.is-divider.is-grey-dark[data-content]::after {
|
||||||
|
background: #fff;
|
||||||
|
color: #4a4a4a
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-grey-dark::before,
|
||||||
|
.is-divider.is-grey-dark::before {
|
||||||
|
border-left-color: #4a4a4a
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-grey,
|
||||||
|
.is-divider.is-grey {
|
||||||
|
border-top-color: #7a7a7a
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-grey[data-content]::after,
|
||||||
|
.is-divider.is-grey[data-content]::after {
|
||||||
|
background: #fff;
|
||||||
|
color: #7a7a7a
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-grey::before,
|
||||||
|
.is-divider.is-grey::before {
|
||||||
|
border-left-color: #7a7a7a
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-grey-light,
|
||||||
|
.is-divider.is-grey-light {
|
||||||
|
border-top-color: #b5b5b5
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-grey-light[data-content]::after,
|
||||||
|
.is-divider.is-grey-light[data-content]::after {
|
||||||
|
background: #fff;
|
||||||
|
color: #b5b5b5
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-grey-light::before,
|
||||||
|
.is-divider.is-grey-light::before {
|
||||||
|
border-left-color: #b5b5b5
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-grey-lighter,
|
||||||
|
.is-divider.is-grey-lighter {
|
||||||
|
border-top-color: #dbdbdb
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-grey-lighter[data-content]::after,
|
||||||
|
.is-divider.is-grey-lighter[data-content]::after {
|
||||||
|
background: rgba(0, 0, 0, .7);
|
||||||
|
color: #dbdbdb
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-grey-lighter::before,
|
||||||
|
.is-divider.is-grey-lighter::before {
|
||||||
|
border-left-color: #dbdbdb
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-white-ter,
|
||||||
|
.is-divider.is-white-ter {
|
||||||
|
border-top-color: #f5f5f5
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-white-ter[data-content]::after,
|
||||||
|
.is-divider.is-white-ter[data-content]::after {
|
||||||
|
background: rgba(0, 0, 0, .7);
|
||||||
|
color: #f5f5f5
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-white-ter::before,
|
||||||
|
.is-divider.is-white-ter::before {
|
||||||
|
border-left-color: #f5f5f5
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-white-bis,
|
||||||
|
.is-divider.is-white-bis {
|
||||||
|
border-top-color: #fafafa
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-white-bis[data-content]::after,
|
||||||
|
.is-divider.is-white-bis[data-content]::after {
|
||||||
|
background: rgba(0, 0, 0, .7);
|
||||||
|
color: #fafafa
|
||||||
|
}
|
||||||
|
.is-divider-vertical.is-white-bis::before,
|
||||||
|
.is-divider.is-white-bis::before {
|
||||||
|
border-left-color: #fafafa
|
||||||
|
}
|
1201
app/assets/stylesheets/bulma/bulma-extensions/bulma-tooltip.scss
Normal file
89
app/assets/stylesheets/bulma/bulma-fixes.scss
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
@import "../src/variables";
|
||||||
|
|
||||||
|
.pagination-previous, .pagination-next, .pagination-link {
|
||||||
|
color: $grey-light;
|
||||||
|
transition-duration: .2s;
|
||||||
|
|
||||||
|
&.is-current {
|
||||||
|
background-color: $bleu-violet;
|
||||||
|
border-color: darken($bleu-violet, 2%);
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
&.is-current {
|
||||||
|
background-color: darken($bleu-violet, 20%);
|
||||||
|
border-color: darken($bleu-violet, 22%);
|
||||||
|
}
|
||||||
|
color: $blanc_immacule;
|
||||||
|
background-color: $gris-violet;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip.is-tooltip-multiline::before {
|
||||||
|
min-width: 15rem!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class*="-bleu_violet"] {
|
||||||
|
background: $bleu_violet;
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-bleu_violet {
|
||||||
|
border: none;
|
||||||
|
color: $blanc_immacule;
|
||||||
|
&:hover {
|
||||||
|
background: darken($bleu_violet, 10%);
|
||||||
|
color: $blanc_immacule;
|
||||||
|
}
|
||||||
|
&:active {
|
||||||
|
background: darken($bleu_violet, 20%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-dark .navbar-item, .navbar-link{
|
||||||
|
color: $blanc_immacule;
|
||||||
|
line-height: inherit;
|
||||||
|
|
||||||
|
&:hover, &input:hover{
|
||||||
|
background-color: inherit;
|
||||||
|
color: $blanc_immacule;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-extra_large {
|
||||||
|
@media (min-width: 769px) {
|
||||||
|
font-size: 1.75rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-full-width {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
&:hover {
|
||||||
|
color: #45618a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
transition: ease-in-out .1s;
|
||||||
|
&.is-success {
|
||||||
|
&:hover {
|
||||||
|
background-color: $success;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.is-white {
|
||||||
|
&:hover {
|
||||||
|
background-color: darken($blanc_immacule, 10%);
|
||||||
|
}
|
||||||
|
&:active {
|
||||||
|
background: darken($blanc_immacule, 20%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.grey-link {
|
||||||
|
color: $gris-violet;
|
||||||
|
&:hover {
|
||||||
|
color: darken($bleu-violet, 5%);
|
||||||
|
}
|
||||||
|
}
|
47
app/assets/stylesheets/src/layouts/content.scss
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
@import "../variables";
|
||||||
|
|
||||||
|
#content {
|
||||||
|
padding-top: 60px;
|
||||||
|
flex: 1;
|
||||||
|
width: 80%;
|
||||||
|
max-width: 1216px;
|
||||||
|
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
|
||||||
|
.description {
|
||||||
|
color: $blanc_immacule;
|
||||||
|
font-size: 1.5em;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: $gris-violet;
|
||||||
|
&:hover {
|
||||||
|
color: #45618a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#scrollTop {
|
||||||
|
display: none;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 70px;
|
||||||
|
right: 30px;
|
||||||
|
z-index: 99;
|
||||||
|
|
||||||
|
height: 42px;
|
||||||
|
width: 42px;
|
||||||
|
|
||||||
|
background: $gris-violet;
|
||||||
|
transition: .1s ease-in-out;
|
||||||
|
|
||||||
|
border: none;
|
||||||
|
border-radius: 10px;
|
||||||
|
outline: none;
|
||||||
|
color: $blanc_immacule;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 0 0 20px 0 $hovered_shadow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
41
app/assets/stylesheets/src/layouts/footer.scss
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
@import "../variables";
|
||||||
|
|
||||||
|
.footer\#home {
|
||||||
|
margin-top: 70px;
|
||||||
|
color: $blanc_immacule;
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
font-size: 1.5em;
|
||||||
|
box-shadow: 0 -10px 20px -5px $shadow;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
|
.bugreport {
|
||||||
|
padding-left: 7px;
|
||||||
|
}
|
||||||
|
.copyright {
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
.language {
|
||||||
|
padding-right: 7px;
|
||||||
|
figure {
|
||||||
|
transition: .1s ease-in-out;
|
||||||
|
|
||||||
|
border: 1px solid $blanc_immacule;
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 30px!important;
|
||||||
|
height: 30px!important;
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 0 0 20px 0 $hovered_shadow;
|
||||||
|
}
|
||||||
|
&:first-child {
|
||||||
|
margin-right: 7px;
|
||||||
|
}
|
||||||
|
&:last-child {
|
||||||
|
margin-left: 7px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
38
app/assets/stylesheets/src/layouts/header.scss
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
@import "../variables";
|
||||||
|
|
||||||
|
header {
|
||||||
|
box-shadow: 0 10px 20px 5px $shadow;
|
||||||
|
|
||||||
|
&.header\#home.to-350 {
|
||||||
|
height: 350px;
|
||||||
|
line-height: 350px;
|
||||||
|
|
||||||
|
nav {
|
||||||
|
height: 350px;
|
||||||
|
line-height: 350px;
|
||||||
|
|
||||||
|
& > .navbar-brand {
|
||||||
|
justify-content: center;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
|
||||||
|
font-family: 'Ubuntu Mono', monospace;
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 6em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
|
||||||
|
nav {
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
& > .navbar-brand {
|
||||||
|
font-size: 2em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
40
app/assets/stylesheets/src/pad-mar.scss
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
$start: 0;
|
||||||
|
$end: 50;
|
||||||
|
|
||||||
|
@for $i from $start through $end {
|
||||||
|
.pad-#{$i} {
|
||||||
|
padding: #{$i}px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pad-t-#{$i} {
|
||||||
|
padding-top: #{$i}px;
|
||||||
|
}
|
||||||
|
.pad-r-#{$i} {
|
||||||
|
padding-right: #{$i}px;
|
||||||
|
}
|
||||||
|
.pad-b-#{$i} {
|
||||||
|
padding-bottom: #{$i}px;
|
||||||
|
}
|
||||||
|
.pad-l-#{$i} {
|
||||||
|
padding-left: #{$i}px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@for $i from $start through $end {
|
||||||
|
.mar-#{$i} {
|
||||||
|
margin: #{$i}px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mar-t-#{$i} {
|
||||||
|
margin-top: #{$i}px;
|
||||||
|
}
|
||||||
|
.mar-r-#{$i} {
|
||||||
|
margin-right: #{$i}px;
|
||||||
|
}
|
||||||
|
.mar-b-#{$i} {
|
||||||
|
margin-bottom: #{$i}px;
|
||||||
|
}
|
||||||
|
.mar-l-#{$i} {
|
||||||
|
margin-left: #{$i}px;
|
||||||
|
}
|
||||||
|
}
|
18
app/assets/stylesheets/src/variables.scss
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
$shadow: rgba(69, 69, 69, 0.5);
|
||||||
|
$hovered_shadow: rgba(0, 0, 0, 0.9);
|
||||||
|
|
||||||
|
// https://discordapp.com/branding
|
||||||
|
$blanc_immacule: #fff;
|
||||||
|
$bleu-violet: #7289DA;
|
||||||
|
$gris-violet: #99AAB5;
|
||||||
|
$sombre_mais-pas-noir: #2C2F33;
|
||||||
|
|
||||||
|
$block_code--border: rgba(32, 34, 37, .3);
|
||||||
|
$block_code--color: #839496;
|
||||||
|
$block_code--strong-color: #839496;
|
||||||
|
|
||||||
|
$grey-light: #b5b5b5;
|
||||||
|
|
||||||
|
$pagination-active-background-color: #2948dc;
|
||||||
|
|
||||||
|
$success: #31b545
|
163
app/assets/stylesheets/users.scss
Normal file
|
@ -0,0 +1,163 @@
|
||||||
|
// Place all the styles related to the Posts controller here.
|
||||||
|
// They will automatically be included in application.css.
|
||||||
|
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||||
|
|
||||||
|
@import "src/variables";
|
||||||
|
|
||||||
|
header {
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
|
||||||
|
font-size: 2em;
|
||||||
|
|
||||||
|
nav {
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
& > .navbar-brand {
|
||||||
|
justify-content: center;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
|
||||||
|
font-family: 'Ubuntu Mono', monospace;
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 2em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#content {
|
||||||
|
padding-top: 40px;
|
||||||
|
|
||||||
|
h1.title{
|
||||||
|
color: $blanc_immacule
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
border-radius: 6px;
|
||||||
|
overflow: hidden;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
min-height: 255px;
|
||||||
|
|
||||||
|
word-wrap: break-word;
|
||||||
|
|
||||||
|
box-shadow: 0 0 15px 0 $hovered_shadow;
|
||||||
|
|
||||||
|
.header {
|
||||||
|
height: 50px;
|
||||||
|
.avatar {
|
||||||
|
width: 80px;
|
||||||
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
|
margin: 0 auto;
|
||||||
|
img {
|
||||||
|
display: block;
|
||||||
|
border-radius: 50%;
|
||||||
|
position: absolute;
|
||||||
|
bottom: -42px;
|
||||||
|
border: 4px solid $blanc_immacule;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.card-body {
|
||||||
|
padding: 30px;
|
||||||
|
.user-info {
|
||||||
|
padding-top: 20px;
|
||||||
|
.username {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.created_at {
|
||||||
|
font-size: .8em;
|
||||||
|
color: #787485;;
|
||||||
|
}
|
||||||
|
|
||||||
|
.block_code {
|
||||||
|
background: #2f3136;
|
||||||
|
border-radius: 5px;
|
||||||
|
border: 2px solid $block_code--border;
|
||||||
|
margin-top: 6px;
|
||||||
|
padding: .5em;
|
||||||
|
color: $block_code--color;
|
||||||
|
font-weight: 300;
|
||||||
|
& strong {
|
||||||
|
font-weight: 900;
|
||||||
|
color: $block_code--strong-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.actions {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 30px;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
.button {
|
||||||
|
padding: 13px 17px;
|
||||||
|
color: $blanc_immacule;
|
||||||
|
border-radius: 100px;
|
||||||
|
border-color: $bleu-violet;
|
||||||
|
transition: opacity .2s;
|
||||||
|
&:hover {
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-card {
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 1%;
|
||||||
|
background: $blanc_immacule;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
.header {
|
||||||
|
img {
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
.username {
|
||||||
|
font-size: 2em;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.subcard_action {
|
||||||
|
font-size: 1rem;
|
||||||
|
white-space: nowrap;
|
||||||
|
user-select: none;
|
||||||
|
|
||||||
|
a {
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 0 .75em;
|
||||||
|
font-size: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
li {
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
&:first-child a {
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&+li::before {
|
||||||
|
color: $grey-light;
|
||||||
|
content: "|";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
4
app/channels/application_cable/channel.rb
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
module ApplicationCable
|
||||||
|
class Channel < ActionCable::Channel::Base
|
||||||
|
end
|
||||||
|
end
|
4
app/channels/application_cable/connection.rb
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
module ApplicationCable
|
||||||
|
class Connection < ActionCable::Connection::Base
|
||||||
|
end
|
||||||
|
end
|
7
app/controllers/application_controller.rb
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
class ApplicationController < ActionController::Base
|
||||||
|
before_action :set_locale
|
||||||
|
|
||||||
|
def set_locale
|
||||||
|
I18n.locale = params[:locale] || I18n.default_locale
|
||||||
|
end
|
||||||
|
end
|
0
app/controllers/concerns/.keep
Normal file
5
app/controllers/pages_controller.rb
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
class PagesController < ApplicationController
|
||||||
|
|
||||||
|
def home
|
||||||
|
end
|
||||||
|
end
|
63
app/controllers/users_controller.rb
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
class UsersController < ApplicationController
|
||||||
|
def index
|
||||||
|
@total_users = User.all().length
|
||||||
|
if params[:key_search]
|
||||||
|
@users = User.where('id LIKE :key_search OR username LIKE :key_search', key_search: "%#{params[:key_search]}%").page(params[:page])
|
||||||
|
else
|
||||||
|
@users = User.order(:id).page(params[:page])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def show
|
||||||
|
@user = User.find(params[:id])
|
||||||
|
@app_title = @user.username
|
||||||
|
end
|
||||||
|
|
||||||
|
def validate_key
|
||||||
|
row = Session.find_by_token(params[:key])
|
||||||
|
|
||||||
|
if row \
|
||||||
|
and (time_delta(Time.now.utc, row.updated_at) < 10.minutes) \
|
||||||
|
and (row.is_admin or row.user_id == params[:id])
|
||||||
|
@user = User.find(params[:id])
|
||||||
|
session[:identified] = true
|
||||||
|
session[:identified_at] = Time.now.utc
|
||||||
|
|
||||||
|
redirect_to edit_user_path(id: @user.id) and return
|
||||||
|
else
|
||||||
|
redirect_to user_path(id: params[:id]), flash: {error: true} and return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def edit
|
||||||
|
@user = User.find(params[:id])
|
||||||
|
if session[:identified] and (time_delta(Time.now.utc, session[:identified_at]) < 10.minutes)
|
||||||
|
@app_title = @user.username
|
||||||
|
render "users/edit"
|
||||||
|
else
|
||||||
|
redirect_to user_path(id: params[:id]), flash: {error: true} and return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def update
|
||||||
|
@user = User.find(params[:id])
|
||||||
|
@user.update(update_post_params)
|
||||||
|
redirect_to user_path(id: @user.id)
|
||||||
|
end
|
||||||
|
|
||||||
|
def destroy
|
||||||
|
@user = User.find(params[:id])
|
||||||
|
@user.destroy
|
||||||
|
redirect_to users_path
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def update_post_params
|
||||||
|
params.require(:user).permit(:os, :config, :pays)
|
||||||
|
end
|
||||||
|
|
||||||
|
def time_delta(new, old)
|
||||||
|
Time.parse(new.to_s) - Time.parse(old.to_s)
|
||||||
|
end
|
||||||
|
end
|
40
app/helpers/application_helper.rb
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
module ApplicationHelper
|
||||||
|
def lang_switcher
|
||||||
|
content_tag(:span, class: 'language') do
|
||||||
|
I18n.available_locales.each do |loc|
|
||||||
|
locale_param = request.path == root_path ? root_path(locale: loc) : params.merge(locale: loc).permit(:locale, :page, :key_search)
|
||||||
|
concat link_to content_tag(:figure, "", :class => "flag-icon flag-icon-squared flag-icon-#{loc == :en ? "us" : loc}"), locale_param
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def iso2human(date)
|
||||||
|
if date
|
||||||
|
begin
|
||||||
|
time = Time.iso8601(date.sub(' ', 'T'))
|
||||||
|
"#{set0(time.day)}/#{set0(time.month)}/#{time.year}"
|
||||||
|
rescue
|
||||||
|
date
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def url_exist?(url)
|
||||||
|
require 'net/http'
|
||||||
|
begin
|
||||||
|
Net::HTTP.get_response(URI.parse(url)).is_a?(Net::HTTPSuccess)
|
||||||
|
rescue
|
||||||
|
false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def set0(value)
|
||||||
|
if value <= 9
|
||||||
|
"0#{value}"
|
||||||
|
else
|
||||||
|
value
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
53
app/helpers/users_helper.rb
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
module UsersHelper
|
||||||
|
def markdown(text)
|
||||||
|
if !text.nil? && !text.blank?
|
||||||
|
text = put_emote(
|
||||||
|
Rack::Utils.escape_html(
|
||||||
|
text
|
||||||
|
)
|
||||||
|
.gsub(
|
||||||
|
/\n/,
|
||||||
|
'<br>'
|
||||||
|
)
|
||||||
|
.gsub(
|
||||||
|
/```/,
|
||||||
|
''
|
||||||
|
)
|
||||||
|
)
|
||||||
|
md = Redcarpet::Markdown.new(Redcarpet::Render::HTML)
|
||||||
|
md.render(text)
|
||||||
|
else
|
||||||
|
'n/a'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_location
|
||||||
|
result = ActiveSupport::JSON.decode(Timeout::timeout(5) {Net::HTTP.get_response(URI.parse('http://ip-api.com/json/' + request.remote_ip)).body})
|
||||||
|
if result['status'] != "fail"
|
||||||
|
result['regionName']
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def put_emote(text)
|
||||||
|
splitted_text = text.split
|
||||||
|
clean_text = []
|
||||||
|
regex = "<:([a-zA-Z0-9]*):[0-9]{18}>"
|
||||||
|
splitted_text.each do |word|
|
||||||
|
if word.match(/#{regex}/)
|
||||||
|
emote_name = word.match(/#{regex}/).captures[0]
|
||||||
|
begin
|
||||||
|
formated_word = image_tag("icones/#{emote_name}.png", size: 16, alt: emote_name)
|
||||||
|
rescue
|
||||||
|
formated_word = ":#{emote_name}:"
|
||||||
|
end
|
||||||
|
else
|
||||||
|
formated_word = word
|
||||||
|
end
|
||||||
|
clean_text.push(formated_word)
|
||||||
|
end
|
||||||
|
|
||||||
|
clean_text.join(' ')
|
||||||
|
end
|
||||||
|
end
|
2
app/jobs/application_job.rb
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
class ApplicationJob < ActiveJob::Base
|
||||||
|
end
|
4
app/mailers/application_mailer.rb
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
class ApplicationMailer < ActionMailer::Base
|
||||||
|
default from: 'from@example.com'
|
||||||
|
layout 'mailer'
|
||||||
|
end
|
3
app/models/application_record.rb
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
class ApplicationRecord < ActiveRecord::Base
|
||||||
|
self.abstract_class = true
|
||||||
|
end
|
0
app/models/concerns/.keep
Normal file
2
app/models/session.rb
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
class Session < ApplicationRecord
|
||||||
|
end
|
3
app/models/user.rb
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
class User < ApplicationRecord
|
||||||
|
|
||||||
|
end
|
17
app/views/kaminari/_first_page.html.erb
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<%
|
||||||
|
=begin
|
||||||
|
|
||||||
|
Link to the "First" page
|
||||||
|
- available local variables
|
||||||
|
url : url to the first page
|
||||||
|
current_page : a page object for the currently displayed page
|
||||||
|
total_pages : total number of pages
|
||||||
|
per_page : number of items to fetch per page
|
||||||
|
remote : data-remote
|
||||||
|
|
||||||
|
=end
|
||||||
|
%>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<%= link_to_unless current_page.first?, t('views.pagination.first').html_safe, url, remote: remote, class: "pagination-link#{' is-current' if current_page.first?}" %>
|
||||||
|
</li>
|
17
app/views/kaminari/_gap.html.erb
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<%
|
||||||
|
=begin
|
||||||
|
|
||||||
|
Non-link tag that stands for skipped pages...
|
||||||
|
- available local variables
|
||||||
|
current_page : a page object for the currently displayed page
|
||||||
|
total_pages : total number of pages
|
||||||
|
per_page : number of items to fetch per page
|
||||||
|
remote : data-remote
|
||||||
|
|
||||||
|
=end
|
||||||
|
%>
|
||||||
|
<li>
|
||||||
|
<span class="pagination-ellipsis">
|
||||||
|
<%= t('views.pagination.truncate').html_safe %>
|
||||||
|
</span>
|
||||||
|
</li>
|
17
app/views/kaminari/_last_page.html.erb
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<%
|
||||||
|
=begin
|
||||||
|
|
||||||
|
Link to the "Last" page
|
||||||
|
- available local variables
|
||||||
|
url : url to the last page
|
||||||
|
current_page : a page object for the currently displayed page
|
||||||
|
total_pages : total number of pages
|
||||||
|
per_page : number of items to fetch per page
|
||||||
|
remote : data-remote
|
||||||
|
|
||||||
|
=end
|
||||||
|
%>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<%= link_to_unless current_page.last?, t('views.pagination.last').html_safe, url, remote: remote, class: "pagination-link#{' is-current' if current_page.last?}" %>
|
||||||
|
</li>
|
15
app/views/kaminari/_next_page.html.erb
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<%
|
||||||
|
=begin
|
||||||
|
|
||||||
|
Link to the "Next" page
|
||||||
|
- available local variables
|
||||||
|
url : url to the next page
|
||||||
|
current_page : a page object for the currently displayed page
|
||||||
|
total_pages : total number of pages
|
||||||
|
per_page : number of items to fetch per page
|
||||||
|
remote : data-remote
|
||||||
|
|
||||||
|
=end
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%= link_to_unless current_page.last?, t('views.pagination.next').html_safe, url, rel: 'next', remote: remote, class: 'pagination-next' %>
|
18
app/views/kaminari/_page.html.erb
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<%
|
||||||
|
=begin
|
||||||
|
|
||||||
|
Link showing page number
|
||||||
|
- available local variables
|
||||||
|
page : a page object for "this" page
|
||||||
|
url : url to this page
|
||||||
|
current_page : a page object for the currently displayed page
|
||||||
|
total_pages : total number of pages
|
||||||
|
per_page : number of items to fetch per page
|
||||||
|
remote : data-remote
|
||||||
|
|
||||||
|
=end
|
||||||
|
%>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<%= link_to page, url, {remote: remote, rel: page.rel, class: "pagination-link#{' is-current' if page.current?}"} %>
|
||||||
|
</li>
|
31
app/views/kaminari/_paginator.html.erb
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<%
|
||||||
|
=begin
|
||||||
|
|
||||||
|
The container tag
|
||||||
|
- available local variables
|
||||||
|
current_page : a page object for the currently displayed page
|
||||||
|
total_pages : total number of pages
|
||||||
|
per_page : number of items to fetch per page
|
||||||
|
remote : data-remote
|
||||||
|
paginator : the paginator that renders the pagination tags inside
|
||||||
|
|
||||||
|
=end
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%= paginator.render do %>
|
||||||
|
<nav class="pagination is-centered">
|
||||||
|
<%= prev_page_tag unless current_page.first? %>
|
||||||
|
<%= next_page_tag unless current_page.last? %>
|
||||||
|
<ul class="pagination-list">
|
||||||
|
<%= first_page_tag unless current_page.first? %>
|
||||||
|
<% each_page do |page| %>
|
||||||
|
<% if page.display_tag? %>
|
||||||
|
<%= page_tag page %>
|
||||||
|
<% elsif !page.was_truncated? %>
|
||||||
|
<%= gap_tag %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<%= last_page_tag unless current_page.last? %>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<% end %>
|
15
app/views/kaminari/_prev_page.html.erb
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<%
|
||||||
|
=begin
|
||||||
|
|
||||||
|
Link to the "Previous" page
|
||||||
|
- available local variables
|
||||||
|
url : url to the previous page
|
||||||
|
current_page : a page object for the currently displayed page
|
||||||
|
total_pages : total number of pages
|
||||||
|
per_page : number of items to fetch per page
|
||||||
|
remote : data-remote
|
||||||
|
|
||||||
|
=end
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%= link_to_unless current_page.first?, t('views.pagination.previous').html_safe, url, rel: 'prev', remote: remote, class: 'pagination-previous' %>
|
52
app/views/layouts/application.html.erb
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||||
|
|
||||||
|
<title><%= @app_title ? @app_title + " | " : ""%>TuxWeb</title>
|
||||||
|
<%= csrf_meta_tags %>
|
||||||
|
<%= csp_meta_tag %>
|
||||||
|
|
||||||
|
<meta property="og:site_name" content="TuxWeb" />
|
||||||
|
<meta property="og:locale" content="<%= t('meta.locale') %>" />
|
||||||
|
<meta name="description" content="<%= t('meta.description') %>" />
|
||||||
|
<meta name="theme-color" content="#6E83D1" />
|
||||||
|
|
||||||
|
|
||||||
|
<% if @user %>
|
||||||
|
<%= tag("meta", property: "og:title", content: @app_title + " | TuxWeb") %>
|
||||||
|
<%= tag("meta", property: "og:url", content: user_url(id: @user.id)) %>
|
||||||
|
<%= tag("meta", property: "og:description", content: raw(@user.os)) %>
|
||||||
|
<%= tag("meta", property: "og:image", content: url_exist?(@user.useravatar) ? @user.useravatar : image_url("default.png")) %>
|
||||||
|
<% else %>
|
||||||
|
<meta property="og:title" content="TuxWeb" />
|
||||||
|
<meta property="og:url" content="<%= root_url %>" />
|
||||||
|
<meta property="og:description" content="<%= t('meta.description') %>" />
|
||||||
|
<meta property="og:image" content="<%= image_url('tux.png') %>" />
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||||
|
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="app">
|
||||||
|
<%= yield %>
|
||||||
|
|
||||||
|
<footer class="footer#home">
|
||||||
|
<span class="bugreport">
|
||||||
|
<a href="https://git.gnous.eu/gnous/TuxWebROR/issues" class="grey-link" target="_blank">
|
||||||
|
<i class="fas fa-bug"></i>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
<span class="copyright">
|
||||||
|
© 2016-<%= Time.current.year %>
|
||||||
|
<a class="grey-link" href="https://outout.xyz">@Outout</a> - <%= raw t('footer.not_affiliated') %> <a class="grey-link" href="https://discordapp.com/branding">Discord</a>
|
||||||
|
</span>
|
||||||
|
<%= lang_switcher %>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
13
app/views/layouts/mailer.html.erb
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<style>
|
||||||
|
/* Email styles need to be inline */
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<%= yield %>
|
||||||
|
</body>
|
||||||
|
</html>
|
1
app/views/layouts/mailer.text.erb
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<%= yield %>
|
39
app/views/pages/home.html.erb
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
<header class="header header#home to-350">
|
||||||
|
<nav class="navbar navbar-expand-md navbar-dark bg-bleu_violet">
|
||||||
|
<div class="navbar-brand">
|
||||||
|
<h1><a class="navbar-item" href="<%= root_url %>"><b>TuxBot</b></a></h1>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
<div class="description pad-b-20">
|
||||||
|
<%= raw t('home.description') %>
|
||||||
|
</div>
|
||||||
|
<div class="pad-t-20 columns is-multiline">
|
||||||
|
<div class="column is-12">
|
||||||
|
<a class="button is-extra_large is-success is-full-width" href="https://discordapp.com/oauth2/authorize?client_id=301062143942590465&scope=bot&permissions=93248">
|
||||||
|
<span class="icon">
|
||||||
|
<i class="fas fa-plus"></i>
|
||||||
|
</span>
|
||||||
|
<span><%= raw t('home.add_it') %></span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="column is-6 is-12-mobile">
|
||||||
|
<a class="button is-extra_large is-bleu_violet is-full-width" href="https://github.com/outout14/tuxbot-bot">
|
||||||
|
<span class="icon">
|
||||||
|
<i class="fab fa-github"></i>
|
||||||
|
</span>
|
||||||
|
<span><%= raw t('home.source_code') %></span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="column is-6 is-12-mobile">
|
||||||
|
<a class="button is-extra_large is-white is-full-width" href="<%= users_path %>">
|
||||||
|
<span class="icon">
|
||||||
|
<i class="fas fa-users"></i>
|
||||||
|
</span>
|
||||||
|
<span><%= raw t('home.users') %></span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
88
app/views/users/edit.html.erb
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
<header class="header header#home">
|
||||||
|
<nav class="navbar navbar-expand-md navbar-dark bg-bleu_violet">
|
||||||
|
<div class="navbar-brand">
|
||||||
|
<a class="navbar-item" href="<%= root_url %>"><b>TuxBot</b></a>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
<div class="columns mar-t-40">
|
||||||
|
<div class="column is-12">
|
||||||
|
<div class="card is-full-width">
|
||||||
|
<div class="header bg-bleu_violet">
|
||||||
|
<div class="avatar">
|
||||||
|
<img src="<%= url_exist?(@user.useravatar) ? @user.useravatar : image_url('default.png') %>" alt="user_avatar">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="user-info has-text-centered">
|
||||||
|
<h3 class="username"><%= @user.username %></h3>
|
||||||
|
<h6 class="created_at"><%= t('users.created_at') %> <%= iso2human(@user.userbirth) %></h6>
|
||||||
|
<hr>
|
||||||
|
<div class="columns is-multiline">
|
||||||
|
<div class="column is-12">
|
||||||
|
<%= form_for(@user, url: user_path) do |f| %>
|
||||||
|
<div class="columns is-multiline">
|
||||||
|
<div class="column is-12">
|
||||||
|
<span class="subtitle"><i class="fab fa-linux"></i> <%= t('user.oses') %></span>
|
||||||
|
</div>
|
||||||
|
<div class="column is-12">
|
||||||
|
<%= f.text_field :os, class: 'input has-text-centered', id: 'oses' %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="columns is-multiline pad-t-20">
|
||||||
|
<div class="column is-12">
|
||||||
|
<span class="subtitle"><i class="fas fa-cogs"></i> <%= t('user.config') %></span>
|
||||||
|
</div>
|
||||||
|
<div class="column is-12 has-text-left">
|
||||||
|
<%= f.text_area :config, class: 'textarea', id: 'config', rows: '10' %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="columns is-multiline pad-t-20">
|
||||||
|
<div class="column is-12">
|
||||||
|
<span class="subtitle"><i class="fa fa-flag" aria-hidden="true"></i> <%= t('user.country') %>
|
||||||
|
<% if get_location %>
|
||||||
|
<a onclick="$('#pays').val('<%= get_location %>')" class="tooltip is-tooltip-dark" data-tooltip="<%= t('user.fill_country') %>"><i class="fas fa-map-marker-alt"></i></a>
|
||||||
|
<% end %>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="column is-12">
|
||||||
|
<%= f.text_field :pays, class: 'input has-text-centered', id: 'pays' %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="columns is-multiline pad-t-20">
|
||||||
|
<div class="column is-12">
|
||||||
|
<span class="subtitle"><i class="fas fa-sign-in-alt" aria-hidden="true"></i> <%= t('user.discord_created_at') %></span>
|
||||||
|
</div>
|
||||||
|
<div class="column is-12">
|
||||||
|
<span><%= iso2human(@user.userbirth) %></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="columns is-multiline pad-t-20">
|
||||||
|
<div class="column is-12">
|
||||||
|
<span><i class="fa fa-user-plus" aria-hidden="true"></i> <%= t('user.ci_created_at', date: iso2human(@user.cidate), office: @user.cibureau) %></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="button is-success is-outlined"><%= t('action.save') %></button>
|
||||||
|
<a href="<%= user_path(id: @user.id) %>" class="button is-danger" data-confirm="<%= t('action.confirmation') %>" data-method="DELETE"><%= t('action.delete') %></a>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="subcard_action has-text-centered">
|
||||||
|
<ul class="mar-t-20">
|
||||||
|
<li>
|
||||||
|
<a href="<%= user_path(id: @user.id) %>" class="grey-link"><%= t('action.back') %></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
65
app/views/users/index.html.erb
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
<header class="header header#index">
|
||||||
|
<div class="navbar navbar-dark bg-bleu_violet is-fixed-top">
|
||||||
|
<div class="navbar-brand">
|
||||||
|
<a class="navbar-item" href="<%= root_url %>">
|
||||||
|
<b>TuxBot</b>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="tutuxNavbar"
|
||||||
|
onclick="$('#tutuxNavbar').toggleClass('is-active')">
|
||||||
|
<span aria-hidden="true"></span>
|
||||||
|
<span aria-hidden="true"></span>
|
||||||
|
<span aria-hidden="true"></span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="tutuxNavbar" class="navbar-menu">
|
||||||
|
<div class="navbar-end">
|
||||||
|
<a class="navbar-item">
|
||||||
|
<%= form_tag({controller: "users", action: "index"}, method: "get") do %>
|
||||||
|
<%= text_field_tag(:key_search, params[:key_search], class: "input", placeholder: t('users.search')) %>
|
||||||
|
<% end %>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
<h1 class="title"><%= raw t('users.all_users') %></h1>
|
||||||
|
<h3 class="subtitle" style="color: #969696;">(<%= @users.length %>/<%= @total_users %> <%= t('users.users') %>)</h3>
|
||||||
|
<hr>
|
||||||
|
<div id="users" class="columns is-multiline">
|
||||||
|
<% @users.each do |user| %>
|
||||||
|
<div class="column is-3-widescreen is-4-desktop is-6-tablet is-12-mobile">
|
||||||
|
<div class="card">
|
||||||
|
<div class="header bg-bleu_violet">
|
||||||
|
<div class="avatar">
|
||||||
|
<img src="<%= user.useravatar %>" alt="user_avatar" onerror="this.onerror=null;this.src='<%= image_url "default.png" %>'">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="user-info has-text-centered">
|
||||||
|
<h3 class="username"><%= user.username %></h3>
|
||||||
|
<%= iso2human(user.userbirth) %>
|
||||||
|
</div>
|
||||||
|
<div class="actions has-text-centered">
|
||||||
|
<a href="<%= user_path(id: user.id) %>" class="button bg-bleu_violet is-small"><%= t('action.view') %></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<div class="column is-12">
|
||||||
|
<%= paginate @users %>
|
||||||
|
</div>
|
||||||
|
<% if @users.length == 0 %>
|
||||||
|
<div class="column is-full">
|
||||||
|
<div class="notification is-danger">
|
||||||
|
<%= t('users.nothing') %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<button id="scrollTop"><i class="fas fa-arrow-up"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
121
app/views/users/show.html.erb
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
<header class="header header#home">
|
||||||
|
<nav class="navbar navbar-expand-md navbar-dark bg-bleu_violet">
|
||||||
|
<div class="navbar-brand">
|
||||||
|
<a class="navbar-item" href="<%= root_url %>"><b>TuxBot</b></a>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
<div class="columns mar-t-40">
|
||||||
|
<div class="column is-12">
|
||||||
|
<div class="card is-full-width">
|
||||||
|
<div class="header bg-bleu_violet">
|
||||||
|
<div class="avatar">
|
||||||
|
<img src="<%= @user.useravatar %>" alt="user_avatar" onerror="this.onerror=null;this.src='<%= image_url "default.png" %>'">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="user-info has-text-centered">
|
||||||
|
<h3 class="username"><%= @user.username %></h3>
|
||||||
|
<h6 class="created_at"><%= t('users.created_at') %> <%= iso2human(@user.userbirth) %></h6>
|
||||||
|
<hr>
|
||||||
|
<div class="columns is-multiline">
|
||||||
|
<div class="column is-12">
|
||||||
|
<div class="columns is-multiline">
|
||||||
|
<div class="column is-12">
|
||||||
|
<span class="subtitle"><i class="fab fa-linux"></i> <%= t('user.oses') %></span>
|
||||||
|
</div>
|
||||||
|
<div class="column is-12">
|
||||||
|
<span><%= raw markdown(@user.os) %></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="columns is-multiline pad-t-20">
|
||||||
|
<div class="column is-12">
|
||||||
|
<span class="subtitle"><i class="fas fa-cogs"></i> <%= t('user.config') %></span>
|
||||||
|
</div>
|
||||||
|
<div class="column is-12 has-text-left block_code">
|
||||||
|
<div><%= raw markdown(@user.config) %></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="columns is-multiline pad-t-20">
|
||||||
|
<div class="column is-12">
|
||||||
|
<span class="subtitle"><i class="fa fa-flag" aria-hidden="true"></i> <%= t('user.country') %></span>
|
||||||
|
</div>
|
||||||
|
<div class="column is-12">
|
||||||
|
<span><%= raw markdown(@user.pays) %></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="columns is-multiline pad-t-20">
|
||||||
|
<div class="column is-12">
|
||||||
|
<span class="subtitle"><i class="fas fa-sign-in-alt" aria-hidden="true"></i> <%= t('user.discord_created_at') %></span>
|
||||||
|
</div>
|
||||||
|
<div class="column is-12">
|
||||||
|
<span><%= iso2human(@user.userbirth) %></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="columns is-multiline pad-t-20">
|
||||||
|
<div class="column is-12">
|
||||||
|
<span><i class="fa fa-user-plus" aria-hidden="true"></i> <%= t('user.ci_created_at', date: iso2human(@user.cidate), office: @user.cibureau) %></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="subcard_action has-text-centered">
|
||||||
|
<ul class="mar-t-20">
|
||||||
|
<li>
|
||||||
|
<a href="<%= users_path %>" class="grey-link"><%= t('action.back') %></a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<% if session[:identified_at] ? ((Time.now - Time.iso8601(session[:identified_at])) < 60 * 20) : false %>
|
||||||
|
<a href="<%= edit_user_path(id: @user.id, locale: locale) %>" class="grey-link"><%= t('action.edit') %></a>
|
||||||
|
<% else %>
|
||||||
|
<a data-target="key_modal" class="grey-link modal-button"><%= t('action.edit') %></a>
|
||||||
|
<% end %>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal <%= 'is-active' if flash[:success] or flash[:error] %>" id="key_modal">
|
||||||
|
<div class="modal-background"></div>
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="box">
|
||||||
|
<article class="media">
|
||||||
|
<div class="media-content">
|
||||||
|
<div class="content">
|
||||||
|
<%= form_tag(validate_user_path, method: "post") do %>
|
||||||
|
<%= hidden_field_tag(:id, @user.id) %>
|
||||||
|
<strong><%= t('user.key_message') %></strong>
|
||||||
|
<a class="tooltip is-tooltip-dark is-tooltip-right is-tooltip-multiline" data-tooltip="<%= t('user.key_help') %>">
|
||||||
|
<i class="far fa-question-circle"></i>
|
||||||
|
</a>
|
||||||
|
<br>
|
||||||
|
<div class="field">
|
||||||
|
<div class="control has-icons-left mar-t-10">
|
||||||
|
<%= text_field_tag(:key, nil, class: flash[:error] ? "input is-danger" : "input", placeholder: "XXXXXXXXXXXXXXXXXXXXXXXXX", maxlength: "25", autofocus: true) %>
|
||||||
|
<span class="icon is-left">
|
||||||
|
<i class="fas fa-key"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<% if flash[:error] %>
|
||||||
|
<p class="help is-danger"><%= t('user.key_error') %></p>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button class="modal-close is-large" aria-label="close"></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
3
bin/bundle
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
||||||
|
load Gem.bin_path('bundler', 'bundle')
|
9
bin/rails
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
begin
|
||||||
|
load File.expand_path('../spring', __FILE__)
|
||||||
|
rescue LoadError => e
|
||||||
|
raise unless e.message.include?('spring')
|
||||||
|
end
|
||||||
|
APP_PATH = File.expand_path('../config/application', __dir__)
|
||||||
|
require_relative '../config/boot'
|
||||||
|
require 'rails/commands'
|
9
bin/rake
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
begin
|
||||||
|
load File.expand_path('../spring', __FILE__)
|
||||||
|
rescue LoadError => e
|
||||||
|
raise unless e.message.include?('spring')
|
||||||
|
end
|
||||||
|
require_relative '../config/boot'
|
||||||
|
require 'rake'
|
||||||
|
Rake.application.run
|
36
bin/setup
Executable file
|
@ -0,0 +1,36 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
require 'fileutils'
|
||||||
|
include FileUtils
|
||||||
|
|
||||||
|
# path to your application root.
|
||||||
|
APP_ROOT = File.expand_path('..', __dir__)
|
||||||
|
|
||||||
|
def system!(*args)
|
||||||
|
system(*args) || abort("\n== Command #{args} failed ==")
|
||||||
|
end
|
||||||
|
|
||||||
|
chdir APP_ROOT do
|
||||||
|
# This script is a starting point to setup your application.
|
||||||
|
# Add necessary setup steps to this file.
|
||||||
|
|
||||||
|
puts '== Installing dependencies =='
|
||||||
|
system! 'gem install bundler --conservative'
|
||||||
|
system('bundle check') || system!('bundle install')
|
||||||
|
|
||||||
|
# Install JavaScript dependencies if using Yarn
|
||||||
|
# system('bin/yarn')
|
||||||
|
|
||||||
|
# puts "\n== Copying sample files =="
|
||||||
|
# unless File.exist?('config/database.yml')
|
||||||
|
# cp 'config/database.yml.sample', 'config/database.yml'
|
||||||
|
# end
|
||||||
|
|
||||||
|
puts "\n== Preparing database =="
|
||||||
|
system! 'bin/rails db:setup'
|
||||||
|
|
||||||
|
puts "\n== Removing old logs and tempfiles =="
|
||||||
|
system! 'bin/rails log:clear tmp:clear'
|
||||||
|
|
||||||
|
puts "\n== Restarting application server =="
|
||||||
|
system! 'bin/rails restart'
|
||||||
|
end
|
17
bin/spring
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
|
# This file loads spring without using Bundler, in order to be fast.
|
||||||
|
# It gets overwritten when you run the `spring binstub` command.
|
||||||
|
|
||||||
|
unless defined?(Spring)
|
||||||
|
require 'rubygems'
|
||||||
|
require 'bundler'
|
||||||
|
|
||||||
|
lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
|
||||||
|
spring = lockfile.specs.detect { |spec| spec.name == "spring" }
|
||||||
|
if spring
|
||||||
|
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
|
||||||
|
gem 'spring', spring.version
|
||||||
|
require 'spring/binstub'
|
||||||
|
end
|
||||||
|
end
|
31
bin/update
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
require 'fileutils'
|
||||||
|
include FileUtils
|
||||||
|
|
||||||
|
# path to your application root.
|
||||||
|
APP_ROOT = File.expand_path('..', __dir__)
|
||||||
|
|
||||||
|
def system!(*args)
|
||||||
|
system(*args) || abort("\n== Command #{args} failed ==")
|
||||||
|
end
|
||||||
|
|
||||||
|
chdir APP_ROOT do
|
||||||
|
# This script is a way to update your development environment automatically.
|
||||||
|
# Add necessary update steps to this file.
|
||||||
|
|
||||||
|
puts '== Installing dependencies =='
|
||||||
|
system! 'gem install bundler --conservative'
|
||||||
|
system('bundle check') || system!('bundle install')
|
||||||
|
|
||||||
|
# Install JavaScript dependencies if using Yarn
|
||||||
|
# system('bin/yarn')
|
||||||
|
|
||||||
|
puts "\n== Updating database =="
|
||||||
|
system! 'bin/rails db:migrate'
|
||||||
|
|
||||||
|
puts "\n== Removing old logs and tempfiles =="
|
||||||
|
system! 'bin/rails log:clear tmp:clear'
|
||||||
|
|
||||||
|
puts "\n== Restarting application server =="
|
||||||
|
system! 'bin/rails restart'
|
||||||
|
end
|
11
bin/yarn
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
APP_ROOT = File.expand_path('..', __dir__)
|
||||||
|
Dir.chdir(APP_ROOT) do
|
||||||
|
begin
|
||||||
|
exec "yarnpkg", *ARGV
|
||||||
|
rescue Errno::ENOENT
|
||||||
|
$stderr.puts "Yarn executable was not detected in the system."
|
||||||
|
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
|
||||||
|
exit 1
|
||||||
|
end
|
||||||
|
end
|
5
config.ru
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# This file is used by Rack-based servers to start the application.
|
||||||
|
|
||||||
|
require_relative 'config/environment'
|
||||||
|
|
||||||
|
run Rails.application
|
22
config/application.rb
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
require_relative 'boot'
|
||||||
|
|
||||||
|
require 'rails/all'
|
||||||
|
|
||||||
|
# Require the gems listed in Gemfile, including any gems
|
||||||
|
# you've limited to :test, :development, or :production.
|
||||||
|
Bundler.require(*Rails.groups)
|
||||||
|
|
||||||
|
module TuxWebROR
|
||||||
|
class Application < Rails::Application
|
||||||
|
# Initialize configuration defaults for originally generated Rails version.
|
||||||
|
config.load_defaults 5.2
|
||||||
|
|
||||||
|
config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
||||||
|
config.i18n.default_locale = :fr
|
||||||
|
|
||||||
|
# Settings in config/environments/* take precedence over those specified here.
|
||||||
|
# Application configuration can go into files in config/initializers
|
||||||
|
# -- all .rb files in that directory are automatically loaded after loading
|
||||||
|
# the framework and any gems in your application.
|
||||||
|
end
|
||||||
|
end
|
4
config/boot.rb
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
||||||
|
|
||||||
|
require 'bundler/setup' # Set up gems listed in the Gemfile.
|
||||||
|
require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
|
10
config/cable.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
development:
|
||||||
|
adapter: async
|
||||||
|
|
||||||
|
test:
|
||||||
|
adapter: async
|
||||||
|
|
||||||
|
production:
|
||||||
|
adapter: redis
|
||||||
|
url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
|
||||||
|
channel_prefix: tuxWebROR_production
|
1
config/credentials.yml.enc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
H0dMiW5eYLKGZopGV0Amc7rF7bOM/hp/ucW7IaNUrtkzgvJN+INncvwHJ18pTHqTDUF8XxCYr6qUEeyBk9xLWyqFFUEf9QO9/bO0Xy8X/wLT6W4UH6+ehDFMwJFax5GpFaqc4M4YZpFZ87qmf80XOpfYNnVJKVHXAjOpAC6o6h4IcH1btbCHkm1sEI8vv+PKTitj4GW5f4fqy5s8v5XLtJ72kip0hiIOeo5UKBey9xAytcDLTWEp5SwrBX+M9CzNPbeuVn9JJ8681pvuFPevq0X7ZDy9zLeBPKgv4roEhdTgNreSNL7LqX9fBZXZvAyUK8rdUF+zrc6kFeJNJUJddoMBJspgasYW+9i4rAE4dAM1pyJrI8JN73nGi7a0IJCfj/VydAoQOyQeb1+Sovdm1urK2ig1ZmYOd0FS--JLu0sW6W1yW/rLvd--zIX9ipRvq8pPKIJlSD3OXw==
|
54
config/database.yml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
# MySQL. Versions 5.1.10 and up are supported.
|
||||||
|
#
|
||||||
|
# Install the MySQL driver
|
||||||
|
# gem install mysql2
|
||||||
|
#
|
||||||
|
# Ensure the MySQL gem is defined in your Gemfile
|
||||||
|
# gem 'mysql2'
|
||||||
|
#
|
||||||
|
# And be sure to use new-style password hashing:
|
||||||
|
# https://dev.mysql.com/doc/refman/5.7/en/password-hashing.html
|
||||||
|
#
|
||||||
|
default: &default
|
||||||
|
adapter: mysql2
|
||||||
|
encoding: utf8
|
||||||
|
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
||||||
|
username: root
|
||||||
|
password: root
|
||||||
|
socket: /var/run/mysqld/mysqld.sock
|
||||||
|
|
||||||
|
development:
|
||||||
|
<<: *default
|
||||||
|
database: tuxbot
|
||||||
|
|
||||||
|
# Warning: The database defined as "test" will be erased and
|
||||||
|
# re-generated from your development database when you run "rake".
|
||||||
|
# Do not set this db to the same as development or production.
|
||||||
|
test:
|
||||||
|
<<: *default
|
||||||
|
database: tuxbot
|
||||||
|
|
||||||
|
# As with config/secrets.yml, you never want to store sensitive information,
|
||||||
|
# like your database password, in your source code. If your source code is
|
||||||
|
# ever seen by anyone, they now have access to your database.
|
||||||
|
#
|
||||||
|
# Instead, provide the password as a unix environment variable when you boot
|
||||||
|
# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
|
||||||
|
# for a full rundown on how to provide these environment variables in a
|
||||||
|
# production deployment.
|
||||||
|
#
|
||||||
|
# On Heroku and other platform providers, you may have a full connection URL
|
||||||
|
# available as an environment variable. For example:
|
||||||
|
#
|
||||||
|
# DATABASE_URL="mysql2://myuser:mypass@localhost/somedatabase"
|
||||||
|
#
|
||||||
|
# You can use this database configuration with:
|
||||||
|
#
|
||||||
|
# production:
|
||||||
|
# url: <%= ENV['DATABASE_URL'] %>
|
||||||
|
#
|
||||||
|
production:
|
||||||
|
<<: *default
|
||||||
|
database: tuxbot
|
||||||
|
username: tuxWebROR
|
||||||
|
password: <%= ENV['TUXWEBROR_DATABASE_PASSWORD'] %>
|
5
config/environment.rb
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Load the Rails application.
|
||||||
|
require_relative 'application'
|
||||||
|
|
||||||
|
# Initialize the Rails application.
|
||||||
|
Rails.application.initialize!
|
61
config/environments/development.rb
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
Rails.application.configure do
|
||||||
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
|
# In the development environment your application's code is reloaded on
|
||||||
|
# every request. This slows down response time but is perfect for development
|
||||||
|
# since you don't have to restart the web server when you make code changes.
|
||||||
|
config.cache_classes = false
|
||||||
|
|
||||||
|
# Do not eager load code on boot.
|
||||||
|
config.eager_load = false
|
||||||
|
|
||||||
|
# Show full error reports.
|
||||||
|
config.consider_all_requests_local = true
|
||||||
|
|
||||||
|
# Enable/disable caching. By default caching is disabled.
|
||||||
|
# Run rails dev:cache to toggle caching.
|
||||||
|
if Rails.root.join('tmp', 'caching-dev.txt').exist?
|
||||||
|
config.action_controller.perform_caching = true
|
||||||
|
|
||||||
|
config.cache_store = :memory_store
|
||||||
|
config.public_file_server.headers = {
|
||||||
|
'Cache-Control' => "public, max-age=#{2.days.to_i}"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
config.action_controller.perform_caching = false
|
||||||
|
|
||||||
|
config.cache_store = :null_store
|
||||||
|
end
|
||||||
|
|
||||||
|
# Store uploaded files on the local file system (see config/storage.yml for options)
|
||||||
|
config.active_storage.service = :local
|
||||||
|
|
||||||
|
# Don't care if the mailer can't send.
|
||||||
|
config.action_mailer.raise_delivery_errors = false
|
||||||
|
|
||||||
|
config.action_mailer.perform_caching = false
|
||||||
|
|
||||||
|
# Print deprecation notices to the Rails logger.
|
||||||
|
config.active_support.deprecation = :log
|
||||||
|
|
||||||
|
# Raise an error on page load if there are pending migrations.
|
||||||
|
config.active_record.migration_error = :page_load
|
||||||
|
|
||||||
|
# Highlight code that triggered database queries in logs.
|
||||||
|
config.active_record.verbose_query_logs = true
|
||||||
|
|
||||||
|
# Debug mode disables concatenation and preprocessing of assets.
|
||||||
|
# This option may cause significant delays in view rendering with a large
|
||||||
|
# number of complex assets.
|
||||||
|
config.assets.debug = true
|
||||||
|
|
||||||
|
# Suppress logger output for asset requests.
|
||||||
|
config.assets.quiet = true
|
||||||
|
|
||||||
|
# Raises error for missing translations
|
||||||
|
# config.action_view.raise_on_missing_translations = true
|
||||||
|
|
||||||
|
# Use an evented file watcher to asynchronously detect changes in source code,
|
||||||
|
# routes, locales, etc. This feature depends on the listen gem.
|
||||||
|
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
||||||
|
end
|
94
config/environments/production.rb
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
Rails.application.configure do
|
||||||
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
|
# Code is not reloaded between requests.
|
||||||
|
config.cache_classes = true
|
||||||
|
|
||||||
|
# Eager load code on boot. This eager loads most of Rails and
|
||||||
|
# your application in memory, allowing both threaded web servers
|
||||||
|
# and those relying on copy on write to perform better.
|
||||||
|
# Rake tasks automatically ignore this option for performance.
|
||||||
|
config.eager_load = true
|
||||||
|
|
||||||
|
# Full error reports are disabled and caching is turned on.
|
||||||
|
config.consider_all_requests_local = false
|
||||||
|
config.action_controller.perform_caching = true
|
||||||
|
|
||||||
|
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
|
||||||
|
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
|
||||||
|
# config.require_master_key = true
|
||||||
|
|
||||||
|
# Disable serving static files from the `/public` folder by default since
|
||||||
|
# Apache or NGINX already handles this.
|
||||||
|
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
||||||
|
|
||||||
|
# Compress JavaScripts and CSS.
|
||||||
|
config.assets.js_compressor = Uglifier.new(harmony: true)
|
||||||
|
# config.assets.css_compressor = :sass
|
||||||
|
|
||||||
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
||||||
|
config.assets.compile = false
|
||||||
|
|
||||||
|
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
||||||
|
|
||||||
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
||||||
|
# config.action_controller.asset_host = 'http://assets.example.com'
|
||||||
|
|
||||||
|
# Specifies the header that your server uses for sending files.
|
||||||
|
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
||||||
|
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
||||||
|
|
||||||
|
# Store uploaded files on the local file system (see config/storage.yml for options)
|
||||||
|
config.active_storage.service = :local
|
||||||
|
|
||||||
|
# Mount Action Cable outside main process or domain
|
||||||
|
# config.action_cable.mount_path = nil
|
||||||
|
# config.action_cable.url = 'wss://example.com/cable'
|
||||||
|
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
|
||||||
|
|
||||||
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
||||||
|
# config.force_ssl = true
|
||||||
|
|
||||||
|
# Use the lowest log level to ensure availability of diagnostic information
|
||||||
|
# when problems arise.
|
||||||
|
config.log_level = :debug
|
||||||
|
|
||||||
|
# Prepend all log lines with the following tags.
|
||||||
|
config.log_tags = [ :request_id ]
|
||||||
|
|
||||||
|
# Use a different cache store in production.
|
||||||
|
# config.cache_store = :mem_cache_store
|
||||||
|
|
||||||
|
# Use a real queuing backend for Active Job (and separate queues per environment)
|
||||||
|
# config.active_job.queue_adapter = :resque
|
||||||
|
# config.active_job.queue_name_prefix = "tuxWebROR_#{Rails.env}"
|
||||||
|
|
||||||
|
config.action_mailer.perform_caching = false
|
||||||
|
|
||||||
|
# Ignore bad email addresses and do not raise email delivery errors.
|
||||||
|
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
||||||
|
# config.action_mailer.raise_delivery_errors = false
|
||||||
|
|
||||||
|
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||||
|
# the I18n.default_locale when a translation cannot be found).
|
||||||
|
config.i18n.fallbacks = true
|
||||||
|
|
||||||
|
# Send deprecation notices to registered listeners.
|
||||||
|
config.active_support.deprecation = :notify
|
||||||
|
|
||||||
|
# Use default logging formatter so that PID and timestamp are not suppressed.
|
||||||
|
config.log_formatter = ::Logger::Formatter.new
|
||||||
|
|
||||||
|
# Use a different logger for distributed setups.
|
||||||
|
# require 'syslog/logger'
|
||||||
|
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
|
||||||
|
|
||||||
|
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
||||||
|
logger = ActiveSupport::Logger.new(STDOUT)
|
||||||
|
logger.formatter = config.log_formatter
|
||||||
|
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
||||||
|
end
|
||||||
|
|
||||||
|
# Do not dump schema after migrations.
|
||||||
|
config.active_record.dump_schema_after_migration = false
|
||||||
|
end
|
46
config/environments/test.rb
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
Rails.application.configure do
|
||||||
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
|
# The test environment is used exclusively to run your application's
|
||||||
|
# test suite. You never need to work with it otherwise. Remember that
|
||||||
|
# your test database is "scratch space" for the test suite and is wiped
|
||||||
|
# and recreated between test runs. Don't rely on the data there!
|
||||||
|
config.cache_classes = true
|
||||||
|
|
||||||
|
# Do not eager load code on boot. This avoids loading your whole application
|
||||||
|
# just for the purpose of running a single test. If you are using a tool that
|
||||||
|
# preloads Rails for running tests, you may have to set it to true.
|
||||||
|
config.eager_load = false
|
||||||
|
|
||||||
|
# Configure public file server for tests with Cache-Control for performance.
|
||||||
|
config.public_file_server.enabled = true
|
||||||
|
config.public_file_server.headers = {
|
||||||
|
'Cache-Control' => "public, max-age=#{1.hour.to_i}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Show full error reports and disable caching.
|
||||||
|
config.consider_all_requests_local = true
|
||||||
|
config.action_controller.perform_caching = false
|
||||||
|
|
||||||
|
# Raise exceptions instead of rendering exception templates.
|
||||||
|
config.action_dispatch.show_exceptions = false
|
||||||
|
|
||||||
|
# Disable request forgery protection in test environment.
|
||||||
|
config.action_controller.allow_forgery_protection = false
|
||||||
|
|
||||||
|
# Store uploaded files on the local file system in a temporary directory
|
||||||
|
config.active_storage.service = :test
|
||||||
|
|
||||||
|
config.action_mailer.perform_caching = false
|
||||||
|
|
||||||
|
# Tell Action Mailer not to deliver emails to the real world.
|
||||||
|
# The :test delivery method accumulates sent emails in the
|
||||||
|
# ActionMailer::Base.deliveries array.
|
||||||
|
config.action_mailer.delivery_method = :test
|
||||||
|
|
||||||
|
# Print deprecation notices to the stderr.
|
||||||
|
config.active_support.deprecation = :stderr
|
||||||
|
|
||||||
|
# Raises error for missing translations
|
||||||
|
# config.action_view.raise_on_missing_translations = true
|
||||||
|
end
|
8
config/initializers/application_controller_renderer.rb
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
|
# ActiveSupport::Reloader.to_prepare do
|
||||||
|
# ApplicationController.renderer.defaults.merge!(
|
||||||
|
# http_host: 'example.org',
|
||||||
|
# https: false
|
||||||
|
# )
|
||||||
|
# end
|
14
config/initializers/assets.rb
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
|
# Version of your assets, change this if you want to expire all your assets.
|
||||||
|
Rails.application.config.assets.version = '1.0'
|
||||||
|
|
||||||
|
# Add additional assets to the asset load path.
|
||||||
|
# Rails.application.config.assets.paths << Emoji.images_path
|
||||||
|
# Add Yarn node_modules folder to the asset load path.
|
||||||
|
Rails.application.config.assets.paths << Rails.root.join('node_modules')
|
||||||
|
|
||||||
|
# Precompile additional assets.
|
||||||
|
# application.js, application.css, and all non-JS/CSS in the app/assets
|
||||||
|
# folder are already added.
|
||||||
|
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
|
7
config/initializers/backtrace_silencers.rb
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
|
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
||||||
|
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
||||||
|
|
||||||
|
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
||||||
|
# Rails.backtrace_cleaner.remove_silencers!
|