brightcontent 2.0.0.alpha3 → 2.0.0.alpha5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. data/README.md +13 -1
  2. data/VERSION +1 -1
  3. metadata +7 -178
  4. data/.gitignore +0 -8
  5. data/MIT-LICENSE +0 -20
  6. data/Rakefile +0 -14
  7. data/brightcontent.gemspec +0 -21
  8. data/core/.gitignore +0 -9
  9. data/core/Gemfile +0 -17
  10. data/core/Gemfile.lock +0 -163
  11. data/core/MIT-LICENSE +0 -20
  12. data/core/README.md +0 -44
  13. data/core/Rakefile +0 -14
  14. data/core/app/assets/images/brightcontent/.gitkeep +0 -0
  15. data/core/app/assets/images/brightcontent/glyphicons-halflings-white.png +0 -0
  16. data/core/app/assets/images/brightcontent/glyphicons-halflings.png +0 -0
  17. data/core/app/assets/javascripts/brightcontent/bootstrap.min.js +0 -6
  18. data/core/app/assets/javascripts/brightcontent/brightcontent.js +0 -17
  19. data/core/app/assets/javascripts/brightcontent/custom.js +0 -1
  20. data/core/app/assets/javascripts/brightcontent/main.js +0 -3
  21. data/core/app/assets/stylesheets/brightcontent/bootstrap-responsive.min.css +0 -9
  22. data/core/app/assets/stylesheets/brightcontent/bootstrap.min.css +0 -9
  23. data/core/app/assets/stylesheets/brightcontent/brightcontent.css +0 -17
  24. data/core/app/assets/stylesheets/brightcontent/custom.css +0 -1
  25. data/core/app/assets/stylesheets/brightcontent/main.css +0 -44
  26. data/core/app/controllers/brightcontent/admin_users_controller.rb +0 -6
  27. data/core/app/controllers/brightcontent/application_controller.rb +0 -22
  28. data/core/app/controllers/brightcontent/base_controller.rb +0 -27
  29. data/core/app/controllers/brightcontent/sessions_controller.rb +0 -24
  30. data/core/app/helpers/brightcontent/application_helper.rb +0 -4
  31. data/core/app/helpers/brightcontent/base_helper.rb +0 -17
  32. data/core/app/models/brightcontent/admin_user.rb +0 -7
  33. data/core/app/views/brightcontent/application/_menu.html.erb +0 -3
  34. data/core/app/views/brightcontent/application/_show_flash_names.html.erb +0 -5
  35. data/core/app/views/brightcontent/base/_form.html.erb +0 -10
  36. data/core/app/views/brightcontent/base/_list.html.erb +0 -8
  37. data/core/app/views/brightcontent/base/_list_actions.html.erb +0 -2
  38. data/core/app/views/brightcontent/base/edit.html.erb +0 -3
  39. data/core/app/views/brightcontent/base/index.html.erb +0 -22
  40. data/core/app/views/brightcontent/base/new.html.erb +0 -3
  41. data/core/app/views/brightcontent/sessions/new.html.erb +0 -12
  42. data/core/app/views/layouts/brightcontent/application.html.erb +0 -53
  43. data/core/brightcontent-core.gemspec +0 -31
  44. data/core/config/initializers/simple_form.rb +0 -142
  45. data/core/config/initializers/simple_form_bootstrap.rb +0 -45
  46. data/core/config/initializers/will_paginate.rb +0 -28
  47. data/core/config/routes.rb +0 -9
  48. data/core/db/migrate/20121206121725_create_brightcontent_admin_users.rb +0 -12
  49. data/core/lib/brightcontent/core.rb +0 -32
  50. data/core/lib/brightcontent/default_actions.rb +0 -19
  51. data/core/lib/brightcontent/engine.rb +0 -9
  52. data/core/lib/brightcontent/pagination.rb +0 -24
  53. data/core/lib/brightcontent/rails/routes.rb +0 -16
  54. data/core/lib/brightcontent/routes_parser.rb +0 -38
  55. data/core/lib/brightcontent-core.rb +0 -1
  56. data/core/lib/generators/brightcontent/install_generator.rb +0 -34
  57. data/core/lib/generators/brightcontent/resource_generator.rb +0 -22
  58. data/core/lib/generators/brightcontent/templates/brightcontent_controller.rb +0 -2
  59. data/core/lib/generators/brightcontent/templates/initializer.rb +0 -8
  60. data/core/script/rails +0 -8
  61. data/core/spec/dummy/README.rdoc +0 -261
  62. data/core/spec/dummy/Rakefile +0 -7
  63. data/core/spec/dummy/app/assets/javascripts/application.js +0 -15
  64. data/core/spec/dummy/app/assets/javascripts/brightcontent/custom.js +0 -1
  65. data/core/spec/dummy/app/assets/stylesheets/application.css +0 -13
  66. data/core/spec/dummy/app/assets/stylesheets/brightcontent/custom.css +0 -1
  67. data/core/spec/dummy/app/controllers/application_controller.rb +0 -3
  68. data/core/spec/dummy/app/controllers/brightcontent/blogs_controller.rb +0 -2
  69. data/core/spec/dummy/app/controllers/pages_controller.rb +0 -8
  70. data/core/spec/dummy/app/helpers/application_helper.rb +0 -2
  71. data/core/spec/dummy/app/mailers/.gitkeep +0 -0
  72. data/core/spec/dummy/app/models/.gitkeep +0 -0
  73. data/core/spec/dummy/app/models/blog.rb +0 -3
  74. data/core/spec/dummy/app/views/layouts/application.html.erb +0 -14
  75. data/core/spec/dummy/app/views/pages/index.html.erb +0 -1
  76. data/core/spec/dummy/config/application.rb +0 -59
  77. data/core/spec/dummy/config/boot.rb +0 -10
  78. data/core/spec/dummy/config/database.yml +0 -25
  79. data/core/spec/dummy/config/environment.rb +0 -5
  80. data/core/spec/dummy/config/environments/development.rb +0 -37
  81. data/core/spec/dummy/config/environments/production.rb +0 -67
  82. data/core/spec/dummy/config/environments/test.rb +0 -37
  83. data/core/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  84. data/core/spec/dummy/config/initializers/brightcontent.rb +0 -3
  85. data/core/spec/dummy/config/initializers/inflections.rb +0 -15
  86. data/core/spec/dummy/config/initializers/mime_types.rb +0 -5
  87. data/core/spec/dummy/config/initializers/secret_token.rb +0 -7
  88. data/core/spec/dummy/config/initializers/session_store.rb +0 -8
  89. data/core/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  90. data/core/spec/dummy/config/locales/en.yml +0 -5
  91. data/core/spec/dummy/config/routes.rb +0 -7
  92. data/core/spec/dummy/config.ru +0 -4
  93. data/core/spec/dummy/db/migrate/20121206225720_create_blogs.rb +0 -10
  94. data/core/spec/dummy/db/schema.rb +0 -30
  95. data/core/spec/dummy/lib/assets/.gitkeep +0 -0
  96. data/core/spec/dummy/public/404.html +0 -26
  97. data/core/spec/dummy/public/422.html +0 -26
  98. data/core/spec/dummy/public/500.html +0 -25
  99. data/core/spec/dummy/public/favicon.ico +0 -0
  100. data/core/spec/dummy/script/rails +0 -6
  101. data/core/spec/factories.rb +0 -16
  102. data/core/spec/features/login_spec.rb +0 -29
  103. data/core/spec/features/menu_spec.rb +0 -27
  104. data/core/spec/features/resources_form_spec.rb +0 -51
  105. data/core/spec/features/resources_index_spec.rb +0 -50
  106. data/core/spec/lib/brightcontent/routes_parser_spec.rb +0 -34
  107. data/core/spec/spec_helper.rb +0 -18
  108. data/core/spec/support/acceptance_helper.rb +0 -8
  109. data/pages/.gitignore +0 -9
  110. data/pages/Gemfile +0 -5
  111. data/pages/Gemfile.lock +0 -173
  112. data/pages/MIT-LICENSE +0 -20
  113. data/pages/README.md +0 -35
  114. data/pages/Rakefile +0 -14
  115. data/pages/app/assets/images/brightcontent/.gitkeep +0 -0
  116. data/pages/app/controllers/brightcontent/pages_controller.rb +0 -16
  117. data/pages/app/helpers/brightcontent/pages_helper.rb +0 -13
  118. data/pages/app/models/brightcontent/page.rb +0 -27
  119. data/pages/app/views/brightcontent/pages/_form_field_parent_id.html.erb +0 -1
  120. data/pages/app/views/brightcontent/pages/_list_field_name.html.erb +0 -1
  121. data/pages/brightcontent-pages.gemspec +0 -26
  122. data/pages/config/routes.rb +0 -3
  123. data/pages/db/migrate/20121207132810_create_brightcontent_pages.rb +0 -16
  124. data/pages/lib/brightcontent/pages/engine.rb +0 -14
  125. data/pages/lib/brightcontent/pages/methods.rb +0 -9
  126. data/pages/lib/brightcontent/pages.rb +0 -10
  127. data/pages/lib/brightcontent-pages.rb +0 -1
  128. data/pages/lib/generators/brightcontent/pages/install_generator.rb +0 -15
  129. data/pages/script/rails +0 -8
  130. data/pages/spec/dummy/README.rdoc +0 -261
  131. data/pages/spec/dummy/Rakefile +0 -7
  132. data/pages/spec/dummy/app/assets/javascripts/application.js +0 -15
  133. data/pages/spec/dummy/app/assets/javascripts/brightcontent/custom.js +0 -1
  134. data/pages/spec/dummy/app/assets/stylesheets/application.css +0 -13
  135. data/pages/spec/dummy/app/assets/stylesheets/brightcontent/custom.css +0 -1
  136. data/pages/spec/dummy/app/controllers/application_controller.rb +0 -3
  137. data/pages/spec/dummy/app/controllers/brightcontent/blogs_controller.rb +0 -2
  138. data/pages/spec/dummy/app/controllers/pages_controller.rb +0 -8
  139. data/pages/spec/dummy/app/helpers/application_helper.rb +0 -2
  140. data/pages/spec/dummy/app/mailers/.gitkeep +0 -0
  141. data/pages/spec/dummy/app/models/.gitkeep +0 -0
  142. data/pages/spec/dummy/app/models/blog.rb +0 -3
  143. data/pages/spec/dummy/app/views/layouts/application.html.erb +0 -14
  144. data/pages/spec/dummy/app/views/pages/index.html.erb +0 -1
  145. data/pages/spec/dummy/config/application.rb +0 -59
  146. data/pages/spec/dummy/config/boot.rb +0 -10
  147. data/pages/spec/dummy/config/database.yml +0 -25
  148. data/pages/spec/dummy/config/environment.rb +0 -5
  149. data/pages/spec/dummy/config/environments/development.rb +0 -37
  150. data/pages/spec/dummy/config/environments/production.rb +0 -67
  151. data/pages/spec/dummy/config/environments/test.rb +0 -37
  152. data/pages/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  153. data/pages/spec/dummy/config/initializers/brightcontent.rb +0 -3
  154. data/pages/spec/dummy/config/initializers/inflections.rb +0 -15
  155. data/pages/spec/dummy/config/initializers/mime_types.rb +0 -5
  156. data/pages/spec/dummy/config/initializers/secret_token.rb +0 -7
  157. data/pages/spec/dummy/config/initializers/session_store.rb +0 -8
  158. data/pages/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  159. data/pages/spec/dummy/config/locales/en.yml +0 -5
  160. data/pages/spec/dummy/config/routes.rb +0 -6
  161. data/pages/spec/dummy/config.ru +0 -4
  162. data/pages/spec/dummy/db/schema.rb +0 -44
  163. data/pages/spec/dummy/lib/assets/.gitkeep +0 -0
  164. data/pages/spec/dummy/public/404.html +0 -26
  165. data/pages/spec/dummy/public/422.html +0 -26
  166. data/pages/spec/dummy/public/500.html +0 -25
  167. data/pages/spec/dummy/public/favicon.ico +0 -0
  168. data/pages/spec/dummy/script/rails +0 -6
  169. data/pages/spec/factories.rb +0 -16
  170. data/pages/spec/features/menu_spec.rb +0 -16
  171. data/pages/spec/features/pages_spec.rb +0 -18
  172. data/pages/spec/models/brightcontent/page_spec.rb +0 -49
  173. data/pages/spec/spec_helper.rb +0 -18
  174. data/pages/spec/support/acceptance_helper.rb +0 -8
@@ -1,37 +0,0 @@
1
- Dummy::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
- # Log error messages when you accidentally call methods on nil.
10
- config.whiny_nils = true
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
- # Only use best-standards-support built into browsers
23
- config.action_dispatch.best_standards_support = :builtin
24
-
25
- # Raise exception on mass assignment protection for Active Record models
26
- config.active_record.mass_assignment_sanitizer = :strict
27
-
28
- # Log the query plan for queries taking more than this (works
29
- # with SQLite, MySQL, and PostgreSQL)
30
- config.active_record.auto_explain_threshold_in_seconds = 0.5
31
-
32
- # Do not compress assets
33
- config.assets.compress = false
34
-
35
- # Expands the lines which load the assets
36
- config.assets.debug = true
37
- end
@@ -1,67 +0,0 @@
1
- Dummy::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
- # Full error reports are disabled and caching is turned on
8
- config.consider_all_requests_local = false
9
- config.action_controller.perform_caching = true
10
-
11
- # Disable Rails's static asset server (Apache or nginx will already do this)
12
- config.serve_static_assets = false
13
-
14
- # Compress JavaScripts and CSS
15
- config.assets.compress = true
16
-
17
- # Don't fallback to assets pipeline if a precompiled asset is missed
18
- config.assets.compile = false
19
-
20
- # Generate digests for assets URLs
21
- config.assets.digest = true
22
-
23
- # Defaults to nil and saved in location specified by config.assets.prefix
24
- # config.assets.manifest = YOUR_PATH
25
-
26
- # Specifies the header that your server uses for sending files
27
- # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
29
-
30
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
- # config.force_ssl = true
32
-
33
- # See everything in the log (default is :info)
34
- # config.log_level = :debug
35
-
36
- # Prepend all log lines with the following tags
37
- # config.log_tags = [ :subdomain, :uuid ]
38
-
39
- # Use a different logger for distributed setups
40
- # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41
-
42
- # Use a different cache store in production
43
- # config.cache_store = :mem_cache_store
44
-
45
- # Enable serving of images, stylesheets, and JavaScripts from an asset server
46
- # config.action_controller.asset_host = "http://assets.example.com"
47
-
48
- # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49
- # config.assets.precompile += %w( search.js )
50
-
51
- # Disable delivery errors, bad email addresses will be ignored
52
- # config.action_mailer.raise_delivery_errors = false
53
-
54
- # Enable threaded mode
55
- # config.threadsafe!
56
-
57
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58
- # the I18n.default_locale when a translation can not be found)
59
- config.i18n.fallbacks = true
60
-
61
- # Send deprecation notices to registered listeners
62
- config.active_support.deprecation = :notify
63
-
64
- # Log the query plan for queries taking more than this (works
65
- # with SQLite, MySQL, and PostgreSQL)
66
- # config.active_record.auto_explain_threshold_in_seconds = 0.5
67
- end
@@ -1,37 +0,0 @@
1
- Dummy::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
- # Configure static asset server for tests with Cache-Control for performance
11
- config.serve_static_assets = true
12
- config.static_cache_control = "public, max-age=3600"
13
-
14
- # Log error messages when you accidentally call methods on nil
15
- config.whiny_nils = true
16
-
17
- # Show full error reports and disable caching
18
- config.consider_all_requests_local = true
19
- config.action_controller.perform_caching = false
20
-
21
- # Raise exceptions instead of rendering exception templates
22
- config.action_dispatch.show_exceptions = false
23
-
24
- # Disable request forgery protection in test environment
25
- config.action_controller.allow_forgery_protection = false
26
-
27
- # Tell Action Mailer not to deliver emails to the real world.
28
- # The :test delivery method accumulates sent emails in the
29
- # ActionMailer::Base.deliveries array.
30
- config.action_mailer.delivery_method = :test
31
-
32
- # Raise exception on mass assignment protection for Active Record models
33
- config.active_record.mass_assignment_sanitizer = :strict
34
-
35
- # Print deprecation notices to the stderr
36
- config.active_support.deprecation = :stderr
37
- end
@@ -1,7 +0,0 @@
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!
@@ -1,3 +0,0 @@
1
- Brightcontent.setup do |config|
2
- #No config options yet!
3
- end
@@ -1,15 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new inflection rules using the following format
4
- # (all these examples are active by default):
5
- # ActiveSupport::Inflector.inflections do |inflect|
6
- # inflect.plural /^(ox)$/i, '\1en'
7
- # inflect.singular /^(ox)en/i, '\1'
8
- # inflect.irregular 'person', 'people'
9
- # inflect.uncountable %w( fish sheep )
10
- # end
11
- #
12
- # These inflection rules are supported but not enabled by default:
13
- # ActiveSupport::Inflector.inflections do |inflect|
14
- # inflect.acronym 'RESTful'
15
- # end
@@ -1,5 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new mime types for use in respond_to blocks:
4
- # Mime::Type.register "text/richtext", :rtf
5
- # Mime::Type.register_alias "text/html", :iphone
@@ -1,7 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Your secret key for verifying the integrity of signed cookies.
4
- # If you change this key, all old signed cookies will become invalid!
5
- # Make sure the secret is at least 30 characters and all random,
6
- # no regular words or you'll be exposed to dictionary attacks.
7
- Dummy::Application.config.secret_token = '1582af16879d84e4319aa02ea51964c7c27576e6468838ea1bcadf1286623d44e9117613a747386fde1bc2253a9a49c291a2c100fec64ae5c2cc5c75efa553ef'
@@ -1,8 +0,0 @@
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
@@ -1,14 +0,0 @@
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
@@ -1,5 +0,0 @@
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"
@@ -1,6 +0,0 @@
1
- Rails.application.routes.draw do
2
- brightcontent_resources do
3
- end
4
- root to: "pages#index"
5
- get "*path" => "pages#show"
6
- end
@@ -1,4 +0,0 @@
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
@@ -1,44 +0,0 @@
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 => 20121207132810) do
15
-
16
- create_table "blogs", :force => true do |t|
17
- t.string "name"
18
- t.text "body"
19
- t.datetime "created_at", :null => false
20
- t.datetime "updated_at", :null => false
21
- end
22
-
23
- create_table "brightcontent_admin_users", :force => true do |t|
24
- t.string "email"
25
- t.string "password_digest"
26
- t.datetime "created_at", :null => false
27
- t.datetime "updated_at", :null => false
28
- end
29
-
30
- create_table "brightcontent_pages", :force => true do |t|
31
- t.string "name"
32
- t.text "body"
33
- t.string "slug"
34
- t.integer "depth"
35
- t.integer "lft"
36
- t.integer "rgt"
37
- t.integer "parent_id"
38
- t.datetime "created_at", :null => false
39
- t.datetime "updated_at", :null => false
40
- end
41
-
42
- add_index "brightcontent_pages", ["slug"], :name => "index_brightcontent_pages_on_slug"
43
-
44
- end
File without changes
@@ -1,26 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The page you were looking for doesn't exist (404)</title>
5
- <style type="text/css">
6
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
- div.dialog {
8
- width: 25em;
9
- padding: 0 4em;
10
- margin: 4em auto 0 auto;
11
- border: 1px solid #ccc;
12
- border-right-color: #999;
13
- border-bottom-color: #999;
14
- }
15
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
- </style>
17
- </head>
18
-
19
- <body>
20
- <!-- This file lives in public/404.html -->
21
- <div class="dialog">
22
- <h1>The page you were looking for doesn't exist.</h1>
23
- <p>You may have mistyped the address or the page may have moved.</p>
24
- </div>
25
- </body>
26
- </html>
@@ -1,26 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The change you wanted was rejected (422)</title>
5
- <style type="text/css">
6
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
- div.dialog {
8
- width: 25em;
9
- padding: 0 4em;
10
- margin: 4em auto 0 auto;
11
- border: 1px solid #ccc;
12
- border-right-color: #999;
13
- border-bottom-color: #999;
14
- }
15
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
- </style>
17
- </head>
18
-
19
- <body>
20
- <!-- This file lives in public/422.html -->
21
- <div class="dialog">
22
- <h1>The change you wanted was rejected.</h1>
23
- <p>Maybe you tried to change something you didn't have access to.</p>
24
- </div>
25
- </body>
26
- </html>
@@ -1,25 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>We're sorry, but something went wrong (500)</title>
5
- <style type="text/css">
6
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
- div.dialog {
8
- width: 25em;
9
- padding: 0 4em;
10
- margin: 4em auto 0 auto;
11
- border: 1px solid #ccc;
12
- border-right-color: #999;
13
- border-bottom-color: #999;
14
- }
15
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
- </style>
17
- </head>
18
-
19
- <body>
20
- <!-- This file lives in public/500.html -->
21
- <div class="dialog">
22
- <h1>We're sorry, but something went wrong.</h1>
23
- </div>
24
- </body>
25
- </html>
File without changes
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
-
4
- APP_PATH = File.expand_path('../../config/application', __FILE__)
5
- require File.expand_path('../../config/boot', __FILE__)
6
- require 'rails/commands'
@@ -1,16 +0,0 @@
1
- FactoryGirl.define do
2
- sequence :email do |n|
3
- "person#{n}@example.com"
4
- end
5
-
6
- factory :admin_user, class: Brightcontent::AdminUser do
7
- email
8
- password "password"
9
- password_confirmation "password"
10
- end
11
-
12
- factory :page, class: Brightcontent::Page do
13
- name "Pagina"
14
- body "Body"
15
- end
16
- end
@@ -1,16 +0,0 @@
1
- require 'spec_helper'
2
-
3
- feature "Menu" do
4
-
5
- scenario "Shows menu for extra resources" do
6
- sign_in
7
- menu_should_have_link "Pages"
8
- end
9
-
10
- def menu_should_have_link(link_name)
11
- within "#menu" do
12
- page.should have_link link_name
13
- end
14
- end
15
-
16
- end
@@ -1,18 +0,0 @@
1
- require 'spec_helper'
2
-
3
- feature "Pages" do
4
- background do
5
- @page = create :page , name: "Homepage"
6
- end
7
-
8
- scenario "visit root page" do
9
- visit root_path
10
- page.should have_content @page.name
11
- end
12
-
13
- scenario "visit specific page" do
14
- @page2 = create :page, name: "Test page"
15
- visit "/test-page"
16
- page.should have_content @page2.name
17
- end
18
- end
@@ -1,49 +0,0 @@
1
- require 'spec_helper'
2
-
3
- module Brightcontent
4
- describe Page do
5
- describe "validations" do
6
- it "validates persence of name" do
7
- build_stubbed(:page, name: nil).should_not be_valid
8
- end
9
- end
10
-
11
- describe "slugs" do
12
- context "first page" do
13
- subject { create(:page, name: "Homepage") }
14
- its(:slug) { should be_empty }
15
- end
16
-
17
- context "second page" do
18
- let!(:homepage) { create(:page, name: "Homepage") }
19
-
20
- it "generates slug for siblings" do
21
- create(:page, name: "About us").slug.should eq "about-us"
22
- end
23
-
24
- it "creates a slug for children" do
25
- create(:page, name: "About us", parent: homepage).slug.should eq "homepage/about-us"
26
- end
27
-
28
- it "persists the slug" do
29
- page = create(:page, name: "About us", parent: homepage).reload
30
- page.slug.should eq "homepage/about-us"
31
- end
32
- end
33
- end
34
-
35
- describe ".homepage?" do
36
- subject { create(:page, name: "Homepage") }
37
-
38
- context "is homepage" do
39
- it { should be_homepage }
40
- end
41
-
42
- context "is not homepage" do
43
- before { create(:page) }
44
- subject { create(:page, name: "Second_page") }
45
- it { should_not be_homepage }
46
- end
47
- end
48
- end
49
- end
@@ -1,18 +0,0 @@
1
- ENV["RAILS_ENV"] = "test"
2
- ENGINE_RAILS_ROOT = File.join(File.dirname(__FILE__), '../')
3
-
4
- require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
- require 'rspec/rails'
6
- require 'capybara/rspec'
7
- require 'factory_girl_rails'
8
- require 'brightcontent-pages'
9
-
10
- Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }
11
-
12
- Rails.backtrace_cleaner.remove_silencers!
13
-
14
- RSpec.configure do |config|
15
- config.mock_with :rspec
16
- config.use_transactional_fixtures = true
17
- config.include FactoryGirl::Syntax::Methods
18
- end
@@ -1,8 +0,0 @@
1
- def sign_in
2
- user = create(:admin_user)
3
- visit "/admin"
4
- fill_in "Email", with: user.email
5
- fill_in "Password", with: "password"
6
- click_button "Login"
7
- user
8
- end