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.
Files changed (86) hide show
  1. data/README.rdoc +2 -5
  2. data/Rakefile +19 -14
  3. data/app/assets/images/simple_forum/forumNewPosts.gif +0 -0
  4. data/app/assets/images/simple_forum/forumNoNewPosts.gif +0 -0
  5. data/app/assets/javascripts/simple_forum/application.js +15 -0
  6. data/app/assets/javascripts/simple_forum/markitup.js +51 -0
  7. data/app/assets/javascripts/simple_forum/markitup/jquery.markitup.js +574 -0
  8. data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/bold.png +0 -0
  9. data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/clean.png +0 -0
  10. data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/code.png +0 -0
  11. data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/fonts.png +0 -0
  12. data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/italic.png +0 -0
  13. data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/link.png +0 -0
  14. data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/list-bullet.png +0 -0
  15. data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/list-item.png +0 -0
  16. data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/list-numeric.png +0 -0
  17. data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/picture.png +0 -0
  18. data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/preview.png +0 -0
  19. data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/quotes.png +0 -0
  20. data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/stroke.png +0 -0
  21. data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/images/underline.png +0 -0
  22. data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/readme.txt +11 -0
  23. data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/set.js +39 -0
  24. data/app/assets/javascripts/simple_forum/markitup/sets/bbcode/style.css.scss +47 -0
  25. data/app/assets/javascripts/simple_forum/markitup/sets/default/images/bold.png +0 -0
  26. data/app/assets/javascripts/simple_forum/markitup/sets/default/images/clean.png +0 -0
  27. data/app/assets/javascripts/simple_forum/markitup/sets/default/images/image.png +0 -0
  28. data/app/assets/javascripts/simple_forum/markitup/sets/default/images/italic.png +0 -0
  29. data/app/assets/javascripts/simple_forum/markitup/sets/default/images/link.png +0 -0
  30. data/app/assets/javascripts/simple_forum/markitup/sets/default/images/picture.png +0 -0
  31. data/app/assets/javascripts/simple_forum/markitup/sets/default/images/preview.png +0 -0
  32. data/app/assets/javascripts/simple_forum/markitup/sets/default/images/stroke.png +0 -0
  33. data/app/assets/javascripts/simple_forum/markitup/sets/default/set.js +27 -0
  34. data/app/assets/javascripts/simple_forum/markitup/sets/default/style.css +27 -0
  35. data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/bg-container.png +0 -0
  36. data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/bg-editor-bbcode.png +0 -0
  37. data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/bg-editor-dotclear.png +0 -0
  38. data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/bg-editor-html.png +0 -0
  39. data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/bg-editor-json.png +0 -0
  40. data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/bg-editor-markdown.png +0 -0
  41. data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/bg-editor-textile.png +0 -0
  42. data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/bg-editor-wiki.png +0 -0
  43. data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/bg-editor-xml.png +0 -0
  44. data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/bg-editor.png +0 -0
  45. data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/handle.png +0 -0
  46. data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/menu.png +0 -0
  47. data/app/assets/javascripts/simple_forum/markitup/skins/markitup/images/submenu.png +0 -0
  48. data/app/assets/javascripts/simple_forum/markitup/skins/markitup/style.css.scss +147 -0
  49. data/app/assets/javascripts/simple_forum/markitup/skins/simple/images/handle.png +0 -0
  50. data/app/assets/javascripts/simple_forum/markitup/skins/simple/images/menu.png +0 -0
  51. data/app/assets/javascripts/simple_forum/markitup/skins/simple/images/submenu.png +0 -0
  52. data/app/assets/javascripts/simple_forum/markitup/skins/simple/style.css +118 -0
  53. data/app/assets/javascripts/simple_forum/markitup/templates/preview.css +5 -0
  54. data/app/assets/javascripts/simple_forum/markitup/templates/preview.html +11 -0
  55. data/app/assets/stylesheets/simple_forum/application.css +13 -0
  56. data/app/assets/stylesheets/simple_forum/base.css +124 -0
  57. data/app/assets/stylesheets/simple_forum/markitup.css +5 -0
  58. data/app/controllers/simple_forum/application_controller.rb +1 -0
  59. data/app/controllers/simple_forum/forums_controller.rb +0 -1
  60. data/app/controllers/simple_forum/posts_controller.rb +5 -5
  61. data/app/controllers/simple_forum/topics_controller.rb +2 -2
  62. data/app/models/simple_forum.rb +0 -1
  63. data/app/models/simple_forum/category.rb +0 -3
  64. data/app/models/simple_forum/forum.rb +0 -3
  65. data/app/models/simple_forum/moderatorship.rb +0 -3
  66. data/app/models/simple_forum/post.rb +0 -3
  67. data/app/models/simple_forum/topic.rb +1 -4
  68. data/app/views/layouts/simple_forum.html.erb +4 -5
  69. data/app/views/simple_forum/forums/index.html.erb +4 -4
  70. data/app/views/simple_forum/forums/show.html.erb +5 -5
  71. data/app/views/simple_forum/posts/edit.html.erb +5 -5
  72. data/app/views/simple_forum/topics/_post.html.erb +2 -2
  73. data/app/views/simple_forum/topics/new.html.erb +3 -3
  74. data/app/views/simple_forum/topics/show.html.erb +9 -16
  75. data/config/routes.rb +11 -36
  76. data/db/migrate/20110330123456_create_simple_forum_forums.rb +35 -0
  77. data/db/migrate/20110330123457_create_simple_forum_topics.rb +30 -0
  78. data/db/migrate/20110330123458_create_simple_forum_posts.rb +31 -0
  79. data/db/migrate/20110330123459_create_simple_forum_categories.rb +19 -0
  80. data/db/migrate/20110330123460_create_simple_forum_moderatorships.rb +17 -0
  81. data/lib/simple_forum.rb +6 -4
  82. data/lib/simple_forum/engine.rb +5 -11
  83. data/lib/simple_forum/version.rb +2 -3
  84. metadata +190 -20
  85. data/Gemfile +0 -18
  86. 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