spud_banners 0.0.1

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 (80) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/Rakefile +40 -0
  3. data/Readme.markdown +128 -0
  4. data/app/assets/javascripts/spud/admin/banners/application.js +2 -0
  5. data/app/assets/javascripts/spud/admin/banners/banner_sets.js +102 -0
  6. data/app/assets/javascripts/spud/admin/banners/banners.js +161 -0
  7. data/app/assets/stylesheets/spud/admin/banners/application.css +4 -0
  8. data/app/assets/stylesheets/spud/admin/banners/banner_sets.css +27 -0
  9. data/app/assets/stylesheets/spud/admin/banners/banners.css +36 -0
  10. data/app/controllers/spud/admin/banner_sets_controller.rb +71 -0
  11. data/app/controllers/spud/admin/banners_controller.rb +104 -0
  12. data/app/helpers/spud/admin/banner_sets_helper.rb +2 -0
  13. data/app/helpers/spud/admin/banners_helper.rb +2 -0
  14. data/app/helpers/spud_banners_helper.rb +37 -0
  15. data/app/models/spud_banner.rb +51 -0
  16. data/app/models/spud_banner_set.rb +30 -0
  17. data/app/observers/spud_banner_sweeper.rb +44 -0
  18. data/app/views/spud/admin/banner_sets/_banner_set.html.erb +8 -0
  19. data/app/views/spud/admin/banner_sets/_form.html.erb +32 -0
  20. data/app/views/spud/admin/banner_sets/create.html.erb +1 -0
  21. data/app/views/spud/admin/banner_sets/edit.html.erb +1 -0
  22. data/app/views/spud/admin/banner_sets/index.html.erb +12 -0
  23. data/app/views/spud/admin/banner_sets/new.html.erb +1 -0
  24. data/app/views/spud/admin/banner_sets/show.html.erb +11 -0
  25. data/app/views/spud/admin/banners/_banner.html.erb +7 -0
  26. data/app/views/spud/admin/banners/_form.html.erb +47 -0
  27. data/app/views/spud/admin/banners/edit.html.erb +1 -0
  28. data/app/views/spud/admin/banners/legacy.js.erb +5 -0
  29. data/app/views/spud/admin/banners/new.html.erb +1 -0
  30. data/app/views/spud/admin/banners/show.html.erb +1 -0
  31. data/config/routes.rb +14 -0
  32. data/db/migrate/20121116195139_create_spud_banners.rb +15 -0
  33. data/db/migrate/20121116195312_create_spud_banner_sets.rb +12 -0
  34. data/lib/responds_to_parent.rb +69 -0
  35. data/lib/spud_banners/configuration.rb +10 -0
  36. data/lib/spud_banners/engine.rb +25 -0
  37. data/lib/spud_banners/liquid_tags.rb +32 -0
  38. data/lib/spud_banners/version.rb +5 -0
  39. data/lib/spud_banners.rb +8 -0
  40. data/lib/tasks/spud_banners_tasks.rake +4 -0
  41. data/test/dummy/README.rdoc +261 -0
  42. data/test/dummy/Rakefile +7 -0
  43. data/test/dummy/app/assets/javascripts/application.js +15 -0
  44. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  45. data/test/dummy/app/controllers/application_controller.rb +3 -0
  46. data/test/dummy/app/helpers/application_helper.rb +2 -0
  47. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  48. data/test/dummy/config/application.rb +59 -0
  49. data/test/dummy/config/boot.rb +10 -0
  50. data/test/dummy/config/database.yml +25 -0
  51. data/test/dummy/config/environment.rb +5 -0
  52. data/test/dummy/config/environments/development.rb +37 -0
  53. data/test/dummy/config/environments/production.rb +67 -0
  54. data/test/dummy/config/environments/test.rb +37 -0
  55. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  56. data/test/dummy/config/initializers/inflections.rb +15 -0
  57. data/test/dummy/config/initializers/mime_types.rb +5 -0
  58. data/test/dummy/config/initializers/secret_token.rb +7 -0
  59. data/test/dummy/config/initializers/session_store.rb +8 -0
  60. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  61. data/test/dummy/config/locales/en.yml +5 -0
  62. data/test/dummy/config/routes.rb +4 -0
  63. data/test/dummy/config.ru +4 -0
  64. data/test/dummy/public/404.html +26 -0
  65. data/test/dummy/public/422.html +26 -0
  66. data/test/dummy/public/500.html +25 -0
  67. data/test/dummy/public/favicon.ico +0 -0
  68. data/test/dummy/script/rails +6 -0
  69. data/test/fixtures/spud_banner_sets.yml +15 -0
  70. data/test/fixtures/spud_banners.yml +15 -0
  71. data/test/functional/spud/admin/banner_sets_controller_test.rb +7 -0
  72. data/test/functional/spud/admin/banners_controller_test.rb +7 -0
  73. data/test/integration/navigation_test.rb +10 -0
  74. data/test/spud_banners_test.rb +7 -0
  75. data/test/test_helper.rb +15 -0
  76. data/test/unit/helpers/spud/admin/banner_sets_helper_test.rb +4 -0
  77. data/test/unit/helpers/spud/admin/banners_helper_test.rb +4 -0
  78. data/test/unit/spud_banner_set_test.rb +7 -0
  79. data/test/unit/spud_banner_test.rb +7 -0
  80. metadata +234 -0
@@ -0,0 +1,26 @@
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>
@@ -0,0 +1,26 @@
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>
@@ -0,0 +1,25 @@
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
@@ -0,0 +1,6 @@
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'
@@ -0,0 +1,15 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ one:
4
+ name: MyString
5
+ short_name: MyString
6
+ width: 1
7
+ height: 1
8
+ cropped: false
9
+
10
+ two:
11
+ name: MyString
12
+ short_name: MyString
13
+ width: 1
14
+ height: 1
15
+ cropped: false
@@ -0,0 +1,15 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ one:
4
+ spud_banner_set_id: 1
5
+ link_to: MyString
6
+ link_to_class: MyString
7
+ target: MyString
8
+ order: 1
9
+
10
+ two:
11
+ spud_banner_set_id: 1
12
+ link_to: MyString
13
+ link_to_class: MyString
14
+ target: MyString
15
+ order: 1
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class Spud::Admin::BannerSetsControllerTest < ActionController::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class Spud::Admin::BannersControllerTest < ActionController::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,10 @@
1
+ require 'test_helper'
2
+
3
+ class NavigationTest < ActionDispatch::IntegrationTest
4
+ fixtures :all
5
+
6
+ # test "the truth" do
7
+ # assert true
8
+ # end
9
+ end
10
+
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class SpudBannersTest < ActiveSupport::TestCase
4
+ test "truth" do
5
+ assert_kind_of Module, SpudBanners
6
+ end
7
+ end
@@ -0,0 +1,15 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require "rails/test_help"
6
+
7
+ Rails.backtrace_cleaner.remove_silencers!
8
+
9
+ # Load support files
10
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
11
+
12
+ # Load fixtures from the engine
13
+ if ActiveSupport::TestCase.method_defined?(:fixture_path=)
14
+ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
15
+ end
@@ -0,0 +1,4 @@
1
+ require 'test_helper'
2
+
3
+ class Spud::Admin::BannerSetsHelperTest < ActionView::TestCase
4
+ end
@@ -0,0 +1,4 @@
1
+ require 'test_helper'
2
+
3
+ class Spud::Admin::BannersHelperTest < ActionView::TestCase
4
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class SpudBannerSetTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class SpudBannerTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
metadata ADDED
@@ -0,0 +1,234 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: spud_banners
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Greg Woods
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-11-27 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 3.2.9
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 3.2.9
30
+ - !ruby/object:Gem::Dependency
31
+ name: spud_core
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 0.9.0
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.9.0
46
+ - !ruby/object:Gem::Dependency
47
+ name: paperclip
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: liquid
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ description: Spud Banners allows you to create and maintain sets of rotating banners
79
+ for use on your Spud-based website.
80
+ email:
81
+ - greg@westlakedesign.com
82
+ executables: []
83
+ extensions: []
84
+ extra_rdoc_files: []
85
+ files:
86
+ - app/assets/javascripts/spud/admin/banners/application.js
87
+ - app/assets/javascripts/spud/admin/banners/banner_sets.js
88
+ - app/assets/javascripts/spud/admin/banners/banners.js
89
+ - app/assets/stylesheets/spud/admin/banners/application.css
90
+ - app/assets/stylesheets/spud/admin/banners/banner_sets.css
91
+ - app/assets/stylesheets/spud/admin/banners/banners.css
92
+ - app/controllers/spud/admin/banner_sets_controller.rb
93
+ - app/controllers/spud/admin/banners_controller.rb
94
+ - app/helpers/spud/admin/banner_sets_helper.rb
95
+ - app/helpers/spud/admin/banners_helper.rb
96
+ - app/helpers/spud_banners_helper.rb
97
+ - app/models/spud_banner.rb
98
+ - app/models/spud_banner_set.rb
99
+ - app/observers/spud_banner_sweeper.rb
100
+ - app/views/spud/admin/banner_sets/_banner_set.html.erb
101
+ - app/views/spud/admin/banner_sets/_form.html.erb
102
+ - app/views/spud/admin/banner_sets/create.html.erb
103
+ - app/views/spud/admin/banner_sets/edit.html.erb
104
+ - app/views/spud/admin/banner_sets/index.html.erb
105
+ - app/views/spud/admin/banner_sets/new.html.erb
106
+ - app/views/spud/admin/banner_sets/show.html.erb
107
+ - app/views/spud/admin/banners/_banner.html.erb
108
+ - app/views/spud/admin/banners/_form.html.erb
109
+ - app/views/spud/admin/banners/edit.html.erb
110
+ - app/views/spud/admin/banners/legacy.js.erb
111
+ - app/views/spud/admin/banners/new.html.erb
112
+ - app/views/spud/admin/banners/show.html.erb
113
+ - config/routes.rb
114
+ - db/migrate/20121116195139_create_spud_banners.rb
115
+ - db/migrate/20121116195312_create_spud_banner_sets.rb
116
+ - lib/responds_to_parent.rb
117
+ - lib/spud_banners/configuration.rb
118
+ - lib/spud_banners/engine.rb
119
+ - lib/spud_banners/liquid_tags.rb
120
+ - lib/spud_banners/version.rb
121
+ - lib/spud_banners.rb
122
+ - lib/tasks/spud_banners_tasks.rake
123
+ - MIT-LICENSE
124
+ - Rakefile
125
+ - Readme.markdown
126
+ - test/dummy/app/assets/javascripts/application.js
127
+ - test/dummy/app/assets/stylesheets/application.css
128
+ - test/dummy/app/controllers/application_controller.rb
129
+ - test/dummy/app/helpers/application_helper.rb
130
+ - test/dummy/app/views/layouts/application.html.erb
131
+ - test/dummy/config/application.rb
132
+ - test/dummy/config/boot.rb
133
+ - test/dummy/config/database.yml
134
+ - test/dummy/config/environment.rb
135
+ - test/dummy/config/environments/development.rb
136
+ - test/dummy/config/environments/production.rb
137
+ - test/dummy/config/environments/test.rb
138
+ - test/dummy/config/initializers/backtrace_silencers.rb
139
+ - test/dummy/config/initializers/inflections.rb
140
+ - test/dummy/config/initializers/mime_types.rb
141
+ - test/dummy/config/initializers/secret_token.rb
142
+ - test/dummy/config/initializers/session_store.rb
143
+ - test/dummy/config/initializers/wrap_parameters.rb
144
+ - test/dummy/config/locales/en.yml
145
+ - test/dummy/config/routes.rb
146
+ - test/dummy/config.ru
147
+ - test/dummy/public/404.html
148
+ - test/dummy/public/422.html
149
+ - test/dummy/public/500.html
150
+ - test/dummy/public/favicon.ico
151
+ - test/dummy/Rakefile
152
+ - test/dummy/README.rdoc
153
+ - test/dummy/script/rails
154
+ - test/fixtures/spud_banner_sets.yml
155
+ - test/fixtures/spud_banners.yml
156
+ - test/functional/spud/admin/banner_sets_controller_test.rb
157
+ - test/functional/spud/admin/banners_controller_test.rb
158
+ - test/integration/navigation_test.rb
159
+ - test/spud_banners_test.rb
160
+ - test/test_helper.rb
161
+ - test/unit/helpers/spud/admin/banner_sets_helper_test.rb
162
+ - test/unit/helpers/spud/admin/banners_helper_test.rb
163
+ - test/unit/spud_banner_set_test.rb
164
+ - test/unit/spud_banner_test.rb
165
+ homepage: http://www.github.com/gregawoods/spud_banners
166
+ licenses: []
167
+ post_install_message:
168
+ rdoc_options: []
169
+ require_paths:
170
+ - lib
171
+ required_ruby_version: !ruby/object:Gem::Requirement
172
+ none: false
173
+ requirements:
174
+ - - ! '>='
175
+ - !ruby/object:Gem::Version
176
+ version: '0'
177
+ segments:
178
+ - 0
179
+ hash: -4238470459929969002
180
+ required_rubygems_version: !ruby/object:Gem::Requirement
181
+ none: false
182
+ requirements:
183
+ - - ! '>='
184
+ - !ruby/object:Gem::Version
185
+ version: '0'
186
+ segments:
187
+ - 0
188
+ hash: -4238470459929969002
189
+ requirements: []
190
+ rubyforge_project:
191
+ rubygems_version: 1.8.24
192
+ signing_key:
193
+ specification_version: 3
194
+ summary: Banner Management tool for Spud applications.
195
+ test_files:
196
+ - test/dummy/app/assets/javascripts/application.js
197
+ - test/dummy/app/assets/stylesheets/application.css
198
+ - test/dummy/app/controllers/application_controller.rb
199
+ - test/dummy/app/helpers/application_helper.rb
200
+ - test/dummy/app/views/layouts/application.html.erb
201
+ - test/dummy/config/application.rb
202
+ - test/dummy/config/boot.rb
203
+ - test/dummy/config/database.yml
204
+ - test/dummy/config/environment.rb
205
+ - test/dummy/config/environments/development.rb
206
+ - test/dummy/config/environments/production.rb
207
+ - test/dummy/config/environments/test.rb
208
+ - test/dummy/config/initializers/backtrace_silencers.rb
209
+ - test/dummy/config/initializers/inflections.rb
210
+ - test/dummy/config/initializers/mime_types.rb
211
+ - test/dummy/config/initializers/secret_token.rb
212
+ - test/dummy/config/initializers/session_store.rb
213
+ - test/dummy/config/initializers/wrap_parameters.rb
214
+ - test/dummy/config/locales/en.yml
215
+ - test/dummy/config/routes.rb
216
+ - test/dummy/config.ru
217
+ - test/dummy/public/404.html
218
+ - test/dummy/public/422.html
219
+ - test/dummy/public/500.html
220
+ - test/dummy/public/favicon.ico
221
+ - test/dummy/Rakefile
222
+ - test/dummy/README.rdoc
223
+ - test/dummy/script/rails
224
+ - test/fixtures/spud_banner_sets.yml
225
+ - test/fixtures/spud_banners.yml
226
+ - test/functional/spud/admin/banner_sets_controller_test.rb
227
+ - test/functional/spud/admin/banners_controller_test.rb
228
+ - test/integration/navigation_test.rb
229
+ - test/spud_banners_test.rb
230
+ - test/test_helper.rb
231
+ - test/unit/helpers/spud/admin/banner_sets_helper_test.rb
232
+ - test/unit/helpers/spud/admin/banners_helper_test.rb
233
+ - test/unit/spud_banner_set_test.rb
234
+ - test/unit/spud_banner_test.rb