From 8b8df383e95d930ee3cde892cfd3c8ad44988582 Mon Sep 17 00:00:00 2001 From: Lorin Werthen Date: Wed, 5 Oct 2016 23:59:33 +0200 Subject: [PATCH 1/3] make really deploy ready --- Gemfile | 3 ++- Gemfile.lock | 14 +++++++++----- Rules | 2 +- nanoc.yaml | 4 ++-- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Gemfile b/Gemfile index 4fb03c8..140d3d0 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,8 @@ # frozen_string_literal: true source 'https://rubygems.org' -gem 'nanoc', '~>4.3.3' +# gem 'nanoc', '~>4.3.3' +gem 'nanoc', path: '/Users/don/Projects/nanoc' gem 'kramdown' gem 'coffee-script' # Needed for relativize_urls diff --git a/Gemfile.lock b/Gemfile.lock index 45c0ef0..ff546f8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,11 @@ +PATH + remote: /Users/don/Projects/nanoc + specs: + nanoc (4.3.4) + cri (~> 2.3) + hamster (~> 3.0) + ref (~> 2.0) + GEM remote: https://rubygems.org/ specs: @@ -45,10 +53,6 @@ GEM lumberjack (1.0.10) method_source (0.8.2) mini_portile2 (2.1.0) - nanoc (4.3.4) - cri (~> 2.3) - hamster (~> 3.0) - ref (~> 2.0) nenv (0.3.0) nokogiri (1.6.8) mini_portile2 (~> 2.1.0) @@ -87,7 +91,7 @@ DEPENDENCIES highline icalendar kramdown - nanoc (~> 4.3.3) + nanoc! nokogiri sass w3c_validators diff --git a/Rules b/Rules index 61df37f..7abd995 100644 --- a/Rules +++ b/Rules @@ -156,7 +156,7 @@ ignore '/assets/stylesheets/includes/**/*' compile '/assets/stylesheets/**/*.scss' do filter :sass, syntax: :scss - filter :autoprefixer if Socket.gethostname == 'abysm' + filter :autoprefixer end passthrough '/assets/images/*.{png,svg}' diff --git a/nanoc.yaml b/nanoc.yaml index fc0fbec..00051a2 100644 --- a/nanoc.yaml +++ b/nanoc.yaml @@ -3,7 +3,7 @@ title: Zeus WPI author_name: '' author_uri: '' -base_url: https://zeus.ugent.be/beta +base_url: https://zeus.ugent.be # The syntax to use for patterns in the Rules file. Can be either `"glob"` # (default) or `"legacy"`. The former will enable glob patterns, which behave @@ -99,5 +99,5 @@ checks: deploy: public: kind: rsync - dst: zeusweb-beta@zeus.ugent.be:/home/zeusweb-beta/public + dst: zeusweb-new@zeus.ugent.be:/home/zeusweb-new/public options: [ '-glpPrtvz', '-e', 'ssh -p 2222', '--delete'] From c959701a4d83eb8f429e47106fe621ae3bf432f7 Mon Sep 17 00:00:00 2001 From: Lorin Werthen Date: Thu, 6 Oct 2016 00:29:56 +0200 Subject: [PATCH 2/3] don't use local gems --- Gemfile | 3 +-- Gemfile.lock | 14 +++++--------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Gemfile b/Gemfile index 140d3d0..4fb03c8 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,7 @@ # frozen_string_literal: true source 'https://rubygems.org' -# gem 'nanoc', '~>4.3.3' -gem 'nanoc', path: '/Users/don/Projects/nanoc' +gem 'nanoc', '~>4.3.3' gem 'kramdown' gem 'coffee-script' # Needed for relativize_urls diff --git a/Gemfile.lock b/Gemfile.lock index ff546f8..45c0ef0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,11 +1,3 @@ -PATH - remote: /Users/don/Projects/nanoc - specs: - nanoc (4.3.4) - cri (~> 2.3) - hamster (~> 3.0) - ref (~> 2.0) - GEM remote: https://rubygems.org/ specs: @@ -53,6 +45,10 @@ GEM lumberjack (1.0.10) method_source (0.8.2) mini_portile2 (2.1.0) + nanoc (4.3.4) + cri (~> 2.3) + hamster (~> 3.0) + ref (~> 2.0) nenv (0.3.0) nokogiri (1.6.8) mini_portile2 (~> 2.1.0) @@ -91,7 +87,7 @@ DEPENDENCIES highline icalendar kramdown - nanoc! + nanoc (~> 4.3.3) nokogiri sass w3c_validators From e5d17b5c331ea69393fe5facce208108e1052b81 Mon Sep 17 00:00:00 2001 From: Lorin Werthen Date: Thu, 6 Oct 2016 00:39:12 +0200 Subject: [PATCH 3/3] proper upcoming events --- content/index.erb | 4 ++-- lib/helpers/events.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/content/index.erb b/content/index.erb index e19eb57..259b9f1 100644 --- a/content/index.erb +++ b/content/index.erb @@ -7,11 +7,11 @@
- <%= render '/partials/_tile.*', article: all_events[0], htmlclass: "highlighted", small_text: "Upcoming event" %> + <%= render '/partials/_tile.*', article: upcoming_events[0], htmlclass: "highlighted", small_text: "Upcoming event" %>
- <%= render '/partials/_tile.*', article: all_events[1], small_text: "Upcoming event" %> + <%= render '/partials/_tile.*', article: upcoming_events[1], small_text: "Upcoming event" %>
diff --git a/lib/helpers/events.rb b/lib/helpers/events.rb index a627daa..65daef9 100644 --- a/lib/helpers/events.rb +++ b/lib/helpers/events.rb @@ -5,11 +5,11 @@ module EventsHelper end def upcoming_events - all_events.reject { |x| x[:time] < Date.today } + all_events.reject { |x| x[:time] <= Date.today } end def past_events - all_events.reject { |x| x[:time] >= Date.today } + all_events.reject { |x| x[:time] > Date.today } end def grouped_events