banner_lite 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +9 -0
  3. data/app/controllers/banner_lite/{banners_controller.rb → image_banners_controller.rb} +9 -9
  4. data/app/controllers/banner_lite/text_banners_controller.rb +53 -0
  5. data/app/helpers/banner_lite/{banners_helper.rb → image_banners_helper.rb} +3 -3
  6. data/app/helpers/banner_lite/text_banners_helper.rb +12 -0
  7. data/app/models/banner_lite/banner.rb +0 -29
  8. data/app/models/banner_lite/image_banner.rb +32 -0
  9. data/app/models/banner_lite/text_banner.rb +5 -0
  10. data/app/views/banner_lite/{banners → image_banners}/_form.html.erb +0 -0
  11. data/app/views/banner_lite/{banners → image_banners}/edit.html.erb +1 -1
  12. data/app/views/banner_lite/{banners → image_banners}/index.html.erb +2 -2
  13. data/app/views/banner_lite/{banners → image_banners}/new.html.erb +1 -1
  14. data/app/views/banner_lite/image_banners/preview.html.erb +1 -0
  15. data/app/views/banner_lite/{banners → image_banners}/show.html.erb +2 -2
  16. data/app/views/banner_lite/text_banners/_form.html.erb +33 -0
  17. data/app/views/banner_lite/text_banners/edit.html.erb +6 -0
  18. data/app/views/banner_lite/text_banners/index.html.erb +31 -0
  19. data/app/views/banner_lite/text_banners/new.html.erb +5 -0
  20. data/app/views/banner_lite/text_banners/preview.html.erb +1 -0
  21. data/app/views/banner_lite/text_banners/show.html.erb +24 -0
  22. data/config/routes.rb +6 -1
  23. data/db/migrate/20140901033058_add_banner_text_to_banner_lite_banners.rb +13 -0
  24. data/lib/banner_lite/engine.rb +2 -1
  25. data/lib/banner_lite/version.rb +1 -1
  26. data/spec/controllers/banner_lite/image_banners_controller_spec.rb +141 -0
  27. data/spec/controllers/banner_lite/text_banners_controller_spec.rb +138 -0
  28. data/spec/factories/image_banners.rb +8 -0
  29. data/spec/factories/text_banners.rb +8 -0
  30. data/spec/features/image_banners_spec.rb +18 -0
  31. data/spec/fixtures/files/dummy.png +0 -0
  32. data/spec/helpers/banner_lite/image_banners_helper_spec.rb +6 -0
  33. data/spec/helpers/banner_lite/text_banners_helper_spec.rb +6 -0
  34. data/spec/models/banner_lite/image_banner_spec.rb +15 -0
  35. data/spec/models/banner_lite/text_banner_spec.rb +15 -0
  36. data/spec/spec_helper.rb +50 -0
  37. data/spec/test_app/README.rdoc +28 -0
  38. data/spec/test_app/Rakefile +6 -0
  39. data/spec/test_app/app/assets/javascripts/application.js +13 -0
  40. data/spec/test_app/app/assets/stylesheets/application.css +15 -0
  41. data/spec/test_app/app/controllers/application_controller.rb +5 -0
  42. data/spec/test_app/app/helpers/application_helper.rb +2 -0
  43. data/spec/test_app/app/views/layouts/application.html.erb +14 -0
  44. data/spec/test_app/bin/bundle +3 -0
  45. data/spec/test_app/bin/rails +4 -0
  46. data/spec/test_app/bin/rake +4 -0
  47. data/spec/test_app/config/application.rb +29 -0
  48. data/spec/test_app/config/boot.rb +5 -0
  49. data/spec/test_app/config/database.yml +25 -0
  50. data/spec/test_app/config/environment.rb +5 -0
  51. data/spec/test_app/config/environments/development.rb +29 -0
  52. data/spec/test_app/config/environments/production.rb +80 -0
  53. data/spec/test_app/config/environments/test.rb +36 -0
  54. data/spec/test_app/config/initializers/backtrace_silencers.rb +7 -0
  55. data/spec/test_app/config/initializers/filter_parameter_logging.rb +4 -0
  56. data/spec/test_app/config/initializers/inflections.rb +16 -0
  57. data/spec/test_app/config/initializers/mime_types.rb +5 -0
  58. data/spec/test_app/config/initializers/session_store.rb +3 -0
  59. data/spec/test_app/config/initializers/wrap_parameters.rb +14 -0
  60. data/spec/test_app/config/locales/en.yml +23 -0
  61. data/spec/test_app/config/routes.rb +4 -0
  62. data/spec/test_app/config/secrets.yml +20 -0
  63. data/spec/test_app/config.ru +4 -0
  64. data/spec/test_app/db/development.sqlite3 +0 -0
  65. data/spec/test_app/db/schema.rb +25 -0
  66. data/spec/test_app/db/test.sqlite3 +0 -0
  67. data/spec/test_app/log/development.log +2022 -0
  68. data/spec/test_app/log/test.log +2944 -0
  69. data/spec/test_app/public/404.html +67 -0
  70. data/spec/test_app/public/422.html +67 -0
  71. data/spec/test_app/public/500.html +66 -0
  72. data/spec/test_app/public/favicon.ico +0 -0
  73. data/spec/test_app/spec/fixtures/files/image.png +0 -0
  74. data/spec/test_app/tmp/cache/assets/development/sprockets/003a38e9fd7ca25c13cedf53bf372ae6 +0 -0
  75. data/spec/test_app/tmp/cache/assets/development/sprockets/03ac7af390932302330c5edf40f1a0c4 +0 -0
  76. data/spec/test_app/tmp/cache/assets/development/sprockets/04407df44edd603d47fc64d43aba1105 +0 -0
  77. data/spec/test_app/tmp/cache/assets/development/sprockets/10a0a05683e0182480089f585e73d994 +0 -0
  78. data/spec/test_app/tmp/cache/assets/development/sprockets/168e239e81a66290e62ea7b88ae0a6f0 +0 -0
  79. data/spec/test_app/tmp/cache/assets/development/sprockets/5c7aaccf5c3cfe31473143cad225e0a3 +0 -0
  80. data/spec/test_app/tmp/cache/assets/development/sprockets/63b2a7b060b4143f09c1f65fa4d05cec +0 -0
  81. data/spec/test_app/tmp/cache/assets/development/sprockets/6b6316f40abcc8e662f825828fb86a60 +0 -0
  82. data/spec/test_app/tmp/cache/assets/development/sprockets/6e59c9d94357e0bad4932c0d6e08aae4 +0 -0
  83. data/spec/test_app/tmp/cache/assets/development/sprockets/8473b4217b725147b48cc7c35a5613f1 +0 -0
  84. data/spec/test_app/tmp/cache/assets/development/sprockets/9a37adb41b90d5a705ad5ac5b36908a5 +0 -0
  85. data/spec/test_app/tmp/cache/assets/development/sprockets/a282da187ba14975a311bdee34282b68 +0 -0
  86. data/spec/test_app/tmp/cache/assets/development/sprockets/b140558c17c5a6a0b4d0db1aa9eec7d9 +0 -0
  87. data/spec/test_app/tmp/cache/assets/development/sprockets/bd2620ba816de25a2d516af4f4d3d9fa +0 -0
  88. data/spec/test_app/tmp/cache/assets/development/sprockets/bd7f920a6fb16d903905510c1b54ac58 +0 -0
  89. data/spec/test_app/tmp/cache/assets/development/sprockets/dad42ce6da98af2bb068880ecf0c4e3b +0 -0
  90. data/spec/test_app/tmp/cache/assets/development/sprockets/f1ea951eed23da8d08839fed76489094 +0 -0
  91. data/spec/test_app/tmp/cache/assets/development/sprockets/f8d343216bb921b4b9f3ff80a279ade1 +0 -0
  92. data/spec/test_app/tmp/cache/assets/test/sprockets/003a38e9fd7ca25c13cedf53bf372ae6 +0 -0
  93. data/spec/test_app/tmp/cache/assets/test/sprockets/03ac7af390932302330c5edf40f1a0c4 +0 -0
  94. data/spec/test_app/tmp/cache/assets/test/sprockets/04407df44edd603d47fc64d43aba1105 +0 -0
  95. data/spec/test_app/tmp/cache/assets/test/sprockets/10a0a05683e0182480089f585e73d994 +0 -0
  96. data/spec/test_app/tmp/cache/assets/test/sprockets/168e239e81a66290e62ea7b88ae0a6f0 +0 -0
  97. data/spec/test_app/tmp/cache/assets/test/sprockets/28d0637a096857502bb280f6159054d5 +0 -0
  98. data/spec/test_app/tmp/cache/assets/test/sprockets/3061646d05a58b102019803c24a45bfb +0 -0
  99. data/spec/test_app/tmp/cache/assets/test/sprockets/3bf4f025073a083e355b74670ab85dad +0 -0
  100. data/spec/test_app/tmp/cache/assets/test/sprockets/5c7aaccf5c3cfe31473143cad225e0a3 +0 -0
  101. data/spec/test_app/tmp/cache/assets/test/sprockets/63b2a7b060b4143f09c1f65fa4d05cec +0 -0
  102. data/spec/test_app/tmp/cache/assets/test/sprockets/6b6316f40abcc8e662f825828fb86a60 +0 -0
  103. data/spec/test_app/tmp/cache/assets/test/sprockets/6e59c9d94357e0bad4932c0d6e08aae4 +0 -0
  104. data/spec/test_app/tmp/cache/assets/test/sprockets/8473b4217b725147b48cc7c35a5613f1 +0 -0
  105. data/spec/test_app/tmp/cache/assets/test/sprockets/9a37adb41b90d5a705ad5ac5b36908a5 +0 -0
  106. data/spec/test_app/tmp/cache/assets/test/sprockets/a282da187ba14975a311bdee34282b68 +0 -0
  107. data/spec/test_app/tmp/cache/assets/test/sprockets/bd7f920a6fb16d903905510c1b54ac58 +0 -0
  108. data/spec/test_app/tmp/cache/assets/test/sprockets/dad42ce6da98af2bb068880ecf0c4e3b +0 -0
  109. data/spec/test_app/tmp/cache/assets/test/sprockets/e1fd1402695e7f441a0b016d610e5a01 +0 -0
  110. data/spec/test_app/tmp/cache/assets/test/sprockets/f1ea951eed23da8d08839fed76489094 +0 -0
  111. data/spec/test_app/tmp/cache/assets/test/sprockets/f8d343216bb921b4b9f3ff80a279ade1 +0 -0
  112. metadata +209 -12
  113. data/app/views/banner_lite/banners/preview.html.erb +0 -1
@@ -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] if respond_to?(:wrap_parameters)
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,4 @@
1
+ Rails.application.routes.draw do
2
+
3
+ mount BannerLite::Engine => "/banner_lite"
4
+ end
@@ -0,0 +1,20 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ development:
14
+ secret_key_base: 02f4b6cc9b0fedffe6d3aa3560c9a5aac4f347f581536c0d0fbfe1a26e395c2daf1e96c38bc8387204bda294a8af5fe02f78aa5b62ec4551f1fa36944d5a1048
15
+
16
+ test:
17
+ secret_key_base: 2ea45819bbbc593e0f90c67af95f0d763e6a5f931d9e7af993b511608385196668e6f8e876d6b482f2c017af31471fca0b11d1688cd9c4c4319d5db255bbf1c6
18
+
19
+ production:
20
+ secret_key_base: 71352ce1d088c92c3842753ceb277ee2bb83198f7b988a7e80ef59e01c796b1acd0a1a1c426c46e9ec209643ad45c7b8eb2761af8820de8d278ca1c0f4c2c0b0
@@ -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 Rails.application
@@ -0,0 +1,25 @@
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: 20140904013125) do
15
+
16
+ create_table "banner_lite_banners", force: true do |t|
17
+ t.string "url"
18
+ t.string "file_name"
19
+ t.datetime "active_from"
20
+ t.datetime "active_until"
21
+ t.string "text"
22
+ t.string "type"
23
+ end
24
+
25
+ end
Binary file