Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
/log/*
!/log/.keep
/tmp

.byebug_history
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.2.3
12 changes: 8 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,12 @@ gem 'coffee-rails', '~> 4.1.0'
# 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
gem 'turbolinks'
# gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

gem 'feedjira'
gem 'twitter-bootstrap-rails'

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

Expand All @@ -35,6 +32,10 @@ gem 'twitter-bootstrap-rails'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development do
gem 'quiet_assets'
end

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
Expand All @@ -46,3 +47,6 @@ group :development, :test do
gem 'spring'
end

gem 'feedjira'
gem 'bootstrap-sass', '~> 3.3.6'
gem 'slim-rails'
33 changes: 24 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,14 @@ GEM
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
arel (6.0.3)
autoprefixer-rails (6.1.2)
execjs
json
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bootstrap-sass (3.3.6)
autoprefixer-rails (>= 5.2.1)
sass (>= 3.3.4)
builder (3.2.2)
byebug (8.2.0)
coffee-rails (4.1.0)
Expand Down Expand Up @@ -83,6 +89,8 @@ GEM
nokogiri (1.6.6.4)
mini_portile (~> 0.6.0)
pg (0.18.4)
quiet_assets (1.1.0)
railties (>= 3.1, < 5.0)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
Expand Down Expand Up @@ -124,23 +132,26 @@ GEM
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
slim (3.0.6)
temple (~> 0.7.3)
tilt (>= 1.3.3, < 2.1)
slim-rails (3.0.1)
actionmailer (>= 3.1, < 5.0)
actionpack (>= 3.1, < 5.0)
activesupport (>= 3.1, < 5.0)
railties (>= 3.1, < 5.0)
slim (~> 3.0)
spring (1.4.4)
sprockets (3.4.0)
rack (> 1, < 3)
sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
temple (0.7.6)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.1)
turbolinks (2.5.3)
coffee-rails
twitter-bootstrap-rails (3.2.0)
actionpack (~> 4.1)
execjs (~> 2.2)
rails (~> 4.1)
railties (~> 4.1)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.7.2)
Expand All @@ -156,17 +167,21 @@ PLATFORMS
ruby

DEPENDENCIES
bootstrap-sass (~> 3.3.6)
byebug
coffee-rails (~> 4.1.0)
feedjira
jbuilder (~> 2.0)
jquery-rails
pg
quiet_assets
rails (= 4.2.2)
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
slim-rails
spring
turbolinks
twitter-bootstrap-rails
uglifier (>= 1.3.0)
web-console (~> 2.0)

BUNDLED WITH
1.10.6
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# feedreader-demo
# feedreader
28 changes: 0 additions & 28 deletions README.rdoc

This file was deleted.

Binary file added app/assets/images/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 2 additions & 14 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's 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
// compiled file.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require bootstrap-sprockets
//= require jquery_ujs
//= require twitter/bootstrap
//= require turbolinks
// require turbolinks
//= require_tree .
3 changes: 0 additions & 3 deletions app/assets/javascripts/bootstrap.js.coffee

This file was deleted.

3 changes: 0 additions & 3 deletions app/assets/javascripts/entries.coffee

This file was deleted.

3 changes: 0 additions & 3 deletions app/assets/javascripts/feeds.coffee

This file was deleted.

15 changes: 0 additions & 15 deletions app/assets/stylesheets/application.css

This file was deleted.

3 changes: 3 additions & 0 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// "bootstrap-sprockets" must be imported before "bootstrap" and "bootstrap/variables"
@import "bootstrap-sprockets";
@import "bootstrap";
7 changes: 0 additions & 7 deletions app/assets/stylesheets/bootstrap_and_overrides.css

This file was deleted.

3 changes: 0 additions & 3 deletions app/assets/stylesheets/entries.scss

This file was deleted.

3 changes: 0 additions & 3 deletions app/assets/stylesheets/feeds.scss

This file was deleted.

8 changes: 2 additions & 6 deletions app/controllers/entries_controller.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
class EntriesController < ApplicationController
before_action :set_feed, only: :index

def index
@feed = Feed.find(params[:feed_id])
@entries = @feed.entries.order('published desc')
end

def show
@feed = Feed.find(params[:feed_id])
@entry = Entry.find(params[:id])
end

private

def set_feed
@feed = Feed.find(params[:id])
end
end
9 changes: 9 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
module ApplicationHelper
def full_title(page_title)
base_title = 'Feed reader'

if @title.nil?
base_title
else
"#{base_title} | #{@title}"
end
end
end
2 changes: 0 additions & 2 deletions app/helpers/entries_helper.rb

This file was deleted.

2 changes: 0 additions & 2 deletions app/helpers/feeds_helper.rb

This file was deleted.

9 changes: 0 additions & 9 deletions app/views/entries/index.html.erb

This file was deleted.

21 changes: 21 additions & 0 deletions app/views/entries/index.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
- @title = "Entries of feed: #{@feed.name}"

h1
= @feed.name
hr

p
= link_to 'Back', feeds_path

- @entries.each do |entry|
.panel.panel-default
.panel-body
'
= link_to entry.title, feed_entry_path(@feed, entry)
'
' -
i
' published
= time_ago_in_words(entry.published)
'
' ago.
7 changes: 0 additions & 7 deletions app/views/entries/show.html.erb

This file was deleted.

19 changes: 19 additions & 0 deletions app/views/entries/show.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
- @title = "Entry of feed: #{@feed.name}"

h3
= link_to @entry.title, @entry.url
i
' published on
= @entry.published
'
- if @entry.author.present?
' by
= @entry.author
p
= @entry.content.html_safe if @entry.content.present?
hr
p
= @entry.summary.html_safe if @entry.summary.present?

hr
= link_to 'Back', feed_entries_path(@feed)
29 changes: 0 additions & 29 deletions app/views/feeds/_form.html.erb

This file was deleted.

24 changes: 24 additions & 0 deletions app/views/feeds/_form.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
= form_for(@feed) do |f|
- if @feed.errors.any?
#error_explanation
h2
= pluralize(@feed.errors.count, "error")
| prohibited this feed from being saved:
ul
- @feed.errors.full_messages.each do |message|
li
= message
.field
= f.label :name
br
= f.text_field :name
.field
= f.label :url
br
= f.text_field :url
.field
= f.label :description
br
= f.text_area :description
.actions
= f.submit
6 changes: 0 additions & 6 deletions app/views/feeds/edit.html.erb

This file was deleted.

10 changes: 10 additions & 0 deletions app/views/feeds/edit.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- @title = "Edit feed: #{@feed.name}"

h1
| Editing Feed

= render 'form'
= link_to 'Show', @feed
'
' |
= link_to 'Back', feeds_path
Loading