--------------------------------------------------------------------------------
/config/initializers/backtrace_silencers.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5 |
6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7 | # Rails.backtrace_cleaner.remove_silencers!
8 |
--------------------------------------------------------------------------------
/test/test_helper.rb:
--------------------------------------------------------------------------------
1 | ENV['RAILS_ENV'] ||= 'test'
2 | require File.expand_path('../../config/environment', __FILE__)
3 | require 'rails/test_help'
4 |
5 | class ActiveSupport::TestCase
6 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
7 | fixtures :all
8 |
9 | # Add more helper methods to be used by all tests here...
10 | def sign_in_as(user, password)
11 | post login_path, session: {email: user.email, password: password}
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/app/views/users/show.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/config/database.yml:
--------------------------------------------------------------------------------
1 | # SQLite version 3.x
2 | # gem install sqlite3
3 | #
4 | # Ensure the SQLite 3 gem is defined in your Gemfile
5 | # gem 'sqlite3'
6 | #
7 | default: &default
8 | adapter: sqlite3
9 | pool: 5
10 | timeout: 5000
11 |
12 | development:
13 | <<: *default
14 | database: db/development.sqlite3
15 |
16 | # Warning: The database defined as "test" will be erased and
17 | # re-generated from your development database when you run "rake".
18 | # Do not set this db to the same as development or production.
19 | test:
20 | <<: *default
21 | database: db/test.sqlite3
22 |
23 | production:
24 | <<: *default
25 | database: db/production.sqlite3
26 |
--------------------------------------------------------------------------------
/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | class ApplicationController < ActionController::Base
2 | # Prevent CSRF attacks by raising an exception.
3 | # For APIs, you may want to use :null_session instead.
4 | protect_from_forgery with: :exception
5 |
6 | helper_method :current_user, :logged_in?
7 |
8 | def current_user
9 | @current_user ||= User.find(session[:user_id]) if session[:user_id]
10 | end
11 |
12 | def logged_in?
13 | !!current_user
14 | end
15 |
16 | def require_user
17 | if !logged_in?
18 | flash[:danger] = "You must be logged in to perform that action."
19 | redirect_to root_path
20 | end
21 | end
22 | end
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Share :angel: : Σ Sigma Blog ∃ ∀
2 |
3 | [](https://gitter.im/AdiChat/Share?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4 | A Σ (summation) of thoughts from all over the world Ω
5 | An Earthly blog with advanced features such as administrator and moderator control, pagination, category clustering and much more. :smile:
6 | Use the Universal blog live at : http://sigma-blog.herokuapp.com/
7 | The front page of the application :
8 | 
9 |
10 | Feel free to contribute. :pray:
11 |
12 |
--------------------------------------------------------------------------------
/app/views/shared/_errors.html.erb:
--------------------------------------------------------------------------------
1 | <% if obj.errors.any? %>
2 |
3 |
4 |
5 |
6 |
7 | <%= pluralize(obj.errors.count, "error") %>
8 | prohibited this article from being saved. Try later:
9 |
10 |
11 |
12 | <% obj.errors.full_messages.each do |msg| %>
13 |
<%= msg %>
14 | <% end %>
15 |
16 |
17 |
18 |
19 |
20 |
21 | <% end %>
--------------------------------------------------------------------------------
/app/controllers/sessions_controller.rb:
--------------------------------------------------------------------------------
1 | class SessionsController < ApplicationController
2 |
3 | def new
4 |
5 | end
6 |
7 | def create
8 | user = User.find_by(email: params[:session][:email].downcase)
9 | if user && user.authenticate(params[:session][:password])
10 | session[:user_id] = user.id
11 | flash[:success] = "You have successfully logged in"
12 | redirect_to user_path(user)
13 | else
14 | flash.now[:danger] = "There was something wrong with your login information"
15 | render 'new'
16 | end
17 | end
18 |
19 | def destroy
20 | session[:user_id] = nil
21 | flash[:success] = "You have logged out"
22 | redirect_to root_path
23 | end
24 |
25 | end
--------------------------------------------------------------------------------
/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new inflection rules using the following format. Inflections
4 | # are locale specific, and you may define rules for as many different
5 | # locales as you wish. All of these examples are active by default:
6 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
7 | # inflect.plural /^(ox)$/i, '\1en'
8 | # inflect.singular /^(ox)en/i, '\1'
9 | # inflect.irregular 'person', 'people'
10 | # inflect.uncountable %w( fish sheep )
11 | # end
12 |
13 | # These inflection rules are supported but not enabled by default:
14 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
15 | # inflect.acronym 'RESTful'
16 | # end
17 |
--------------------------------------------------------------------------------
/config/locales/en.yml:
--------------------------------------------------------------------------------
1 | # Files in the config/locales directory are used for internationalization
2 | # and are automatically loaded by Rails. If you want to use locales other
3 | # than English, add the necessary files in this directory.
4 | #
5 | # To use the locales, use `I18n.t`:
6 | #
7 | # I18n.t 'hello'
8 | #
9 | # In views, this is aliased to just `t`:
10 | #
11 | # <%= t('hello') %>
12 | #
13 | # To use a different locale, set it with `I18n.locale`:
14 | #
15 | # I18n.locale = :es
16 | #
17 | # This would use the information in config/locales/es.yml.
18 | #
19 | # To learn more, please read the Rails Internationalization guide
20 | # available at http://guides.rubyonrails.org/i18n.html.
21 |
22 | en:
23 | hello: "Hello world"
24 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/application.css:
--------------------------------------------------------------------------------
1 | /*
2 | * This is a manifest file that'll be compiled into application.css, which will include all the files
3 | * listed below.
4 | *
5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6 | * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7 | *
8 | * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9 | * compiled file so the styles you add here take precedence over styles defined in any styles
10 | * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11 | * file per style scope.
12 | *
13 | *= require_tree .
14 | *= require_self
15 | */
16 |
--------------------------------------------------------------------------------
/app/assets/javascripts/application.js:
--------------------------------------------------------------------------------
1 | // This is a manifest file that'll be compiled into application.js, which will include all the files
2 | // listed below.
3 | //
4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5 | // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6 | //
7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8 | // compiled file.
9 | //
10 | // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11 | // about supported directives.
12 | //
13 | //= require jquery
14 | //= require jquery_ujs
15 | //= require bootstrap-sprockets
16 | //= require turbolinks
17 | //= require_tree .
18 |
--------------------------------------------------------------------------------
/app/views/categories/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'shared/errors', obj: @category %>
2 |
3 | <%= form_for(@category, :html => {class: "form-horizontal", role: "form"}) do |f| %>
4 |
<%= pluralize(user.articles.count, "article") if user.articles %>
13 | <% if logged_in? and current_user.admin? %>
14 |
<%= link_to "Delete this user", user_path(user), method: :delete,
15 | data: { confirm: "Are you sure you want to delete the user and all their articles ?" } %>
16 | <% end %>
17 |
18 |
19 |
20 | <% end %>
21 | <%= will_paginate %>
22 |
--------------------------------------------------------------------------------
/test/controllers/categories_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class CategoriesControllerTest < ActionController::TestCase
4 | def setup
5 | @category = Category.create(name: "sports")
6 | @user = User.create(username: "john", email: "john@example.com", password: "password", admin: true)
7 | end
8 |
9 | test "should get categories index" do
10 | get :index
11 | assert_response :success
12 | end
13 |
14 | test "should get new" do
15 | session[:user_id] = @user.id
16 | get :new
17 | assert_response :success
18 | end
19 |
20 | test "should get show" do
21 | get(:show, {'id' => @category.id})
22 | assert_response :success
23 | end
24 |
25 | test "should redirect create when admin not logged in" do
26 | assert_no_difference 'Category.count' do
27 | post :create, category: { name: "sports" }
28 | end
29 | assert_redirected_to categories_path
30 | end
31 | end
32 |
--------------------------------------------------------------------------------
/app/views/sessions/new.html.erb:
--------------------------------------------------------------------------------
1 |
27 | [ <%= link_to "Cancel request and return to articles listing", articles_path %> ]
28 |
--------------------------------------------------------------------------------
/config/secrets.yml:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Your secret key is used for verifying the integrity of signed cookies.
4 | # If you change this key, all old signed cookies will become invalid!
5 |
6 | # Make sure the secret is at least 30 characters and all random,
7 | # no regular words or you'll be exposed to dictionary attacks.
8 | # You can use `rake secret` to generate a secure secret key.
9 |
10 | # Make sure the secrets in this file are kept private
11 | # if you're sharing your code publicly.
12 |
13 | development:
14 | secret_key_base: 54de9c3bdb176c30cc05ea4757ec13a74ff1d0bf6255497243a67d5387b701b35b6346afe157124ec2d0be2783218f2bd0cbf7145382a366e1eee9d23ffd0bae
15 |
16 | test:
17 | secret_key_base: ad2d50dbfc60e6ceae64e161fd2852f90d13aaa5d51c645e36e74611bfbb3e45c383b46b6d467d06b865244262f6f8805e9eb5dd0574d9a2b34f18c5a1a11763
18 |
19 | # Do not keep production secrets in the repository,
20 | # instead read values from the environment.
21 | production:
22 | secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
23 |
--------------------------------------------------------------------------------
/test/integration/create_categories_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class CreateCategoriesTest < ActionDispatch::IntegrationTest
4 |
5 | def setup
6 | @user = User.create(username: "john", email: "john@example.com", password: "password", admin: true)
7 | end
8 |
9 | test "get new category form and create category" do
10 | sign_in_as(@user, "password")
11 | get new_category_path
12 | assert_template 'categories/new'
13 | assert_difference 'Category.count', 1 do
14 | post_via_redirect categories_path, category: {name: "sports"}
15 | end
16 | assert_template 'categories/index'
17 | assert_match "sports", response.body
18 | end
19 |
20 | test "invalid category submission results in failure" do
21 | sign_in_as(@user, "password")
22 | get new_category_path
23 | assert_template 'categories/new'
24 | assert_no_difference 'Category.count' do
25 | post categories_path, category: {name: " "}
26 | end
27 | assert_template 'categories/new'
28 | assert_select 'h2.panel-title'
29 | assert_select 'div.panel-body'
30 | end
31 | end
--------------------------------------------------------------------------------
/config/application.rb:
--------------------------------------------------------------------------------
1 | require File.expand_path('../boot', __FILE__)
2 |
3 | require 'rails/all'
4 |
5 | # Require the gems listed in Gemfile, including any gems
6 | # you've limited to :test, :development, or :production.
7 | Bundler.require(*Rails.groups)
8 |
9 | module AlphaBlog
10 | class Application < Rails::Application
11 | # Settings in config/environments/* take precedence over those specified here.
12 | # Application configuration should go into files in config/initializers
13 | # -- all .rb files in that directory are automatically loaded.
14 |
15 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
16 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
17 | # config.time_zone = 'Central Time (US & Canada)'
18 |
19 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
20 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
21 | # config.i18n.default_locale = :de
22 |
23 | # Do not swallow errors in after_commit/after_rollback callbacks.
24 | config.active_record.raise_in_transactional_callbacks = true
25 | end
26 | end
27 |
--------------------------------------------------------------------------------
/app/views/pages/about.html.erb:
--------------------------------------------------------------------------------
1 |
Σ Sigma Blog ∃ ∀
2 |
A Σ summation of thoughts from all over the world Ω
3 |
This is a blog application which strives to exist for humanity. Everyone all around the
4 | world will be able to share their thoughts on all topics for other fellow humans to be
5 | inspired. The features in this application makes it very easily to use. The purpose makes
6 | this application open-source hence one may free free to fork the repository on github
7 | and make this even better. Thought this apllication has been coded by Aditya Chatterjee
8 | but everyone is the owner and user of this wonderful application. Be open-minded and amiable
9 | while you use this blog and do not spam it. Still initially, we will be having just one
10 | administrator to manage all transactions but with the passage of time, some of the users
11 | will be elevated to the position of moderators and hence will be able to monitor the behaviour
12 | of fellow users. Gradually, the entire control will be transfered to the users and this will be
13 | a global open society in true sense.
14 | ⊕ Be happy. ∞
15 |
16 | <%= link_to " ~ Home", root_path %>
--------------------------------------------------------------------------------
/app/controllers/categories_controller.rb:
--------------------------------------------------------------------------------
1 | class CategoriesController < ApplicationController
2 | before_action :require_admin, except: [:index, :show]
3 |
4 | def index
5 | @categories = Category.paginate(page: params[:page], per_page: 5)
6 | end
7 |
8 | def new
9 | @category = Category.new
10 | end
11 |
12 | def create
13 | @category = Category.new(category_params)
14 | if @category.save
15 | flash[:success] = "Category was created successfully"
16 | redirect_to categories_path
17 | else
18 | render 'new'
19 | end
20 | end
21 |
22 | def edit
23 | @category = Category.find(params[:id])
24 | end
25 |
26 | def update
27 | @category = Category.find(params[:id])
28 | if @category.update(category_params)
29 | flash[:success] = "Category name was successfully updated"
30 | redirect_to category_path(@category)
31 | else
32 | render 'edit'
33 | end
34 | end
35 |
36 | def show
37 | @category = Category.find(params[:id])
38 | @category_articles = @category.articles.paginate(page: params[:page], per_page: 5)
39 | end
40 | private
41 | def category_params
42 | params.require(:category).permit(:name)
43 | end
44 |
45 | def require_admin
46 | if !logged_in? || (logged_in? and !current_user.admin?)
47 | flash[:danger] = "Only admins can perform that action"
48 | redirect_to categories_path
49 | end
50 | end
51 | end
--------------------------------------------------------------------------------
/app/views/articles/_article.html.erb:
--------------------------------------------------------------------------------
1 | <% obj.each do |article| %>
2 |
38 | [ <%= link_to "Cancel request and return to articles listing", articles_path %> ]
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/db/schema.rb:
--------------------------------------------------------------------------------
1 | # encoding: UTF-8
2 | # This file is auto-generated from the current state of the database. Instead
3 | # of editing this file, please use the migrations feature of Active Record to
4 | # incrementally modify your database, and then regenerate this schema definition.
5 | #
6 | # Note that this schema.rb definition is the authoritative source for your
7 | # database schema. If you need to create the application database on another
8 | # system, you should be using db:schema:load, not running all the migrations
9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10 | # you'll amass, the slower it'll run and the greater likelihood for issues).
11 | #
12 | # It's strongly recommended that you check this file into your version control system.
13 |
14 | ActiveRecord::Schema.define(version: 20151008173755) do
15 |
16 | create_table "article_categories", force: :cascade do |t|
17 | t.integer "article_id"
18 | t.integer "category_id"
19 | end
20 |
21 | create_table "articles", force: :cascade do |t|
22 | t.string "title"
23 | t.text "description"
24 | t.datetime "created_at"
25 | t.datetime "updated_at"
26 | t.integer "user_id"
27 | end
28 |
29 | create_table "categories", force: :cascade do |t|
30 | t.string "name"
31 | t.datetime "created_at"
32 | t.datetime "updated_at"
33 | end
34 |
35 | create_table "users", force: :cascade do |t|
36 | t.string "username"
37 | t.string "email"
38 | t.datetime "created_at"
39 | t.datetime "updated_at"
40 | t.string "password_digest"
41 | t.boolean "admin", default: false
42 | end
43 |
44 | end
45 |
--------------------------------------------------------------------------------
/app/controllers/articles_controller.rb:
--------------------------------------------------------------------------------
1 | class ArticlesController < ApplicationController
2 | before_action :set_article, only: [:edit, :update, :show, :destroy]
3 | before_action :require_user, except: [:index, :show]
4 | before_action :require_same_user, only: [:edit, :update, :destroy]
5 |
6 | def index
7 | @articles = Article.paginate(page: params[:page], per_page: 5)
8 | end
9 |
10 | def new
11 | @article = Article.new
12 | end
13 |
14 | def edit
15 | end
16 |
17 | def create
18 | @article = Article.new(article_params)
19 | @article.user = current_user
20 | if @article.save
21 | flash[:success] = "Article was successfully created"
22 | redirect_to article_path(@article)
23 | else
24 | render 'new'
25 | end
26 | end
27 |
28 | def update
29 | if @article.update(article_params)
30 | flash[:success] = "Article was successfully updated"
31 | redirect_to article_path(@article)
32 | else
33 | render 'edit'
34 | end
35 | end
36 |
37 | def show
38 | end
39 |
40 | def destroy
41 | @article.destroy
42 | flash[:danger] = "Article was successfully deleted"
43 | redirect_to articles_path
44 | end
45 |
46 | private
47 | def set_article
48 | @article = Article.find(params[:id])
49 | end
50 |
51 | def article_params
52 | params.require(:article).permit(:title, :description, category_ids: [])
53 | end
54 |
55 | def require_same_user
56 | if current_user != @article.user and !current_user.admin?
57 | flash[:danger] = "You can only edit or delete your own articles. Contact Admin for upgrading your profile."
58 | redirect_to root_path
59 | end
60 | end
61 |
62 | end
--------------------------------------------------------------------------------
/public/500.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | We're sorry, but something went wrong (500)
5 |
6 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
We're sorry, but something went wrong.
62 |
63 |
If you are the application owner check the logs for more information.
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/config/environments/development.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # In the development environment your application's code is reloaded on
5 | # every request. This slows down response time but is perfect for development
6 | # since you don't have to restart the web server when you make code changes.
7 | config.cache_classes = false
8 |
9 | # Do not eager load code on boot.
10 | config.eager_load = false
11 |
12 | # Show full error reports and disable caching.
13 | config.consider_all_requests_local = true
14 | config.action_controller.perform_caching = false
15 |
16 | # Don't care if the mailer can't send.
17 | config.action_mailer.raise_delivery_errors = false
18 |
19 | # Print deprecation notices to the Rails logger.
20 | config.active_support.deprecation = :log
21 |
22 | # Raise an error on page load if there are pending migrations.
23 | config.active_record.migration_error = :page_load
24 |
25 | # Debug mode disables concatenation and preprocessing of assets.
26 | # This option may cause significant delays in view rendering with a large
27 | # number of complex assets.
28 | config.assets.debug = true
29 |
30 | # Asset digests allow you to set far-future HTTP expiration dates on all assets,
31 | # yet still be able to expire them through the digest params.
32 | config.assets.digest = true
33 |
34 | # Adds additional error checking when serving assets at runtime.
35 | # Checks for improperly declared sprockets dependencies.
36 | # Raises helpful error messages.
37 | config.assets.raise_runtime_errors = true
38 |
39 | # Raises error for missing translations
40 | # config.action_view.raise_on_missing_translations = true
41 | end
42 |
--------------------------------------------------------------------------------
/public/422.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | The change you wanted was rejected (422)
5 |
6 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
The change you wanted was rejected.
62 |
Maybe you tried to change something you didn't have access to.
63 |
64 |
If you are the application owner check the logs for more information.
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/public/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | The page you were looking for doesn't exist (404)
5 |
6 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
The page you were looking for doesn't exist.
62 |
You may have mistyped the address or the page may have moved.
63 |
64 |
If you are the application owner check the logs for more information.
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/app/controllers/users_controller.rb:
--------------------------------------------------------------------------------
1 | class UsersController < ApplicationController
2 | before_action :set_user, only: [:edit, :update, :show]
3 | before_action :require_same_user, only: [:edit, :update, :destroy]
4 | before_action :require_admin, only: [:destroy]
5 | def index
6 | @users = User.paginate(page: params[:page], per_page: 5)
7 | end
8 |
9 | def new
10 | @user = User.new
11 | end
12 |
13 | def create
14 | @user = User.new(user_params)
15 | if @user.save
16 | session[:user_id] = @user.id
17 | flash[:success] = "Welcome to the alpha blog #{@user.username}"
18 | redirect_to user_path(@user)
19 | else
20 | render 'new'
21 | end
22 | end
23 |
24 | def edit
25 | end
26 |
27 | def update
28 | if @user.update(user_params)
29 | flash[:success] = "Your account was updated successfully"
30 | redirect_to articles_path
31 | else
32 | render 'edit'
33 | end
34 | end
35 |
36 | def show
37 | @user_articles = @user.articles.paginate(page: params[:page], per_page: 5)
38 | end
39 |
40 | def destroy
41 | @user = User.find(params[:id])
42 | @user.destroy
43 | flash[:danger] = "User and all articles created by user have been deleted"
44 | redirect_to users_path
45 | end
46 |
47 | private
48 | def user_params
49 | params.require(:user).permit(:username, :email, :password)
50 | end
51 | def set_user
52 | @user = User.find(params[:id])
53 | end
54 |
55 | def require_same_user
56 | if current_user != @user and !current_user.admin?
57 | flash[:danger] = "You can only edit your own account"
58 | redirect_to root_path
59 | end
60 | end
61 |
62 | def require_admin
63 | if logged_in? and !current_user.admin?
64 | flash[:danger] = "Only admin users can perform that action"
65 | redirect_to root_path
66 | end
67 | end
68 |
69 | end
--------------------------------------------------------------------------------
/config/environments/test.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # The test environment is used exclusively to run your application's
5 | # test suite. You never need to work with it otherwise. Remember that
6 | # your test database is "scratch space" for the test suite and is wiped
7 | # and recreated between test runs. Don't rely on the data there!
8 | config.cache_classes = true
9 |
10 | # Do not eager load code on boot. This avoids loading your whole application
11 | # just for the purpose of running a single test. If you are using a tool that
12 | # preloads Rails for running tests, you may have to set it to true.
13 | config.eager_load = false
14 |
15 | # Configure static file server for tests with Cache-Control for performance.
16 | config.serve_static_files = true
17 | config.static_cache_control = 'public, max-age=3600'
18 |
19 | # Show full error reports and disable caching.
20 | config.consider_all_requests_local = true
21 | config.action_controller.perform_caching = false
22 |
23 | # Raise exceptions instead of rendering exception templates.
24 | config.action_dispatch.show_exceptions = false
25 |
26 | # Disable request forgery protection in test environment.
27 | config.action_controller.allow_forgery_protection = false
28 |
29 | # Tell Action Mailer not to deliver emails to the real world.
30 | # The :test delivery method accumulates sent emails in the
31 | # ActionMailer::Base.deliveries array.
32 | config.action_mailer.delivery_method = :test
33 |
34 | # Randomize the order test cases are executed.
35 | config.active_support.test_order = :random
36 |
37 | # Print deprecation notices to the stderr.
38 | config.active_support.deprecation = :stderr
39 |
40 | # Raises error for missing translations
41 | # config.action_view.raise_on_missing_translations = true
42 | end
43 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 |
4 | # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
5 | gem 'rails', '4.2.3'
6 | # Use sqlite3 as the database for Active Record
7 | gem 'bcrypt', '~> 3.1.7'
8 | gem 'will_paginate', '3.0.7'
9 | gem 'bootstrap-will_paginate', '0.0.10'
10 | # Use SCSS for stylesheets
11 | gem 'bootstrap-sass', '~> 3.3.5'
12 | gem 'sass-rails', '~> 5.0'
13 | # Use Uglifier as compressor for JavaScript assets
14 | gem 'uglifier', '>= 1.3.0'
15 | # Use CoffeeScript for .coffee assets and views
16 | gem 'coffee-rails', '~> 4.1.0'
17 | # See https://github.com/rails/execjs#readme for more supported runtimes
18 | # gem 'therubyracer', platforms: :ruby
19 | gem 'tzinfo-data', platforms: [:mingw, :mswin]
20 |
21 | # Use jquery as the JavaScript library
22 | gem 'jquery-rails'
23 | # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
24 | gem 'turbolinks'
25 | # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
26 | gem 'jbuilder', '~> 2.0'
27 | # bundle exec rake doc:rails generates the API under doc/api.
28 | gem 'sdoc', '~> 0.4.0', group: :doc
29 |
30 | # Use ActiveModel has_secure_password
31 | # gem 'bcrypt', '~> 3.1.7'
32 |
33 | # Use Unicorn as the app server
34 | # gem 'unicorn'
35 |
36 | # Use Capistrano for deployment
37 | # gem 'capistrano-rails', group: :development
38 |
39 | group :development, :test do
40 | gem 'sqlite3'
41 | # Call 'byebug' anywhere in the code to stop execution and get a debugger console
42 | gem 'byebug'
43 |
44 | # Access an IRB console on exception pages or by using <%= console %> in views
45 | gem 'web-console', '~> 2.0'
46 |
47 | # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
48 | gem 'spring'
49 | end
50 |
51 | group :production do
52 | gem 'pg'
53 | gem 'rails_12factor'
54 | end
55 |
56 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/custom.css.scss:
--------------------------------------------------------------------------------
1 | $navbar-default-bg: black;
2 |
3 | @import "bootstrap-sprockets";
4 | @import "bootstrap";
5 |
6 | #logo {
7 | float: left;
8 | font-size: 1.7em;
9 | color: #fff;
10 | text-transform: uppercase;
11 | letter-spacing: -1px;
12 | font-weight: bold;
13 | }
14 |
15 | #logo:hover {
16 | color: #fff;
17 | text-decoration: none;
18 | }
19 |
20 | .center {
21 | text-align: center;
22 | }
23 |
24 | .jumbotron {
25 | background-image: url('1.jpg');
26 | background-size: cover;
27 | height: 550px;
28 | }
29 |
30 | .jumbotron h1 {
31 | color: #fff;
32 | text-align: center;
33 | margin-bottom: 30px;
34 | letter-spacing: -1px;
35 | font-weight: bold;
36 | }
37 |
38 | .btn-xlarge {
39 | font-size: 1.7em;
40 | background-color: black;
41 | }
42 |
43 | .article-meta-details {
44 | border-top: 1px solid #eaeaea;
45 | margin-top: 15px;
46 | }
47 |
48 | .article-actions {
49 | border-top: 1px solid #eaeaea;
50 | padding-top: 5px;
51 | }
52 |
53 | .description {
54 | margin-top: 0;
55 | }
56 |
57 | .article-title {
58 | font-weight: bold;
59 | font-size: 1.5em;
60 | }
61 |
62 | .article-body {
63 | border-top: 1px solid #eaeaea;
64 | padding-top: 15px;
65 | padding-bottom: 15px;
66 | }
67 |
68 | .listing {
69 | list-style: none;
70 | padding-left: 0;
71 | }
72 |
73 | .badge {
74 | background-color: #CEF6F5;
75 | text-transform: uppercase;
76 | letter-spacing: -1px;
77 | font-weight: bold;
78 | }
79 |
80 | .input_checkbox input {
81 | width: auto !important;
82 | }
83 |
84 | footer {
85 | margin-top: 45px;
86 | padding-top: 5px;
87 | border-top: 1px solid #eaeaea;
88 | color: #777;
89 | }
90 |
91 | footer a:hover {
92 | color: #222;
93 | }
94 |
95 | footer small {
96 | float: left;
97 | }
98 |
99 | footer ul {
100 | float: right;
101 | list-style: none;
102 | }
103 |
104 | footer ul li {
105 | float: left;
106 | margin-left: 15px;
107 | }
--------------------------------------------------------------------------------
/config/routes.rb:
--------------------------------------------------------------------------------
1 | Rails.application.routes.draw do
2 |
3 | root 'pages#home'
4 | get 'about', to: 'pages#about'
5 |
6 | resources :articles
7 |
8 | get 'signup', to: 'users#new'
9 | resources :users, except: [:new]
10 |
11 | get 'login', to: 'sessions#new'
12 | post 'login', to: 'sessions#create'
13 | delete 'logout', to: 'sessions#destroy'
14 |
15 | resources :categories, except: [:destroy]
16 | # The priority is based upon order of creation: first created -> highest priority.
17 | # See how all your routes lay out with "rake routes".
18 |
19 | # You can have the root of your site routed with "root"
20 | # root 'welcome#index'
21 |
22 | # Example of regular route:
23 | # get 'products/:id' => 'catalog#view'
24 |
25 | # Example of named route that can be invoked with purchase_url(id: product.id)
26 | # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
27 |
28 | # Example resource route (maps HTTP verbs to controller actions automatically):
29 | # resources :products
30 |
31 | # Example resource route with options:
32 | # resources :products do
33 | # member do
34 | # get 'short'
35 | # post 'toggle'
36 | # end
37 | #
38 | # collection do
39 | # get 'sold'
40 | # end
41 | # end
42 |
43 | # Example resource route with sub-resources:
44 | # resources :products do
45 | # resources :comments, :sales
46 | # resource :seller
47 | # end
48 |
49 | # Example resource route with more complex sub-resources:
50 | # resources :products do
51 | # resources :comments
52 | # resources :sales do
53 | # get 'recent', on: :collection
54 | # end
55 | # end
56 |
57 | # Example resource route with concerns:
58 | # concern :toggleable do
59 | # post 'toggle'
60 | # end
61 | # resources :posts, concerns: :toggleable
62 | # resources :photos, concerns: :toggleable
63 |
64 | # Example resource route within a namespace:
65 | # namespace :admin do
66 | # # Directs /admin/products/* to Admin::ProductsController
67 | # # (app/controllers/admin/products_controller.rb)
68 | # resources :products
69 | # end
70 | end
71 |
--------------------------------------------------------------------------------
/config/environments/production.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # Code is not reloaded between requests.
5 | config.cache_classes = true
6 |
7 | # Eager load code on boot. This eager loads most of Rails and
8 | # your application in memory, allowing both threaded web servers
9 | # and those relying on copy on write to perform better.
10 | # Rake tasks automatically ignore this option for performance.
11 | config.eager_load = true
12 |
13 | # Full error reports are disabled and caching is turned on.
14 | config.consider_all_requests_local = false
15 | config.action_controller.perform_caching = true
16 |
17 | # Enable Rack::Cache to put a simple HTTP cache in front of your application
18 | # Add `rack-cache` to your Gemfile before enabling this.
19 | # For large-scale production use, consider using a caching reverse proxy like
20 | # NGINX, varnish or squid.
21 | # config.action_dispatch.rack_cache = true
22 |
23 | # Disable serving static files from the `/public` folder by default since
24 | # Apache or NGINX already handles this.
25 | config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
26 |
27 | # Compress JavaScripts and CSS.
28 | config.assets.js_compressor = :uglifier
29 | # config.assets.css_compressor = :sass
30 |
31 | # Do not fallback to assets pipeline if a precompiled asset is missed.
32 | config.assets.compile = false
33 |
34 | # Asset digests allow you to set far-future HTTP expiration dates on all assets,
35 | # yet still be able to expire them through the digest params.
36 | config.assets.digest = true
37 |
38 | # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
39 |
40 | # Specifies the header that your server uses for sending files.
41 | # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
42 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
43 |
44 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
45 | # config.force_ssl = true
46 |
47 | # Use the lowest log level to ensure availability of diagnostic information
48 | # when problems arise.
49 | config.log_level = :debug
50 |
51 | # Prepend all log lines with the following tags.
52 | # config.log_tags = [ :subdomain, :uuid ]
53 |
54 | # Use a different logger for distributed setups.
55 | # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
56 |
57 | # Use a different cache store in production.
58 | # config.cache_store = :mem_cache_store
59 |
60 | # Enable serving of images, stylesheets, and JavaScripts from an asset server.
61 | # config.action_controller.asset_host = 'http://assets.example.com'
62 |
63 | # Ignore bad email addresses and do not raise email delivery errors.
64 | # Set this to true and configure the email server for immediate delivery to raise delivery errors.
65 | # config.action_mailer.raise_delivery_errors = false
66 |
67 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
68 | # the I18n.default_locale when a translation cannot be found).
69 | config.i18n.fallbacks = true
70 |
71 | # Send deprecation notices to registered listeners.
72 | config.active_support.deprecation = :notify
73 |
74 | # Use default logging formatter so that PID and timestamp are not suppressed.
75 | config.log_formatter = ::Logger::Formatter.new
76 |
77 | # Do not dump schema after migrations.
78 | config.active_record.dump_schema_after_migration = false
79 | end
80 |
--------------------------------------------------------------------------------
/app/views/layouts/_navigation.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: https://rubygems.org/
3 | specs:
4 | actionmailer (4.2.3)
5 | actionpack (= 4.2.3)
6 | actionview (= 4.2.3)
7 | activejob (= 4.2.3)
8 | mail (~> 2.5, >= 2.5.4)
9 | rails-dom-testing (~> 1.0, >= 1.0.5)
10 | actionpack (4.2.3)
11 | actionview (= 4.2.3)
12 | activesupport (= 4.2.3)
13 | rack (~> 1.6)
14 | rack-test (~> 0.6.2)
15 | rails-dom-testing (~> 1.0, >= 1.0.5)
16 | rails-html-sanitizer (~> 1.0, >= 1.0.2)
17 | actionview (4.2.3)
18 | activesupport (= 4.2.3)
19 | builder (~> 3.1)
20 | erubis (~> 2.7.0)
21 | rails-dom-testing (~> 1.0, >= 1.0.5)
22 | rails-html-sanitizer (~> 1.0, >= 1.0.2)
23 | activejob (4.2.3)
24 | activesupport (= 4.2.3)
25 | globalid (>= 0.3.0)
26 | activemodel (4.2.3)
27 | activesupport (= 4.2.3)
28 | builder (~> 3.1)
29 | activerecord (4.2.3)
30 | activemodel (= 4.2.3)
31 | activesupport (= 4.2.3)
32 | arel (~> 6.0)
33 | activesupport (4.2.3)
34 | i18n (~> 0.7)
35 | json (~> 1.7, >= 1.7.7)
36 | minitest (~> 5.1)
37 | thread_safe (~> 0.3, >= 0.3.4)
38 | tzinfo (~> 1.1)
39 | arel (6.0.3)
40 | autoprefixer-rails (6.0.3)
41 | execjs
42 | json
43 | bcrypt (3.1.10)
44 | bcrypt (3.1.10-x86-mingw32)
45 | binding_of_caller (0.7.2)
46 | debug_inspector (>= 0.0.1)
47 | bootstrap-sass (3.3.5.1)
48 | autoprefixer-rails (>= 5.0.0.1)
49 | sass (>= 3.3.0)
50 | bootstrap-will_paginate (0.0.10)
51 | will_paginate
52 | builder (3.2.2)
53 | byebug (6.0.2)
54 | coffee-rails (4.1.0)
55 | coffee-script (>= 2.2.0)
56 | railties (>= 4.0.0, < 5.0)
57 | coffee-script (2.4.1)
58 | coffee-script-source
59 | execjs
60 | coffee-script-source (1.9.1.1)
61 | debug_inspector (0.0.2)
62 | erubis (2.7.0)
63 | execjs (2.6.0)
64 | globalid (0.3.6)
65 | activesupport (>= 4.1.0)
66 | i18n (0.7.0)
67 | jbuilder (2.3.1)
68 | activesupport (>= 3.0.0, < 5)
69 | multi_json (~> 1.2)
70 | jquery-rails (4.0.5)
71 | rails-dom-testing (~> 1.0)
72 | railties (>= 4.2.0)
73 | thor (>= 0.14, < 2.0)
74 | json (1.8.3)
75 | loofah (2.0.3)
76 | nokogiri (>= 1.5.9)
77 | mail (2.6.3)
78 | mime-types (>= 1.16, < 3)
79 | mime-types (2.6.2)
80 | mini_portile (0.6.2)
81 | minitest (5.8.1)
82 | multi_json (1.11.2)
83 | nokogiri (1.6.6.2)
84 | mini_portile (~> 0.6.0)
85 | nokogiri (1.6.6.2-x86-mingw32)
86 | mini_portile (~> 0.6.0)
87 | pg (0.18.3)
88 | pg (0.18.3-x86-mingw32)
89 | rack (1.6.4)
90 | rack-test (0.6.3)
91 | rack (>= 1.0)
92 | rails (4.2.3)
93 | actionmailer (= 4.2.3)
94 | actionpack (= 4.2.3)
95 | actionview (= 4.2.3)
96 | activejob (= 4.2.3)
97 | activemodel (= 4.2.3)
98 | activerecord (= 4.2.3)
99 | activesupport (= 4.2.3)
100 | bundler (>= 1.3.0, < 2.0)
101 | railties (= 4.2.3)
102 | sprockets-rails
103 | rails-deprecated_sanitizer (1.0.3)
104 | activesupport (>= 4.2.0.alpha)
105 | rails-dom-testing (1.0.7)
106 | activesupport (>= 4.2.0.beta, < 5.0)
107 | nokogiri (~> 1.6.0)
108 | rails-deprecated_sanitizer (>= 1.0.1)
109 | rails-html-sanitizer (1.0.2)
110 | loofah (~> 2.0)
111 | rails_12factor (0.0.3)
112 | rails_serve_static_assets
113 | rails_stdout_logging
114 | rails_serve_static_assets (0.0.4)
115 | rails_stdout_logging (0.0.4)
116 | railties (4.2.3)
117 | actionpack (= 4.2.3)
118 | activesupport (= 4.2.3)
119 | rake (>= 0.8.7)
120 | thor (>= 0.18.1, < 2.0)
121 | rake (10.4.2)
122 | rdoc (4.2.0)
123 | json (~> 1.4)
124 | sass (3.4.18)
125 | sass-rails (5.0.4)
126 | railties (>= 4.0.0, < 5.0)
127 | sass (~> 3.1)
128 | sprockets (>= 2.8, < 4.0)
129 | sprockets-rails (>= 2.0, < 4.0)
130 | tilt (>= 1.1, < 3)
131 | sdoc (0.4.1)
132 | json (~> 1.7, >= 1.7.7)
133 | rdoc (~> 4.0)
134 | spring (1.4.0)
135 | sprockets (3.3.4)
136 | rack (~> 1.0)
137 | sprockets-rails (2.3.3)
138 | actionpack (>= 3.0)
139 | activesupport (>= 3.0)
140 | sprockets (>= 2.8, < 4.0)
141 | sqlite3 (1.3.10)
142 | sqlite3 (1.3.10-x86-mingw32)
143 | thor (0.19.1)
144 | thread_safe (0.3.5)
145 | tilt (2.0.1)
146 | turbolinks (2.5.3)
147 | coffee-rails
148 | tzinfo (1.2.2)
149 | thread_safe (~> 0.1)
150 | tzinfo-data (1.2015.7)
151 | tzinfo (>= 1.0.0)
152 | uglifier (2.7.2)
153 | execjs (>= 0.3.0)
154 | json (>= 1.8.0)
155 | web-console (2.2.1)
156 | activemodel (>= 4.0)
157 | binding_of_caller (>= 0.7.2)
158 | railties (>= 4.0)
159 | sprockets-rails (>= 2.0, < 4.0)
160 | will_paginate (3.0.7)
161 |
162 | PLATFORMS
163 | ruby
164 | x86-mingw32
165 |
166 | DEPENDENCIES
167 | bcrypt (~> 3.1.7)
168 | bootstrap-sass (~> 3.3.5)
169 | bootstrap-will_paginate (= 0.0.10)
170 | byebug
171 | coffee-rails (~> 4.1.0)
172 | jbuilder (~> 2.0)
173 | jquery-rails
174 | pg
175 | rails (= 4.2.3)
176 | rails_12factor
177 | sass-rails (~> 5.0)
178 | sdoc (~> 0.4.0)
179 | spring
180 | sqlite3
181 | turbolinks
182 | tzinfo-data
183 | uglifier (>= 1.3.0)
184 | web-console (~> 2.0)
185 | will_paginate (= 3.0.7)
186 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | CC0 1.0 Universal
2 |
3 | Statement of Purpose
4 |
5 | The laws of most jurisdictions throughout the world automatically confer
6 | exclusive Copyright and Related Rights (defined below) upon the creator and
7 | subsequent owner(s) (each and all, an "owner") of an original work of
8 | authorship and/or a database (each, a "Work").
9 |
10 | Certain owners wish to permanently relinquish those rights to a Work for the
11 | purpose of contributing to a commons of creative, cultural and scientific
12 | works ("Commons") that the public can reliably and without fear of later
13 | claims of infringement build upon, modify, incorporate in other works, reuse
14 | and redistribute as freely as possible in any form whatsoever and for any
15 | purposes, including without limitation commercial purposes. These owners may
16 | contribute to the Commons to promote the ideal of a free culture and the
17 | further production of creative, cultural and scientific works, or to gain
18 | reputation or greater distribution for their Work in part through the use and
19 | efforts of others.
20 |
21 | For these and/or other purposes and motivations, and without any expectation
22 | of additional consideration or compensation, the person associating CC0 with a
23 | Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
24 | and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
25 | and publicly distribute the Work under its terms, with knowledge of his or her
26 | Copyright and Related Rights in the Work and the meaning and intended legal
27 | effect of CC0 on those rights.
28 |
29 | 1. Copyright and Related Rights. A Work made available under CC0 may be
30 | protected by copyright and related or neighboring rights ("Copyright and
31 | Related Rights"). Copyright and Related Rights include, but are not limited
32 | to, the following:
33 |
34 | i. the right to reproduce, adapt, distribute, perform, display, communicate,
35 | and translate a Work;
36 |
37 | ii. moral rights retained by the original author(s) and/or performer(s);
38 |
39 | iii. publicity and privacy rights pertaining to a person's image or likeness
40 | depicted in a Work;
41 |
42 | iv. rights protecting against unfair competition in regards to a Work,
43 | subject to the limitations in paragraph 4(a), below;
44 |
45 | v. rights protecting the extraction, dissemination, use and reuse of data in
46 | a Work;
47 |
48 | vi. database rights (such as those arising under Directive 96/9/EC of the
49 | European Parliament and of the Council of 11 March 1996 on the legal
50 | protection of databases, and under any national implementation thereof,
51 | including any amended or successor version of such directive); and
52 |
53 | vii. other similar, equivalent or corresponding rights throughout the world
54 | based on applicable law or treaty, and any national implementations thereof.
55 |
56 | 2. Waiver. To the greatest extent permitted by, but not in contravention of,
57 | applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
58 | unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
59 | and Related Rights and associated claims and causes of action, whether now
60 | known or unknown (including existing as well as future claims and causes of
61 | action), in the Work (i) in all territories worldwide, (ii) for the maximum
62 | duration provided by applicable law or treaty (including future time
63 | extensions), (iii) in any current or future medium and for any number of
64 | copies, and (iv) for any purpose whatsoever, including without limitation
65 | commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
66 | the Waiver for the benefit of each member of the public at large and to the
67 | detriment of Affirmer's heirs and successors, fully intending that such Waiver
68 | shall not be subject to revocation, rescission, cancellation, termination, or
69 | any other legal or equitable action to disrupt the quiet enjoyment of the Work
70 | by the public as contemplated by Affirmer's express Statement of Purpose.
71 |
72 | 3. Public License Fallback. Should any part of the Waiver for any reason be
73 | judged legally invalid or ineffective under applicable law, then the Waiver
74 | shall be preserved to the maximum extent permitted taking into account
75 | Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
76 | is so judged Affirmer hereby grants to each affected person a royalty-free,
77 | non transferable, non sublicensable, non exclusive, irrevocable and
78 | unconditional license to exercise Affirmer's Copyright and Related Rights in
79 | the Work (i) in all territories worldwide, (ii) for the maximum duration
80 | provided by applicable law or treaty (including future time extensions), (iii)
81 | in any current or future medium and for any number of copies, and (iv) for any
82 | purpose whatsoever, including without limitation commercial, advertising or
83 | promotional purposes (the "License"). The License shall be deemed effective as
84 | of the date CC0 was applied by Affirmer to the Work. Should any part of the
85 | License for any reason be judged legally invalid or ineffective under
86 | applicable law, such partial invalidity or ineffectiveness shall not
87 | invalidate the remainder of the License, and in such case Affirmer hereby
88 | affirms that he or she will not (i) exercise any of his or her remaining
89 | Copyright and Related Rights in the Work or (ii) assert any associated claims
90 | and causes of action with respect to the Work, in either case contrary to
91 | Affirmer's express Statement of Purpose.
92 |
93 | 4. Limitations and Disclaimers.
94 |
95 | a. No trademark or patent rights held by Affirmer are waived, abandoned,
96 | surrendered, licensed or otherwise affected by this document.
97 |
98 | b. Affirmer offers the Work as-is and makes no representations or warranties
99 | of any kind concerning the Work, express, implied, statutory or otherwise,
100 | including without limitation warranties of title, merchantability, fitness
101 | for a particular purpose, non infringement, or the absence of latent or
102 | other defects, accuracy, or the present or absence of errors, whether or not
103 | discoverable, all to the greatest extent permissible under applicable law.
104 |
105 | c. Affirmer disclaims responsibility for clearing rights of other persons
106 | that may apply to the Work or any use thereof, including without limitation
107 | any person's Copyright and Related Rights in the Work. Further, Affirmer
108 | disclaims responsibility for obtaining any necessary consents, permissions
109 | or other rights required for any use of the Work.
110 |
111 | d. Affirmer understands and acknowledges that Creative Commons is not a
112 | party to this document and has no duty or obligation with respect to this
113 | CC0 or use of the Work.
114 |
115 | For more information, please see
116 |
117 |
118 |
--------------------------------------------------------------------------------