Compare commits

...

10 Commits

Author SHA1 Message Date
Mac 431e7731ef g 2018-03-06 21:59:34 +01:00
Mac 6e0d259df3 sdf 2017-10-31 23:26:15 +01:00
Mac abd242d952 bla 2017-10-31 23:08:50 +01:00
Adrian Hinz e193cf66f7 Signed-off-by: Adrian Hinz <ahinz@voicetelecom.pl> 2017-10-13 15:46:25 +02:00
Adrian Hinz e0893428b1 Signed-off-by: Adrian Hinz <ahinz@voicetelecom.pl> 2017-10-11 11:20:44 +02:00
Adrian Hinz 6fa34f31c0 Merge branch 'master' of ssh://51.254.143.84:9319/home/git/thiscrm 2017-10-10 14:40:24 +02:00
Adrian Hinz 71914ad6ac Start new app 2017-10-10 14:39:36 +02:00
Adrian Hinz b3167a4986 Reset app 2017-10-10 14:36:04 +02:00
Adrian Hinz 3b0c76dae1 Signed-off-by: Adrian Hinz <adhinz@gmail.com> 2017-09-28 22:46:37 +02:00
Adrian Hinz 7b216ee6a6 Signed-off-by: Adrian Hinz <adhinz@gmail.com> 2017-09-28 22:45:36 +02:00
55 changed files with 328 additions and 182 deletions

4
.gitignore vendored
View File

@ -17,5 +17,7 @@
!/log/.keep !/log/.keep
!/tmp/.keep !/tmp/.keep
# Ignore Byebug command history file. /node_modules
/yarn-error.log
Gemfile.lock
.byebug_history .byebug_history

30
Gemfile
View File

@ -1,23 +1,30 @@
source 'https://rubygems.org' source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
ends
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.0', '>= 5.0.0.1' gem 'rails', '~> 5.1.4'
# Use sqlite3 as the database for Active Record # Use sqlite3 as the database for Active Record
gem 'sqlite3' #gem 'sqlite3'
gem 'mysql2'
# Use Puma as the app server # Use Puma as the app server
gem 'puma', '~> 3.0' gem 'puma', '~> 3.7'
# Use SCSS for stylesheets # Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0' gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets # Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0' gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes # See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby # gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library gem 'bootstrap', '~> 4.0.0.beta'
gem 'jquery-rails' gem 'jquery-rails'
# 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 # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5' gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
@ -32,16 +39,15 @@ gem 'jbuilder', '~> 2.5'
group :development, :test do group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console # Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '~> 2.13'
gem 'selenium-webdriver'
end end
group :development do group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code. # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console' gem 'web-console', '>= 3.3.0'
gem 'listen', '~> 3.0.5'
# 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 end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem # Windows does not include zoneinfo files, so bundle the tzinfo-data gem

View File

@ -1,47 +1,64 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
actioncable (5.0.6) actioncable (5.1.4)
actionpack (= 5.0.6) actionpack (= 5.1.4)
nio4r (>= 1.2, < 3.0) nio4r (~> 2.0)
websocket-driver (~> 0.6.1) websocket-driver (~> 0.6.1)
actionmailer (5.0.6) actionmailer (5.1.4)
actionpack (= 5.0.6) actionpack (= 5.1.4)
actionview (= 5.0.6) actionview (= 5.1.4)
activejob (= 5.0.6) activejob (= 5.1.4)
mail (~> 2.5, >= 2.5.4) mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
actionpack (5.0.6) actionpack (5.1.4)
actionview (= 5.0.6) actionview (= 5.1.4)
activesupport (= 5.0.6) activesupport (= 5.1.4)
rack (~> 2.0) rack (~> 2.0)
rack-test (~> 0.6.3) rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2) rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.0.6) actionview (5.1.4)
activesupport (= 5.0.6) activesupport (= 5.1.4)
builder (~> 3.1) builder (~> 3.1)
erubis (~> 2.7.0) erubi (~> 1.4)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3) rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.0.6) activejob (5.1.4)
activesupport (= 5.0.6) activesupport (= 5.1.4)
globalid (>= 0.3.6) globalid (>= 0.3.6)
activemodel (5.0.6) activemodel (5.1.4)
activesupport (= 5.0.6) activesupport (= 5.1.4)
activerecord (5.0.6) activerecord (5.1.4)
activemodel (= 5.0.6) activemodel (= 5.1.4)
activesupport (= 5.0.6) activesupport (= 5.1.4)
arel (~> 7.0) arel (~> 8.0)
activesupport (5.0.6) activesupport (5.1.4)
concurrent-ruby (~> 1.0, >= 1.0.2) concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7) i18n (~> 0.7)
minitest (~> 5.1) minitest (~> 5.1)
tzinfo (~> 1.1) tzinfo (~> 1.1)
arel (7.1.4) addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
arel (8.0.0)
autoprefixer-rails (7.1.5)
execjs
bindex (0.5.0) bindex (0.5.0)
bootstrap (4.0.0.beta)
autoprefixer-rails (>= 6.0.3)
popper_js (~> 1.11.1)
sass (>= 3.4.19)
builder (3.2.3) builder (3.2.3)
byebug (9.1.0) byebug (9.1.0)
capybara (2.15.4)
addressable
mini_mime (>= 0.1.3)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
childprocess (0.8.0)
ffi (~> 1.0, >= 1.0.11)
coffee-rails (4.2.2) coffee-rails (4.2.2)
coffee-script (>= 2.2.0) coffee-script (>= 2.2.0)
railties (>= 4.0.0) railties (>= 4.0.0)
@ -51,9 +68,9 @@ GEM
coffee-script-source (1.12.2) coffee-script-source (1.12.2)
concurrent-ruby (1.0.5) concurrent-ruby (1.0.5)
crass (1.0.2) crass (1.0.2)
erubis (2.7.0) erubi (1.7.0)
execjs (2.7.0) execjs (2.7.0)
ffi (1.9.18) ffi (1.9.18-x64-mingw32)
globalid (0.4.0) globalid (0.4.0)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
i18n (0.8.6) i18n (0.8.6)
@ -64,9 +81,6 @@ GEM
rails-dom-testing (>= 1, < 3) rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0) railties (>= 4.2.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
loofah (2.1.1) loofah (2.1.1)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
@ -76,36 +90,40 @@ GEM
mime-types (3.1) mime-types (3.1)
mime-types-data (~> 3.2015) mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521) mime-types-data (3.2016.0521)
mini_mime (0.1.4)
mini_portile2 (2.3.0) mini_portile2 (2.3.0)
minitest (5.10.3) minitest (5.10.3)
multi_json (1.12.2) multi_json (1.12.2)
mysql2 (0.4.9-x64-mingw32)
nio4r (2.1.0) nio4r (2.1.0)
nokogiri (1.8.1) nokogiri (1.8.1-x64-mingw32)
mini_portile2 (~> 2.3.0) mini_portile2 (~> 2.3.0)
popper_js (1.11.1)
public_suffix (3.0.0)
puma (3.10.0) puma (3.10.0)
rack (2.0.3) rack (2.0.3)
rack-test (0.6.3) rack-test (0.7.0)
rack (>= 1.0) rack (>= 1.0, < 3)
rails (5.0.6) rails (5.1.4)
actioncable (= 5.0.6) actioncable (= 5.1.4)
actionmailer (= 5.0.6) actionmailer (= 5.1.4)
actionpack (= 5.0.6) actionpack (= 5.1.4)
actionview (= 5.0.6) actionview (= 5.1.4)
activejob (= 5.0.6) activejob (= 5.1.4)
activemodel (= 5.0.6) activemodel (= 5.1.4)
activerecord (= 5.0.6) activerecord (= 5.1.4)
activesupport (= 5.0.6) activesupport (= 5.1.4)
bundler (>= 1.3.0) bundler (>= 1.3.0)
railties (= 5.0.6) railties (= 5.1.4)
sprockets-rails (>= 2.0.0) sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3) rails-dom-testing (2.0.3)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
nokogiri (>= 1.6) nokogiri (>= 1.6)
rails-html-sanitizer (1.0.3) rails-html-sanitizer (1.0.3)
loofah (~> 2.0) loofah (~> 2.0)
railties (5.0.6) railties (5.1.4)
actionpack (= 5.0.6) actionpack (= 5.1.4)
activesupport (= 5.0.6) activesupport (= 5.1.4)
method_source method_source
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
@ -113,7 +131,8 @@ GEM
rb-fsevent (0.10.2) rb-fsevent (0.10.2)
rb-inotify (0.9.10) rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2) ffi (>= 0.5.0, < 2)
sass (3.5.1) rubyzip (1.2.1)
sass (3.5.2)
sass-listen (~> 4.0.0) sass-listen (~> 4.0.0)
sass-listen (4.0.0) sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4) rb-fsevent (~> 0.9, >= 0.9.4)
@ -124,11 +143,9 @@ GEM
sprockets (>= 2.8, < 4.0) sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0) sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3) tilt (>= 1.1, < 3)
spring (2.0.2) selenium-webdriver (3.6.0)
activesupport (>= 4.2) childprocess (~> 0.5)
spring-watcher-listen (2.0.1) rubyzip (~> 1.0)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (3.7.1) sprockets (3.7.1)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
rack (> 1, < 3) rack (> 1, < 3)
@ -136,7 +153,6 @@ GEM
actionpack (>= 4.0) actionpack (>= 4.0)
activesupport (>= 4.0) activesupport (>= 4.0)
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
sqlite3 (1.3.13)
thor (0.20.0) thor (0.20.0)
thread_safe (0.3.6) thread_safe (0.3.6)
tilt (2.0.8) tilt (2.0.8)
@ -145,6 +161,8 @@ GEM
turbolinks-source (5.0.3) turbolinks-source (5.0.3)
tzinfo (1.2.3) tzinfo (1.2.3)
thread_safe (~> 0.1) thread_safe (~> 0.1)
tzinfo-data (1.2017.2)
tzinfo (>= 1.0.0)
uglifier (3.2.0) uglifier (3.2.0)
execjs (>= 0.3.0, < 3) execjs (>= 0.3.0, < 3)
web-console (3.5.1) web-console (3.5.1)
@ -155,26 +173,28 @@ GEM
websocket-driver (0.6.5) websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0) websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2) websocket-extensions (0.1.2)
xpath (2.1.0)
nokogiri (~> 1.3)
PLATFORMS PLATFORMS
ruby x64-mingw32
DEPENDENCIES DEPENDENCIES
bootstrap (~> 4.0.0.beta)
byebug byebug
capybara (~> 2.13)
coffee-rails (~> 4.2) coffee-rails (~> 4.2)
jbuilder (~> 2.5) jbuilder (~> 2.5)
jquery-rails jquery-rails
listen (~> 3.0.5) mysql2
puma (~> 3.0) puma (~> 3.7)
rails (~> 5.0.0, >= 5.0.0.1) rails (~> 5.1.4)
sass-rails (~> 5.0) sass-rails (~> 5.0)
spring selenium-webdriver
spring-watcher-listen (~> 2.0.0)
sqlite3
turbolinks (~> 5) turbolinks (~> 5)
tzinfo-data tzinfo-data
uglifier (>= 1.3.0) uglifier (>= 1.3.0)
web-console web-console (>= 3.3.0)
BUNDLED WITH BUNDLED WITH
1.13.2 1.15.4

BIN
ThisCRM.docx Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
app/assets/images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,8 +1,8 @@
// This is a manifest file that'll be compiled into application.js, which will include all the files // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below. // listed below.
// //
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. // 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 // 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. // compiled file. JavaScript code in this file should be added after the last require_* statement.
@ -10,7 +10,9 @@
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives. // about supported directives.
// //
//= require jquery //= require rails-ujs
//= require jquery_ujs
//= require turbolinks //= require turbolinks
//= require jquery3
//= require popper
//= require bootstrap
//= require_tree . //= require_tree .

View File

@ -1,5 +1,5 @@
// Action Cable provides the framework to deal with WebSockets in Rails. // 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. // You can generate new channels where WebSocket features live using the `rails generate channel` command.
// //
//= require action_cable //= require action_cable
//= require_self //= require_self

View 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/

View File

@ -1,15 +0,0 @@
/*
* 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, vendor/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_self
*/

View File

@ -0,0 +1 @@
@import "bootstrap";

View File

@ -0,0 +1,3 @@
// Place all the styles related to the Home controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@ -0,0 +1,4 @@
class HomeController < ApplicationController
def index
end
end

View File

@ -0,0 +1,2 @@
module HomeHelper
end

View File

@ -0,0 +1,2 @@
<h1>Home#index</h1>
<p>Fin</p>

View File

@ -6,6 +6,7 @@
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
<%= favicon_link_tag %>
</head> </head>
<body> <body>

View File

@ -18,6 +18,10 @@ chdir APP_ROOT do
system! 'gem install bundler --conservative' system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install') system('bundle check') || system!('bundle install')
# Install JavaScript dependencies if using Yarn
# system('bin/yarn')
# puts "\n== Copying sample files ==" # puts "\n== Copying sample files =="
# unless File.exist?('config/database.yml') # unless File.exist?('config/database.yml')
# cp 'config/database.yml.sample', 'config/database.yml' # cp 'config/database.yml.sample', 'config/database.yml'

11
bin/yarn Normal file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env ruby.exe
VENDOR_PATH = File.expand_path('..', __dir__)
Dir.chdir(VENDOR_PATH) do
begin
exec "yarnpkg #{ARGV.join(" ")}"
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

View File

@ -8,6 +8,9 @@ Bundler.require(*Rails.groups)
module Thiscrm module Thiscrm
class Application < Rails::Application class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 5.1
# Settings in config/environments/* take precedence over those specified here. # Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers # Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded. # -- all .rb files in that directory are automatically loaded.

View File

@ -7,3 +7,4 @@ test:
production: production:
adapter: redis adapter: redis
url: redis://localhost:6379/1 url: redis://localhost:6379/1
channel_prefix: thiscrm_production

View File

@ -1,25 +1,23 @@
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
#
default: &default default: &default
adapter: sqlite3 adapter: mysql2
encoding: utf8
username: thiscrm_usr
password: Wdfiayjto340278_!349
host: 51.254.143.84
pool: 5 pool: 5
timeout: 5000 timeout: 5000
development: development:
<<: *default <<: *default
database: db/development.sqlite3 database: thiscrm
# Warning: The database defined as "test" will be erased and # Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake". # re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production. # Do not set this db to the same as development or production.
test: test:
<<: *default <<: *default
database: db/test.sqlite3 database: thiscrm_tst
production: production:
<<: *default <<: *default
database: db/production.sqlite3 database: thiscrm

View File

@ -0,0 +1,26 @@
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
# thiscrm_usr
# Wdfiayjto340278_!349
default: &default
adapter: sqlite3
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000
development:
<<: *default
database: db/development.sqlite3
# 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: db/test.sqlite3
production:
<<: *default
database: db/production.sqlite3

View File

@ -18,7 +18,7 @@ Rails.application.configure do
config.cache_store = :memory_store config.cache_store = :memory_store
config.public_file_server.headers = { config.public_file_server.headers = {
'Cache-Control' => 'public, max-age=172800' 'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
} }
else else
config.action_controller.perform_caching = false config.action_controller.perform_caching = false
@ -50,5 +50,5 @@ Rails.application.configure do
# Use an evented file watcher to asynchronously detect changes in source code, # Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem. # routes, locales, etc. This feature depends on the listen gem.
config.file_watcher = ActiveSupport::EventedFileUpdateChecker # config.file_watcher = ActiveSupport::EventedFileUpdateChecker
end end

View File

@ -14,6 +14,11 @@ Rails.application.configure do
config.consider_all_requests_local = false config.consider_all_requests_local = false
config.action_controller.perform_caching = true config.action_controller.perform_caching = true
# Attempt to read encrypted secrets from `config/secrets.yml.enc`.
# Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or
# `config/secrets.yml.key`.
config.read_encrypted_secrets = true
# Disable serving static files from the `/public` folder by default since # Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this. # Apache or NGINX already handles this.
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
@ -78,7 +83,7 @@ Rails.application.configure do
if ENV["RAILS_LOG_TO_STDOUT"].present? if ENV["RAILS_LOG_TO_STDOUT"].present?
logger = ActiveSupport::Logger.new(STDOUT) logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger) config.logger = ActiveSupport::TaggedLogging.new(logger)
end end
# Do not dump schema after migrations. # Do not dump schema after migrations.

View File

@ -15,7 +15,7 @@ Rails.application.configure do
# Configure public file server for tests with Cache-Control for performance. # Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true config.public_file_server.enabled = true
config.public_file_server.headers = { config.public_file_server.headers = {
'Cache-Control' => 'public, max-age=3600' 'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}"
} }
# Show full error reports and disable caching. # Show full error reports and disable caching.

View File

@ -1,6 +1,8 @@
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
# ApplicationController.renderer.defaults.merge!( # ActiveSupport::Reloader.to_prepare do
# http_host: 'example.org', # ApplicationController.renderer.defaults.merge!(
# https: false # http_host: 'example.org',
# ) # https: false
# )
# end

View File

@ -3,9 +3,12 @@
# Version of your assets, change this if you want to expire all your assets. # Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = '1.0' Rails.application.config.assets.version = '1.0'
# Add additional assets to the asset load path # Add additional assets to the asset load path.
# Rails.application.config.assets.paths << Emoji.images_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. # Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. # application.js, application.css, and all non-JS/CSS in the app/assets
# Rails.application.config.assets.precompile += %w( search.js ) # folder are already added.
# Rails.application.config.assets.precompile += %w( admin.js admin.css )

View File

@ -1,24 +0,0 @@
# Be sure to restart your server when you modify this file.
#
# This file contains migration options to ease your Rails 5.0 upgrade.
#
# Read the Rails 5.0 release notes for more info on each option.
# Enable per-form CSRF tokens. Previous versions had false.
Rails.application.config.action_controller.per_form_csrf_tokens = true
# Enable origin-checking CSRF mitigation. Previous versions had false.
Rails.application.config.action_controller.forgery_protection_origin_check = true
# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
# Previous versions had false.
ActiveSupport.to_time_preserves_timezone = true
# Require `belongs_to` associations by default. Previous versions had false.
Rails.application.config.active_record.belongs_to_required_by_default = true
# Do not halt callback chains when a callback returns false. Previous versions had true.
ActiveSupport.halt_callback_chains_on_return_false = false
# Configure SSL options to enable HSTS with subdomains. Previous versions had false.
Rails.application.config.ssl_options = { hsts: { subdomains: true } }

View File

@ -1,3 +0,0 @@
# Be sure to restart your server when you modify this file.
Rails.application.config.session_store :cookie_store, key: '_thiscrm_session'

View File

@ -16,6 +16,16 @@
# #
# This would use the information in config/locales/es.yml. # This would use the information in config/locales/es.yml.
# #
# The following keys must be escaped otherwise they will not be retrieved by
# the default I18n backend:
#
# true, false, on, off, yes, no
#
# Instead, surround them with single quotes.
#
# en:
# 'true': 'foo'
#
# To learn more, please read the Rails Internationalization guide # To learn more, please read the Rails Internationalization guide
# available at http://guides.rubyonrails.org/i18n.html. # available at http://guides.rubyonrails.org/i18n.html.

View File

@ -1,13 +1,13 @@
# Puma can serve each request in a thread from an internal thread pool. # Puma can serve each request in a thread from an internal thread pool.
# The `threads` method setting takes two numbers a minimum and maximum. # The `threads` method setting takes two numbers: a minimum and maximum.
# Any libraries that use thread pools should be configured to match # Any libraries that use thread pools should be configured to match
# the maximum value specified for Puma. Default is set to 5 threads for minimum # the maximum value specified for Puma. Default is set to 5 threads for minimum
# and maximum, this matches the default thread size of Active Record. # and maximum; this matches the default thread size of Active Record.
# #
threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
threads threads_count, threads_count threads threads_count, threads_count
# Specifies the `port` that Puma will listen on to receive requests, default is 3000. # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
# #
port ENV.fetch("PORT") { 3000 } port ENV.fetch("PORT") { 3000 }
@ -32,16 +32,25 @@ environment ENV.fetch("RAILS_ENV") { "development" }
# #
# preload_app! # preload_app!
# If you are preloading your application and using Active Record, it's
# recommended that you close any connections to the database before workers
# are forked to prevent connection leakage.
#
# before_fork do
# ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord)
# end
# The code in the `on_worker_boot` will be called if you are using # The code in the `on_worker_boot` will be called if you are using
# clustered mode by specifying a number of `workers`. After each worker # clustered mode by specifying a number of `workers`. After each worker
# process is booted this block will be run, if you are using `preload_app!` # process is booted, this block will be run. If you are using the `preload_app!`
# option you will want to use this block to reconnect to any threads # option, you will want to use this block to reconnect to any threads
# or connections that may have been created at application boot, Ruby # or connections that may have been created at application boot, as Ruby
# cannot share connections between processes. # cannot share connections between processes.
# #
# on_worker_boot do # on_worker_boot do
# ActiveRecord::Base.establish_connection if defined?(ActiveRecord) # ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
# end # end
#
# Allow puma to be restarted by `rails restart` command. # Allow puma to be restarted by `rails restart` command.
plugin :tmp_restart plugin :tmp_restart

View File

@ -1,3 +1,5 @@
Rails.application.routes.draw do Rails.application.routes.draw do
get 'home/index'
root 'home#index'
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end end

View File

@ -10,13 +10,23 @@
# Make sure the secrets in this file are kept private # Make sure the secrets in this file are kept private
# if you're sharing your code publicly. # if you're sharing your code publicly.
# Shared secrets are available across all environments.
# shared:
# api_key: a1B2c3D4e5F6
# Environmental secrets are only available for that specific environment.
development: development:
secret_key_base: 62f653874a19bc09534010da88e2554b21b20c7a63dd8db82150a7abc0d254b4859cc7e284cae8a6c2cc6709d8ae2bb02d46dcbfc84e11a9f2b6c0bef75ed398 secret_key_base: d4cb6068055d2762ab2cf397c8f9b78416a2f9aa93a1084d407f0a6ecd0e8d210c16a81a6162bba1869734bcbf054e37f14394703ca2b0ee1afe70b61be987b3
test: test:
secret_key_base: 834e8b50df0ab0808571f96fa78e3a99a504f2225043b1686804b087f09f97f0219fdd8dd527a027d1259f0ae39b81f4c2f89b9cf1facb34c0051948fefa8570 secret_key_base: e60d94111b5bad9e8d548732c32f8b02c6985295937f2ed0d9b65e3f418452e72c6fd65cf1eaf400c20e22ed0811b0fbdca77c9abd647978f3fce51229e418b2
# Do not keep production secrets in the unencrypted secrets file.
# Instead, either read values from the environment.
# Or, use `bin/rails secrets:setup` to configure encrypted secrets
# and move the `production:` environment over there.
# Do not keep production secrets in the repository,
# instead read values from the environment.
production: production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>

View File

@ -1,6 +0,0 @@
%w(
.ruby-version
.rbenv-vars
tmp/restart.txt
tmp/caching-dev.txt
).each { |path| Spring.watch(path) }

7
favicons_base64.txt Normal file

File diff suppressed because one or more lines are too long

40
index.html Normal file
View File

@ -0,0 +1,40 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>ThisCRM</title>
<style>
.fire_cl {
color:#f9bd47;
font-family: "Courier New";
}
.storm_cl {
color:#afc9ff;
font-family: "Courier New";
}
.shadow_big {
text-shadow: 2px 2px 5px black;
font-family: "Courier New";
}
.shadow_small {
text-shadow: 1px 1px black;
font-family: "Courier New";
}
a.no_u {
color: inherit; /* blue colors for links too */
text-decoration: inherit; /* no underline */
}
</style>
</head>
<body>
<center>
<img alt="ThisCRM" src="thiscrm_logo.png" />
<p>Copyright &copy; <a class="no_u" href="http://firestorm.pl" target="__blank" style><span class="fire_cl shadow_small">Fire</span><span class="storm_cl shadow_small">Storm</span></a></p>
</center>
</body>
</html>

5
package.json Normal file
View File

@ -0,0 +1,5 @@
{
"name": "thiscrm",
"private": true,
"dependencies": {}
}

View File

@ -4,7 +4,7 @@
<title>The page you were looking for doesn't exist (404)</title> <title>The page you were looking for doesn't exist (404)</title>
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<style> <style>
body { .rails-default-error-page {
background-color: #EFEFEF; background-color: #EFEFEF;
color: #2E2F30; color: #2E2F30;
text-align: center; text-align: center;
@ -12,13 +12,13 @@
margin: 0; margin: 0;
} }
div.dialog { .rails-default-error-page div.dialog {
width: 95%; width: 95%;
max-width: 33em; max-width: 33em;
margin: 4em auto 0; margin: 4em auto 0;
} }
div.dialog > div { .rails-default-error-page div.dialog > div {
border: 1px solid #CCC; border: 1px solid #CCC;
border-right-color: #999; border-right-color: #999;
border-left-color: #999; border-left-color: #999;
@ -31,13 +31,13 @@
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
} }
h1 { .rails-default-error-page h1 {
font-size: 100%; font-size: 100%;
color: #730E15; color: #730E15;
line-height: 1.5em; line-height: 1.5em;
} }
div.dialog > p { .rails-default-error-page div.dialog > p {
margin: 0 0 1em; margin: 0 0 1em;
padding: 1em; padding: 1em;
background-color: #F7F7F7; background-color: #F7F7F7;
@ -54,7 +54,7 @@
</style> </style>
</head> </head>
<body> <body class="rails-default-error-page">
<!-- This file lives in public/404.html --> <!-- This file lives in public/404.html -->
<div class="dialog"> <div class="dialog">
<div> <div>

View File

@ -4,7 +4,7 @@
<title>The change you wanted was rejected (422)</title> <title>The change you wanted was rejected (422)</title>
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<style> <style>
body { .rails-default-error-page {
background-color: #EFEFEF; background-color: #EFEFEF;
color: #2E2F30; color: #2E2F30;
text-align: center; text-align: center;
@ -12,13 +12,13 @@
margin: 0; margin: 0;
} }
div.dialog { .rails-default-error-page div.dialog {
width: 95%; width: 95%;
max-width: 33em; max-width: 33em;
margin: 4em auto 0; margin: 4em auto 0;
} }
div.dialog > div { .rails-default-error-page div.dialog > div {
border: 1px solid #CCC; border: 1px solid #CCC;
border-right-color: #999; border-right-color: #999;
border-left-color: #999; border-left-color: #999;
@ -31,13 +31,13 @@
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
} }
h1 { .rails-default-error-page h1 {
font-size: 100%; font-size: 100%;
color: #730E15; color: #730E15;
line-height: 1.5em; line-height: 1.5em;
} }
div.dialog > p { .rails-default-error-page div.dialog > p {
margin: 0 0 1em; margin: 0 0 1em;
padding: 1em; padding: 1em;
background-color: #F7F7F7; background-color: #F7F7F7;
@ -54,7 +54,7 @@
</style> </style>
</head> </head>
<body> <body class="rails-default-error-page">
<!-- This file lives in public/422.html --> <!-- This file lives in public/422.html -->
<div class="dialog"> <div class="dialog">
<div> <div>

View File

@ -4,7 +4,7 @@
<title>We're sorry, but something went wrong (500)</title> <title>We're sorry, but something went wrong (500)</title>
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<style> <style>
body { .rails-default-error-page {
background-color: #EFEFEF; background-color: #EFEFEF;
color: #2E2F30; color: #2E2F30;
text-align: center; text-align: center;
@ -12,13 +12,13 @@
margin: 0; margin: 0;
} }
div.dialog { .rails-default-error-page div.dialog {
width: 95%; width: 95%;
max-width: 33em; max-width: 33em;
margin: 4em auto 0; margin: 4em auto 0;
} }
div.dialog > div { .rails-default-error-page div.dialog > div {
border: 1px solid #CCC; border: 1px solid #CCC;
border-right-color: #999; border-right-color: #999;
border-left-color: #999; border-left-color: #999;
@ -31,13 +31,13 @@
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
} }
h1 { .rails-default-error-page h1 {
font-size: 100%; font-size: 100%;
color: #730E15; color: #730E15;
line-height: 1.5em; line-height: 1.5em;
} }
div.dialog > p { .rails-default-error-page div.dialog > p {
margin: 0 0 1em; margin: 0 0 1em;
padding: 1em; padding: 1em;
background-color: #F7F7F7; background-color: #F7F7F7;
@ -54,7 +54,7 @@
</style> </style>
</head> </head>
<body> <body class="rails-default-error-page">
<!-- This file lives in public/500.html --> <!-- This file lives in public/500.html -->
<div class="dialog"> <div class="dialog">
<div> <div>

View File

@ -1,5 +1 @@
# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
#
# To ban all spiders from the entire site uncomment the next two lines:
# User-agent: *
# Disallow: /

3
readme.txt Normal file
View File

@ -0,0 +1,3 @@
Logo GIMP:
"This" R: 112; G: 48; B: 160; H: 274; S: 70; V: 63; Czcionka: Freestyle Script, 90
"CRM" R: 88; G: 75; B: 75; H: 0; S: 15; V: 35; Czcionka: Book Antiqua, 90

View File

@ -0,0 +1,5 @@
require "test_helper"
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
end

View File

@ -0,0 +1,9 @@
require 'test_helper'
class HomeControllerTest < ActionDispatch::IntegrationTest
test "should get index" do
get home_index_url
assert_response :success
end
end

View File

@ -1,4 +1,3 @@
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__) require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help' require 'rails/test_help'

BIN
thiscrm.xcf Normal file

Binary file not shown.

BIN
thiscrm_favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
thiscrm_favicon.xcf Normal file

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB