cleanerupper 0.3.0 → 0.4.0
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.
- data/README.markdown +10 -3
- data/cleanerupper.gemspec +3 -2
- data/lib/cleanerupper.rb +22 -17
- data/pkg/cleanerupper-0.3.0.gem +0 -0
- data/test/cleanerupper_test.rb +18 -0
- data/test/debug.log +160 -0
- metadata +4 -3
data/README.markdown
CHANGED
@@ -28,11 +28,12 @@ It works by providing a new method to all of your ActiveRecord based objects ca
|
|
28
28
|
clean :body, :method => :scramble
|
29
29
|
end
|
30
30
|
|
31
|
-
This method takes an array of columns to be cleaned by cleanerupper, followed by
|
31
|
+
This method takes an array of columns to be cleaned by cleanerupper, followed by four optional parameters:
|
32
32
|
|
33
33
|
:method => Specifies which method to clean with
|
34
34
|
:dictionary => Specifies which dictionaries should be used for this cleaning
|
35
35
|
:callback => Specifies a callback to call if disallowed data is found
|
36
|
+
:match_case => Specifies whether the cleaner should be case sensitive
|
36
37
|
|
37
38
|
Three methods have been provided for cleaning convenience, which are:
|
38
39
|
|
@@ -45,7 +46,7 @@ If no method is defined, `:scramble` will be used. You can also define your own
|
|
45
46
|
class Widget < ActiveRecord::Base
|
46
47
|
clean :body, :method => :remove_vowels
|
47
48
|
|
48
|
-
def
|
49
|
+
def remove_vowels(val)
|
49
50
|
return val.gsub(/(a|e|i|o|u)/, "*")
|
50
51
|
end
|
51
52
|
end
|
@@ -92,6 +93,12 @@ the columns. If the callback returns false, the save will fail (this works the
|
|
92
93
|
end
|
93
94
|
end
|
94
95
|
|
96
|
+
By default, the cleaner is case insensitive. This means that if you have the word `foo` in your dictionary, it will match any of: `foo`, `Foo`, `fOo`, `foO`, `FOo`, `FoO`, `fOO`, `FOO`. To force a clean to match the case specifically, you simply specify `:match_case => true`, like so:
|
97
|
+
|
98
|
+
class Widget < ActiveRecord::Base
|
99
|
+
clean :body, :match_case => true
|
100
|
+
end
|
101
|
+
|
95
102
|
# Examples #
|
96
103
|
|
97
104
|
# Clean different columns with different methods
|
@@ -138,7 +145,7 @@ the columns. If the callback returns false, the save will fail (this works the
|
|
138
145
|
|
139
146
|
#Everything in one
|
140
147
|
class Widget
|
141
|
-
clean :body, :method => :remove_vowels, :dictionary => [:words, :user_names], :callback => :bad_word_found
|
148
|
+
clean :body, :method => :remove_vowels, :dictionary => [:words, :user_names], :callback => :bad_word_found, :match_case => true
|
142
149
|
|
143
150
|
def remove_vowels(val)
|
144
151
|
val.gsub(/(a|e|i|o|u)/, "*")
|
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.
|
8
|
+
s.version = "0.4.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-
|
12
|
+
s.date = %q{2010-05-07}
|
13
13
|
s.email = %q{mike@fluidmedia.com}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"README.markdown"
|
@@ -27,6 +27,7 @@ Gem::Specification.new do |s|
|
|
27
27
|
"./pkg/cleanerupper-0.2.0.gem",
|
28
28
|
"./pkg/cleanerupper-0.2.1.gem",
|
29
29
|
"./pkg/cleanerupper-0.2.2.gem",
|
30
|
+
"./pkg/cleanerupper-0.3.0.gem",
|
30
31
|
"./rails/init.rb",
|
31
32
|
"./tasks/cleanerupper_tasks.rake",
|
32
33
|
"./test/cleanerupper_test.rb",
|
data/lib/cleanerupper.rb
CHANGED
@@ -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(column, method, dictionary, callback = nil)
|
44
|
+
def bind(column, method, dictionary, callback = nil, match_case)
|
45
45
|
dictionary = [dictionary].flatten.map{|dict| Cleaner::Data.dictionaries.has_key?(dict) ? Cleaner::Data.dictionaries[dict] : self.send(dict)}.flatten.uniq
|
46
46
|
old_value = read_attribute(column)
|
47
47
|
to_save = true
|
48
48
|
method = method.to_sym
|
49
49
|
unless old_value.nil?
|
50
50
|
if Cleaner::Data.cleaner_methods.include?(method)
|
51
|
-
new_value = Cleaner.send(method, old_value.dup, dictionary)
|
51
|
+
new_value = Cleaner.send(method, old_value.dup, dictionary, match_case)
|
52
52
|
else
|
53
|
-
new_value = Cleaner.send(:custom_clean, old_value.dup, dictionary, self.method(method))
|
53
|
+
new_value = Cleaner.send(:custom_clean, old_value.dup, dictionary, match_case, self.method(method))
|
54
54
|
end
|
55
55
|
unless new_value == old_value
|
56
56
|
to_save = callback.nil? ? true : self.send(callback) == false ? false : true
|
@@ -67,13 +67,14 @@ module Cleaner
|
|
67
67
|
#before_save filters are called
|
68
68
|
def clean(*args)
|
69
69
|
last_argument = args[-1]
|
70
|
-
params
|
71
|
-
attributes
|
72
|
-
with
|
73
|
-
callback
|
74
|
-
dictionary
|
70
|
+
params = last_argument.is_a?(Hash) ? last_argument : {}
|
71
|
+
attributes = args[0..-1] if params
|
72
|
+
with = params.has_key?(:method) ? params[:method] : :scramble
|
73
|
+
callback = params.has_key?(:callback) ? params[:callback] : nil
|
74
|
+
dictionary = params.has_key?(:dictionary) ? params[:dictionary] : :words
|
75
|
+
match_case = params.has_key?(:match_case) ? params[:match_case] : false
|
75
76
|
attributes.each do |attribute|
|
76
|
-
before_save {|model| model.bind(attribute, with, dictionary, callback)}
|
77
|
+
before_save {|model| model.bind(attribute, with, dictionary, callback, match_case)}
|
77
78
|
end
|
78
79
|
end
|
79
80
|
end
|
@@ -81,35 +82,39 @@ module Cleaner
|
|
81
82
|
#Define all your actual manipulation methods here:
|
82
83
|
|
83
84
|
#This is a wrapper method for custom cleaning methods defined by a user
|
84
|
-
def self.custom_clean(value, dict, func)
|
85
|
+
def self.custom_clean(value, dict, match, func)
|
85
86
|
dict.each do |word|
|
86
|
-
|
87
|
+
rxp = match ? /#{word}/ : /#{word}/i
|
88
|
+
value.to_s.gsub!(rxp, func.call(word))
|
87
89
|
end
|
88
90
|
value
|
89
91
|
end
|
90
92
|
|
91
93
|
#This method scrambles data by rearranging the letters.
|
92
|
-
def self.scramble(value, dict)
|
94
|
+
def self.scramble(value, dict, match)
|
93
95
|
dict.each do |word|
|
94
|
-
|
96
|
+
rxp = match ? /#{word}/ : /#{word}/i
|
97
|
+
value.to_s.gsub!(rxp, word.split(//).shuffle.join(''))
|
95
98
|
end
|
96
99
|
value
|
97
100
|
end
|
98
101
|
|
99
102
|
#This method removes selected words from the string and replaces them
|
100
103
|
#with nothing
|
101
|
-
def self.remove(value, dict)
|
104
|
+
def self.remove(value, dict, match)
|
102
105
|
dict.each do |word|
|
103
|
-
|
106
|
+
rxp = match ? /#{word}/ : /#{word}/i
|
107
|
+
value.to_s.gsub!(rxp, "")
|
104
108
|
end
|
105
109
|
value
|
106
110
|
end
|
107
111
|
|
108
112
|
#This method removes selected words from the string and replaces them
|
109
113
|
#with 'swear' characters,such as '#$@!%&'
|
110
|
-
def self.replace(value, dict)
|
114
|
+
def self.replace(value, dict, match)
|
111
115
|
dict.each do |word|
|
112
|
-
|
116
|
+
rxp = match ? /#{word}/ : /#{word}/i
|
117
|
+
value.to_s.gsub!(rxp, word.split(//).map{|char| char = Cleaner::Data.replacement_chars.shuffle[0]}.join(''))
|
113
118
|
end
|
114
119
|
value
|
115
120
|
end
|
Binary file
|
data/test/cleanerupper_test.rb
CHANGED
@@ -80,6 +80,12 @@ class ModelDictWidget < ActiveRecord::Base
|
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
83
|
+
class CaseTestDict < ActiveRecord::Base
|
84
|
+
set_table_name :widgets
|
85
|
+
clean :body, :method => :scramble, :match_case => false
|
86
|
+
clean :title, :method => :scramble, :match_case => true
|
87
|
+
end
|
88
|
+
|
83
89
|
class CleanerupperTest < Test::Unit::TestCase
|
84
90
|
|
85
91
|
def test_automatically_replace
|
@@ -180,4 +186,16 @@ class CleanerupperTest < Test::Unit::TestCase
|
|
180
186
|
assert w.body != body
|
181
187
|
assert !w.body.include?("model_test")
|
182
188
|
end
|
189
|
+
|
190
|
+
def test_case_matching
|
191
|
+
body = "this is a Scramble_test test"
|
192
|
+
title = "this is a Scramble_test test"
|
193
|
+
w = CaseTestDict.new(:body => body.dup, :title => title.dup)
|
194
|
+
w.save
|
195
|
+
w = CaseTestDict.find(w.id)
|
196
|
+
assert w.body != body
|
197
|
+
assert !w.body.include?("Scramble_test")
|
198
|
+
assert w.title == title
|
199
|
+
assert w.title.include?("Scramble_test")
|
200
|
+
end
|
183
201
|
end
|
data/test/debug.log
CHANGED
@@ -3724,3 +3724,163 @@
|
|
3724
3724
|
[4;36;1mModelDictWidget Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 8) [0m
|
3725
3725
|
[4;35;1mMultiDictWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'stetod_g regular_test teset_db', NULL)[0m
|
3726
3726
|
[4;36;1mMultiDictWidget Load (0.2ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 9) [0m
|
3727
|
+
[4;36;1mSQL (4.4ms)[0m [0;1mselect sqlite_version(*)[0m
|
3728
|
+
[4;35;1mSQL (0.9ms)[0m [0m SELECT name
|
3729
|
+
FROM sqlite_master
|
3730
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
3731
|
+
[0m
|
3732
|
+
[4;36;1mSQL (25.4ms)[0m [0;1mDROP TABLE "widgets"[0m
|
3733
|
+
[4;35;1mSQL (3.0ms)[0m [0mCREATE TABLE "widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) [0m
|
3734
|
+
[4;36;1mSQL (0.3ms)[0m [0;1m SELECT name
|
3735
|
+
FROM sqlite_master
|
3736
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
3737
|
+
[0m
|
3738
|
+
[4;35;1mSQL (2.6ms)[0m [0mDROP TABLE "words"[0m
|
3739
|
+
[4;36;1mSQL (2.6ms)[0m [0;1mCREATE TABLE "words" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "word" varchar(100)) [0m
|
3740
|
+
[4;35;1mSQL (0.3ms)[0m [0m SELECT name
|
3741
|
+
FROM sqlite_master
|
3742
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
3743
|
+
[0m
|
3744
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mSELECT version FROM "schema_migrations"[0m
|
3745
|
+
[4;35;1mWord Create (0.2ms)[0m [0mINSERT INTO "words" ("word") VALUES('model_test')[0m
|
3746
|
+
[4;36;1mWord Create (0.2ms)[0m [0;1mINSERT INTO "words" ("word") VALUES('database_test')[0m
|
3747
|
+
[4;35;1mRemoveWidget Create (0.4ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper test', 'cleanerupper test', NULL)[0m
|
3748
|
+
[4;36;1mRemoveWidget Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 1) [0m
|
3749
|
+
[4;35;1mReplaceWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'cleanerupper !$!!&%&$@!%! test', NULL)[0m
|
3750
|
+
[4;36;1mReplaceWidget Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 2) [0m
|
3751
|
+
[4;35;1mScrambleWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper meetbsclatr_s test', NULL, NULL)[0m
|
3752
|
+
[4;36;1mScrambleWidget Load (0.2ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 3) [0m
|
3753
|
+
[4;35;1mCallbackWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('CALLBACK', 'cleanerupper mtt_ctsseou body', NULL)[0m
|
3754
|
+
[4;36;1mCallbackWidget Load (0.2ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 4) [0m
|
3755
|
+
[4;35;1mCustomDictWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'ets_tgdo bird_test i_hseftst', NULL)[0m
|
3756
|
+
[4;36;1mCustomDictWidget Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 5) [0m
|
3757
|
+
[4;35;1mCustomWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper r*m*v*_t*st title', 'cleanerupper scr*mbl*_t*st body', NULL)[0m
|
3758
|
+
[4;36;1mCustomWidget Load (0.2ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 6) [0m
|
3759
|
+
[4;35;1mScrambleWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper elu_ttstdafe body', NULL, NULL)[0m
|
3760
|
+
[4;36;1mScrambleWidget Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 7) [0m
|
3761
|
+
[4;35;1mWord Load (0.2ms)[0m [0mSELECT * FROM "words" [0m
|
3762
|
+
[4;36;1mWord Load (0.2ms)[0m [0;1mSELECT * FROM "words" [0m
|
3763
|
+
[4;35;1mModelDictWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'this is a slm_ttedoe test', NULL)[0m
|
3764
|
+
[4;36;1mModelDictWidget Load (0.2ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 8) [0m
|
3765
|
+
[4;35;1mMultiDictWidget Create (0.4ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'stte_ogd regular_test stdteeb_', NULL)[0m
|
3766
|
+
[4;36;1mMultiDictWidget Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 9) [0m
|
3767
|
+
[4;36;1mSQL (0.8ms)[0m [0;1mselect sqlite_version(*)[0m
|
3768
|
+
[4;35;1mSQL (0.9ms)[0m [0m SELECT name
|
3769
|
+
FROM sqlite_master
|
3770
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
3771
|
+
[0m
|
3772
|
+
[4;36;1mSQL (34.4ms)[0m [0;1mDROP TABLE "widgets"[0m
|
3773
|
+
[4;35;1mSQL (11.7ms)[0m [0mCREATE TABLE "widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) [0m
|
3774
|
+
[4;36;1mSQL (0.3ms)[0m [0;1m SELECT name
|
3775
|
+
FROM sqlite_master
|
3776
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
3777
|
+
[0m
|
3778
|
+
[4;35;1mSQL (3.1ms)[0m [0mDROP TABLE "words"[0m
|
3779
|
+
[4;36;1mSQL (2.6ms)[0m [0;1mCREATE TABLE "words" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "word" varchar(100)) [0m
|
3780
|
+
[4;35;1mSQL (0.3ms)[0m [0m SELECT name
|
3781
|
+
FROM sqlite_master
|
3782
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
3783
|
+
[0m
|
3784
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mSELECT version FROM "schema_migrations"[0m
|
3785
|
+
[4;35;1mWord Create (0.3ms)[0m [0mINSERT INTO "words" ("word") VALUES('model_test')[0m
|
3786
|
+
[4;36;1mWord Create (0.2ms)[0m [0;1mINSERT INTO "words" ("word") VALUES('database_test')[0m
|
3787
|
+
[4;35;1mScrambleWidget Create (0.3ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper c_retssmaletb test', NULL, NULL)[0m
|
3788
|
+
[4;36;1mScrambleWidget Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 1) [0m
|
3789
|
+
[4;35;1mCaseTestDict Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('this is a Scramble_test test', 'this is a sctr_tesaemlb test', NULL)[0m
|
3790
|
+
[4;36;1mCaseTestDict Load (0.2ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 2) [0m
|
3791
|
+
[4;35;1mCallbackWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('CALLBACK', 'cleanerupper ttssu_cemto body', NULL)[0m
|
3792
|
+
[4;36;1mCallbackWidget Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 3) [0m
|
3793
|
+
[4;35;1mCustomDictWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'tde_gsot bird_test stf_etish', NULL)[0m
|
3794
|
+
[4;36;1mCustomDictWidget Load (0.4ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 4) [0m
|
3795
|
+
[4;35;1mScrambleWidget Create (0.3ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper atetdluftes_ body', NULL, NULL)[0m
|
3796
|
+
[4;36;1mScrambleWidget Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 5) [0m
|
3797
|
+
[4;35;1mWord Load (0.3ms)[0m [0mSELECT * FROM "words" [0m
|
3798
|
+
[4;36;1mWord Load (0.2ms)[0m [0;1mSELECT * FROM "words" [0m
|
3799
|
+
[4;35;1mModelDictWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'this is a _omttsdeel test', NULL)[0m
|
3800
|
+
[4;36;1mModelDictWidget Load (0.2ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 6) [0m
|
3801
|
+
[4;35;1mMultiDictWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'sdgeo_tt regular_test teestdb_', NULL)[0m
|
3802
|
+
[4;36;1mMultiDictWidget Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 7) [0m
|
3803
|
+
[4;36;1mSQL (0.4ms)[0m [0;1mselect sqlite_version(*)[0m
|
3804
|
+
[4;35;1mSQL (0.7ms)[0m [0m SELECT name
|
3805
|
+
FROM sqlite_master
|
3806
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
3807
|
+
[0m
|
3808
|
+
[4;36;1mSQL (30.9ms)[0m [0;1mDROP TABLE "widgets"[0m
|
3809
|
+
[4;35;1mSQL (3.3ms)[0m [0mCREATE TABLE "widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) [0m
|
3810
|
+
[4;36;1mSQL (0.3ms)[0m [0;1m SELECT name
|
3811
|
+
FROM sqlite_master
|
3812
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
3813
|
+
[0m
|
3814
|
+
[4;35;1mSQL (2.8ms)[0m [0mDROP TABLE "words"[0m
|
3815
|
+
[4;36;1mSQL (9.4ms)[0m [0;1mCREATE TABLE "words" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "word" varchar(100)) [0m
|
3816
|
+
[4;35;1mSQL (0.3ms)[0m [0m SELECT name
|
3817
|
+
FROM sqlite_master
|
3818
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
3819
|
+
[0m
|
3820
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mSELECT version FROM "schema_migrations"[0m
|
3821
|
+
[4;35;1mWord Create (0.2ms)[0m [0mINSERT INTO "words" ("word") VALUES('model_test')[0m
|
3822
|
+
[4;36;1mWord Create (0.2ms)[0m [0;1mINSERT INTO "words" ("word") VALUES('database_test')[0m
|
3823
|
+
[4;35;1mRemoveWidget Create (0.3ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper test', 'cleanerupper test', NULL)[0m
|
3824
|
+
[4;36;1mRemoveWidget Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 1) [0m
|
3825
|
+
[4;35;1mReplaceWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'cleanerupper &&$@%!@%$@&& test', NULL)[0m
|
3826
|
+
[4;36;1mReplaceWidget Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 2) [0m
|
3827
|
+
[4;35;1mScrambleWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper mcrt_albetsse test', NULL, NULL)[0m
|
3828
|
+
[4;36;1mScrambleWidget Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 3) [0m
|
3829
|
+
[4;35;1mCaseTestDict Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('this is a Scramble_test test', 'this is a mcere_bstlats test', NULL)[0m
|
3830
|
+
[4;36;1mCaseTestDict Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 4) [0m
|
3831
|
+
[4;35;1mCallbackWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('CALLBACK', 'cleanerupper tcss_umotet body', NULL)[0m
|
3832
|
+
[4;36;1mCallbackWidget Load (0.2ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 5) [0m
|
3833
|
+
[4;35;1mCustomDictWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'te_tsgdo bird_test hetsftis_', NULL)[0m
|
3834
|
+
[4;36;1mCustomDictWidget Load (0.2ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 6) [0m
|
3835
|
+
[4;35;1mCustomWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper r*m*v*_t*st title', 'cleanerupper scr*mbl*_t*st body', NULL)[0m
|
3836
|
+
[4;36;1mCustomWidget Load (0.2ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 7) [0m
|
3837
|
+
[4;35;1mScrambleWidget Create (0.1ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper el_ttfetdsau body', NULL, NULL)[0m
|
3838
|
+
[4;36;1mScrambleWidget Load (0.2ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 8) [0m
|
3839
|
+
[4;35;1mWord Load (0.5ms)[0m [0mSELECT * FROM "words" [0m
|
3840
|
+
[4;36;1mWord Load (0.2ms)[0m [0;1mSELECT * FROM "words" [0m
|
3841
|
+
[4;35;1mModelDictWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'this is a dsmeto_elt test', NULL)[0m
|
3842
|
+
[4;36;1mModelDictWidget Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 9) [0m
|
3843
|
+
[4;35;1mMultiDictWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, '_estgtdo regular_test _stdtbee', NULL)[0m
|
3844
|
+
[4;36;1mMultiDictWidget Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 10) [0m
|
3845
|
+
[4;36;1mSQL (0.7ms)[0m [0;1mselect sqlite_version(*)[0m
|
3846
|
+
[4;35;1mSQL (0.8ms)[0m [0m SELECT name
|
3847
|
+
FROM sqlite_master
|
3848
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
3849
|
+
[0m
|
3850
|
+
[4;36;1mSQL (21.0ms)[0m [0;1mDROP TABLE "widgets"[0m
|
3851
|
+
[4;35;1mSQL (10.0ms)[0m [0mCREATE TABLE "widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(100), "body" varchar(255), "author_name" varchar(100)) [0m
|
3852
|
+
[4;36;1mSQL (0.4ms)[0m [0;1m SELECT name
|
3853
|
+
FROM sqlite_master
|
3854
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
3855
|
+
[0m
|
3856
|
+
[4;35;1mSQL (2.8ms)[0m [0mDROP TABLE "words"[0m
|
3857
|
+
[4;36;1mSQL (2.8ms)[0m [0;1mCREATE TABLE "words" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "word" varchar(100)) [0m
|
3858
|
+
[4;35;1mSQL (0.3ms)[0m [0m SELECT name
|
3859
|
+
FROM sqlite_master
|
3860
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
3861
|
+
[0m
|
3862
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mSELECT version FROM "schema_migrations"[0m
|
3863
|
+
[4;35;1mWord Create (0.3ms)[0m [0mINSERT INTO "words" ("word") VALUES('model_test')[0m
|
3864
|
+
[4;36;1mWord Create (0.2ms)[0m [0;1mINSERT INTO "words" ("word") VALUES('database_test')[0m
|
3865
|
+
[4;35;1mRemoveWidget Create (0.3ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper test', 'cleanerupper test', NULL)[0m
|
3866
|
+
[4;36;1mRemoveWidget Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 1) [0m
|
3867
|
+
[4;35;1mReplaceWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'cleanerupper &*&@%$&&*&!& test', NULL)[0m
|
3868
|
+
[4;36;1mReplaceWidget Load (0.2ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 2) [0m
|
3869
|
+
[4;35;1mScrambleWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper te_lmcbtsesar test', NULL, NULL)[0m
|
3870
|
+
[4;36;1mScrambleWidget Load (0.2ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 3) [0m
|
3871
|
+
[4;35;1mCaseTestDict Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('this is a Scramble_test test', 'this is a tebslemrcs_ta test', NULL)[0m
|
3872
|
+
[4;36;1mCaseTestDict Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 4) [0m
|
3873
|
+
[4;35;1mCallbackWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('CALLBACK', 'cleanerupper teoumcstst_ body', NULL)[0m
|
3874
|
+
[4;36;1mCallbackWidget Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 5) [0m
|
3875
|
+
[4;35;1mCustomDictWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'dseogt_t bird_test sisteht_f', NULL)[0m
|
3876
|
+
[4;36;1mCustomDictWidget Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 6) [0m
|
3877
|
+
[4;35;1mCustomWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper r*m*v*_t*st title', 'cleanerupper scr*mbl*_t*st body', NULL)[0m
|
3878
|
+
[4;36;1mCustomWidget Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 7) [0m
|
3879
|
+
[4;35;1mScrambleWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES('cleanerupper ttaulefdse_t body', NULL, NULL)[0m
|
3880
|
+
[4;36;1mScrambleWidget Load (0.5ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 8) [0m
|
3881
|
+
[4;35;1mWord Load (0.3ms)[0m [0mSELECT * FROM "words" [0m
|
3882
|
+
[4;36;1mWord Load (0.2ms)[0m [0;1mSELECT * FROM "words" [0m
|
3883
|
+
[4;35;1mModelDictWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'this is a edlo_mtest test', NULL)[0m
|
3884
|
+
[4;36;1mModelDictWidget Load (0.2ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 9) [0m
|
3885
|
+
[4;35;1mMultiDictWidget Create (0.2ms)[0m [0mINSERT INTO "widgets" ("title", "body", "author_name") VALUES(NULL, 'tetogds_ regular_test tteedb_s', NULL)[0m
|
3886
|
+
[4;36;1mMultiDictWidget Load (0.3ms)[0m [0;1mSELECT * FROM "widgets" WHERE ("widgets"."id" = 10) [0m
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 4
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.4.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-
|
17
|
+
date: 2010-05-07 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|
@@ -39,6 +39,7 @@ files:
|
|
39
39
|
- ./pkg/cleanerupper-0.2.0.gem
|
40
40
|
- ./pkg/cleanerupper-0.2.1.gem
|
41
41
|
- ./pkg/cleanerupper-0.2.2.gem
|
42
|
+
- ./pkg/cleanerupper-0.3.0.gem
|
42
43
|
- ./rails/init.rb
|
43
44
|
- ./tasks/cleanerupper_tasks.rake
|
44
45
|
- ./test/cleanerupper_test.rb
|