cleanerupper 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -15,12 +15,12 @@ application called `dictionary.yml`. This file is structured as so:
15
15
  be
16
16
  cleaned
17
17
 
18
- A default dictionary is included with this project, but only contains some test data for you to get started. These words can be accessed via the `Cleaner::Dictionary` object, which has several dictionaries:
18
+ A default dictionary is included with this project, but only contains some test data for you to get started. These words can be accessed via the `Cleaner::Data` object, which has several attributes:
19
19
 
20
- Cleaner::Dictionary.words => Array of words from the dictionary
21
- Cleaner::Dictionary.replacement_chars => Array of characters to use for the `replace` method
22
- Cleaner::Dictionary.file => Filepath of the used dictionary file
23
- Cleaner::Dictionary.cleaner_methods => List of cleaner methods included in this release
20
+ Cleaner::Data.dictionaries => Hash of dictionary arrays from your file
21
+ Cleaner::Data.replacement_chars => Array of characters to use for the `replace` method
22
+ Cleaner::Data.file => Filepath of the used dictionary file
23
+ Cleaner::Data.cleaner_methods => List of cleaner methods included in this release
24
24
 
25
25
  It works by providing a new method to all of your ActiveRecord based objects called `clean`
26
26
 
@@ -30,10 +30,11 @@ It works by providing a new method to all of your ActiveRecord based objects ca
30
30
 
31
31
  This method takes an array of columns to be cleaned by cleanerupper, followed by two options:
32
32
 
33
- :with => specifies which method to clean with
34
- :callback => specifies a callback to call if disallowed data is found
33
+ :with => Specifies which method to clean with
34
+ :dictionary => Specifies which dictionary should be used for this cleaning
35
+ :callback => Specifies a callback to call if disallowed data is found
35
36
 
36
- Three method have been provided for cleaning convenience, which are:
37
+ Three methods have been provided for cleaning convenience, which are:
37
38
 
38
39
  :scramble => keeps all characters, but scrambles the word
39
40
  :remove => removes the word completely
@@ -44,15 +45,27 @@ If no method is defined, `:scramble` will be used. You can also define your own
44
45
  class Widget < ActiveRecord::Base
45
46
  clean :body, :with => :custom
46
47
 
47
- def custom(found)
48
- Cleaner::Dictionary.words.each do |word|
48
+ def custom(found, dict)
49
+ Cleaner::Data.dictionaries[dict].each do |word|
49
50
  found.gsub!(word, "CUSTOM") if found.include?(word)
50
51
  end
51
52
  return found
52
53
  end
53
54
  end
54
55
 
55
- In the example above, we make use of the word dictionary to check our column for bad words.
56
+ In the example above, we make use of the `word` dictionary to check our column for bad words, as it is the default. You can define a custom dictionary by creating a new top level key in your `dictionary.yml` file, like so:
57
+
58
+ words:
59
+ foo
60
+ bar
61
+ custom:
62
+ baz
63
+
64
+ You can access these dictionaries by using the `Cleaner::Data.dictionaries[:key]` object, where `:key` is the key of your dictionary as defined by your config file. You can specify that any cleaning method use a specific dictionary by adding a `:dictionary` paramater:
65
+
66
+ class Widget < ActiveRecord::Base
67
+ clean :body, :with => :replace, :dictionary => :custom
68
+ end
56
69
 
57
70
  You can also define a callback. This callback will only be called if bad data was found in any of
58
71
  the columns. If the callback returns falls, the save will fail (this works the same way as a `before_save`).
@@ -66,9 +79,7 @@ the columns. If the callback returns falls, the save will fail (this works the
66
79
  end
67
80
  end
68
81
 
69
-
70
- Examples
71
- =======
82
+ # Examples #
72
83
 
73
84
  # Clean different columns with different methods
74
85
  class Widget < ActiveRecord::Base
@@ -101,5 +112,20 @@ Examples
101
112
  end
102
113
  end
103
114
 
115
+ # Custom dictionary
116
+ class Widget < ActiveRecord::Base
117
+ clean :body, :title, :with => :replace, :dictionary => :animals
118
+ end
119
+
120
+ # Disclaimer #
121
+ This code is still under development, and as such, minor revisions may break compatibility with earlier versions of
122
+ the gem/plugin. Please keep this in mind when using CleanerUpper.
123
+
124
+ # What's Next? #
125
+ * Change the custom cleaning code to be more user friendly
126
+ * Optimize dictionary loops
127
+ * Increase test coverage
128
+ * Remove test dependency on the rails environment
129
+
104
130
  # Copyright and Licensing #
105
131
  Copyright (c) 2010 Mike Trpcic (Fluid Media Inc.), released under the MIT license
data/cleanerupper.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cleanerupper}
8
- s.version = "0.1.1"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Mike Trpcic"]
12
- s.date = %q{2010-04-10}
12
+ s.date = %q{2010-04-16}
13
13
  s.email = %q{mike@fluidmedia.com}
14
14
  s.extra_rdoc_files = [
15
15
  "README.markdown"
@@ -17,13 +17,13 @@ Gem::Specification.new do |s|
17
17
  s.files = [
18
18
  "./README.markdown",
19
19
  "./cleanerupper.gemspec",
20
- "./cleanerupper.sqlite3.db",
21
20
  "./dictionary.yml",
22
21
  "./init.rb",
23
22
  "./install.rb",
24
23
  "./lib/cleanerupper.rb",
25
24
  "./pkg/cleanerupper-0.0.0.gem",
26
25
  "./pkg/cleanerupper-0.1.0.gem",
26
+ "./pkg/cleanerupper-0.1.1.gem",
27
27
  "./rails/init.rb",
28
28
  "./tasks/cleanerupper_tasks.rake",
29
29
  "./test/cleanerupper_test.rb",
data/lib/cleanerupper.rb CHANGED
@@ -9,12 +9,12 @@
9
9
 
10
10
  module Cleaner
11
11
  extend self
12
-
13
12
  #The Dictionary class contains all words that are used by the Cleaner. It also contains other
14
13
  #integral components, such as the replacement characters for the `replace` method.
15
- class Dictionary
16
- cattr_accessor :file, :words, :replacement_chars, :cleaner_methods
17
-
14
+ class Data
15
+ cattr_accessor :file, :replacement_chars, :cleaner_methods, :dictionaries
16
+
17
+ @@dictionaries = {}
18
18
  #Use the default dictionary if one wasn't defined by the user
19
19
  if File.exists?(File.join(RAILS_ROOT, '/config/dictionary.yml'))
20
20
  @@file = File.join(RAILS_ROOT, '/config/dictionary.yml')
@@ -23,16 +23,16 @@ module Cleaner
23
23
  else
24
24
  @@file = nil
25
25
  end
26
-
27
26
  @@cleaner_methods = [:scramble, :replace, :remove]
28
27
  @@replacement_chars = ['*', '@', '!', '$', '%', '&']
29
28
  unless(@@file.nil?)
30
- @@words = YAML.load_file(@@file)
29
+ data = YAML.load_file(@@file)
31
30
  else
32
- @@words = {}
33
-
31
+ data = {}
32
+ end
33
+ data.each do |k, v|
34
+ @@dictionaries[k.to_sym] = v.split(" ")
34
35
  end
35
- @@words = @@words["words"].blank? ? [] : @@words["words"].split(" ")
36
36
  end
37
37
 
38
38
  module ActiveRecord
@@ -41,16 +41,16 @@ module Cleaner
41
41
  end
42
42
 
43
43
  #Append the following methods to the ActiveRecord::Base class
44
- def bind(method, column, callback = nil)
44
+ def bind(column, method, dictionary, callback = nil)
45
45
  #debugger
46
46
  old_value = read_attribute(column)
47
47
  to_save = true
48
48
 
49
49
  unless old_value.nil?
50
- if Cleaner::Dictionary.cleaner_methods.include?(method.to_sym)
51
- new_value = Cleaner.send(method.to_sym, old_value.dup)
50
+ if Cleaner::Data.cleaner_methods.include?(method.to_sym)
51
+ new_value = Cleaner.send(method.to_sym, old_value.dup, dictionary)
52
52
  else
53
- new_value = self.send(method, old_value.dup)
53
+ new_value = self.send(method, old_value.dup, dictionary)
54
54
  end
55
55
  unless new_value == old_value
56
56
  to_save = callback.nil? ? true : self.send(callback) == false ? false : true
@@ -66,12 +66,13 @@ module Cleaner
66
66
  #These are methods that can be called in the same manner that
67
67
  #before_save filters are called
68
68
  def clean(*args)
69
- methods = args[-1].is_a?(Hash) ? args[-1] : {}
70
- args = args[0..-1] if methods
71
- with = methods.has_key?(:with) ? methods[:with] : :scramble
72
- callback = methods.has_key?(:callback) ? methods[:callback] : nil
73
- args.each do |attribute|
74
- before_save {|m| m.bind(with, attribute, callback)}
69
+ params = args[-1].is_a?(Hash) ? args[-1] : {}
70
+ attributes = args[0..-1] if params
71
+ with = params.has_key?(:with) ? params[:with] : :scramble
72
+ callback = params.has_key?(:callback) ? params[:callback] : nil
73
+ dictionary = params.has_key?(:dictionary) ? params[:dictionary] : :words
74
+ attributes.each do |attribute|
75
+ before_save {|m| m.bind(attribute, with, dictionary, callback)}
75
76
  end
76
77
  end
77
78
  end
@@ -79,8 +80,8 @@ module Cleaner
79
80
  #Define all your actual manipulation methods here:
80
81
 
81
82
  #This method scrambles data by rearranging the letters.
82
- def scramble(value)
83
- Cleaner::Dictionary.words.each do |word|
83
+ def scramble(value, dict)
84
+ Cleaner::Data.dictionaries[dict].each do |word|
84
85
  value.to_s.gsub!(/#{word}/, word.split(//).shuffle.join(''))
85
86
  end
86
87
  value
@@ -88,8 +89,8 @@ module Cleaner
88
89
 
89
90
  #This method removes selected words from the string and replaces them
90
91
  #with nothing
91
- def remove(value)
92
- Cleaner::Dictionary.words.each do |word|
92
+ def remove(value, dict)
93
+ Cleaner::Data.dictionaries[dict].each do |word|
93
94
  value.to_s.gsub!(/#{word}/, "")
94
95
  end
95
96
  value
@@ -97,9 +98,9 @@ module Cleaner
97
98
 
98
99
  #This method removes selected words from the string and replaces them
99
100
  #with 'swear' characters,such as '#$@!%&'
100
- def replace(value)
101
- Cleaner::Dictionary.words.each do |word|
102
- value.to_s.gsub!(/#{word}/, word.split(//).map{|c| c = Cleaner::Dictionary.replacement_chars.shuffle[0]}.join(''))
101
+ def replace(value, dict)
102
+ Cleaner::Data.dictionaries[dict].each do |word|
103
+ value.to_s.gsub!(/#{word}/, word.split(//).map{|c| c = Cleaner::Data.replacement_chars.shuffle[0]}.join(''))
103
104
  end
104
105
  value
105
106
  end
Binary file
data/rails/init.rb CHANGED
@@ -1,3 +1,3 @@
1
- require 'activerecord'
1
+ require 'active_record'
2
2
  require 'cleanerupper'
3
- ActiveRecord::Base.send(:include, Cleaner::ActiveRecord)
3
+ ActiveRecord::Base.send(:include, Cleaner::ActiveRecord)
@@ -1,31 +1,41 @@
1
1
  require File.join(File.dirname(__FILE__), 'test_helper')
2
2
 
3
- Cleaner::Dictionary.words = ["scramble_test", "remove_test", "replace_test", "custom_test", "default_test"]
3
+ Cleaner::Data.dictionaries = {
4
+ :words => ["scramble_test", "remove_test", "replace_test", "custom_test", "default_test"],
5
+ :animals => ["cat_test", "dog_test", "fish_test"]
6
+ }
7
+
4
8
  class Widget < ActiveRecord::Base
9
+ set_table_name :widgets
5
10
  clean :body
6
11
  end
7
12
 
8
13
  class ReplaceWidget < ActiveRecord::Base
14
+ set_table_name :widgets
9
15
  clean :body, :with => :replace
10
16
  end
11
17
 
12
18
  class RemoveWidget < ActiveRecord::Base
19
+ set_table_name :widgets
13
20
  clean :body, :title, :with => :remove
14
21
  end
15
22
 
16
23
  class ScrambleWidget < ActiveRecord::Base
24
+ set_table_name :widgets
17
25
  clean :title, :with => :scramble
18
26
  end
19
27
 
20
28
  class CustomWidget < ActiveRecord::Base
29
+ set_table_name :widgets
21
30
  clean :body, :title, :with => :custom_function
22
31
 
23
- def custom_function(value)
32
+ def custom_function(value, dict)
24
33
  return "Custom Value: #{value}"
25
34
  end
26
35
  end
27
36
 
28
37
  class CallbackWidget < ActiveRecord::Base
38
+ set_table_name :widgets
29
39
  clean :body, :with => :scramble, :callback => :callback_method
30
40
 
31
41
  def callback_method
@@ -35,6 +45,7 @@ class CallbackWidget < ActiveRecord::Base
35
45
  end
36
46
 
37
47
  class FalseCallbackWidget < ActiveRecord::Base
48
+ set_table_name :widgets
38
49
  clean :body, :with => :scramble, :callback => :callback_method
39
50
 
40
51
  def callback_method
@@ -43,6 +54,11 @@ class FalseCallbackWidget < ActiveRecord::Base
43
54
  end
44
55
  end
45
56
 
57
+ class CustomDictWidget < ActiveRecord::Base
58
+ set_table_name :widgets
59
+ clean :body, :with => :scramble, :dictionary => :animals
60
+ end
61
+
46
62
  class CleanerupperTest < Test::Unit::TestCase
47
63
 
48
64
  def test_automatically_replace
@@ -114,4 +130,13 @@ class CleanerupperTest < Test::Unit::TestCase
114
130
  assert w.title.split(//).sort == title.split(//).sort
115
131
  end
116
132
 
133
+ def test_cleanerupper_custom_dictionary
134
+ body = "dog_test bird_test fish_test"
135
+ w = CustomDictWidget.new(:body => body.dup)
136
+ w.save
137
+ w = CustomDictWidget.find(w.id)
138
+ puts w.body
139
+ assert w.body != body
140
+ assert w.body.include?("bird_test")
141
+ end
117
142
  end
data/test/debug.log CHANGED
@@ -2339,51 +2339,383 @@
2339
2339
  CustomWidget Load (0.3ms) SELECT * FROM "custom_widgets" WHERE ("custom_widgets"."id" = 1) 
2340
2340
  ScrambleWidget Create (0.2ms) INSERT INTO "scramble_widgets" ("title", "body", "author_name") VALUES('cleanerupper eetda_stuftl body', NULL, NULL)
2341
2341
  ScrambleWidget Load (0.2ms) SELECT * FROM "scramble_widgets" WHERE ("scramble_widgets"."id" = 2) 
2342
- SQL (0.4ms) select sqlite_version(*)
2342
+ SQL (1.9ms) select sqlite_version(*)
2343
2343
  SQL (0.2ms)  SELECT name
2344
2344
  FROM sqlite_master
2345
2345
  WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2346
2346
  
2347
- SQL (29.3ms) CREATE TABLE "widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2347
+ SQL (39.1ms) CREATE TABLE "widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2348
2348
  SQL (0.2ms)  SELECT name
2349
2349
  FROM sqlite_master
2350
2350
  WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2351
2351
  
2352
- SQL (3.8ms) CREATE TABLE "replace_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2352
+ SQL (28.4ms) CREATE TABLE "replace_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2353
2353
  SQL (0.2ms)  SELECT name
2354
2354
  FROM sqlite_master
2355
2355
  WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2356
2356
  
2357
- SQL (91.3ms) CREATE TABLE "remove_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2357
+ SQL (40.1ms) CREATE TABLE "remove_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2358
2358
  SQL (0.2ms)  SELECT name
2359
2359
  FROM sqlite_master
2360
2360
  WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2361
2361
  
2362
- SQL (19.9ms) CREATE TABLE "scramble_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2362
+ SQL (3.9ms) CREATE TABLE "scramble_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2363
+ SQL (0.2ms)  SELECT name
2364
+ FROM sqlite_master
2365
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2366
+ 
2367
+ SQL (28.9ms) CREATE TABLE "custom_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2368
+ SQL (0.3ms)  SELECT name
2369
+ FROM sqlite_master
2370
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2371
+ 
2372
+ SQL (21.8ms) CREATE TABLE "callback_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2373
+ SQL (0.5ms)  SELECT name
2374
+ FROM sqlite_master
2375
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2376
+ 
2377
+ SQL (9.9ms) CREATE TABLE "false_callback_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2363
2378
  SQL (0.3ms)  SELECT name
2364
2379
  FROM sqlite_master
2365
2380
  WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2366
2381
  
2367
- SQL (3.8ms) CREATE TABLE "custom_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2382
+ SQL (68.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
2383
+ SQL (32.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
2384
+ SQL (0.3ms)  SELECT name
2385
+ FROM sqlite_master
2386
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2387
+ 
2388
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
2389
+ SQL (50.1ms) INSERT INTO "schema_migrations" (version) VALUES ('1')
2390
+ RemoveWidget Create (0.3ms) INSERT INTO "remove_widgets" ("title", "body", "author_name") VALUES('cleanerupper test', 'cleanerupper test', NULL)
2391
+ RemoveWidget Load (0.4ms) SELECT * FROM "remove_widgets" WHERE ("remove_widgets"."id" = 1) 
2392
+ ScrambleWidget Create (0.3ms) INSERT INTO "scramble_widgets" ("title", "body", "author_name") VALUES('cleanerupper at_mssbrcleet test', NULL, NULL)
2393
+ ScrambleWidget Load (0.3ms) SELECT * FROM "scramble_widgets" WHERE ("scramble_widgets"."id" = 1) 
2394
+ CallbackWidget Create (0.3ms) INSERT INTO "callback_widgets" ("title", "body", "author_name") VALUES('CALLBACK', 'cleanerupper ettscmst_ou body', NULL)
2395
+ CallbackWidget Load (0.3ms) SELECT * FROM "callback_widgets" WHERE ("callback_widgets"."id" = 1) 
2396
+ ScrambleWidget Create (0.3ms) INSERT INTO "scramble_widgets" ("title", "body", "author_name") VALUES('cleanerupper attfdl_esetu body', NULL, NULL)
2397
+ ScrambleWidget Load (0.2ms) SELECT * FROM "scramble_widgets" WHERE ("scramble_widgets"."id" = 2) 
2398
+ SQL (0.4ms) select sqlite_version(*)
2399
+ SQL (0.7ms)  SELECT name
2400
+ FROM sqlite_master
2401
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2402
+ 
2403
+ SQL (32.7ms) DROP TABLE "widgets"
2404
+ SQL (11.1ms) CREATE TABLE "widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2405
+ SQL (0.3ms)  SELECT name
2406
+ FROM sqlite_master
2407
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2408
+ 
2409
+ SQL (2.7ms) DROP TABLE "replace_widgets"
2410
+ SQL (2.7ms) CREATE TABLE "replace_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2368
2411
  SQL (0.2ms)  SELECT name
2369
2412
  FROM sqlite_master
2370
2413
  WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2371
2414
  
2372
- SQL (260.9ms) CREATE TABLE "callback_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2415
+ SQL (135.7ms) DROP TABLE "remove_widgets"
2416
+ SQL (4.6ms) CREATE TABLE "remove_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2417
+ SQL (0.6ms)  SELECT name
2418
+ FROM sqlite_master
2419
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2420
+ 
2421
+ SQL (4.4ms) DROP TABLE "scramble_widgets"
2422
+ SQL (3.7ms) CREATE TABLE "scramble_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2423
+ SQL (0.3ms)  SELECT name
2424
+ FROM sqlite_master
2425
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2426
+ 
2427
+ SQL (11.5ms) DROP TABLE "custom_widgets"
2428
+ SQL (2.9ms) CREATE TABLE "custom_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2429
+ SQL (0.3ms)  SELECT name
2430
+ FROM sqlite_master
2431
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2432
+ 
2433
+ SQL (35.8ms) DROP TABLE "callback_widgets"
2434
+ SQL (16.5ms) CREATE TABLE "callback_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2373
2435
  SQL (0.3ms)  SELECT name
2374
2436
  FROM sqlite_master
2375
2437
  WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2376
2438
  
2377
- SQL (5.2ms) CREATE TABLE "false_callback_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2439
+ SQL (84.9ms) DROP TABLE "false_callback_widgets"
2440
+ SQL (44.1ms) CREATE TABLE "false_callback_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2441
+ SQL (0.3ms)  SELECT name
2442
+ FROM sqlite_master
2443
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2444
+ 
2445
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
2446
+ RemoveWidget Create (0.4ms) INSERT INTO "remove_widgets" ("title", "body", "author_name") VALUES('cleanerupper test', 'cleanerupper test', NULL)
2447
+ RemoveWidget Load (0.3ms) SELECT * FROM "remove_widgets" WHERE ("remove_widgets"."id" = 1) 
2448
+ ScrambleWidget Create (0.2ms) INSERT INTO "scramble_widgets" ("title", "body", "author_name") VALUES('cleanerupper tcleseb_trsam test', NULL, NULL)
2449
+ ScrambleWidget Load (0.3ms) SELECT * FROM "scramble_widgets" WHERE ("scramble_widgets"."id" = 1) 
2450
+ CallbackWidget Create (0.2ms) INSERT INTO "callback_widgets" ("title", "body", "author_name") VALUES('CALLBACK', 'cleanerupper ssu_ttctmoe body', NULL)
2451
+ CallbackWidget Load (0.2ms) SELECT * FROM "callback_widgets" WHERE ("callback_widgets"."id" = 1) 
2452
+ ScrambleWidget Create (0.2ms) INSERT INTO "scramble_widgets" ("title", "body", "author_name") VALUES('cleanerupper teelutdat_fs body', NULL, NULL)
2453
+ ScrambleWidget Load (0.2ms) SELECT * FROM "scramble_widgets" WHERE ("scramble_widgets"."id" = 2) 
2454
+ SQL (0.4ms) select sqlite_version(*)
2455
+ SQL (0.6ms)  SELECT name
2456
+ FROM sqlite_master
2457
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2458
+ 
2459
+ SQL (38.1ms) DROP TABLE "widgets"
2460
+ SQL (3.6ms) CREATE TABLE "widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2461
+ SQL (0.3ms)  SELECT name
2462
+ FROM sqlite_master
2463
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2464
+ 
2465
+ SQL (2.5ms) DROP TABLE "replace_widgets"
2466
+ SQL (2.5ms) CREATE TABLE "replace_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2378
2467
  SQL (0.2ms)  SELECT name
2379
2468
  FROM sqlite_master
2380
2469
  WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2381
2470
  
2382
- SQL (3.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
2383
- SQL (25.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
2471
+ SQL (2.5ms) DROP TABLE "remove_widgets"
2472
+ SQL (43.2ms) CREATE TABLE "remove_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2473
+ SQL (0.3ms)  SELECT name
2474
+ FROM sqlite_master
2475
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2476
+ 
2477
+ SQL (3.3ms) DROP TABLE "scramble_widgets"
2478
+ SQL (34.2ms) CREATE TABLE "scramble_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2479
+ SQL (0.3ms)  SELECT name
2480
+ FROM sqlite_master
2481
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2482
+ 
2483
+ SQL (20.3ms) DROP TABLE "custom_widgets"
2484
+ SQL (45.3ms) CREATE TABLE "custom_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2485
+ SQL (0.3ms)  SELECT name
2486
+ FROM sqlite_master
2487
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2488
+ 
2489
+ SQL (14.0ms) DROP TABLE "callback_widgets"
2490
+ SQL (26.0ms) CREATE TABLE "callback_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2491
+ SQL (0.3ms)  SELECT name
2492
+ FROM sqlite_master
2493
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2494
+ 
2495
+ SQL (2.7ms) DROP TABLE "false_callback_widgets"
2496
+ SQL (2.9ms) CREATE TABLE "false_callback_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2497
+ SQL (0.3ms)  SELECT name
2498
+ FROM sqlite_master
2499
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2500
+ 
2501
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
2502
+ RemoveWidget Create (0.3ms) INSERT INTO "remove_widgets" ("title", "body", "author_name") VALUES('cleanerupper test', 'cleanerupper test', NULL)
2503
+ RemoveWidget Load (0.3ms) SELECT * FROM "remove_widgets" WHERE ("remove_widgets"."id" = 1) 
2504
+ ReplaceWidget Create (0.2ms) INSERT INTO "replace_widgets" ("title", "body", "author_name") VALUES(NULL, 'cleanerupper !*&!!!$@&@$& test', NULL)
2505
+ ReplaceWidget Load (0.3ms) SELECT * FROM "replace_widgets" WHERE ("replace_widgets"."id" = 1) 
2506
+ ScrambleWidget Create (0.2ms) INSERT INTO "scramble_widgets" ("title", "body", "author_name") VALUES('cleanerupper bectsst_leram test', NULL, NULL)
2507
+ ScrambleWidget Load (0.3ms) SELECT * FROM "scramble_widgets" WHERE ("scramble_widgets"."id" = 1) 
2508
+ CallbackWidget Create (0.2ms) INSERT INTO "callback_widgets" ("title", "body", "author_name") VALUES('CALLBACK', 'cleanerupper utsmcet_tso body', NULL)
2509
+ CallbackWidget Load (0.4ms) SELECT * FROM "callback_widgets" WHERE ("callback_widgets"."id" = 1) 
2510
+ ScrambleWidget Create (0.2ms) INSERT INTO "scramble_widgets" ("title", "body", "author_name") VALUES('cleanerupper leea_ufsttdt body', NULL, NULL)
2511
+ ScrambleWidget Load (0.2ms) SELECT * FROM "scramble_widgets" WHERE ("scramble_widgets"."id" = 2) 
2512
+ SQL (0.4ms) select sqlite_version(*)
2513
+ SQL (0.6ms)  SELECT name
2514
+ FROM sqlite_master
2515
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2516
+ 
2517
+ SQL (56.4ms) DROP TABLE "widgets"
2518
+ SQL (22.5ms) CREATE TABLE "widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2519
+ SQL (0.3ms)  SELECT name
2520
+ FROM sqlite_master
2521
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2522
+ 
2523
+ SQL (3.2ms) DROP TABLE "replace_widgets"
2524
+ SQL (3.5ms) CREATE TABLE "replace_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2525
+ SQL (0.2ms)  SELECT name
2526
+ FROM sqlite_master
2527
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2528
+ 
2529
+ SQL (35.9ms) DROP TABLE "remove_widgets"
2530
+ SQL (15.7ms) CREATE TABLE "remove_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2531
+ SQL (0.3ms)  SELECT name
2532
+ FROM sqlite_master
2533
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2534
+ 
2535
+ SQL (2.7ms) DROP TABLE "scramble_widgets"
2536
+ SQL (2.7ms) CREATE TABLE "scramble_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2537
+ SQL (0.3ms)  SELECT name
2538
+ FROM sqlite_master
2539
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2540
+ 
2541
+ SQL (2.3ms) DROP TABLE "custom_widgets"
2542
+ SQL (43.0ms) CREATE TABLE "custom_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2543
+ SQL (0.3ms)  SELECT name
2544
+ FROM sqlite_master
2545
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2546
+ 
2547
+ SQL (2.7ms) DROP TABLE "callback_widgets"
2548
+ SQL (2.4ms) CREATE TABLE "callback_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2549
+ SQL (0.3ms)  SELECT name
2550
+ FROM sqlite_master
2551
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2552
+ 
2553
+ SQL (24.4ms) DROP TABLE "false_callback_widgets"
2554
+ SQL (2.3ms) CREATE TABLE "false_callback_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2555
+ SQL (0.5ms) select sqlite_version(*)
2556
+ SQL (0.6ms)  SELECT name
2557
+ FROM sqlite_master
2558
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2559
+ 
2560
+ SQL (48.9ms) DROP TABLE "widgets"
2561
+ SQL (26.3ms) CREATE TABLE "widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2562
+ SQL (0.4ms)  SELECT name
2563
+ FROM sqlite_master
2564
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2565
+ 
2566
+ SQL (2.6ms) DROP TABLE "replace_widgets"
2567
+ SQL (2.7ms) CREATE TABLE "replace_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2568
+ SQL (0.2ms)  SELECT name
2569
+ FROM sqlite_master
2570
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2571
+ 
2572
+ SQL (2.6ms) DROP TABLE "remove_widgets"
2573
+ SQL (2.8ms) CREATE TABLE "remove_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2574
+ SQL (0.2ms)  SELECT name
2575
+ FROM sqlite_master
2576
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2577
+ 
2578
+ SQL (2.7ms) DROP TABLE "scramble_widgets"
2579
+ SQL (24.6ms) CREATE TABLE "scramble_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2580
+ SQL (0.4ms)  SELECT name
2581
+ FROM sqlite_master
2582
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2583
+ 
2584
+ SQL (2.8ms) DROP TABLE "custom_widgets"
2585
+ SQL (2.8ms) CREATE TABLE "custom_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2586
+ SQL (0.4ms)  SELECT name
2587
+ FROM sqlite_master
2588
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2589
+ 
2590
+ SQL (54.3ms) DROP TABLE "callback_widgets"
2591
+ SQL (26.5ms) CREATE TABLE "callback_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2592
+ SQL (0.3ms)  SELECT name
2593
+ FROM sqlite_master
2594
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2595
+ 
2596
+ SQL (2.7ms) DROP TABLE "false_callback_widgets"
2597
+ SQL (39.4ms) CREATE TABLE "false_callback_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2598
+ SQL (0.3ms)  SELECT name
2599
+ FROM sqlite_master
2600
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2601
+ 
2602
+ SQL (37.4ms) CREATE TABLE "custom_dict_widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2603
+ SQL (0.3ms)  SELECT name
2604
+ FROM sqlite_master
2605
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2606
+ 
2607
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
2608
+ RemoveWidget Create (0.3ms) INSERT INTO "remove_widgets" ("title", "body", "author_name") VALUES('cleanerupper test', 'cleanerupper test', NULL)
2609
+ RemoveWidget Load (0.4ms) SELECT * FROM "remove_widgets" WHERE ("remove_widgets"."id" = 1) 
2610
+ ReplaceWidget Create (0.3ms) INSERT INTO "replace_widgets" ("title", "body", "author_name") VALUES(NULL, 'cleanerupper *&$&!%!%*&*@ test', NULL)
2611
+ ReplaceWidget Load (0.3ms) SELECT * FROM "replace_widgets" WHERE ("replace_widgets"."id" = 1) 
2612
+ ScrambleWidget Create (0.2ms) INSERT INTO "scramble_widgets" ("title", "body", "author_name") VALUES('cleanerupper c_tbselmretas test', NULL, NULL)
2613
+ ScrambleWidget Load (0.3ms) SELECT * FROM "scramble_widgets" WHERE ("scramble_widgets"."id" = 1) 
2614
+ CallbackWidget Create (0.2ms) INSERT INTO "callback_widgets" ("title", "body", "author_name") VALUES('CALLBACK', 'cleanerupper ett_soscumt body', NULL)
2615
+ CallbackWidget Load (0.3ms) SELECT * FROM "callback_widgets" WHERE ("callback_widgets"."id" = 1) 
2616
+ CustomDictWidget Create (0.2ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'dtgseto_ bird_test tft_ihsse', NULL)
2617
+ CustomDictWidget Load (0.3ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 1) 
2618
+ ScrambleWidget Create (0.2ms) INSERT INTO "scramble_widgets" ("title", "body", "author_name") VALUES('cleanerupper _ttuldteasef body', NULL, NULL)
2619
+ ScrambleWidget Load (0.3ms) SELECT * FROM "scramble_widgets" WHERE ("scramble_widgets"."id" = 2) 
2620
+ SQL (0.4ms) select sqlite_version(*)
2621
+ SQL (0.6ms)  SELECT name
2622
+ FROM sqlite_master
2623
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2624
+ 
2625
+ SQL (24.3ms) DROP TABLE "widgets"
2626
+ SQL (3.1ms) CREATE TABLE "widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2627
+ SQL (0.3ms)  SELECT name
2628
+ FROM sqlite_master
2629
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2630
+ 
2631
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
2632
+ RemoveWidget Create (0.3ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper test', 'cleanerupper test', NULL)
2633
+ RemoveWidget Load (0.3ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 1) 
2634
+ ReplaceWidget Create (0.3ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'cleanerupper @!$*@&!&$@!* test', NULL)
2635
+ ReplaceWidget Load (0.2ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 2) 
2636
+ ScrambleWidget Create (0.2ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper etsscemr_ltba test', NULL, NULL)
2637
+ ScrambleWidget Load (0.3ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 3) 
2638
+ CallbackWidget Create (0.2ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES('CALLBACK', 'cleanerupper csume_stott body', NULL)
2639
+ CallbackWidget Load (0.3ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 4) 
2640
+ CustomDictWidget Create (0.3ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'tsog_det bird_test _fitshset', NULL)
2641
+ CustomDictWidget Load (0.3ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 5) 
2642
+ ScrambleWidget Create (0.2ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper usetaefl_dtt body', NULL, NULL)
2643
+ ScrambleWidget Load (0.2ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 6) 
2644
+ SQL (0.4ms) select sqlite_version(*)
2645
+ SQL (0.7ms)  SELECT name
2646
+ FROM sqlite_master
2647
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2648
+ 
2649
+ SQL (22.0ms) DROP TABLE "widgets"
2650
+ SQL (3.4ms) CREATE TABLE "widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2651
+ SQL (0.4ms)  SELECT name
2652
+ FROM sqlite_master
2653
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2654
+ 
2655
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
2656
+ RemoveWidget Create (0.3ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper test', 'cleanerupper test', NULL)
2657
+ RemoveWidget Load (0.3ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 1) 
2658
+ ReplaceWidget Create (0.2ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'cleanerupper @&&!@!$@$@$@ test', NULL)
2659
+ ReplaceWidget Load (0.3ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 2) 
2660
+ ScrambleWidget Create (0.2ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper _atmteslscreb test', NULL, NULL)
2661
+ ScrambleWidget Load (0.2ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 3) 
2662
+ CallbackWidget Create (0.2ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES('CALLBACK', 'cleanerupper osuestmtc_t body', NULL)
2663
+ CallbackWidget Load (0.2ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 4) 
2664
+ CustomDictWidget Create (0.2ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'dtog_set bird_test fitseths_', NULL)
2665
+ CustomDictWidget Load (0.5ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 5) 
2666
+ CustomWidget Create (0.2ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES('Custom Value: cleanerupper remove_test title', 'Custom Value: cleanerupper scramble_test body', NULL)
2667
+ CustomWidget Load (0.3ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 6) 
2668
+ ScrambleWidget Create (0.2ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper edsu_taefltt body', NULL, NULL)
2669
+ ScrambleWidget Load (0.3ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 7) 
2670
+ SQL (0.5ms) select sqlite_version(*)
2671
+ SQL (0.9ms)  SELECT name
2672
+ FROM sqlite_master
2673
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2674
+ 
2675
+ SQL (24.3ms) DROP TABLE "widgets"
2676
+ SQL (2.7ms) CREATE TABLE "widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2677
+ SQL (0.3ms)  SELECT name
2678
+ FROM sqlite_master
2679
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2680
+ 
2681
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
2682
+ RemoveWidget Create (0.3ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper test', 'cleanerupper test', NULL)
2683
+ RemoveWidget Load (0.3ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 1) 
2684
+ ReplaceWidget Create (0.2ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'cleanerupper %$*$!!!%$@!& test', NULL)
2685
+ ReplaceWidget Load (0.2ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 2) 
2686
+ ScrambleWidget Create (0.2ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper _seamtrseclbt test', NULL, NULL)
2687
+ ScrambleWidget Load (0.3ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 3) 
2688
+ CallbackWidget Create (0.2ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES('CALLBACK', 'cleanerupper tstumtse_co body', NULL)
2689
+ CallbackWidget Load (0.3ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 4) 
2690
+ CustomDictWidget Create (0.2ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'd_etstgo bird_test ihtesfs_t', NULL)
2691
+ CustomDictWidget Load (0.3ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 5) 
2692
+ CustomWidget Create (0.2ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES('Custom Value: cleanerupper remove_test title', 'Custom Value: cleanerupper scramble_test body', NULL)
2693
+ CustomWidget Load (28.6ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 6) 
2694
+ ScrambleWidget Create (0.5ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper edusafttet_l body', NULL, NULL)
2695
+ ScrambleWidget Load (0.5ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 7) 
2696
+ SQL (0.4ms) select sqlite_version(*)
2697
+ SQL (0.6ms)  SELECT name
2698
+ FROM sqlite_master
2699
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2700
+ 
2701
+ SQL (19.9ms) DROP TABLE "widgets"
2702
+ SQL (3.5ms) CREATE TABLE "widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) 
2384
2703
  SQL (0.3ms)  SELECT name
2385
2704
  FROM sqlite_master
2386
2705
  WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2387
2706
  
2388
2707
  SQL (0.1ms) SELECT version FROM "schema_migrations"
2389
- SQL (3.5ms) INSERT INTO "schema_migrations" (version) VALUES ('1')
2708
+ RemoveWidget Create (0.3ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper test', 'cleanerupper test', NULL)
2709
+ RemoveWidget Load (0.3ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 1) 
2710
+ ReplaceWidget Create (0.2ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'cleanerupper !%*@*%*%&@$@ test', NULL)
2711
+ ReplaceWidget Load (0.3ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 2) 
2712
+ ScrambleWidget Create (0.3ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper _cbemtartless test', NULL, NULL)
2713
+ ScrambleWidget Load (0.3ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 3) 
2714
+ CallbackWidget Create (0.2ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES('CALLBACK', 'cleanerupper mcsu_ottest body', NULL)
2715
+ CallbackWidget Load (0.3ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 4) 
2716
+ CustomDictWidget Create (0.3ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'stetg_od bird_test hssttfei_', NULL)
2717
+ CustomDictWidget Load (0.2ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 5) 
2718
+ CustomWidget Create (0.3ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES('Custom Value: cleanerupper remove_test title', 'Custom Value: cleanerupper scramble_test body', NULL)
2719
+ CustomWidget Load (0.5ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 6) 
2720
+ ScrambleWidget Create (0.2ms) INSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper tteusletfd_a body', NULL, NULL)
2721
+ ScrambleWidget Load (0.2ms) SELECT * FROM "widgets" WHERE ("widgets"."id" = 7) 
data/test/schema.rb CHANGED
@@ -5,39 +5,45 @@ ActiveRecord::Schema.define(:version => 1) do
5
5
  t.column :author_name, :string, :limit => 100
6
6
  end
7
7
 
8
- create_table :replace_widgets, :force => true do |t|
9
- t.column :title, :string, :limit => 100
10
- t.column :body, :string
11
- t.column :author_name, :string, :limit => 100
12
- end
13
-
14
- create_table :remove_widgets, :force => true do |t|
15
- t.column :title, :string, :limit => 100
16
- t.column :body, :string
17
- t.column :author_name, :string, :limit => 100
18
- end
19
-
20
- create_table :scramble_widgets, :force => true do |t|
21
- t.column :title, :string, :limit => 100
22
- t.column :body, :string
23
- t.column :author_name, :string, :limit => 100
24
- end
25
-
26
- create_table :custom_widgets, :force => true do |t|
27
- t.column :title, :string, :limit => 100
28
- t.column :body, :string
29
- t.column :author_name, :string, :limit => 100
30
- end
31
-
32
- create_table :callback_widgets, :force => true do |t|
33
- t.column :title, :string, :limit => 100
34
- t.column :body, :string
35
- t.column :author_name, :string, :limit => 100
36
- end
37
-
38
- create_table :false_callback_widgets, :force => true do |t|
39
- t.column :title, :string, :limit => 100
40
- t.column :body, :string
41
- t.column :author_name, :string, :limit => 100
42
- end
43
- end
8
+ # create_table :replace_widgets, :force => true do |t|
9
+ # t.column :title, :string, :limit => 100
10
+ # t.column :body, :string
11
+ # t.column :author_name, :string, :limit => 100
12
+ # end
13
+ #
14
+ # create_table :remove_widgets, :force => true do |t|
15
+ # t.column :title, :string, :limit => 100
16
+ # t.column :body, :string
17
+ # t.column :author_name, :string, :limit => 100
18
+ # end
19
+ #
20
+ # create_table :scramble_widgets, :force => true do |t|
21
+ # t.column :title, :string, :limit => 100
22
+ # t.column :body, :string
23
+ # t.column :author_name, :string, :limit => 100
24
+ # end
25
+ #
26
+ # create_table :custom_widgets, :force => true do |t|
27
+ # t.column :title, :string, :limit => 100
28
+ # t.column :body, :string
29
+ # t.column :author_name, :string, :limit => 100
30
+ # end
31
+ #
32
+ # create_table :callback_widgets, :force => true do |t|
33
+ # t.column :title, :string, :limit => 100
34
+ # t.column :body, :string
35
+ # t.column :author_name, :string, :limit => 100
36
+ # end
37
+ #
38
+ # create_table :false_callback_widgets, :force => true do |t|
39
+ # t.column :title, :string, :limit => 100
40
+ # t.column :body, :string
41
+ # t.column :author_name, :string, :limit => 100
42
+ # end
43
+ #
44
+ # create_table :custom_dict_widgets, :force => true do |t|
45
+ # t.column :title, :string, :limit => 100
46
+ # t.column :body, :string
47
+ # t.column :author_name, :string, :limit => 100
48
+ # end
49
+ end
data/test/test_helper.rb CHANGED
@@ -3,7 +3,7 @@ require 'active_support'
3
3
  require 'active_support/test_case'
4
4
 
5
5
  if ENV['RAILS'].nil?
6
- require File.expand_path(File.join(File.dirname(__FILE__), '../../../../config/environment.rb'))
6
+ require File.expand_path(File.join(File.dirname(__FILE__), '../../../../config/environment.rb'))
7
7
  else
8
8
  # specific rails version targeted
9
9
  # load activerecord and plugin manually
@@ -27,4 +27,4 @@ load(File.dirname(__FILE__) + "/schema.rb")
27
27
  require File.expand_path(File.dirname(__FILE__) + "/../lib/cleanerupper.rb")
28
28
  ENV["RAILS_ENV"] = "test"
29
29
  require File.expand_path(File.dirname(__FILE__) + "/../../../../config/environment")
30
- require 'test_help'
30
+ require 'test_help'
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 1
8
- - 1
9
- version: 0.1.1
7
+ - 2
8
+ - 0
9
+ version: 0.2.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mike Trpcic
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-10 00:00:00 -04:00
17
+ date: 2010-04-16 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies: []
20
20
 
@@ -29,13 +29,13 @@ extra_rdoc_files:
29
29
  files:
30
30
  - ./README.markdown
31
31
  - ./cleanerupper.gemspec
32
- - ./cleanerupper.sqlite3.db
33
32
  - ./dictionary.yml
34
33
  - ./init.rb
35
34
  - ./install.rb
36
35
  - ./lib/cleanerupper.rb
37
36
  - ./pkg/cleanerupper-0.0.0.gem
38
37
  - ./pkg/cleanerupper-0.1.0.gem
38
+ - ./pkg/cleanerupper-0.1.1.gem
39
39
  - ./rails/init.rb
40
40
  - ./tasks/cleanerupper_tasks.rake
41
41
  - ./test/cleanerupper_test.rb
Binary file