spud_banners 0.9.0.2 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +32 -15
- data/app/models/spud_banner.rb +1 -17
- data/app/models/spud_banner_set.rb +1 -1
- data/app/observers/spud_banner_sweeper.rb +2 -2
- data/lib/spud_banners/version.rb +1 -1
- data/spec/dummy/db/schema.rb +4 -4
- data/spec/dummy/log/development.log +42 -61
- data/spec/dummy/log/test.log +662 -8215
- metadata +4 -4
data/README.markdown
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
[![Build Status](https://travis-ci.org/spud-rails/spud_banners.png?branch=master)](https://travis-ci.org/spud-rails/spud_banners)
|
1
2
|
# Spud Banners
|
2
3
|
|
3
4
|
Spud Banners is an engine for creating and managing rotating banner sets, designed for use with [Spud][spud].
|
@@ -14,18 +15,20 @@ Spud Banners is an engine for creating and managing rotating banner sets, design
|
|
14
15
|
bundle exec rake railties:install:migrations
|
15
16
|
rake db:migrate
|
16
17
|
|
17
|
-
4. Run a rails server instance and point your browser to
|
18
|
+
4. Run a rails server instance and point your browser to `/spud/admin`
|
18
19
|
|
19
20
|
## Configuration
|
20
21
|
|
21
22
|
Spud Banners accepts the following configuration options:
|
22
23
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
24
|
+
```ruby
|
25
|
+
Spud::Banners.configure do |config|
|
26
|
+
config.paperclip_storage = :filesystem #use :s3 to use s3 storage (aws gem required)
|
27
|
+
config.s3_credentials = "#{Rails.root}/config/s3.yml"
|
28
|
+
config.storage_path = ":rails_root/public/system/spud_banners/:id/:style/:basename.:extension"
|
29
|
+
config.storage_url = "/system/spud_banners/:id/:style/:basename.:extension"
|
30
|
+
end
|
31
|
+
```
|
29
32
|
|
30
33
|
## Creating a Banner Set
|
31
34
|
|
@@ -42,30 +45,37 @@ Once a Set has been created, you can begin adding banners to it. Banners contain
|
|
42
45
|
|
43
46
|
## View Helpers
|
44
47
|
|
45
|
-
A number of view helpers are provided for displaying banners in your templates.
|
48
|
+
A number of view helpers are provided for displaying banners in your templates.
|
46
49
|
|
47
50
|
`spud_banners_for_set(set_or_identifier, options)`
|
48
51
|
|
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.
|
52
|
+
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
53
|
|
51
|
-
|
54
|
+
```ruby
|
55
|
+
spud_banner_tag(banner)
|
56
|
+
```
|
52
57
|
|
53
58
|
Accepts a banner model object and returns a banner image wrapped in a link tag. Link tag is omitted if the `link_to` property of the banner is blank.
|
54
59
|
|
55
|
-
|
60
|
+
```ruby
|
61
|
+
spud_banner_image_tag(banner)
|
62
|
+
```
|
56
63
|
|
57
|
-
Accepts a banner model and returns only the image tag, no link.
|
64
|
+
Accepts a banner model and returns only the image tag, no link.
|
58
65
|
|
59
66
|
## Examples
|
60
67
|
|
61
68
|
Displaying banners using the standard helper.
|
62
69
|
|
70
|
+
```erb
|
63
71
|
<div id="banners">
|
64
72
|
<%= spud_banners_for_set(:promotions) %>
|
65
73
|
</div>
|
74
|
+
```
|
66
75
|
|
67
76
|
Displaying banners using the helper, with a block for custom html.
|
68
77
|
|
78
|
+
```erb
|
69
79
|
<ul id="slides">
|
70
80
|
<% spud_banners_for_set(:promotions) do |banner| %>
|
71
81
|
<li class="custom_slide">
|
@@ -73,9 +83,11 @@ Displaying banners using the helper, with a block for custom html.
|
|
73
83
|
</li>
|
74
84
|
<% end %>
|
75
85
|
</ul>
|
86
|
+
```
|
76
87
|
|
77
88
|
Displaying banners using the helper, with a block for even more custom html.
|
78
89
|
|
90
|
+
```erb
|
79
91
|
<ul id="slides">
|
80
92
|
<% spud_banners_for_set(:promotions) do |banner| %>
|
81
93
|
<li class="custom_slide">
|
@@ -84,21 +96,25 @@ Displaying banners using the helper, with a block for even more custom html.
|
|
84
96
|
</li>
|
85
97
|
<% end %>
|
86
98
|
</ul>
|
99
|
+
```
|
87
100
|
|
88
101
|
## Liquid
|
89
102
|
|
90
|
-
Spud Banners comes with its own custom [Liquid][liquid] tag. For now the liquid tag only supports rendering the standard html as generated by the `spud_banners_for_set`. Will provide support more advanced options in the future.
|
103
|
+
Spud Banners comes with its own custom [Liquid][liquid] tag. For now the liquid tag only supports rendering the standard html as generated by the `spud_banners_for_set`. Will provide support more advanced options in the future.
|
91
104
|
|
92
105
|
Usage:
|
93
106
|
|
107
|
+
```erb
|
94
108
|
<%= raw Liquid::Template.parse("{% spud_banner_set Promotions %}").render %>
|
109
|
+
```
|
95
110
|
|
96
111
|
## Slideshows
|
97
112
|
|
98
|
-
Spud Banners does not provide a built-in slideshow animation library. Instead, we make it easy for you to integrate into any number of popular JavaScript slideshow plugins available on the web, or even to write your own from scratch.
|
113
|
+
Spud Banners does not provide a built-in slideshow animation library. Instead, we make it easy for you to integrate into any number of popular JavaScript slideshow plugins available on the web, or even to write your own from scratch.
|
99
114
|
|
100
115
|
Below is an example of integration with [SlidesJs][slidesjs], a jQuery plugin.
|
101
116
|
|
117
|
+
```erb
|
102
118
|
<style type="text/css" media="screen">
|
103
119
|
.spud_banner_set {
|
104
120
|
width: 600px;
|
@@ -122,7 +138,8 @@ Below is an example of integration with [SlidesJs][slidesjs], a jQuery plugin.
|
|
122
138
|
});
|
123
139
|
});
|
124
140
|
</script>
|
141
|
+
```
|
125
142
|
|
126
143
|
[spud]:https://github.com/spud-rails/spud_core_admin
|
127
144
|
[slidesjs]:http://www.slidesjs.com
|
128
|
-
[liquid]:https://github.com/Shopify/liquid
|
145
|
+
[liquid]:https://github.com/Shopify/liquid
|
data/app/models/spud_banner.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
class SpudBanner < ActiveRecord::Base
|
2
2
|
attr_accessible :banner, :link_to, :link_target, :title, :alt, :sort_order
|
3
|
-
belongs_to :owner, :class_name => 'SpudBannerSet', :foreign_key => 'spud_banner_set_id'
|
3
|
+
belongs_to :owner, :class_name => 'SpudBannerSet', :foreign_key => 'spud_banner_set_id', :inverse_of => :banners
|
4
4
|
|
5
5
|
has_attached_file :banner,
|
6
6
|
:styles => lambda { |attachment| attachment.instance.dynamic_styles },
|
@@ -28,22 +28,6 @@ class SpudBanner < ActiveRecord::Base
|
|
28
28
|
return styles
|
29
29
|
end
|
30
30
|
|
31
|
-
def self.banners_for_set(identifier)
|
32
|
-
case identifier.class
|
33
|
-
when String
|
34
|
-
banner_set = SpudBannerSet.find_by_name(identifier)
|
35
|
-
when Symbol
|
36
|
-
banner_set = SpudBannerSet.find_by_name(identifier.to_s.titleize)
|
37
|
-
when Number
|
38
|
-
banner_set = SpudBannerSet.find(identifier)
|
39
|
-
end
|
40
|
-
if banner_set
|
41
|
-
return banner_set.banners
|
42
|
-
else
|
43
|
-
return []
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
31
|
def set_name
|
48
32
|
return owner.name
|
49
33
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class SpudBannerSet < ActiveRecord::Base
|
2
2
|
attr_accessible :cropped, :height, :name, :short_name, :width
|
3
|
-
has_many :banners, :class_name => 'SpudBanner', :order => 'sort_order asc', :dependent => :destroy
|
3
|
+
has_many :banners, :class_name => 'SpudBanner', :order => 'sort_order asc', :dependent => :destroy, :inverse_of => :owner
|
4
4
|
|
5
5
|
validates_presence_of :name
|
6
6
|
validates_uniqueness_of :name
|
@@ -28,7 +28,7 @@ private
|
|
28
28
|
if defined?(Spud::Cms)
|
29
29
|
values = [record.set_name]
|
30
30
|
values << @old_name if !@old_name.blank?
|
31
|
-
SpudPageLiquidTag.where(:tag_name => "
|
31
|
+
SpudPageLiquidTag.where(:tag_name => "banner_set",:value => values).includes(:attachment).each do |tag|
|
32
32
|
partial = tag.attachment
|
33
33
|
partial.postprocess_content
|
34
34
|
partial.save
|
@@ -41,4 +41,4 @@ private
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
end
|
44
|
+
end
|
data/lib/spud_banners/version.rb
CHANGED
data/spec/dummy/db/schema.rb
CHANGED
@@ -34,9 +34,9 @@ ActiveRecord::Schema.define(:version => 20121127192250) do
|
|
34
34
|
add_index "spud_banner_sets", ["name"], :name => "index_spud_banner_sets_on_name", :unique => true
|
35
35
|
|
36
36
|
create_table "spud_banners", :force => true do |t|
|
37
|
-
t.integer "spud_banner_set_id",
|
37
|
+
t.integer "spud_banner_set_id", :null => false
|
38
38
|
t.string "link_to"
|
39
|
-
t.string "link_target"
|
39
|
+
t.string "link_target", :default => "_self"
|
40
40
|
t.string "title"
|
41
41
|
t.string "alt"
|
42
42
|
t.integer "sort_order", :default => 0
|
@@ -44,8 +44,8 @@ ActiveRecord::Schema.define(:version => 20121127192250) do
|
|
44
44
|
t.string "banner_content_type"
|
45
45
|
t.integer "banner_file_size"
|
46
46
|
t.datetime "banner_updated_at"
|
47
|
-
t.datetime "created_at",
|
48
|
-
t.datetime "updated_at",
|
47
|
+
t.datetime "created_at", :null => false
|
48
|
+
t.datetime "updated_at", :null => false
|
49
49
|
end
|
50
50
|
|
51
51
|
add_index "spud_banners", ["spud_banner_set_id"], :name => "index_spud_banners_on_spud_banner_set_id"
|
@@ -1,72 +1,53 @@
|
|
1
1
|
Connecting to database specified by database.yml
|
2
|
-
[1m[36m (
|
3
|
-
[1m[35m (
|
4
|
-
[1m[36m (
|
2
|
+
[1m[36m (20.6ms)[0m [1mCREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB[0m
|
3
|
+
[1m[35m (19.3ms)[0m CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
|
4
|
+
[1m[36m (1.5ms)[0m [1mSELECT `schema_migrations`.`version` FROM `schema_migrations` [0m
|
5
5
|
Migrating to CreateSpudBanners (20121116195139)
|
6
|
-
[1m[35m (
|
7
|
-
[1m[36m (14.
|
8
|
-
[1m[35m (0.
|
6
|
+
[1m[35m (9.8ms)[0m 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) DEFAULT '_self', `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
|
+
[1m[36m (14.6ms)[0m [1mCREATE INDEX `index_spud_banners_on_spud_banner_set_id` ON `spud_banners` (`spud_banner_set_id`)[0m
|
8
|
+
[1m[35m (0.3ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20121116195139')
|
9
9
|
Migrating to CreateSpudBannerSets (20121116195312)
|
10
|
-
[1m[36m (
|
11
|
-
[1m[35m (
|
10
|
+
[1m[36m (11.0ms)[0m [1mCREATE 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[0m
|
11
|
+
[1m[35m (15.5ms)[0m CREATE UNIQUE INDEX `index_spud_banner_sets_on_name` ON `spud_banner_sets` (`name`)
|
12
12
|
[1m[36m (0.3ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20121116195312')[0m
|
13
|
-
[1m[35m (0.2ms)[0m SELECT `schema_migrations`.`version` FROM `schema_migrations`
|
14
|
-
Connecting to database specified by database.yml
|
15
|
-
[1m[36m (1.7ms)[0m [1mSELECT `schema_migrations`.`version` FROM `schema_migrations` [0m
|
16
|
-
[1m[35m (2.2ms)[0m DROP DATABASE IF EXISTS `spud_banners_test`
|
17
|
-
[1m[36m (0.4ms)[0m [1mCREATE DATABASE `spud_banners_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`[0m
|
18
|
-
[1m[35m (13.1ms)[0m 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
|
-
[1m[36m (14.6ms)[0m [1mCREATE UNIQUE INDEX `index_spud_banner_sets_on_name` ON `spud_banner_sets` (`name`)[0m
|
20
|
-
[1m[35m (9.7ms)[0m 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
|
-
[1m[36m (13.6ms)[0m [1mCREATE INDEX `index_spud_banners_on_spud_banner_set_id` ON `spud_banners` (`spud_banner_set_id`)[0m
|
22
|
-
[1m[35m (8.7ms)[0m CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
|
23
|
-
[1m[36m (13.8ms)[0m [1mCREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)[0m
|
24
|
-
[1m[35m (0.1ms)[0m SELECT version FROM `schema_migrations`
|
25
|
-
[1m[36m (0.3ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20121116195312')[0m
|
26
|
-
[1m[35m (0.3ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20121116195139')
|
27
|
-
Connecting to database specified by database.yml
|
28
|
-
Connecting to database specified by database.yml
|
29
|
-
[1m[36m (1.7ms)[0m [1mSELECT `schema_migrations`.`version` FROM `schema_migrations` [0m
|
30
|
-
Migrating to CreateSpudBanners (20121116195139)
|
31
|
-
Migrating to CreateSpudBannerSets (20121116195312)
|
32
13
|
Migrating to CreateSpudAdminPermissions (20121127192246)
|
33
|
-
[1m[35m (
|
34
|
-
[1m[36m (0.
|
14
|
+
[1m[35m (8.5ms)[0m 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
|
15
|
+
[1m[36m (0.2ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20121127192246')[0m
|
35
16
|
Migrating to CreateSpudUsers (20121127192247)
|
36
|
-
[1m[35m (
|
37
|
-
[1m[36m (
|
38
|
-
[1m[35m (
|
39
|
-
[1m[36m (0.
|
17
|
+
[1m[35m (9.8ms)[0m 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
|
18
|
+
[1m[36m (11.7ms)[0m [1mCREATE INDEX `index_spud_users_on_login` ON `spud_users` (`login`)[0m
|
19
|
+
[1m[35m (11.7ms)[0m CREATE INDEX `index_spud_users_on_email` ON `spud_users` (`email`)
|
20
|
+
[1m[36m (0.4ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20121127192247')[0m
|
40
21
|
Migrating to AddTimeZoneToSpudUser (20121127192248)
|
41
|
-
[1m[35m (
|
22
|
+
[1m[35m (14.0ms)[0m ALTER TABLE `spud_users` ADD `time_zone` varchar(255)
|
42
23
|
[1m[36m (0.3ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20121127192248')[0m
|
43
24
|
Migrating to AddScopeToSpudAdminPermissions (20121127192249)
|
44
|
-
[1m[35m (
|
45
|
-
[1m[36m (0.
|
25
|
+
[1m[35m (18.3ms)[0m ALTER TABLE `spud_admin_permissions` ADD `scope` varchar(255)
|
26
|
+
[1m[36m (0.3ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20121127192249')[0m
|
46
27
|
Migrating to CreateSpudUserSettings (20121127192250)
|
47
|
-
[1m[35m (
|
48
|
-
[1m[36m (0.
|
49
|
-
[1m[35m (0.
|
28
|
+
[1m[35m (8.4ms)[0m 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
|
29
|
+
[1m[36m (0.3ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20121127192250')[0m
|
30
|
+
[1m[35m (0.3ms)[0m SELECT `schema_migrations`.`version` FROM `schema_migrations`
|
50
31
|
Connecting to database specified by database.yml
|
51
|
-
[1m[36m (
|
52
|
-
[1m[35m (
|
53
|
-
[1m[36m (0.
|
54
|
-
[1m[35m (
|
55
|
-
[1m[36m (
|
56
|
-
[1m[35m (
|
57
|
-
[1m[36m (
|
58
|
-
[1m[35m (
|
59
|
-
[1m[36m (
|
60
|
-
[1m[35m (
|
61
|
-
[1m[36m (
|
62
|
-
[1m[35m (
|
63
|
-
[1m[36m (
|
64
|
-
[1m[35m (
|
65
|
-
[1m[36m (0.
|
66
|
-
[1m[35m (0.
|
67
|
-
[1m[36m (0.
|
68
|
-
[1m[35m (0.
|
69
|
-
[1m[36m (0.
|
70
|
-
[1m[35m (0.
|
71
|
-
[1m[36m (0.
|
72
|
-
[1m[35m (0.
|
32
|
+
[1m[36m (1.5ms)[0m [1mSELECT `schema_migrations`.`version` FROM `schema_migrations` [0m
|
33
|
+
[1m[35m (0.3ms)[0m DROP DATABASE IF EXISTS `spud_banners_test`
|
34
|
+
[1m[36m (0.2ms)[0m [1mCREATE DATABASE `spud_banners_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`[0m
|
35
|
+
[1m[35m (13.0ms)[0m 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
|
36
|
+
[1m[36m (10.7ms)[0m [1mCREATE 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[0m
|
37
|
+
[1m[35m (13.7ms)[0m CREATE UNIQUE INDEX `index_spud_banner_sets_on_name` ON `spud_banner_sets` (`name`)
|
38
|
+
[1m[36m (9.6ms)[0m [1mCREATE 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) DEFAULT '_self', `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[0m
|
39
|
+
[1m[35m (14.9ms)[0m CREATE INDEX `index_spud_banners_on_spud_banner_set_id` ON `spud_banners` (`spud_banner_set_id`)
|
40
|
+
[1m[36m (9.7ms)[0m [1mCREATE 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[0m
|
41
|
+
[1m[35m (12.5ms)[0m 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
|
42
|
+
[1m[36m (12.4ms)[0m [1mCREATE INDEX `index_spud_users_on_email` ON `spud_users` (`email`)[0m
|
43
|
+
[1m[35m (12.2ms)[0m CREATE INDEX `index_spud_users_on_login` ON `spud_users` (`login`)
|
44
|
+
[1m[36m (16.0ms)[0m [1mCREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB[0m
|
45
|
+
[1m[35m (15.5ms)[0m CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
|
46
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM `schema_migrations`[0m
|
47
|
+
[1m[35m (0.3ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20121127192250')
|
48
|
+
[1m[36m (0.2ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20121127192246')[0m
|
49
|
+
[1m[35m (0.2ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20121127192247')
|
50
|
+
[1m[36m (0.2ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20121127192248')[0m
|
51
|
+
[1m[35m (0.2ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20121127192249')
|
52
|
+
[1m[36m (0.2ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20121116195139')[0m
|
53
|
+
[1m[35m (0.2ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20121116195312')
|