-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic setup for forem, including way to view forums
- Loading branch information
0 parents
commit 82ba7f8
Showing
74 changed files
with
21,068 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.bundle/ | ||
log/*.log | ||
pkg/ | ||
test/dummy/db/*.sqlite3 | ||
test/dummy/log/*.log | ||
test/dummy/tmp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rvm use 1.9.2@forem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
source "http://rubygems.org" | ||
|
||
gem 'rails', :git => "git://github.com/rails/rails.git" | ||
gem 'rack', :git => "git://github.com/rack/rack.git" | ||
gem 'arel', :git => "git://github.com/rails/arel.git" | ||
|
||
gem 'rspec-rails' | ||
gem 'capybara' | ||
|
||
gem 'sqlite3-ruby', :require => 'sqlite3' | ||
|
||
group :development do | ||
gem 'launchy' | ||
end | ||
|
||
if RUBY_VERSION < '1.9' | ||
gem "ruby-debug", ">= 0.10.3" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
GIT | ||
remote: git://github.com/rack/rack.git | ||
revision: e3ffeac0dc04bb8d5994b7923bf12e55d549a279 | ||
specs: | ||
rack (1.2.1) | ||
|
||
GIT | ||
remote: git://github.com/rails/arel.git | ||
revision: dbc86c0f2c2fc3c8bacf35c67fb8e0967b0a8980 | ||
specs: | ||
arel (2.0.7.beta.20110121165657) | ||
|
||
GIT | ||
remote: git://github.com/rails/rails.git | ||
revision: 289cc15f1a89a179116f67e5f666f4ff6d645f03 | ||
specs: | ||
actionmailer (3.1.0.beta) | ||
actionpack (= 3.1.0.beta) | ||
mail (~> 2.2.15) | ||
actionpack (3.1.0.beta) | ||
activemodel (= 3.1.0.beta) | ||
activesupport (= 3.1.0.beta) | ||
builder (~> 3.0.0) | ||
erubis (~> 2.6.6) | ||
i18n (~> 0.5.0) | ||
rack (~> 1.2.1) | ||
rack-cache (~> 1.0.0) | ||
rack-mount (~> 0.6.13) | ||
rack-test (~> 0.5.7) | ||
tzinfo (~> 0.3.23) | ||
activemodel (3.1.0.beta) | ||
activesupport (= 3.1.0.beta) | ||
bcrypt-ruby (~> 2.1.4) | ||
builder (~> 3.0.0) | ||
i18n (~> 0.5.0) | ||
activerecord (3.1.0.beta) | ||
activemodel (= 3.1.0.beta) | ||
activesupport (= 3.1.0.beta) | ||
arel (~> 2.0.2) | ||
tzinfo (~> 0.3.23) | ||
activeresource (3.1.0.beta) | ||
activemodel (= 3.1.0.beta) | ||
activesupport (= 3.1.0.beta) | ||
activesupport (3.1.0.beta) | ||
rails (3.1.0.beta) | ||
actionmailer (= 3.1.0.beta) | ||
actionpack (= 3.1.0.beta) | ||
activerecord (= 3.1.0.beta) | ||
activeresource (= 3.1.0.beta) | ||
activesupport (= 3.1.0.beta) | ||
bundler (~> 1.0) | ||
railties (= 3.1.0.beta) | ||
railties (3.1.0.beta) | ||
actionpack (= 3.1.0.beta) | ||
activesupport (= 3.1.0.beta) | ||
rake (>= 0.8.7) | ||
thor (~> 0.14.4) | ||
|
||
GEM | ||
remote: http://rubygems.org/ | ||
specs: | ||
abstract (1.0.0) | ||
bcrypt-ruby (2.1.4) | ||
builder (3.0.0) | ||
capybara (0.4.1.2) | ||
celerity (>= 0.7.9) | ||
culerity (>= 0.2.4) | ||
mime-types (>= 1.16) | ||
nokogiri (>= 1.3.3) | ||
rack (>= 1.0.0) | ||
rack-test (>= 0.5.4) | ||
selenium-webdriver (>= 0.0.27) | ||
xpath (~> 0.1.3) | ||
celerity (0.8.8) | ||
childprocess (0.1.7) | ||
ffi (~> 0.6.3) | ||
configuration (1.2.0) | ||
culerity (0.2.15) | ||
diff-lcs (1.1.2) | ||
erubis (2.6.6) | ||
abstract (>= 1.0.0) | ||
ffi (0.6.3) | ||
rake (>= 0.8.7) | ||
i18n (0.5.0) | ||
json_pure (1.5.1) | ||
launchy (0.3.7) | ||
configuration (>= 0.0.5) | ||
rake (>= 0.8.1) | ||
mail (2.2.15) | ||
activesupport (>= 2.3.6) | ||
i18n (>= 0.4.0) | ||
mime-types (~> 1.16) | ||
treetop (~> 1.4.8) | ||
mime-types (1.16) | ||
nokogiri (1.4.4) | ||
polyglot (0.3.1) | ||
rack-cache (1.0) | ||
rack (>= 0.4) | ||
rack-mount (0.6.13) | ||
rack (>= 1.0.0) | ||
rack-test (0.5.7) | ||
rack (>= 1.0) | ||
rake (0.8.7) | ||
rspec (2.5.0) | ||
rspec-core (~> 2.5.0) | ||
rspec-expectations (~> 2.5.0) | ||
rspec-mocks (~> 2.5.0) | ||
rspec-core (2.5.1) | ||
rspec-expectations (2.5.0) | ||
diff-lcs (~> 1.1.2) | ||
rspec-mocks (2.5.0) | ||
rspec-rails (2.5.0) | ||
actionpack (~> 3.0) | ||
activesupport (~> 3.0) | ||
railties (~> 3.0) | ||
rspec (~> 2.5.0) | ||
rubyzip (0.9.4) | ||
selenium-webdriver (0.1.3) | ||
childprocess (~> 0.1.5) | ||
ffi (~> 0.6.3) | ||
json_pure | ||
rubyzip | ||
sqlite3 (1.3.3) | ||
sqlite3-ruby (1.3.3) | ||
sqlite3 (>= 1.3.3) | ||
thor (0.14.6) | ||
treetop (1.4.9) | ||
polyglot (>= 0.3.1) | ||
tzinfo (0.3.24) | ||
xpath (0.1.3) | ||
nokogiri (~> 1.3) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
arel! | ||
capybara | ||
launchy | ||
rack! | ||
rails! | ||
rspec-rails | ||
sqlite3-ruby |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Copyright 2011 YOURNAME | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
= <%= camelized %> | ||
|
||
This project rocks and uses MIT-LICENSE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env rake | ||
begin | ||
require 'bundler/setup' | ||
rescue LoadError | ||
puts 'You must `gem install bundler` and `bundle install` to run rake tasks' | ||
end | ||
|
||
require 'rake/rdoctask' | ||
|
||
Rake::RDocTask.new(:rdoc) do |rdoc| | ||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = 'Forem' | ||
rdoc.options << '--line-numbers' << '--inline-source' | ||
rdoc.rdoc_files.include('README.rdoc') | ||
rdoc.rdoc_files.include('lib/**/*.rb') | ||
end | ||
|
||
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__) | ||
load 'rails/tasks/engine.rake' | ||
|
||
require 'rake/testtask' | ||
|
||
Rake::TestTask.new(:test) do |t| | ||
t.libs << 'lib' | ||
t.libs << 'test' | ||
t.pattern = 'test/**/*_test.rb' | ||
t.verbose = false | ||
end | ||
|
||
|
||
task :default => :test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module Forem | ||
class ApplicationController < ActionController::Base | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module Forem | ||
class ForumsController < ApplicationController | ||
def index | ||
@forums = Forem::Forum.all | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module Forem | ||
module ApplicationHelper | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class Forem::Forum < ActiveRecord::Base | ||
|
||
#temporary | ||
def topics | ||
[] | ||
end | ||
|
||
def posts | ||
[] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<ul class="forums listing"> | ||
<% @forums.each do |forum| %> | ||
<li class="<%= cycle("odd", "even") %>"> | ||
<h2><%= link_to forum.title, forem_forum_path(forum) %></h2> | ||
<%= forum.description %> | ||
<br> | ||
<%= t("forem.forum.topics_count", :count => forum.topics.count) %> topics, | ||
<%= t("forem.forum.posts_count", :count => forum.posts.count) %> posts | ||
<br> | ||
Last post was TIME AGO by NAME in TOPIC | ||
</li> | ||
<% end %> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Forem</title> | ||
<%= stylesheet_link_tag :all %> | ||
<%= javascript_include_tag :defaults %> | ||
<%= csrf_meta_tags %> | ||
</head> | ||
<body> | ||
|
||
<%= yield %> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
en: | ||
forem: | ||
forum: | ||
topics_count: | ||
zero: 0 topics | ||
one: 1 topic | ||
many: "%{count} topics" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Rails.application.routes.draw do | ||
namespace :forem do | ||
resources :forums | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class CreateForums < ActiveRecord::Migration | ||
def up | ||
create_table :forums do |t| | ||
t.string :title | ||
t.text :description | ||
end | ||
|
||
end | ||
|
||
def down | ||
drop_table :forums | ||
end | ||
end |
Oops, something went wrong.