cleanerupper 0.1.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 +40 -0
- data/cleanerupper-0.1.0.gem +0 -0
- data/cleanerupper.gemspec +50 -0
- data/dictionary.yml +3 -0
- data/init.rb +1 -0
- data/install.rb +1 -0
- data/lib/cleanerupper.rb +107 -0
- data/pkg/cleanerupper-0.0.0.gem +0 -0
- data/rails/init.rb +3 -0
- data/tasks/cleanerupper_tasks.rake +4 -0
- data/test/cleanerupper_test.rb +117 -0
- data/test/database.yml +18 -0
- data/test/debug.log +2341 -0
- data/test/schema.rb +43 -0
- data/test/test_helper.rb +30 -0
- data/uninstall.rb +1 -0
- metadata +70 -0
data/test/schema.rb
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
ActiveRecord::Schema.define(:version => 1) do
|
2
|
+
create_table :widgets, :force => true do |t|
|
3
|
+
t.column :title, :string, :limit => 100
|
4
|
+
t.column :body, :string
|
5
|
+
t.column :author_name, :string, :limit => 100
|
6
|
+
end
|
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
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'active_support'
|
3
|
+
require 'active_support/test_case'
|
4
|
+
|
5
|
+
if ENV['RAILS'].nil?
|
6
|
+
require File.expand_path(File.join(File.dirname(__FILE__), '../../../../config/environment.rb'))
|
7
|
+
else
|
8
|
+
# specific rails version targeted
|
9
|
+
# load activerecord and plugin manually
|
10
|
+
gem 'activerecord', "=#{ENV['RAILS']}"
|
11
|
+
require 'active_record'
|
12
|
+
$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
|
13
|
+
Dir["#{$LOAD_PATH.last}/**/*.rb"].each do |path|
|
14
|
+
require path[$LOAD_PATH.last.size + 1..-1]
|
15
|
+
end
|
16
|
+
require File.join(File.dirname(__FILE__), '..', 'init.rb')
|
17
|
+
end
|
18
|
+
|
19
|
+
config = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml'))
|
20
|
+
# do this so fixtures will load
|
21
|
+
ActiveRecord::Base.configurations.update config
|
22
|
+
ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log")
|
23
|
+
ActiveRecord::Base.establish_connection(config[ENV['DB'] || 'sqlite3'])
|
24
|
+
|
25
|
+
load(File.dirname(__FILE__) + "/schema.rb")
|
26
|
+
|
27
|
+
require File.expand_path(File.dirname(__FILE__) + "/../lib/cleanerupper.rb")
|
28
|
+
ENV["RAILS_ENV"] = "test"
|
29
|
+
require File.expand_path(File.dirname(__FILE__) + "/../../../../config/environment")
|
30
|
+
require 'test_help'
|
data/uninstall.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# Uninstall hook code here
|
metadata
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cleanerupper
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Mike Trpcic
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2010-04-09 00:00:00 -04:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description:
|
17
|
+
email: mike@fluidmedia.com
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- README
|
24
|
+
files:
|
25
|
+
- ./cleanerupper-0.1.0.gem
|
26
|
+
- ./cleanerupper.gemspec
|
27
|
+
- ./dictionary.yml
|
28
|
+
- ./init.rb
|
29
|
+
- ./install.rb
|
30
|
+
- ./lib/cleanerupper.rb
|
31
|
+
- ./pkg/cleanerupper-0.0.0.gem
|
32
|
+
- ./rails/init.rb
|
33
|
+
- ./tasks/cleanerupper_tasks.rake
|
34
|
+
- ./test/cleanerupper_test.rb
|
35
|
+
- ./test/database.yml
|
36
|
+
- ./test/debug.log
|
37
|
+
- ./test/schema.rb
|
38
|
+
- ./test/test_helper.rb
|
39
|
+
- ./uninstall.rb
|
40
|
+
- README
|
41
|
+
has_rdoc: true
|
42
|
+
homepage: http://github.com/fmiopensource/cleanerupper
|
43
|
+
licenses: []
|
44
|
+
|
45
|
+
post_install_message:
|
46
|
+
rdoc_options:
|
47
|
+
- --charset=UTF-8
|
48
|
+
require_paths:
|
49
|
+
- lib
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: "0"
|
55
|
+
version:
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: "0"
|
61
|
+
version:
|
62
|
+
requirements: []
|
63
|
+
|
64
|
+
rubyforge_project:
|
65
|
+
rubygems_version: 1.3.5
|
66
|
+
signing_key:
|
67
|
+
specification_version: 3
|
68
|
+
summary: Simple database sanitation
|
69
|
+
test_files: []
|
70
|
+
|