neifelheim-forem 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. data/lib/forem/version.rb +1 -1
  2. data/spec/configuration_spec.rb +12 -0
  3. data/spec/controllers/forem/posts_controller_spec.rb +7 -0
  4. data/spec/controllers/forem/topics_controller_spec.rb +7 -0
  5. data/spec/dummy/README.rdoc +261 -0
  6. data/spec/dummy/Rakefile +7 -0
  7. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  8. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  9. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  10. data/spec/dummy/app/controllers/fake_controller.rb +5 -0
  11. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  12. data/spec/dummy/app/models/user.rb +6 -0
  13. data/spec/dummy/app/views/layouts/application.html.erb +17 -0
  14. data/spec/dummy/config/application.rb +59 -0
  15. data/spec/dummy/config/boot.rb +10 -0
  16. data/spec/dummy/config/database.yml +25 -0
  17. data/spec/dummy/config/environment.rb +5 -0
  18. data/spec/dummy/config/environments/development.rb +37 -0
  19. data/spec/dummy/config/environments/production.rb +67 -0
  20. data/spec/dummy/config/environments/test.rb +37 -0
  21. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  22. data/spec/dummy/config/initializers/forem.rb +1 -0
  23. data/spec/dummy/config/initializers/inflections.rb +15 -0
  24. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  25. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  26. data/spec/dummy/config/initializers/session_store.rb +8 -0
  27. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  28. data/spec/dummy/config/locales/en.yml +5 -0
  29. data/spec/dummy/config/routes.rb +5 -0
  30. data/spec/dummy/config.ru +4 -0
  31. data/spec/dummy/db/development.sqlite3 +0 -0
  32. data/spec/dummy/db/migrate/20130624063712_create_users.rb +9 -0
  33. data/spec/dummy/db/schema.rb +38 -0
  34. data/spec/dummy/db/test.sqlite3 +0 -0
  35. data/spec/dummy/log/development.log +130 -0
  36. data/spec/dummy/log/test.log +3877 -0
  37. data/spec/dummy/public/404.html +26 -0
  38. data/spec/dummy/public/422.html +26 -0
  39. data/spec/dummy/public/500.html +25 -0
  40. data/spec/dummy/public/favicon.ico +0 -0
  41. data/spec/dummy/script/rails +6 -0
  42. data/spec/dummy/spec/models/user_spec.rb +5 -0
  43. data/spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  44. data/spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  45. data/spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  46. data/spec/helpers/forem/posts_helper_spec.rb +17 -0
  47. data/spec/helpers/forem/topics_helper_spec.rb +17 -0
  48. data/spec/integration/posts_spec.rb +59 -0
  49. data/spec/integration/topics_spec.rb +43 -0
  50. data/spec/models/forem/post_spec.rb +7 -0
  51. data/spec/models/forem/topic_spec.rb +7 -0
  52. data/spec/spec_helper.rb +21 -0
  53. data/spec/support/capybara.rb +8 -0
  54. data/spec/support/dummy_login.rb +18 -0
  55. data/spec/support/load_routes.rb +7 -0
  56. metadata +112 -4
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rails generate session_migration")
8
+ # Dummy::Application.config.session_store :active_record_store
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json]
9
+ end
10
+
11
+ # Disable root element in JSON by default.
12
+ ActiveSupport.on_load(:active_record) do
13
+ self.include_root_in_json = false
14
+ end
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,5 @@
1
+ Rails.application.routes.draw do
2
+
3
+ mount Forem::Engine => "/forem"
4
+ match "/sign_in", :to => "fake#sign_in", :as => "sign_in"
5
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Dummy::Application
Binary file
@@ -0,0 +1,9 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table :users do |t|
4
+ t.string :login
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,38 @@
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 to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20130624063712) do
15
+
16
+ create_table "forem_posts", :force => true do |t|
17
+ t.integer "topic_id"
18
+ t.text "text"
19
+ t.integer "user_id"
20
+ t.datetime "created_at", :null => false
21
+ t.datetime "updated_at", :null => false
22
+ end
23
+
24
+ create_table "forem_topics", :force => true do |t|
25
+ t.text "subject"
26
+ t.integer "user_id"
27
+ t.datetime "created_at", :null => false
28
+ t.datetime "updated_at", :null => false
29
+ t.integer "posts_count", :default => 0
30
+ end
31
+
32
+ create_table "users", :force => true do |t|
33
+ t.string "login"
34
+ t.datetime "created_at", :null => false
35
+ t.datetime "updated_at", :null => false
36
+ end
37
+
38
+ end
Binary file
@@ -0,0 +1,130 @@
1
+ Connecting to database specified by database.yml
2
+  (0.1ms) select sqlite_version(*)
3
+  (171.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
4
+  (178.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5
+  (3.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
6
+ Migrating to CreateForemTopics (20130623193923)
7
+  (0.1ms) begin transaction
8
+  (0.9ms) CREATE TABLE "forem_topics" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subject" text, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
9
+  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130623193923')
10
+  (199.4ms) commit transaction
11
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
12
+ Connecting to database specified by database.yml
13
+  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
14
+  (0.2ms) select sqlite_version(*)
15
+  (182.6ms) CREATE TABLE "forem_topics" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subject" text, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
16
+  (157.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
17
+  (200.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
18
+  (0.2ms) SELECT version FROM "schema_migrations"
19
+  (199.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20130623193923')
20
+ Connecting to database specified by database.yml
21
+  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
22
+ Migrating to CreateForemTopics (20130623193923)
23
+ Migrating to CreateForemPosts (20130623195306)
24
+  (0.0ms) select sqlite_version(*)
25
+  (0.0ms) begin transaction
26
+  (0.4ms) CREATE TABLE "forem_posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "topic_id" integer, "text" text, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
27
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130623195306')
28
+  (690.9ms) commit transaction
29
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
30
+ Connecting to database specified by database.yml
31
+  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
32
+  (0.2ms) select sqlite_version(*)
33
+  (1204.4ms) CREATE TABLE "forem_posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "topic_id" integer, "text" text, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
34
+  (154.3ms) DROP TABLE "forem_topics"
35
+  (155.7ms) CREATE TABLE "forem_topics" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subject" text, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
36
+  (0.2ms) SELECT version FROM "schema_migrations"
37
+  (188.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20130623195306')
38
+ Connecting to database specified by database.yml
39
+
40
+
41
+ Started GET "/" for 127.0.0.1 at 2013-06-24 01:54:59 +0530
42
+
43
+ ActionController::RoutingError (No route matches [GET] "/"):
44
+ actionpack (3.2.13) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
45
+ actionpack (3.2.13) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
46
+ railties (3.2.13) lib/rails/rack/logger.rb:32:in `call_app'
47
+ railties (3.2.13) lib/rails/rack/logger.rb:16:in `block in call'
48
+ activesupport (3.2.13) lib/active_support/tagged_logging.rb:22:in `tagged'
49
+ railties (3.2.13) lib/rails/rack/logger.rb:16:in `call'
50
+ actionpack (3.2.13) lib/action_dispatch/middleware/request_id.rb:22:in `call'
51
+ rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
52
+ rack (1.4.5) lib/rack/runtime.rb:17:in `call'
53
+ activesupport (3.2.13) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
54
+ rack (1.4.5) lib/rack/lock.rb:15:in `call'
55
+ actionpack (3.2.13) lib/action_dispatch/middleware/static.rb:63:in `call'
56
+ railties (3.2.13) lib/rails/engine.rb:479:in `call'
57
+ railties (3.2.13) lib/rails/application.rb:223:in `call'
58
+ rack (1.4.5) lib/rack/content_length.rb:14:in `call'
59
+ railties (3.2.13) lib/rails/rack/log_tailer.rb:17:in `call'
60
+ rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service'
61
+ /home/riddle/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
62
+ /home/riddle/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
63
+ /home/riddle/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
64
+
65
+
66
+ Rendered /home/riddle/.rvm/gems/ruby-1.9.3-p429@sprycer/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (2.8ms)
67
+
68
+
69
+ Started GET "/forem/topics" for 127.0.0.1 at 2013-06-24 01:55:12 +0530
70
+ Processing by Forem::TopicsController#index as HTML
71
+ Forem::Topic Load (0.1ms) SELECT "forem_topics".* FROM "forem_topics" 
72
+ Rendered /home/riddle/tutorials/forem/app/views/forem/topics/index.html.erb within layouts/application (0.9ms)
73
+ Compiled application.css (0ms) (pid 8321)
74
+ Completed 500 Internal Server Error in 80ms
75
+
76
+ ActionView::Template::Error (couldn't find file 'jquery'
77
+ (in /home/riddle/tutorials/forem/spec/dummy/app/assets/javascripts/application.js:13)):
78
+ 3: <head>
79
+ 4: <title>Dummy</title>
80
+ 5: <%= stylesheet_link_tag "application", :media => "all" %>
81
+ 6: <%= javascript_include_tag "application" %>
82
+ 7: <%= csrf_meta_tags %>
83
+ 8: </head>
84
+ 9: <body>
85
+ app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb__2818408880083353857_28463560'
86
+
87
+
88
+ Rendered /home/riddle/.rvm/gems/ruby-1.9.3-p429@sprycer/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_trace.erb (3.4ms)
89
+ Rendered /home/riddle/.rvm/gems/ruby-1.9.3-p429@sprycer/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.9ms)
90
+ Rendered /home/riddle/.rvm/gems/ruby-1.9.3-p429@sprycer/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (22.0ms)
91
+ Connecting to database specified by database.yml
92
+  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
93
+ Migrating to CreateForemTopics (20130623193923)
94
+ Migrating to CreateForemPosts (20130623195306)
95
+ Migrating to AddPostsCountToForemTopics (20130623204949)
96
+  (0.0ms) select sqlite_version(*)
97
+  (0.0ms) begin transaction
98
+  (0.4ms) ALTER TABLE "forem_topics" ADD "posts_count" integer DEFAULT 0
99
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130623204949')
100
+  (236.4ms) commit transaction
101
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
102
+ Connecting to database specified by database.yml
103
+  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
104
+  (0.3ms) select sqlite_version(*)
105
+  (199.5ms) DROP TABLE "forem_posts"
106
+  (166.8ms) CREATE TABLE "forem_posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "topic_id" integer, "text" text, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
107
+  (165.4ms) DROP TABLE "forem_topics"
108
+  (169.6ms) CREATE TABLE "forem_topics" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subject" text, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "posts_count" integer DEFAULT 0)
109
+  (0.2ms) SELECT version FROM "schema_migrations"
110
+  (165.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20130623204949')
111
+ Connecting to database specified by database.yml
112
+ Connecting to database specified by database.yml
113
+  (14.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
114
+ Migrating to CreateUsers (20130624063712)
115
+  (0.1ms) select sqlite_version(*)
116
+  (0.1ms) begin transaction
117
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
118
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130624063712')
119
+  (162.2ms) commit transaction
120
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
121
+ Connecting to database specified by database.yml
122
+  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
123
+  (0.2ms) select sqlite_version(*)
124
+  (149.1ms) CREATE TABLE "forem_posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "topic_id" integer, "text" text, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
125
+  (136.2ms) CREATE TABLE "forem_topics" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subject" text, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "posts_count" integer DEFAULT 0)
126
+  (143.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
127
+  (144.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
128
+  (144.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
129
+  (0.2ms) SELECT version FROM "schema_migrations"
130
+  (144.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20130624063712')