spud_banners 0.9.0.1 → 0.9.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 (61) hide show
  1. data/{Readme.markdown → README.markdown} +3 -3
  2. data/Rakefile +1 -1
  3. data/app/assets/javascripts/spud/admin/banners/banners.js +1 -1
  4. data/app/controllers/spud/admin/banner_sets_controller.rb +1 -4
  5. data/app/helpers/spud_banners_helper.rb +3 -2
  6. data/db/migrate/20121116195139_create_spud_banners.rb +1 -1
  7. data/lib/spud_banners/version.rb +1 -1
  8. data/spec/controllers/spud/admin/banner_sets_controller_spec.rb +100 -0
  9. data/{test → spec}/dummy/README.rdoc +0 -0
  10. data/{test → spec}/dummy/Rakefile +0 -0
  11. data/{test → spec}/dummy/app/assets/javascripts/application.js +0 -0
  12. data/{test → spec}/dummy/app/assets/stylesheets/application.css +0 -0
  13. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  14. data/{test → spec}/dummy/app/helpers/application_helper.rb +0 -0
  15. data/{test → spec}/dummy/app/views/layouts/application.html.erb +0 -0
  16. data/{test → spec}/dummy/config.ru +0 -0
  17. data/{test → spec}/dummy/config/application.rb +0 -0
  18. data/{test → spec}/dummy/config/boot.rb +0 -0
  19. data/spec/dummy/config/database.yml +14 -0
  20. data/{test → spec}/dummy/config/environment.rb +0 -0
  21. data/{test → spec}/dummy/config/environments/development.rb +0 -0
  22. data/{test → spec}/dummy/config/environments/production.rb +0 -0
  23. data/{test → spec}/dummy/config/environments/test.rb +0 -0
  24. data/{test → spec}/dummy/config/initializers/backtrace_silencers.rb +0 -0
  25. data/{test → spec}/dummy/config/initializers/inflections.rb +0 -0
  26. data/{test → spec}/dummy/config/initializers/mime_types.rb +0 -0
  27. data/{test → spec}/dummy/config/initializers/secret_token.rb +0 -0
  28. data/{test → spec}/dummy/config/initializers/session_store.rb +0 -0
  29. data/{test → spec}/dummy/config/initializers/wrap_parameters.rb +0 -0
  30. data/{test → spec}/dummy/config/locales/en.yml +0 -0
  31. data/spec/dummy/config/routes.rb +3 -0
  32. data/spec/dummy/db/migrate/20121127192246_create_spud_admin_permissions.spud_core.rb +12 -0
  33. data/spec/dummy/db/migrate/20121127192247_create_spud_users.spud_core.rb +30 -0
  34. data/spec/dummy/db/migrate/20121127192248_add_time_zone_to_spud_user.spud_core.rb +7 -0
  35. data/spec/dummy/db/migrate/20121127192249_add_scope_to_spud_admin_permissions.spud_core.rb +7 -0
  36. data/spec/dummy/db/migrate/20121127192250_create_spud_user_settings.spud_core.rb +12 -0
  37. data/spec/dummy/db/schema.rb +87 -0
  38. data/spec/dummy/log/development.log +72 -0
  39. data/spec/dummy/log/test.log +8512 -0
  40. data/{test → spec}/dummy/public/404.html +0 -0
  41. data/{test → spec}/dummy/public/422.html +0 -0
  42. data/{test → spec}/dummy/public/500.html +0 -0
  43. data/{test → spec}/dummy/public/favicon.ico +0 -0
  44. data/{test → spec}/dummy/script/rails +0 -0
  45. data/spec/spec_helper.rb +40 -0
  46. data/spec/support/authlogic_helper.rb +2 -0
  47. metadata +211 -83
  48. data/test/dummy/app/controllers/application_controller.rb +0 -3
  49. data/test/dummy/config/database.yml +0 -25
  50. data/test/dummy/config/routes.rb +0 -4
  51. data/test/fixtures/spud_banner_sets.yml +0 -15
  52. data/test/fixtures/spud_banners.yml +0 -15
  53. data/test/functional/spud/admin/banner_sets_controller_test.rb +0 -7
  54. data/test/functional/spud/admin/banners_controller_test.rb +0 -7
  55. data/test/integration/navigation_test.rb +0 -10
  56. data/test/spud_banners_test.rb +0 -7
  57. data/test/test_helper.rb +0 -15
  58. data/test/unit/helpers/spud/admin/banner_sets_helper_test.rb +0 -4
  59. data/test/unit/helpers/spud/admin/banners_helper_test.rb +0 -4
  60. data/test/unit/spud_banner_set_test.rb +0 -7
  61. data/test/unit/spud_banner_test.rb +0 -7
@@ -44,9 +44,9 @@ Once a Set has been created, you can begin adding banners to it. Banners contain
44
44
 
45
45
  A number of view helpers are provided for displaying banners in your templates.
46
46
 
47
- `spud_banners_for_set(set_or_identifier)`
47
+ `spud_banners_for_set(set_or_identifier, options)`
48
48
 
49
- Accepts the banner set name as a String or Symbol and returns an html template. Optionally takes a block argument for rendering custom html.
49
+ Accepts the banner set name as a String or Symbol and returns an html template. Options hash accepts a `:limit` parameter for limiting the number of banners returned. This helper also accepts a block argument for rendering custom html.
50
50
 
51
51
  `spud_banner_tag(banner)`
52
52
 
@@ -123,6 +123,6 @@ Below is an example of integration with [SlidesJs][slidesjs], a jQuery plugin.
123
123
  });
124
124
  </script>
125
125
 
126
- [spud]:https://github.com/davydotcom/spud_core_admin
126
+ [spud]:https://github.com/spud-rails/spud_core_admin
127
127
  [slidesjs]:http://www.slidesjs.com
128
128
  [liquid]:https://github.com/Shopify/liquid
data/Rakefile CHANGED
@@ -20,7 +20,7 @@ RDoc::Task.new(:rdoc) do |rdoc|
20
20
  rdoc.rdoc_files.include('lib/**/*.rb')
21
21
  end
22
22
 
23
- APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
23
+ APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
24
24
  load 'rails/tasks/engine.rake'
25
25
 
26
26
 
@@ -79,7 +79,7 @@ spud.admin.banners = new function(){
79
79
  fd.append('_method', form.find('[name=_method]').val());
80
80
  fd.append('authenticity_token', form.find('[name=authenticity_token]').val());
81
81
  fd.append('spud_banner[link_to]', form.find('#spud_banner_link_to').val());
82
- fd.append('spud_banner[link_target]', form.find('#spud_banner_target').val());
82
+ fd.append('spud_banner[link_target]', form.find('#spud_banner_link_target').val());
83
83
  fd.append('spud_banner[title]', form.find('#spud_banner_title').val());
84
84
  fd.append('spud_banner[alt]', form.find('#spud_banner_alt').val());
85
85
 
@@ -48,11 +48,8 @@ class Spud::Admin::BannerSetsController < Spud::Admin::ApplicationController
48
48
  def destroy
49
49
  if @banner_set.destroy
50
50
  flash.now[:notice] = 'BannerSet deleted successfully'
51
- status = 200
52
- else
53
- status = 422
54
51
  end
55
- render :nothing => true, :status => status
52
+ render :nothing => true
56
53
  end
57
54
 
58
55
  private
@@ -1,6 +1,7 @@
1
1
  module SpudBannersHelper
2
2
 
3
3
  def spud_banners_for_set(set_or_identifier, options = {})
4
+ limit = options[:limit] || false
4
5
  if set_or_identifier.is_a?(SpudBannerSet)
5
6
  banner_set = set_or_identifier
6
7
  else
@@ -8,12 +9,12 @@ module SpudBannersHelper
8
9
  end
9
10
  return '' if banner_set.blank?
10
11
  if block_given?
11
- banner_set.banners.each do |banner|
12
+ banner_set.banners.limit(limit).each do |banner|
12
13
  yield(banner)
13
14
  end
14
15
  else
15
16
  content_tag(:div, :class => 'spud_banner_set', 'data-id' => banner_set.id) do
16
- banner_set.banners.map do |banner|
17
+ banner_set.banners.limit(limit).map do |banner|
17
18
  concat(content_tag(:div, :class => 'spud_banner_set_banner', 'data-id' => banner.id){ spud_banner_tag(banner) })
18
19
  end
19
20
  end
@@ -3,7 +3,7 @@ class CreateSpudBanners < ActiveRecord::Migration
3
3
  create_table :spud_banners do |t|
4
4
  t.integer :spud_banner_set_id, :null => false
5
5
  t.string :link_to
6
- t.string :link_target
6
+ t.string :link_target, :default => '_self'
7
7
  t.string :title
8
8
  t.string :alt
9
9
  t.integer :sort_order, :default => 0
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Banners
3
- VERSION = "0.9.0.1"
3
+ VERSION = "0.9.0.2"
4
4
  end
5
5
  end
@@ -0,0 +1,100 @@
1
+ require 'spec_helper'
2
+
3
+ describe Spud::Admin::BannerSetsController do
4
+
5
+ before(:each) do
6
+ activate_authlogic
7
+ u = SpudUser.new(:login => "testuser",:email => "test@testuser.com",:password => "test",:password_confirmation => "test")
8
+ u.super_admin = true
9
+ u.save
10
+ @user = SpudUserSession.create(u)
11
+ end
12
+
13
+ describe :index do
14
+ it "should return an array of banner sets" do
15
+ 5.times do |x|
16
+ banner_set = FactoryGirl.create(:spud_banner_set)
17
+ end
18
+ get :index
19
+ assigns(:banner_sets).count.should be > 1
20
+ end
21
+ end
22
+
23
+ describe :show do
24
+ it "should respond with a banner set" do
25
+ banner_set = FactoryGirl.create(:spud_banner_set)
26
+ get :show, :id => banner_set.id
27
+ assigns(:banner_set).should == banner_set
28
+ response.should be_success
29
+ end
30
+
31
+ it "should redirect if banner set is not found" do
32
+ get :show, :id => -1
33
+ assigns(:banner_set).should be_blank
34
+ response.should redirect_to spud_admin_banner_sets_path
35
+ end
36
+ end
37
+
38
+ describe :new do
39
+ it "should respond with a banner set" do
40
+ get :new
41
+ assigns(:banner_set).should_not be_blank
42
+ response.should be_success
43
+ end
44
+ end
45
+
46
+ describe :create do
47
+ it "should respond with a banner set" do
48
+ lambda {
49
+ post :create, :spud_banner_set => FactoryGirl.attributes_for(:spud_banner_set)
50
+ }.should change(SpudBannerSet, :count).by(1)
51
+ response.should be_success
52
+ end
53
+
54
+ it "should respond unsuccessfully if the banner set is invalid" do
55
+ lambda {
56
+ post :create, :spud_banner_set => {:name => '', :width => 'lorem', :height => 'ipsum'}
57
+ }.should_not change(SpudBannerSet, :count)
58
+ assert_response 422
59
+ end
60
+ end
61
+
62
+ describe :edit do
63
+ it "should respond with a banner set" do
64
+ banner_set = FactoryGirl.create(:spud_banner_set)
65
+ get :edit, :id => banner_set.id
66
+ assigns(:banner_set).should == banner_set
67
+ response.should be_success
68
+ end
69
+ end
70
+
71
+ describe :update do
72
+ it "should update the banner set" do
73
+ banner_set = FactoryGirl.create(:spud_banner_set)
74
+ new_name = "Updated Set Name"
75
+ lambda {
76
+ put :update, :id => banner_set.id, :spud_banner_set => {:name => new_name}
77
+ banner_set.reload
78
+ }.should change(banner_set, :name).to(new_name)
79
+ end
80
+
81
+ it "should respond unsuccessfully if the updated banner set is invalid" do
82
+ banner_set = FactoryGirl.create(:spud_banner_set)
83
+ lambda {
84
+ put :update, :id => banner_set.id, :spud_banner_set => {:name => '', :width => 'lorem', :height => 'ipsum'}
85
+ }.should_not change(SpudBannerSet, :count)
86
+ assert_response 422
87
+ end
88
+ end
89
+
90
+ describe :destroy do
91
+ it "should destroy the banner set and respond successfully" do
92
+ banner_set = FactoryGirl.create(:spud_banner_set)
93
+ lambda {
94
+ delete :destroy, :id => banner_set.id
95
+ }.should change(SpudBannerSet, :count).by(-1)
96
+ response.should be_success
97
+ end
98
+ end
99
+
100
+ end
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ class ApplicationController < Spud::ApplicationController
2
+ protect_from_forgery
3
+ end
File without changes
File without changes
File without changes
@@ -0,0 +1,14 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ development:
7
+ adapter: mysql2
8
+ database: spud_banners_development
9
+ username: root
10
+
11
+ test:
12
+ adapter: mysql2
13
+ database: spud_banners_test
14
+ username: root
File without changes
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ Rails.application.routes.draw do
2
+
3
+ end
@@ -0,0 +1,12 @@
1
+ # This migration comes from spud_core (originally 20111214161011)
2
+ class CreateSpudAdminPermissions < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_admin_permissions do |t|
5
+ t.integer :user_id
6
+ t.string :name
7
+ t.boolean :access
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,30 @@
1
+ # This migration comes from spud_core (originally 20111214161146)
2
+ class CreateSpudUsers < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_users do |t|
5
+
6
+ t.string :first_name
7
+ t.string :last_name
8
+ t.boolean :super_admin
9
+ t.string :login, :null => false # optional, you can use email instead, or both
10
+ t.string :email, :null => false # optional, you can use login instead, or both
11
+ t.string :crypted_password, :null => false # optional, see below
12
+ t.string :password_salt, :null => false # optional, but highly recommended
13
+ t.string :persistence_token, :null => false # required
14
+ t.string :single_access_token, :null => false # optional, see Authlogic::Session::Params
15
+ t.string :perishable_token, :null => false # optional, see Authlogic::Session::Perishability
16
+
17
+ # Magic columns, just like ActiveRecord's created_at and updated_at. These are automatically maintained by Authlogic if they are present.
18
+ t.integer :login_count, :null => false, :default => 0 # optional, see Authlogic::Session::MagicColumns
19
+ t.integer :failed_login_count, :null => false, :default => 0 # optional, see Authlogic::Session::MagicColumns
20
+ t.datetime :last_request_at # optional, see Authlogic::Session::MagicColumns
21
+ t.datetime :current_login_at # optional, see Authlogic::Session::MagicColumns
22
+ t.datetime :last_login_at # optional, see Authlogic::Session::MagicColumns
23
+ t.string :current_login_ip # optional, see Authlogic::Session::MagicColumns
24
+ t.string :last_login_ip # optional, see Authlogic::Session::MagicColumns
25
+ t.timestamps
26
+ end
27
+ add_index :spud_users,:login
28
+ add_index :spud_users,:email
29
+ end
30
+ end
@@ -0,0 +1,7 @@
1
+ # This migration comes from spud_core (originally 20120327124229)
2
+ class AddTimeZoneToSpudUser < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_users, :time_zone, :string
5
+
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ # This migration comes from spud_core (originally 20120328235431)
2
+ class AddScopeToSpudAdminPermissions < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_admin_permissions, :scope, :string
5
+
6
+ end
7
+ end
@@ -0,0 +1,12 @@
1
+ # This migration comes from spud_core (originally 20120329174000)
2
+ class CreateSpudUserSettings < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_user_settings do |t|
5
+ t.integer :spud_user_id
6
+ t.string :key
7
+ t.string :value
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,87 @@
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 => 20121127192250) do
15
+
16
+ create_table "spud_admin_permissions", :force => true do |t|
17
+ t.integer "user_id"
18
+ t.string "name"
19
+ t.boolean "access"
20
+ t.datetime "created_at", :null => false
21
+ t.datetime "updated_at", :null => false
22
+ t.string "scope"
23
+ end
24
+
25
+ create_table "spud_banner_sets", :force => true do |t|
26
+ t.string "name", :null => false
27
+ t.integer "width", :null => false
28
+ t.integer "height", :null => false
29
+ t.boolean "cropped", :default => true
30
+ t.datetime "created_at", :null => false
31
+ t.datetime "updated_at", :null => false
32
+ end
33
+
34
+ add_index "spud_banner_sets", ["name"], :name => "index_spud_banner_sets_on_name", :unique => true
35
+
36
+ create_table "spud_banners", :force => true do |t|
37
+ t.integer "spud_banner_set_id", :null => false
38
+ t.string "link_to"
39
+ t.string "link_target"
40
+ t.string "title"
41
+ t.string "alt"
42
+ t.integer "sort_order", :default => 0
43
+ t.string "banner_file_name"
44
+ t.string "banner_content_type"
45
+ t.integer "banner_file_size"
46
+ t.datetime "banner_updated_at"
47
+ t.datetime "created_at", :null => false
48
+ t.datetime "updated_at", :null => false
49
+ end
50
+
51
+ add_index "spud_banners", ["spud_banner_set_id"], :name => "index_spud_banners_on_spud_banner_set_id"
52
+
53
+ create_table "spud_user_settings", :force => true do |t|
54
+ t.integer "spud_user_id"
55
+ t.string "key"
56
+ t.string "value"
57
+ t.datetime "created_at", :null => false
58
+ t.datetime "updated_at", :null => false
59
+ end
60
+
61
+ create_table "spud_users", :force => true do |t|
62
+ t.string "first_name"
63
+ t.string "last_name"
64
+ t.boolean "super_admin"
65
+ t.string "login", :null => false
66
+ t.string "email", :null => false
67
+ t.string "crypted_password", :null => false
68
+ t.string "password_salt", :null => false
69
+ t.string "persistence_token", :null => false
70
+ t.string "single_access_token", :null => false
71
+ t.string "perishable_token", :null => false
72
+ t.integer "login_count", :default => 0, :null => false
73
+ t.integer "failed_login_count", :default => 0, :null => false
74
+ t.datetime "last_request_at"
75
+ t.datetime "current_login_at"
76
+ t.datetime "last_login_at"
77
+ t.string "current_login_ip"
78
+ t.string "last_login_ip"
79
+ t.datetime "created_at", :null => false
80
+ t.datetime "updated_at", :null => false
81
+ t.string "time_zone"
82
+ end
83
+
84
+ add_index "spud_users", ["email"], :name => "index_spud_users_on_email"
85
+ add_index "spud_users", ["login"], :name => "index_spud_users_on_login"
86
+
87
+ end
@@ -0,0 +1,72 @@
1
+ Connecting to database specified by database.yml
2
+  (35.6ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
3
+  (26.2ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
4
+  (2.2ms) SELECT `schema_migrations`.`version` FROM `schema_migrations` 
5
+ Migrating to CreateSpudBanners (20121116195139)
6
+  (15.6ms) CREATE TABLE `spud_banners` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `spud_banner_set_id` int(11) NOT NULL, `link_to` varchar(255), `link_target` varchar(255), `title` varchar(255), `alt` varchar(255), `sort_order` int(11) DEFAULT 0, `banner_file_name` varchar(255), `banner_content_type` varchar(255), `banner_file_size` int(11), `banner_updated_at` datetime, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
7
+  (14.2ms) CREATE INDEX `index_spud_banners_on_spud_banner_set_id` ON `spud_banners` (`spud_banner_set_id`)
8
+  (0.4ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20121116195139')
9
+ Migrating to CreateSpudBannerSets (20121116195312)
10
+  (14.5ms) CREATE TABLE `spud_banner_sets` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL, `width` int(11) NOT NULL, `height` int(11) NOT NULL, `cropped` tinyint(1) DEFAULT 1, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
11
+  (9.1ms) CREATE UNIQUE INDEX `index_spud_banner_sets_on_name` ON `spud_banner_sets` (`name`)
12
+  (0.3ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20121116195312')
13
+  (0.2ms) SELECT `schema_migrations`.`version` FROM `schema_migrations`
14
+ Connecting to database specified by database.yml
15
+  (1.7ms) SELECT `schema_migrations`.`version` FROM `schema_migrations` 
16
+  (2.2ms) DROP DATABASE IF EXISTS `spud_banners_test`
17
+  (0.4ms) CREATE DATABASE `spud_banners_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
18
+  (13.1ms) CREATE TABLE `spud_banner_sets` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL, `width` int(11) NOT NULL, `height` int(11) NOT NULL, `cropped` tinyint(1) DEFAULT 1, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
19
+  (14.6ms) CREATE UNIQUE INDEX `index_spud_banner_sets_on_name` ON `spud_banner_sets` (`name`)
20
+  (9.7ms) CREATE TABLE `spud_banners` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `spud_banner_set_id` int(11) NOT NULL, `link_to` varchar(255), `link_target` varchar(255), `title` varchar(255), `alt` varchar(255), `sort_order` int(11) DEFAULT 0, `banner_file_name` varchar(255), `banner_content_type` varchar(255), `banner_file_size` int(11), `banner_updated_at` datetime, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
21
+  (13.6ms) CREATE INDEX `index_spud_banners_on_spud_banner_set_id` ON `spud_banners` (`spud_banner_set_id`)
22
+  (8.7ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
23
+  (13.8ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
24
+  (0.1ms) SELECT version FROM `schema_migrations`
25
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20121116195312')
26
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20121116195139')
27
+ Connecting to database specified by database.yml
28
+ Connecting to database specified by database.yml
29
+  (1.7ms) SELECT `schema_migrations`.`version` FROM `schema_migrations` 
30
+ Migrating to CreateSpudBanners (20121116195139)
31
+ Migrating to CreateSpudBannerSets (20121116195312)
32
+ Migrating to CreateSpudAdminPermissions (20121127192246)
33
+  (16.9ms) CREATE TABLE `spud_admin_permissions` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `user_id` int(11), `name` varchar(255), `access` tinyint(1), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
34
+  (0.5ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20121127192246')
35
+ Migrating to CreateSpudUsers (20121127192247)
36
+  (16.0ms) CREATE TABLE `spud_users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `first_name` varchar(255), `last_name` varchar(255), `super_admin` tinyint(1), `login` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `crypted_password` varchar(255) NOT NULL, `password_salt` varchar(255) NOT NULL, `persistence_token` varchar(255) NOT NULL, `single_access_token` varchar(255) NOT NULL, `perishable_token` varchar(255) NOT NULL, `login_count` int(11) DEFAULT 0 NOT NULL, `failed_login_count` int(11) DEFAULT 0 NOT NULL, `last_request_at` datetime, `current_login_at` datetime, `last_login_at` datetime, `current_login_ip` varchar(255), `last_login_ip` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
37
+  (10.5ms) CREATE INDEX `index_spud_users_on_login` ON `spud_users` (`login`)
38
+  (14.1ms) CREATE INDEX `index_spud_users_on_email` ON `spud_users` (`email`)
39
+  (0.5ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20121127192247')
40
+ Migrating to AddTimeZoneToSpudUser (20121127192248)
41
+  (12.6ms) ALTER TABLE `spud_users` ADD `time_zone` varchar(255)
42
+  (0.3ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20121127192248')
43
+ Migrating to AddScopeToSpudAdminPermissions (20121127192249)
44
+  (16.9ms) ALTER TABLE `spud_admin_permissions` ADD `scope` varchar(255)
45
+  (0.4ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20121127192249')
46
+ Migrating to CreateSpudUserSettings (20121127192250)
47
+  (13.1ms) CREATE TABLE `spud_user_settings` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `spud_user_id` int(11), `key` varchar(255), `value` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
48
+  (0.4ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20121127192250')
49
+  (0.2ms) SELECT `schema_migrations`.`version` FROM `schema_migrations`
50
+ Connecting to database specified by database.yml
51
+  (2.0ms) SELECT `schema_migrations`.`version` FROM `schema_migrations` 
52
+  (1.9ms) DROP DATABASE IF EXISTS `spud_banners_test`
53
+  (0.3ms) CREATE DATABASE `spud_banners_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
54
+  (17.7ms) CREATE TABLE `spud_admin_permissions` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `user_id` int(11), `name` varchar(255), `access` tinyint(1), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `scope` varchar(255)) ENGINE=InnoDB
55
+  (16.1ms) CREATE TABLE `spud_banner_sets` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL, `width` int(11) NOT NULL, `height` int(11) NOT NULL, `cropped` tinyint(1) DEFAULT 1, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
56
+  (14.6ms) CREATE UNIQUE INDEX `index_spud_banner_sets_on_name` ON `spud_banner_sets` (`name`)
57
+  (12.2ms) CREATE TABLE `spud_banners` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `spud_banner_set_id` int(11) NOT NULL, `link_to` varchar(255), `link_target` varchar(255), `title` varchar(255), `alt` varchar(255), `sort_order` int(11) DEFAULT 0, `banner_file_name` varchar(255), `banner_content_type` varchar(255), `banner_file_size` int(11), `banner_updated_at` datetime, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
58
+  (18.0ms) CREATE INDEX `index_spud_banners_on_spud_banner_set_id` ON `spud_banners` (`spud_banner_set_id`)
59
+  (13.3ms) CREATE TABLE `spud_user_settings` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `spud_user_id` int(11), `key` varchar(255), `value` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
60
+  (14.6ms) CREATE TABLE `spud_users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `first_name` varchar(255), `last_name` varchar(255), `super_admin` tinyint(1), `login` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `crypted_password` varchar(255) NOT NULL, `password_salt` varchar(255) NOT NULL, `persistence_token` varchar(255) NOT NULL, `single_access_token` varchar(255) NOT NULL, `perishable_token` varchar(255) NOT NULL, `login_count` int(11) DEFAULT 0 NOT NULL, `failed_login_count` int(11) DEFAULT 0 NOT NULL, `last_request_at` datetime, `current_login_at` datetime, `last_login_at` datetime, `current_login_ip` varchar(255), `last_login_ip` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `time_zone` varchar(255)) ENGINE=InnoDB
61
+  (15.8ms) CREATE INDEX `index_spud_users_on_email` ON `spud_users` (`email`)
62
+  (16.3ms) CREATE INDEX `index_spud_users_on_login` ON `spud_users` (`login`)
63
+  (14.5ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
64
+  (59.9ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
65
+  (0.2ms) SELECT version FROM `schema_migrations`
66
+  (0.4ms) INSERT INTO `schema_migrations` (version) VALUES ('20121127192250')
67
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20121127192246')
68
+  (0.6ms) INSERT INTO `schema_migrations` (version) VALUES ('20121127192247')
69
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20121127192248')
70
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20121127192249')
71
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20121116195139')
72
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20121116195312')