dismissible_blocks 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 (86) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/LICENSE.text +22 -0
  4. data/README.markdown +152 -0
  5. data/Rakefile +34 -0
  6. data/app/assets/javascripts/dismissible_blocks.js +37 -0
  7. data/app/assets/javascripts/dismissible_blocks_loader.js +3 -0
  8. data/app/controllers/dismissible_blocks_controller.rb +3 -0
  9. data/app/helpers/dismissible_blocks_helper.rb +3 -0
  10. data/config/routes.rb +3 -0
  11. data/lib/dismissible_blocks/controller.rb +18 -0
  12. data/lib/dismissible_blocks/engine.rb +4 -0
  13. data/lib/dismissible_blocks/helper.rb +34 -0
  14. data/lib/dismissible_blocks/version.rb +3 -0
  15. data/lib/dismissible_blocks.rb +13 -0
  16. data/test/capybara_helper.rb +33 -0
  17. data/test/controllers/dismissible_blocks_controller_test.rb +18 -0
  18. data/test/dummy/Rakefile +3 -0
  19. data/test/dummy/app/assets/javascripts/application.js +3 -0
  20. data/test/dummy/app/assets/stylesheets/application.css +17 -0
  21. data/test/dummy/app/controllers/application_controller.rb +29 -0
  22. data/test/dummy/app/controllers/landings_controller.rb +6 -0
  23. data/test/dummy/app/controllers/sessions_controller.rb +28 -0
  24. data/test/dummy/app/helpers/application_helper.rb +2 -0
  25. data/test/dummy/app/helpers/landings_helper.rb +2 -0
  26. data/test/dummy/app/helpers/sessions_helper.rb +2 -0
  27. data/test/dummy/app/models/user.rb +9 -0
  28. data/test/dummy/app/views/landings/show.html.erb +10 -0
  29. data/test/dummy/app/views/layouts/application.html.erb +18 -0
  30. data/test/dummy/app/views/sessions/new.html.erb +15 -0
  31. data/test/dummy/bin/bundle +3 -0
  32. data/test/dummy/bin/rails +4 -0
  33. data/test/dummy/bin/rake +4 -0
  34. data/test/dummy/config/application.rb +10 -0
  35. data/test/dummy/config/boot.rb +4 -0
  36. data/test/dummy/config/database.yml +11 -0
  37. data/test/dummy/config/environment.rb +3 -0
  38. data/test/dummy/config/environments/development.rb +29 -0
  39. data/test/dummy/config/environments/test.rb +36 -0
  40. data/test/dummy/config/initializers/filter_parameter_logging.rb +1 -0
  41. data/test/dummy/config/initializers/secret_token.rb +1 -0
  42. data/test/dummy/config/initializers/session_store.rb +1 -0
  43. data/test/dummy/config/routes.rb +7 -0
  44. data/test/dummy/config.ru +3 -0
  45. data/test/dummy/db/migrate/20140303154458_create_users.rb +10 -0
  46. data/test/dummy/db/migrate/20140303161500_add_dismissed_blocks_to_users.rb +9 -0
  47. data/test/dummy/db/schema.rb +24 -0
  48. data/test/dummy/db/test.sqlite3 +0 -0
  49. data/test/dummy/log/development.log +6003 -0
  50. data/test/dummy/log/test.log +21144 -0
  51. data/test/dummy/public/404.html +58 -0
  52. data/test/dummy/public/422.html +58 -0
  53. data/test/dummy/public/500.html +57 -0
  54. data/test/dummy/public/favicon.ico +0 -0
  55. data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  56. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  57. data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  58. data/test/dummy/tmp/cache/assets/development/sprockets/489c5c881967a5316ffa31442761ffcb +0 -0
  59. data/test/dummy/tmp/cache/assets/development/sprockets/48d901fc62129ded86005b628a7f0f6f +0 -0
  60. data/test/dummy/tmp/cache/assets/development/sprockets/58a8328804a777933d757eb9a448eaf5 +0 -0
  61. data/test/dummy/tmp/cache/assets/development/sprockets/96c147c638b08a4c0178d9c66c3b9c48 +0 -0
  62. data/test/dummy/tmp/cache/assets/development/sprockets/9708d20fa7cc14e3657195722d1a3948 +0 -0
  63. data/test/dummy/tmp/cache/assets/development/sprockets/996481d37a8199e763e8fcf21a801422 +0 -0
  64. data/test/dummy/tmp/cache/assets/development/sprockets/ac2d5385dbcd9cea11c510dc83189bba +0 -0
  65. data/test/dummy/tmp/cache/assets/development/sprockets/bec12e1e92fe458e19b5f9869454ac1a +0 -0
  66. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  67. data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  68. data/test/dummy/tmp/cache/assets/development/sprockets/ecbb0d7ff91e9d89fc001dcc70d1d48f +0 -0
  69. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  70. data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  71. data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  72. data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  73. data/test/dummy/tmp/cache/assets/test/sprockets/58a8328804a777933d757eb9a448eaf5 +0 -0
  74. data/test/dummy/tmp/cache/assets/test/sprockets/96c147c638b08a4c0178d9c66c3b9c48 +0 -0
  75. data/test/dummy/tmp/cache/assets/test/sprockets/9708d20fa7cc14e3657195722d1a3948 +0 -0
  76. data/test/dummy/tmp/cache/assets/test/sprockets/ac2d5385dbcd9cea11c510dc83189bba +0 -0
  77. data/test/dummy/tmp/cache/assets/test/sprockets/bec12e1e92fe458e19b5f9869454ac1a +0 -0
  78. data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  79. data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  80. data/test/dummy/tmp/cache/assets/test/sprockets/ecbb0d7ff91e9d89fc001dcc70d1d48f +0 -0
  81. data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  82. data/test/features/dismissible_blocks_test.rb +21 -0
  83. data/test/fixtures/users.yml +9 -0
  84. data/test/helpers/dismissible_blocks_helper_test.rb +53 -0
  85. data/test/test_helper.rb +9 -0
  86. metadata +297 -0
@@ -0,0 +1,36 @@
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
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
14
+
15
+ # Configure static asset server for tests with Cache-Control for performance.
16
+ config.serve_static_assets = true
17
+ config.static_cache_control = "public, max-age=3600"
18
+
19
+ # Show full error reports and disable caching.
20
+ config.consider_all_requests_local = true
21
+ config.action_controller.perform_caching = false
22
+
23
+ # Raise exceptions instead of rendering exception templates.
24
+ config.action_dispatch.show_exceptions = false
25
+
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
28
+
29
+ # Tell Action Mailer not to deliver emails to the real world.
30
+ # The :test delivery method accumulates sent emails in the
31
+ # ActionMailer::Base.deliveries array.
32
+ config.action_mailer.delivery_method = :test
33
+
34
+ # Print deprecation notices to the stderr.
35
+ config.active_support.deprecation = :stderr
36
+ end
@@ -0,0 +1 @@
1
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1 @@
1
+ Dummy::Application.config.secret_key_base = 'loremipsum'
@@ -0,0 +1 @@
1
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
@@ -0,0 +1,7 @@
1
+ Dummy::Application.routes.draw do
2
+ root to: redirect('/login')
3
+ get 'login' => 'sessions#new'
4
+ post 'login' => 'sessions#create'
5
+ get 'logout' => 'sessions#destroy'
6
+ resource :landing, only: [:show]
7
+ end
@@ -0,0 +1,3 @@
1
+ require ::File.expand_path('../config/environment', __FILE__)
2
+
3
+ run Rails.application
@@ -0,0 +1,10 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table :users do |t|
4
+ t.string :username
5
+ t.string :password
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,9 @@
1
+ class AddDismissedBlocksToUsers < ActiveRecord::Migration
2
+ def up
3
+ add_column :users, :dismissed_blocks, :text
4
+ end
5
+
6
+ def down
7
+ remove_column :users, :dismissed_blocks
8
+ end
9
+ end
@@ -0,0 +1,24 @@
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 that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20140303161500) do
15
+
16
+ create_table "users", force: true do |t|
17
+ t.string "username"
18
+ t.string "password"
19
+ t.datetime "created_at"
20
+ t.datetime "updated_at"
21
+ t.text "dismissed_blocks"
22
+ end
23
+
24
+ end
Binary file