diff --git a/Gemfile b/Gemfile index d35de94..dad9056 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,8 @@ end # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.1.4' # Use sqlite3 as the database for Active Record -gem 'sqlite3' +#gem 'sqlite3' +gem 'mysql2' # Use Puma as the app server gem 'puma', '~> 3.7' # Use SCSS for stylesheets @@ -19,6 +20,10 @@ gem 'uglifier', '>= 1.3.0' # See https://github.com/rails/execjs#readme for more supported runtimes # gem 'therubyracer', platforms: :ruby +gem 'bootstrap', '~> 4.0.0.beta' +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 diff --git a/Gemfile.lock b/Gemfile.lock index 7d3960b..1758f0e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -41,7 +41,13 @@ GEM 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) + bootstrap (4.0.0.beta) + autoprefixer-rails (>= 6.0.3) + popper_js (~> 1.11.1) + sass (>= 3.4.19) builder (3.2.3) byebug (9.1.0) capybara (2.15.4) @@ -71,6 +77,10 @@ GEM jbuilder (2.7.0) activesupport (>= 4.2.0) multi_json (>= 1.2) + jquery-rails (4.3.1) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) loofah (2.1.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -84,9 +94,11 @@ GEM mini_portile2 (2.3.0) minitest (5.10.3) multi_json (1.12.2) + mysql2 (0.4.9-x64-mingw32) nio4r (2.1.0) nokogiri (1.8.1-x64-mingw32) mini_portile2 (~> 2.3.0) + popper_js (1.11.1) public_suffix (3.0.0) puma (3.10.0) rack (2.0.3) @@ -141,7 +153,6 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sqlite3 (1.3.13-x64-mingw32) thor (0.20.0) thread_safe (0.3.6) tilt (2.0.8) @@ -169,15 +180,17 @@ PLATFORMS x64-mingw32 DEPENDENCIES + bootstrap (~> 4.0.0.beta) byebug capybara (~> 2.13) coffee-rails (~> 4.2) jbuilder (~> 2.5) + jquery-rails + mysql2 puma (~> 3.7) rails (~> 5.1.4) sass-rails (~> 5.0) selenium-webdriver - sqlite3 turbolinks (~> 5) tzinfo-data uglifier (>= 1.3.0) diff --git a/app/assets/images/favicon.png b/app/assets/images/favicon.png new file mode 100644 index 0000000..7f62aff Binary files /dev/null and b/app/assets/images/favicon.png differ diff --git a/app/assets/images/logo-symbol.png b/app/assets/images/logo-symbol.png new file mode 100644 index 0000000..7f62aff Binary files /dev/null and b/app/assets/images/logo-symbol.png differ diff --git a/app/assets/images/logo.png b/app/assets/images/logo.png new file mode 100644 index 0000000..98a1946 Binary files /dev/null and b/app/assets/images/logo.png differ diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 46b2035..dc8f1b9 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -12,4 +12,7 @@ // //= require rails-ujs //= require turbolinks +//= require jquery3 +//= require popper +//= require bootstrap //= require_tree . diff --git a/app/assets/javascripts/home.coffee b/app/assets/javascripts/home.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/home.coffee @@ -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/ diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css deleted file mode 100644 index d05ea0f..0000000 --- a/app/assets/stylesheets/application.css +++ /dev/null @@ -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, 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 - */ diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss new file mode 100644 index 0000000..cbd46a7 --- /dev/null +++ b/app/assets/stylesheets/application.scss @@ -0,0 +1 @@ +@import "bootstrap"; diff --git a/app/assets/stylesheets/home.scss b/app/assets/stylesheets/home.scss new file mode 100644 index 0000000..7131aac --- /dev/null +++ b/app/assets/stylesheets/home.scss @@ -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/ diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb new file mode 100644 index 0000000..95f2992 --- /dev/null +++ b/app/controllers/home_controller.rb @@ -0,0 +1,4 @@ +class HomeController < ApplicationController + def index + end +end diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb new file mode 100644 index 0000000..23de56a --- /dev/null +++ b/app/helpers/home_helper.rb @@ -0,0 +1,2 @@ +module HomeHelper +end diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb new file mode 100644 index 0000000..2085730 --- /dev/null +++ b/app/views/home/index.html.erb @@ -0,0 +1,2 @@ +

Home#index

+

Find me in app/views/home/index.html.erb

diff --git a/config/database.yml b/config/database.yml index 0d02f24..b2f90b0 100644 --- a/config/database.yml +++ b/config/database.yml @@ -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 - adapter: sqlite3 - pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> + adapter: mysql2 + encoding: utf8 + username: thiscrm_usr + password: Wdfiayjto340278_!349 + host: 51.254.143.84 + pool: 5 timeout: 5000 development: <<: *default - database: db/development.sqlite3 + database: thiscrm # 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 + database: thiscrm_tst production: <<: *default - database: db/production.sqlite3 + database: thiscrm diff --git a/config/database_sqlite.yml b/config/database_sqlite.yml new file mode 100644 index 0000000..ed0932c --- /dev/null +++ b/config/database_sqlite.yml @@ -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 diff --git a/config/routes.rb b/config/routes.rb index 787824f..80a21f6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,3 +1,5 @@ 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 end diff --git a/test/controllers/home_controller_test.rb b/test/controllers/home_controller_test.rb new file mode 100644 index 0000000..6013b68 --- /dev/null +++ b/test/controllers/home_controller_test.rb @@ -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