simple_forum 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +2 -5
- data/Rakefile +19 -14
- data/app/assets/images/simple_forum/forumNewPosts.gif +0 -0
- data/app/assets/images/simple_forum/forumNoNewPosts.gif +0 -0
- data/app/assets/javascripts/simple_forum/application.js +15 -0
- data/app/assets/javascripts/simple_forum/markitup.js +51 -0
- data/app/assets/javascripts/simple_forum/markitup/jquery.markitup.js +574 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/bold.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/clean.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/code.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/fonts.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/italic.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/link.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/list-bullet.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/list-item.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/list-numeric.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/picture.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/preview.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/quotes.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/stroke.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/underline.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/readme.txt +11 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/set.js +39 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/style.css.scss +47 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/default/images/bold.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/default/images/clean.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/default/images/image.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/default/images/italic.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/default/images/link.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/default/images/picture.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/default/images/preview.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/default/images/stroke.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/default/set.js +27 -0
- data/app/assets/javascripts/simple_forum/markitup/sets/default/style.css +27 -0
- data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/bg-container.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/bg-editor-bbcode.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/bg-editor-dotclear.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/bg-editor-html.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/bg-editor-json.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/bg-editor-markdown.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/bg-editor-textile.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/bg-editor-wiki.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/bg-editor-xml.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/bg-editor.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/handle.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/menu.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/submenu.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/skins/markitup/style.css.scss +147 -0
- data/app/assets/javascripts/simple_forum/markitup/skins/simple/images/handle.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/skins/simple/images/menu.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/skins/simple/images/submenu.png +0 -0
- data/app/assets/javascripts/simple_forum/markitup/skins/simple/style.css +118 -0
- data/app/assets/javascripts/simple_forum/markitup/templates/preview.css +5 -0
- data/app/assets/javascripts/simple_forum/markitup/templates/preview.html +11 -0
- data/app/assets/stylesheets/simple_forum/application.css +13 -0
- data/app/assets/stylesheets/simple_forum/base.css +124 -0
- data/app/assets/stylesheets/simple_forum/markitup.css +5 -0
- data/app/controllers/simple_forum/application_controller.rb +1 -0
- data/app/controllers/simple_forum/forums_controller.rb +0 -1
- data/app/controllers/simple_forum/posts_controller.rb +5 -5
- data/app/controllers/simple_forum/topics_controller.rb +2 -2
- data/app/models/simple_forum.rb +0 -1
- data/app/models/simple_forum/category.rb +0 -3
- data/app/models/simple_forum/forum.rb +0 -3
- data/app/models/simple_forum/moderatorship.rb +0 -3
- data/app/models/simple_forum/post.rb +0 -3
- data/app/models/simple_forum/topic.rb +1 -4
- data/app/views/layouts/simple_forum.html.erb +4 -5
- data/app/views/simple_forum/forums/index.html.erb +4 -4
- data/app/views/simple_forum/forums/show.html.erb +5 -5
- data/app/views/simple_forum/posts/edit.html.erb +5 -5
- data/app/views/simple_forum/topics/_post.html.erb +2 -2
- data/app/views/simple_forum/topics/new.html.erb +3 -3
- data/app/views/simple_forum/topics/show.html.erb +9 -16
- data/config/routes.rb +11 -36
- data/db/migrate/20110330123456_create_simple_forum_forums.rb +35 -0
- data/db/migrate/20110330123457_create_simple_forum_topics.rb +30 -0
- data/db/migrate/20110330123458_create_simple_forum_posts.rb +31 -0
- data/db/migrate/20110330123459_create_simple_forum_categories.rb +19 -0
- data/db/migrate/20110330123460_create_simple_forum_moderatorships.rb +17 -0
- data/lib/simple_forum.rb +6 -4
- data/lib/simple_forum/engine.rb +5 -11
- data/lib/simple_forum/version.rb +2 -3
- metadata +190 -20
- data/Gemfile +0 -18
- data/lib/simple_forum/tasks/railties.rake +0 -66
data/Gemfile
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
source "http://rubygems.org"
|
2
|
-
|
3
|
-
gem "rails", "3.1.0"
|
4
|
-
#gem "rails", :git => "git://github.com/rails/rails.git"
|
5
|
-
#gem "arel", :git => "git://github.com/rails/arel.git"
|
6
|
-
#gem "rack", :git => "git://github.com/rack/rack.git"
|
7
|
-
|
8
|
-
gem "devise"
|
9
|
-
|
10
|
-
gem "sqlite3"
|
11
|
-
|
12
|
-
#group :development, :test do
|
13
|
-
gem "capybara", ">= 0.4.0"
|
14
|
-
gem "rspec-rails", ">= 2.0.0.beta"
|
15
|
-
gem "factory_girl"
|
16
|
-
#end
|
17
|
-
|
18
|
-
gemspec
|
@@ -1,66 +0,0 @@
|
|
1
|
-
#TODO delete this file when Rails 3.1 will be released!
|
2
|
-
require 'active_record/migration'
|
3
|
-
|
4
|
-
namespace :simple_forum do
|
5
|
-
namespace :install do
|
6
|
-
desc "-"
|
7
|
-
task :assets => :rails_env do
|
8
|
-
require 'rails/generators/base'
|
9
|
-
Rails.application.initialize!
|
10
|
-
|
11
|
-
app_public_path = Rails.application.paths["public"].first
|
12
|
-
|
13
|
-
|
14
|
-
railtie = Rails.application.railties.all.detect { |r| r.respond_to?(:railtie_name) ? r.railtie_name == 'simple_forum_engine' : r.class == SimpleForum::Engine }
|
15
|
-
|
16
|
-
path = railtie.paths["public"].first
|
17
|
-
Rails::Generators::Base.source_root(path)
|
18
|
-
copier = Rails::Generators::Base.new
|
19
|
-
Dir[File.join(path, "**/*")].each do |file|
|
20
|
-
relative = file.gsub(/^#{path}\//, '')
|
21
|
-
if File.file?(file)
|
22
|
-
copier.copy_file relative, File.join(app_public_path, 'simple_forum_engine', relative)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
desc "-"
|
28
|
-
task :migrations => :"db:load_config" do
|
29
|
-
to_load = ['simple_forum_engine']
|
30
|
-
railties = {}
|
31
|
-
railtie = Rails.application.railties.all.detect { |r| r.respond_to?(:railtie_name) ? r.railtie_name == 'simple_forum_engine' : r.class == SimpleForum::Engine }
|
32
|
-
|
33
|
-
if railtie.respond_to?(:paths) && (path = railtie.paths["db/migrate"].first)
|
34
|
-
railties['simple_forum_engine'] = path
|
35
|
-
end
|
36
|
-
|
37
|
-
on_copy = Proc.new do |name, file, old_path|
|
38
|
-
puts "Copied migration #{file} from #{name}"
|
39
|
-
end
|
40
|
-
|
41
|
-
destination = 'db/migrate'
|
42
|
-
|
43
|
-
FileUtils.mkdir_p(destination) unless File.exists?(destination)
|
44
|
-
|
45
|
-
railties.each do |name, path|
|
46
|
-
source_files = Dir["#{path}/[0-9]*_*.rb"]
|
47
|
-
|
48
|
-
|
49
|
-
source_files.each do |file|
|
50
|
-
new_path = File.join(destination, File.basename(file))
|
51
|
-
old_path = file
|
52
|
-
|
53
|
-
FileUtils.cp(old_path, new_path)
|
54
|
-
on_copy.call(name, file, old_path)
|
55
|
-
end
|
56
|
-
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
desc "-"
|
62
|
-
task :install do
|
63
|
-
Rake::Task["simple_forum:install:migrations"].invoke
|
64
|
-
Rake::Task["simple_forum:install:assets"].invoke
|
65
|
-
end
|
66
|
-
end
|