diff --git a/Gemfile b/Gemfile index 1c59fa0..879c93f 100644 --- a/Gemfile +++ b/Gemfile @@ -12,17 +12,19 @@ gem 'rails_admin' gem 'rails_locale_detection', '~> 2.0.0.pre' gem 'sass-rails', '~> 4.0.0' -gem 'bootstrap-sass', '~> 3.2.0' +gem 'bootstrap-sass', '~> 3.3.0' gem 'uglifier', '>= 1.3.0' gem 'coffee-rails', '~> 4.0' gem 'jquery-rails' gem 'turbolinks' +gem 'will_paginate-bootstrap' gem 'redcarpet', '~> 3.2' gem 'paperclip', '~> 4.1' gem 'feedjira', github: 'feedjira/feedjira' gem 'trollop', '~> 2.0' +gem 'sanitize', '~> 3.0.0' group :development, :test do gem 'pry' diff --git a/Gemfile.lock b/Gemfile.lock index 94b4d26..009da73 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -39,7 +39,7 @@ GEM arel (5.0.1.20140414130214) awesome_print (1.2.0) bcrypt (3.1.9) - bootstrap-sass (3.2.0.2) + bootstrap-sass (3.3.1.0) sass (~> 3.2) builder (3.2.2) capybara (2.4.4) @@ -60,6 +60,7 @@ GEM coffee-script-source execjs coffee-script-source (1.8.0) + crass (0.2.1) curb (0.8.6) devise (3.4.1) bcrypt (~> 3.0) @@ -104,6 +105,8 @@ GEM nested_form (0.3.2) nokogiri (1.6.5) mini_portile (~> 0.6.0) + nokogumbo (1.1.12) + nokogiri orm_adapter (0.5.0) paperclip (4.2.1) activemodel (>= 3.0.0) @@ -182,6 +185,10 @@ GEM rspec-support (3.1.2) ruby-progressbar (1.7.0) safe_yaml (1.0.4) + sanitize (3.0.3) + crass (~> 0.2.0) + nokogiri (>= 1.4.4) + nokogumbo (= 1.1.12) sass (3.2.19) sass-rails (4.0.5) railties (>= 4.0.0, < 5.0) @@ -216,6 +223,9 @@ GEM raindrops (~> 0.7) warden (1.2.3) rack (>= 1.0) + will_paginate (3.0.7) + will_paginate-bootstrap (1.0.1) + will_paginate (>= 3.0.3) xpath (2.0.0) nokogiri (~> 1.3) @@ -224,7 +234,7 @@ PLATFORMS DEPENDENCIES awesome_print - bootstrap-sass (~> 3.2.0) + bootstrap-sass (~> 3.3.0) capybara (~> 2.4.1) coffee-rails (~> 4.0) devise (~> 3.4.0) @@ -240,8 +250,10 @@ DEPENDENCIES redcarpet (~> 3.2) rspec-instafail (~> 0.2.4) rspec-rails (~> 3.0) + sanitize (~> 3.0.0) sass-rails (~> 4.0.0) trollop (~> 2.0) turbolinks uglifier (>= 1.3.0) unicorn + will_paginate-bootstrap diff --git a/app/controllers/planet_controller.rb b/app/controllers/planet_controller.rb new file mode 100644 index 0000000..03abc1e --- /dev/null +++ b/app/controllers/planet_controller.rb @@ -0,0 +1,13 @@ +class PlanetController < ApplicationController + respond_to :html, :except => [:feed] + respond_to :atom, :only => [:feed] + + def index + @entries = Planet::Models::Entry.order(:published_at => :desc) + .paginate(:page => params[:page], :per_page => 10) + end + + def feed + # TODO implement me + end +end diff --git a/app/views/planet/index.html.erb b/app/views/planet/index.html.erb new file mode 100644 index 0000000..0c3dc02 --- /dev/null +++ b/app/views/planet/index.html.erb @@ -0,0 +1,22 @@ +<%- content_for :page_title do %> + <%= t 'pages.planet.menu_title' %> +<% end %> + +