From 02f36f5750bf078be7fe7f561e2021c76faaffd0 Mon Sep 17 00:00:00 2001 From: Tom Naessens Date: Tue, 8 Sep 2015 14:55:37 +0200 Subject: [PATCH 1/9] Look a comment --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index f254794..f296b62 100644 --- a/Gemfile +++ b/Gemfile @@ -65,5 +65,5 @@ group :development do end group :production do - gem 'mysql2' + gem 'mysql2' # Database end From 8b41c5dc5d1328359462e42f9d0ee02d905593e1 Mon Sep 17 00:00:00 2001 From: Tom Naessens Date: Tue, 8 Sep 2015 15:01:29 +0200 Subject: [PATCH 2/9] Pin mysql --- Gemfile | 2 +- Gemfile.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index f296b62..89508f4 100644 --- a/Gemfile +++ b/Gemfile @@ -65,5 +65,5 @@ group :development do end group :production do - gem 'mysql2' # Database + gem 'mysql2', '~> 0.3' # Database end diff --git a/Gemfile.lock b/Gemfile.lock index 56694dc..f956ae6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -236,7 +236,7 @@ DEPENDENCIES faker jbuilder (~> 2.0) jquery-rails - mysql2 + mysql2 (~> 0.3) omniauth-oauth2 rails (= 4.2.4) rspec-rails From 308c089c7df9ce57a6f13a43f81dad75a10bc69d Mon Sep 17 00:00:00 2001 From: Tom Naessens Date: Tue, 8 Sep 2015 15:04:31 +0200 Subject: [PATCH 3/9] Actually pin mysql2 --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 89508f4..894ecb2 100644 --- a/Gemfile +++ b/Gemfile @@ -65,5 +65,5 @@ group :development do end group :production do - gem 'mysql2', '~> 0.3' # Database + gem 'mysql2', '~> 0.3.0' # Database end diff --git a/Gemfile.lock b/Gemfile.lock index f956ae6..fe6a4e5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -112,7 +112,7 @@ GEM multi_json (1.11.2) multi_xml (0.5.5) multipart-post (2.0.0) - mysql2 (0.4.0) + mysql2 (0.3.20) net-scp (1.2.1) net-ssh (>= 2.6.5) net-ssh (2.9.2) @@ -236,7 +236,7 @@ DEPENDENCIES faker jbuilder (~> 2.0) jquery-rails - mysql2 (~> 0.3) + mysql2 (~> 0.3.0) omniauth-oauth2 rails (= 4.2.4) rspec-rails From 326ab59de5e2bfd98dd9c7132dd0a13e3c409dbc Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Tue, 8 Sep 2015 15:06:36 +0200 Subject: [PATCH 4/9] Added pure css --- Gemfile | 4 ++++ Gemfile.lock | 3 +++ 2 files changed, 7 insertions(+) diff --git a/Gemfile b/Gemfile index 89508f4..a45ce65 100644 --- a/Gemfile +++ b/Gemfile @@ -21,6 +21,10 @@ gem 'omniauth-oauth2' # Authorisation gem 'cancancan' +# Pure for css +gem 'purecss-rails' + + # Use jquery as the JavaScript library gem 'jquery-rails' # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks diff --git a/Gemfile.lock b/Gemfile.lock index f956ae6..83c99c7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -131,6 +131,8 @@ GEM oauth2 (~> 1.0) omniauth (~> 1.2) orm_adapter (0.5.0) + purecss-rails (0.6.0) + railties (>= 3.2.6, < 5) rack (1.6.4) rack-test (0.6.3) rack (>= 1.0) @@ -238,6 +240,7 @@ DEPENDENCIES jquery-rails mysql2 (~> 0.3) omniauth-oauth2 + purecss-rails rails (= 4.2.4) rspec-rails sass-rails (~> 5.0) From 04fa1a67e12ec6f196fd1cae2b7798186d7da22a Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Tue, 8 Sep 2015 15:12:28 +0200 Subject: [PATCH 5/9] Use datatables --- Gemfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index 5ede63b..827d765 100644 --- a/Gemfile +++ b/Gemfile @@ -23,6 +23,8 @@ gem 'cancancan' # Pure for css gem 'purecss-rails' +# Use datatables +gem 'jquery-datatables-rails', '~> 3.3.0' # Use jquery as the JavaScript library From 32a82c65ff7bbac8e651f12706e12e6a862cfaf5 Mon Sep 17 00:00:00 2001 From: Tom Naessens Date: Tue, 8 Sep 2015 15:12:35 +0200 Subject: [PATCH 6/9] Pls work --- Gemfile | 2 +- Gemfile.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 894ecb2..f254794 100644 --- a/Gemfile +++ b/Gemfile @@ -65,5 +65,5 @@ group :development do end group :production do - gem 'mysql2', '~> 0.3.0' # Database + gem 'mysql2' end diff --git a/Gemfile.lock b/Gemfile.lock index fe6a4e5..25d8f24 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -236,7 +236,7 @@ DEPENDENCIES faker jbuilder (~> 2.0) jquery-rails - mysql2 (~> 0.3.0) + mysql2 omniauth-oauth2 rails (= 4.2.4) rspec-rails From 0909bdda3ddc7b45d315ff8b7d725c2efbe13d3c Mon Sep 17 00:00:00 2001 From: Tom Naessens Date: Tue, 8 Sep 2015 15:13:24 +0200 Subject: [PATCH 7/9] Do bundle install --- Gemfile.lock | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index f3b37ef..13ddcb2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -96,6 +96,11 @@ GEM jbuilder (2.3.1) activesupport (>= 3.0.0, < 5) multi_json (~> 1.2) + jquery-datatables-rails (3.3.0) + actionpack (>= 3.1) + jquery-rails + railties (>= 3.1) + sass-rails jquery-rails (4.0.5) rails-dom-testing (~> 1.0) railties (>= 4.2.0) @@ -237,6 +242,7 @@ DEPENDENCIES factory_girl_rails faker jbuilder (~> 2.0) + jquery-datatables-rails (~> 3.3.0) jquery-rails mysql2 omniauth-oauth2 From 92ea1441166d0a5a9842deb7366c323b89bf000a Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Tue, 8 Sep 2015 15:14:46 +0200 Subject: [PATCH 8/9] Add user controller and views --- Gemfile.lock | 6 ++++++ app/assets/javascripts/users.coffee | 3 +++ app/assets/stylesheets/users.scss | 3 +++ app/controllers/users_controller.rb | 2 ++ app/helpers/users_helper.rb | 2 ++ spec/controllers/users_controller_spec.rb | 5 +++++ spec/helpers/users_helper_spec.rb | 15 +++++++++++++++ 7 files changed, 36 insertions(+) create mode 100644 app/assets/javascripts/users.coffee create mode 100644 app/assets/stylesheets/users.scss create mode 100644 app/controllers/users_controller.rb create mode 100644 app/helpers/users_helper.rb create mode 100644 spec/controllers/users_controller_spec.rb create mode 100644 spec/helpers/users_helper_spec.rb diff --git a/Gemfile.lock b/Gemfile.lock index 7304f1a..2bb2b88 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -96,6 +96,11 @@ GEM jbuilder (2.3.1) activesupport (>= 3.0.0, < 5) multi_json (~> 1.2) + jquery-datatables-rails (3.3.0) + actionpack (>= 3.1) + jquery-rails + railties (>= 3.1) + sass-rails jquery-rails (4.0.5) rails-dom-testing (~> 1.0) railties (>= 4.2.0) @@ -237,6 +242,7 @@ DEPENDENCIES factory_girl_rails faker jbuilder (~> 2.0) + jquery-datatables-rails (~> 3.3.0) jquery-rails mysql2 (~> 0.3.0) omniauth-oauth2 diff --git a/app/assets/javascripts/users.coffee b/app/assets/javascripts/users.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/users.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/users.scss b/app/assets/stylesheets/users.scss new file mode 100644 index 0000000..1efc835 --- /dev/null +++ b/app/assets/stylesheets/users.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the users 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/users_controller.rb b/app/controllers/users_controller.rb new file mode 100644 index 0000000..3e74dea --- /dev/null +++ b/app/controllers/users_controller.rb @@ -0,0 +1,2 @@ +class UsersController < ApplicationController +end diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb new file mode 100644 index 0000000..2310a24 --- /dev/null +++ b/app/helpers/users_helper.rb @@ -0,0 +1,2 @@ +module UsersHelper +end diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb new file mode 100644 index 0000000..e2c3d3b --- /dev/null +++ b/spec/controllers/users_controller_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe UsersController, type: :controller do + +end diff --git a/spec/helpers/users_helper_spec.rb b/spec/helpers/users_helper_spec.rb new file mode 100644 index 0000000..b2e3444 --- /dev/null +++ b/spec/helpers/users_helper_spec.rb @@ -0,0 +1,15 @@ +require 'rails_helper' + +# Specs in this file have access to a helper object that includes +# the UsersHelper. For example: +# +# describe UsersHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# expect(helper.concat_strings("this","that")).to eq("this that") +# end +# end +# end +RSpec.describe UsersHelper, type: :helper do + pending "add some examples to (or delete) #{__FILE__}" +end From 9a7c9686cc84c8904ce9364cb3543f3f4c8e83d1 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Tue, 8 Sep 2015 15:15:17 +0200 Subject: [PATCH 9/9] Install datatables --- app/assets/javascripts/application.js | 1 + app/assets/stylesheets/application.css | 1 + 2 files changed, 2 insertions(+) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index e07c5a8..6a254ee 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -12,5 +12,6 @@ // //= require jquery //= require jquery_ujs +//= require dataTables/jquery.dataTables //= require turbolinks //= require_tree . diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index f9cd5b3..28c16f8 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -11,5 +11,6 @@ * file per style scope. * *= require_tree . + *= require dataTables/jquery.dataTables *= require_self */