mir_extensions 0.2.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/.bundle/config +2 -0
- data/.document +5 -0
- data/.gitignore +21 -0
- data/.rspec +1 -0
- data/Gemfile +41 -0
- data/Gemfile.lock +116 -0
- data/LICENSE +20 -0
- data/README +256 -0
- data/README.rdoc +17 -0
- data/Rakefile +50 -0
- data/VERSION +1 -0
- data/app/controllers/application_controller.rb +9 -0
- data/app/helpers/application_helper.rb +2 -0
- data/app/models/primary.rb +11 -0
- data/app/models/secondary.rb +7 -0
- data/app/views/layouts/application.html.erb +14 -0
- data/autotest/discover.rb +2 -0
- data/config.ru +4 -0
- data/config/application.rb +47 -0
- data/config/boot.rb +13 -0
- data/config/database.yml +17 -0
- data/config/environment.rb +5 -0
- data/config/environments/development.rb +22 -0
- data/config/environments/production.rb +49 -0
- data/config/environments/test.rb +35 -0
- data/config/initializers/backtrace_silencers.rb +7 -0
- data/config/initializers/inflections.rb +10 -0
- data/config/initializers/mime_types.rb +5 -0
- data/config/initializers/secret_token.rb +7 -0
- data/config/initializers/session_store.rb +8 -0
- data/config/locales/en.yml +5 -0
- data/config/routes.rb +58 -0
- data/db/development.sqlite3 +1 -0
- data/db/mir_ext_development.sqlite3 +0 -0
- data/db/mir_ext_test.sqlite3 +0 -0
- data/db/schema.rb +26 -0
- data/db/seeds.rb +7 -0
- data/db/test.sqlite3 +0 -0
- data/doc/README_FOR_APP +2 -0
- data/lib/core_ext/controller_extensions.rb +37 -0
- data/lib/core_ext/core_ext.rb +344 -0
- data/lib/core_ext/helper_extensions.rb +383 -0
- data/lib/mir_extensions.rb +37 -0
- data/lib/tasks/.gitkeep +0 -0
- data/log/development.log +151 -0
- data/log/production.log +0 -0
- data/log/server.log +0 -0
- data/log/test.log +27 -0
- data/mir_extensions.gemspec +119 -0
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +26 -0
- data/public/favicon.ico +0 -0
- data/public/images/rails.png +0 -0
- data/public/index.html +262 -0
- data/public/javascripts/application.js +2 -0
- data/public/javascripts/controls.js +965 -0
- data/public/javascripts/dragdrop.js +974 -0
- data/public/javascripts/effects.js +1123 -0
- data/public/javascripts/prototype.js +6001 -0
- data/public/javascripts/rails.js +175 -0
- data/public/robots.txt +5 -0
- data/public/stylesheets/.gitkeep +0 -0
- data/script/rails +6 -0
- data/spec/controllers/application_controller_spec.rb +41 -0
- data/spec/helpers/application_helper_spec.rb +40 -0
- data/spec/mir_extensions_spec.rb +269 -0
- data/spec/spec_helper.rb +27 -0
- data/vendor/plugins/.gitkeep +0 -0
- metadata +170 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'singleton'
|
2
|
+
require File.expand_path(File.dirname(__FILE__) + '/core_ext/core_ext')
|
3
|
+
require 'friendly_id'
|
4
|
+
|
5
|
+
module MirExtensions
|
6
|
+
|
7
|
+
# Constants ======================================================================================
|
8
|
+
|
9
|
+
MONTHS = {0 => "JAN", 1 => "FEB", 2 => "MAR", 3 => "APR", 4 => "MAY", 5 => "JUN", 6 => "JUL", 7 => "AUG", 8 => "SEP", 9 => "OCT", 10 => "NOV", 11 => "DEC"}
|
10
|
+
|
11
|
+
STATE_CODES = { 'Alabama' => 'AL', 'Alaska' => 'AK', 'Arizona' => 'AZ', 'Arkansas' => 'AR', 'California' => 'CA', 'Colorado' => 'CO', 'Connecticut' => 'CT', 'Delaware' => 'DE', 'Florida' => 'FL', 'Georgia' => 'GA', 'Hawaii' => 'HI', 'Idaho' => 'ID', 'Illinois' => 'IL', 'Indiana' => 'IN', 'Iowa' => 'IA', 'Kansas' => 'KS', 'Kentucky' => 'KY', 'Louisiana' => 'LA', 'Maine' => 'ME', 'Maryland' => 'MD', 'Massachusetts' => 'MA', 'Michigan' => 'MI', 'Minnesota' => 'MN', 'Mississippi' => 'MS', 'Missouri' => 'MO', 'Montana' => 'MT', 'Nebraska' => 'NE', 'Nevada' => 'NV', 'New Hampshire' => 'NH', 'New Jersey' => 'NJ', 'New Mexico' => 'NM', 'New York' => 'NY', 'North Carolina' => 'NC', 'North Dakota' => 'ND', 'Ohio' => 'OH', 'Oklahoma' => 'OK', 'Oregon' => 'OR', 'Pennsylvania' => 'PA', 'Puerto Rico' => 'PR', 'Rhode Island' => 'RI', 'South Carolina' => 'SC', 'South Dakota' => 'SD', 'Tennessee' => 'TN', 'Texas' => 'TX', 'Utah' => 'UT', 'Vermont' => 'VT', 'Virginia' => 'VA', 'Washington' => 'WA', 'Washington DC' => 'DC', 'West Virginia' => 'WV', 'Wisconsin' => 'WI', 'Wyoming' => 'WY', 'Alberta' => 'AB', 'British Columbia' => 'BC', 'Manitoba' => 'MB', 'New Brunswick' => 'NB', 'Newfoundland and Labrador' => 'NL', 'Northwest Territories' => 'NT', 'Nova Scotia' => 'NS', 'Nunavut' => 'NU', 'Ontario' => 'ON', 'Prince Edward Island' => 'PE', 'Quebec' => 'QC', 'Saskatchewan' => 'SK', 'Yukon' => 'YT' }
|
12
|
+
|
13
|
+
# General Utility Methods ========================================================================
|
14
|
+
|
15
|
+
def self.canonical_url(url)
|
16
|
+
(url + '/').gsub(/\/\/$/,'/')
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.month_name_for(number)
|
20
|
+
MONTHS[number]
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.normalize_slug(text)
|
24
|
+
_normalized = text.gsub(/[\W]/u, ' ').strip.gsub(/\s+/u, '-').gsub(/-\z/u, '').downcase.to_s
|
25
|
+
_normalized.gsub!(/[-]+/, '-') # truncate multiple -
|
26
|
+
_normalized
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.state_code_for(state_name)
|
30
|
+
STATE_CODES[state_name]
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.state_name_for(abbreviation)
|
34
|
+
STATE_CODES.invert[abbreviation]
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
data/lib/tasks/.gitkeep
ADDED
File without changes
|
data/log/development.log
ADDED
@@ -0,0 +1,151 @@
|
|
1
|
+
[1m[36mSQL (0.4ms)[0m [1m SELECT name
|
2
|
+
FROM sqlite_master
|
3
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
4
|
+
[0m
|
5
|
+
[1m[35mSQL (0.1ms)[0m select sqlite_version(*)
|
6
|
+
[1m[36mSQL (2.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
7
|
+
[1m[35mSQL (0.1ms)[0m PRAGMA index_list("schema_migrations")
|
8
|
+
[1m[36mSQL (1.6ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
9
|
+
[1m[35mSQL (0.1ms)[0m SELECT name
|
10
|
+
FROM sqlite_master
|
11
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
12
|
+
[1m[36mSQL (0.2ms)[0m [1m SELECT name
|
13
|
+
FROM sqlite_master
|
14
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
15
|
+
[0m
|
16
|
+
[1m[35mSQL (0.2ms)[0m SELECT name
|
17
|
+
FROM sqlite_master
|
18
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
19
|
+
[1m[36mSQL (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations"[0m
|
20
|
+
[1m[35mSQL (0.1ms)[0m SELECT name
|
21
|
+
FROM sqlite_master
|
22
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
23
|
+
[1m[36mSQL (0.3ms)[0m [1mselect sqlite_version(*)[0m
|
24
|
+
[1m[35mSQL (0.3ms)[0m SELECT name
|
25
|
+
FROM sqlite_master
|
26
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
27
|
+
[1m[36mSQL (0.1ms)[0m [1m SELECT name
|
28
|
+
FROM sqlite_master
|
29
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
30
|
+
[0m
|
31
|
+
[1m[35mSQL (0.3ms)[0m SELECT name
|
32
|
+
FROM sqlite_master
|
33
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
34
|
+
[1m[36mSQL (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
35
|
+
[1m[35mSQL (2.3ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
36
|
+
[1m[36mSQL (0.1ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
37
|
+
[1m[35mSQL (1.7ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
38
|
+
[1m[36mSQL (0.2ms)[0m [1m SELECT name
|
39
|
+
FROM sqlite_master
|
40
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
41
|
+
[0m
|
42
|
+
[1m[35mSQL (0.1ms)[0m SELECT version FROM "schema_migrations"
|
43
|
+
[1m[36mSQL (1.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
44
|
+
[1m[36mSQL (1.2ms)[0m [1mselect sqlite_version(*)[0m
|
45
|
+
[1m[35mSQL (0.3ms)[0m SELECT name
|
46
|
+
FROM sqlite_master
|
47
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
48
|
+
[1m[36mSQL (0.1ms)[0m [1m SELECT name
|
49
|
+
FROM sqlite_master
|
50
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
51
|
+
[0m
|
52
|
+
[1m[35mSQL (0.2ms)[0m SELECT name
|
53
|
+
FROM sqlite_master
|
54
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
55
|
+
[1m[36mSQL (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
56
|
+
[1m[35mSQL (1.6ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
57
|
+
[1m[36mSQL (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
58
|
+
[1m[35mSQL (1.4ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
59
|
+
[1m[36mSQL (0.1ms)[0m [1m SELECT name
|
60
|
+
FROM sqlite_master
|
61
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
62
|
+
[0m
|
63
|
+
[1m[35mSQL (0.1ms)[0m SELECT version FROM "schema_migrations"
|
64
|
+
[1m[36mSQL (1.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
65
|
+
[1m[36mSQL (0.4ms)[0m [1mselect sqlite_version(*)[0m
|
66
|
+
[1m[35mSQL (0.3ms)[0m SELECT name
|
67
|
+
FROM sqlite_master
|
68
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
69
|
+
[1m[36mSQL (0.1ms)[0m [1m SELECT name
|
70
|
+
FROM sqlite_master
|
71
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
72
|
+
[0m
|
73
|
+
[1m[35mSQL (0.2ms)[0m SELECT name
|
74
|
+
FROM sqlite_master
|
75
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
76
|
+
[1m[36mSQL (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
77
|
+
[1m[35mSQL (2.3ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
78
|
+
[1m[36mSQL (0.1ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
79
|
+
[1m[35mSQL (2.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
80
|
+
[1m[36mSQL (0.2ms)[0m [1m SELECT name
|
81
|
+
FROM sqlite_master
|
82
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
83
|
+
[0m
|
84
|
+
[1m[35mSQL (0.1ms)[0m SELECT version FROM "schema_migrations"
|
85
|
+
[1m[36mSQL (1.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
86
|
+
[1m[36mSQL (0.4ms)[0m [1m SELECT name
|
87
|
+
FROM sqlite_master
|
88
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
89
|
+
[0m
|
90
|
+
[1m[35mSQL (0.1ms)[0m select sqlite_version(*)
|
91
|
+
[1m[36mSQL (2.4ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
92
|
+
[1m[35mSQL (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
93
|
+
[1m[36mSQL (1.7ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
94
|
+
[1m[35mSQL (0.1ms)[0m SELECT name
|
95
|
+
FROM sqlite_master
|
96
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
97
|
+
[1m[36mSQL (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
98
|
+
[1m[35mSQL (1.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('0')
|
99
|
+
[1m[36mSQL (0.3ms)[0m [1mselect sqlite_version(*)[0m
|
100
|
+
[1m[35mSQL (0.3ms)[0m SELECT name
|
101
|
+
FROM sqlite_master
|
102
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
103
|
+
[1m[36mSQL (2.6ms)[0m [1mCREATE TABLE "primaries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) [0m
|
104
|
+
[1m[35mSQL (0.2ms)[0m SELECT name
|
105
|
+
FROM sqlite_master
|
106
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
107
|
+
[1m[36mSQL (1.8ms)[0m [1mCREATE TABLE "secondaries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "primary_id" integer) [0m
|
108
|
+
[1m[35mSQL (0.1ms)[0m PRAGMA index_list("secondaries")
|
109
|
+
[1m[36mSQL (1.8ms)[0m [1mCREATE INDEX "index_roles_on_name" ON "secondaries" ("primary_id")[0m
|
110
|
+
[1m[35mSQL (0.1ms)[0m SELECT name
|
111
|
+
FROM sqlite_master
|
112
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
113
|
+
[1m[36mSQL (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
114
|
+
[1m[36mSQL (0.4ms)[0m [1mselect sqlite_version(*)[0m
|
115
|
+
[1m[35mSQL (0.5ms)[0m SELECT name
|
116
|
+
FROM sqlite_master
|
117
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
118
|
+
[1m[36mSQL (0.1ms)[0m [1m SELECT name
|
119
|
+
FROM sqlite_master
|
120
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
121
|
+
[0m
|
122
|
+
[1m[35mSQL (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
123
|
+
[1m[36mSQL (0.1ms)[0m [1m SELECT name
|
124
|
+
FROM sqlite_master
|
125
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
126
|
+
[0m
|
127
|
+
[1m[35mSQL (0.0ms)[0m PRAGMA index_list("primaries")
|
128
|
+
[1m[36mSQL (0.1ms)[0m [1mPRAGMA index_list("secondaries")[0m
|
129
|
+
[1m[35mSQL (0.1ms)[0m PRAGMA index_info('index_roles_on_name')
|
130
|
+
[1m[36mSQL (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
131
|
+
[1m[35mSQL (0.2ms)[0m SELECT name
|
132
|
+
FROM sqlite_master
|
133
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
134
|
+
[1m[36mSQL (2.5ms)[0m [1mCREATE TABLE "primaries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) [0m
|
135
|
+
[1m[35mSQL (0.3ms)[0m SELECT name
|
136
|
+
FROM sqlite_master
|
137
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
138
|
+
[1m[36mSQL (1.5ms)[0m [1mCREATE TABLE "secondaries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "primary_id" integer) [0m
|
139
|
+
[1m[35mSQL (0.1ms)[0m PRAGMA index_list("secondaries")
|
140
|
+
[1m[36mSQL (1.4ms)[0m [1mCREATE INDEX "index_roles_on_name" ON "secondaries" ("primary_id")[0m
|
141
|
+
[1m[35mSQL (0.2ms)[0m SELECT name
|
142
|
+
FROM sqlite_master
|
143
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
144
|
+
[1m[36mSQL (1.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
145
|
+
[1m[35mSQL (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
146
|
+
[1m[36mSQL (1.7ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
147
|
+
[1m[35mSQL (0.2ms)[0m SELECT name
|
148
|
+
FROM sqlite_master
|
149
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
150
|
+
[1m[36mSQL (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
151
|
+
[1m[35mSQL (6.3ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('0')
|
data/log/production.log
ADDED
File without changes
|
data/log/server.log
ADDED
File without changes
|
data/log/test.log
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
[1m[36mSQL (0.2ms)[0m [1m SELECT name
|
2
|
+
FROM sqlite_master
|
3
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
4
|
+
[0m
|
5
|
+
[1m[35mSQL (0.1ms)[0m SELECT name
|
6
|
+
FROM sqlite_master
|
7
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
8
|
+
[1m[36mSQL (0.2ms)[0m [1m SELECT name
|
9
|
+
FROM sqlite_master
|
10
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
11
|
+
[0m
|
12
|
+
[1m[36mSQL (0.2ms)[0m [1m SELECT name
|
13
|
+
FROM sqlite_master
|
14
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
15
|
+
[0m
|
16
|
+
[1m[36mSQL (0.3ms)[0m [1m SELECT name
|
17
|
+
FROM sqlite_master
|
18
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
19
|
+
[0m
|
20
|
+
[1m[35mPrimary Load (0.2ms)[0m SELECT "primaries".* FROM "primaries"
|
21
|
+
SQLite3::SQLException: no such table: primaries: SELECT "primaries".* FROM "primaries"
|
22
|
+
[1m[36mSQL (0.3ms)[0m [1m SELECT name
|
23
|
+
FROM sqlite_master
|
24
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
25
|
+
[0m
|
26
|
+
[1m[35mPrimary Load (0.2ms)[0m SELECT "primaries".* FROM "primaries"
|
27
|
+
SQLite3::SQLException: no such table: primaries: SELECT "primaries".* FROM "primaries"
|
@@ -0,0 +1,119 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{mir_extensions}
|
8
|
+
s.version = "0.2.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Corey Ehmke", "Rod Monje"]
|
12
|
+
s.date = %q{2010-08-01}
|
13
|
+
s.description = %q{Standard extensions and utility methods for SEO Logic's Rails 3 apps.}
|
14
|
+
s.email = %q{corey@seologic.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README",
|
18
|
+
"README.rdoc"
|
19
|
+
]
|
20
|
+
s.files = [
|
21
|
+
".bundle/config",
|
22
|
+
".document",
|
23
|
+
".gitignore",
|
24
|
+
".rspec",
|
25
|
+
"Gemfile",
|
26
|
+
"Gemfile.lock",
|
27
|
+
"LICENSE",
|
28
|
+
"README",
|
29
|
+
"README.rdoc",
|
30
|
+
"Rakefile",
|
31
|
+
"VERSION",
|
32
|
+
"app/controllers/application_controller.rb",
|
33
|
+
"app/helpers/application_helper.rb",
|
34
|
+
"app/models/primary.rb",
|
35
|
+
"app/models/secondary.rb",
|
36
|
+
"app/views/layouts/application.html.erb",
|
37
|
+
"autotest/discover.rb",
|
38
|
+
"config.ru",
|
39
|
+
"config/application.rb",
|
40
|
+
"config/boot.rb",
|
41
|
+
"config/database.yml",
|
42
|
+
"config/environment.rb",
|
43
|
+
"config/environments/development.rb",
|
44
|
+
"config/environments/production.rb",
|
45
|
+
"config/environments/test.rb",
|
46
|
+
"config/initializers/backtrace_silencers.rb",
|
47
|
+
"config/initializers/inflections.rb",
|
48
|
+
"config/initializers/mime_types.rb",
|
49
|
+
"config/initializers/secret_token.rb",
|
50
|
+
"config/initializers/session_store.rb",
|
51
|
+
"config/locales/en.yml",
|
52
|
+
"config/routes.rb",
|
53
|
+
"db/development.sqlite3",
|
54
|
+
"db/mir_ext_development.sqlite3",
|
55
|
+
"db/mir_ext_test.sqlite3",
|
56
|
+
"db/schema.rb",
|
57
|
+
"db/seeds.rb",
|
58
|
+
"db/test.sqlite3",
|
59
|
+
"doc/README_FOR_APP",
|
60
|
+
"lib/core_ext/controller_extensions.rb",
|
61
|
+
"lib/core_ext/core_ext.rb",
|
62
|
+
"lib/core_ext/helper_extensions.rb",
|
63
|
+
"lib/mir_extensions.rb",
|
64
|
+
"lib/tasks/.gitkeep",
|
65
|
+
"log/development.log",
|
66
|
+
"log/production.log",
|
67
|
+
"log/server.log",
|
68
|
+
"log/test.log",
|
69
|
+
"mir_extensions.gemspec",
|
70
|
+
"public/404.html",
|
71
|
+
"public/422.html",
|
72
|
+
"public/500.html",
|
73
|
+
"public/favicon.ico",
|
74
|
+
"public/images/rails.png",
|
75
|
+
"public/index.html",
|
76
|
+
"public/javascripts/application.js",
|
77
|
+
"public/javascripts/controls.js",
|
78
|
+
"public/javascripts/dragdrop.js",
|
79
|
+
"public/javascripts/effects.js",
|
80
|
+
"public/javascripts/prototype.js",
|
81
|
+
"public/javascripts/rails.js",
|
82
|
+
"public/robots.txt",
|
83
|
+
"public/stylesheets/.gitkeep",
|
84
|
+
"script/rails",
|
85
|
+
"spec/controllers/application_controller_spec.rb",
|
86
|
+
"spec/helpers/application_helper_spec.rb",
|
87
|
+
"spec/mir_extensions_spec.rb",
|
88
|
+
"spec/spec_helper.rb",
|
89
|
+
"vendor/plugins/.gitkeep"
|
90
|
+
]
|
91
|
+
s.homepage = %q{http://github.com/Bantik/mir_extensions}
|
92
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
93
|
+
s.require_paths = ["lib"]
|
94
|
+
s.rubygems_version = %q{1.3.7}
|
95
|
+
s.summary = %q{Standard extensions and utility methods for SEO Logic's Rails 3 apps.}
|
96
|
+
s.test_files = [
|
97
|
+
"spec/controllers/application_controller_spec.rb",
|
98
|
+
"spec/helpers/application_helper_spec.rb",
|
99
|
+
"spec/mir_extensions_spec.rb",
|
100
|
+
"spec/spec_helper.rb"
|
101
|
+
]
|
102
|
+
|
103
|
+
if s.respond_to? :specification_version then
|
104
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
105
|
+
s.specification_version = 3
|
106
|
+
|
107
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
108
|
+
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
109
|
+
s.add_development_dependency(%q<friendly_id>, [">= 0"])
|
110
|
+
else
|
111
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
112
|
+
s.add_dependency(%q<friendly_id>, [">= 0"])
|
113
|
+
end
|
114
|
+
else
|
115
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
116
|
+
s.add_dependency(%q<friendly_id>, [">= 0"])
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
data/public/404.html
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/404.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
23
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
data/public/422.html
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/422.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The change you wanted was rejected.</h1>
|
23
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
data/public/500.html
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/500.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>We're sorry, but something went wrong.</h1>
|
23
|
+
<p>We've been notified about this issue and we'll take a look at it shortly.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
data/public/favicon.ico
ADDED
File without changes
|
Binary file
|
data/public/index.html
ADDED
@@ -0,0 +1,262 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Ruby on Rails: Welcome aboard</title>
|
5
|
+
<style type="text/css" media="screen">
|
6
|
+
body {
|
7
|
+
margin: 0;
|
8
|
+
margin-bottom: 25px;
|
9
|
+
padding: 0;
|
10
|
+
background-color: #f0f0f0;
|
11
|
+
font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
|
12
|
+
font-size: 13px;
|
13
|
+
color: #333;
|
14
|
+
}
|
15
|
+
|
16
|
+
h1 {
|
17
|
+
font-size: 28px;
|
18
|
+
color: #000;
|
19
|
+
}
|
20
|
+
|
21
|
+
a {color: #03c}
|
22
|
+
a:hover {
|
23
|
+
background-color: #03c;
|
24
|
+
color: white;
|
25
|
+
text-decoration: none;
|
26
|
+
}
|
27
|
+
|
28
|
+
|
29
|
+
#page {
|
30
|
+
background-color: #f0f0f0;
|
31
|
+
width: 750px;
|
32
|
+
margin: 0;
|
33
|
+
margin-left: auto;
|
34
|
+
margin-right: auto;
|
35
|
+
}
|
36
|
+
|
37
|
+
#content {
|
38
|
+
float: left;
|
39
|
+
background-color: white;
|
40
|
+
border: 3px solid #aaa;
|
41
|
+
border-top: none;
|
42
|
+
padding: 25px;
|
43
|
+
width: 500px;
|
44
|
+
}
|
45
|
+
|
46
|
+
#sidebar {
|
47
|
+
float: right;
|
48
|
+
width: 175px;
|
49
|
+
}
|
50
|
+
|
51
|
+
#footer {
|
52
|
+
clear: both;
|
53
|
+
}
|
54
|
+
|
55
|
+
|
56
|
+
#header, #about, #getting-started {
|
57
|
+
padding-left: 75px;
|
58
|
+
padding-right: 30px;
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
#header {
|
63
|
+
background-image: url("images/rails.png");
|
64
|
+
background-repeat: no-repeat;
|
65
|
+
background-position: top left;
|
66
|
+
height: 64px;
|
67
|
+
}
|
68
|
+
#header h1, #header h2 {margin: 0}
|
69
|
+
#header h2 {
|
70
|
+
color: #888;
|
71
|
+
font-weight: normal;
|
72
|
+
font-size: 16px;
|
73
|
+
}
|
74
|
+
|
75
|
+
|
76
|
+
#about h3 {
|
77
|
+
margin: 0;
|
78
|
+
margin-bottom: 10px;
|
79
|
+
font-size: 14px;
|
80
|
+
}
|
81
|
+
|
82
|
+
#about-content {
|
83
|
+
background-color: #ffd;
|
84
|
+
border: 1px solid #fc0;
|
85
|
+
margin-left: -55px;
|
86
|
+
margin-right: -10px;
|
87
|
+
}
|
88
|
+
#about-content table {
|
89
|
+
margin-top: 10px;
|
90
|
+
margin-bottom: 10px;
|
91
|
+
font-size: 11px;
|
92
|
+
border-collapse: collapse;
|
93
|
+
}
|
94
|
+
#about-content td {
|
95
|
+
padding: 10px;
|
96
|
+
padding-top: 3px;
|
97
|
+
padding-bottom: 3px;
|
98
|
+
}
|
99
|
+
#about-content td.name {color: #555}
|
100
|
+
#about-content td.value {color: #000}
|
101
|
+
|
102
|
+
#about-content ul {
|
103
|
+
padding: 0;
|
104
|
+
list-style-type: none;
|
105
|
+
}
|
106
|
+
|
107
|
+
#about-content.failure {
|
108
|
+
background-color: #fcc;
|
109
|
+
border: 1px solid #f00;
|
110
|
+
}
|
111
|
+
#about-content.failure p {
|
112
|
+
margin: 0;
|
113
|
+
padding: 10px;
|
114
|
+
}
|
115
|
+
|
116
|
+
|
117
|
+
#getting-started {
|
118
|
+
border-top: 1px solid #ccc;
|
119
|
+
margin-top: 25px;
|
120
|
+
padding-top: 15px;
|
121
|
+
}
|
122
|
+
#getting-started h1 {
|
123
|
+
margin: 0;
|
124
|
+
font-size: 20px;
|
125
|
+
}
|
126
|
+
#getting-started h2 {
|
127
|
+
margin: 0;
|
128
|
+
font-size: 14px;
|
129
|
+
font-weight: normal;
|
130
|
+
color: #333;
|
131
|
+
margin-bottom: 25px;
|
132
|
+
}
|
133
|
+
#getting-started ol {
|
134
|
+
margin-left: 0;
|
135
|
+
padding-left: 0;
|
136
|
+
}
|
137
|
+
#getting-started li {
|
138
|
+
font-size: 18px;
|
139
|
+
color: #888;
|
140
|
+
margin-bottom: 25px;
|
141
|
+
}
|
142
|
+
#getting-started li h2 {
|
143
|
+
margin: 0;
|
144
|
+
font-weight: normal;
|
145
|
+
font-size: 18px;
|
146
|
+
color: #333;
|
147
|
+
}
|
148
|
+
#getting-started li p {
|
149
|
+
color: #555;
|
150
|
+
font-size: 13px;
|
151
|
+
}
|
152
|
+
|
153
|
+
|
154
|
+
#search {
|
155
|
+
margin: 0;
|
156
|
+
padding-top: 10px;
|
157
|
+
padding-bottom: 10px;
|
158
|
+
font-size: 11px;
|
159
|
+
}
|
160
|
+
#search input {
|
161
|
+
font-size: 11px;
|
162
|
+
margin: 2px;
|
163
|
+
}
|
164
|
+
#search-text {width: 170px}
|
165
|
+
|
166
|
+
|
167
|
+
#sidebar ul {
|
168
|
+
margin-left: 0;
|
169
|
+
padding-left: 0;
|
170
|
+
}
|
171
|
+
#sidebar ul h3 {
|
172
|
+
margin-top: 25px;
|
173
|
+
font-size: 16px;
|
174
|
+
padding-bottom: 10px;
|
175
|
+
border-bottom: 1px solid #ccc;
|
176
|
+
}
|
177
|
+
#sidebar li {
|
178
|
+
list-style-type: none;
|
179
|
+
}
|
180
|
+
#sidebar ul.links li {
|
181
|
+
margin-bottom: 5px;
|
182
|
+
}
|
183
|
+
|
184
|
+
</style>
|
185
|
+
<script type="text/javascript">
|
186
|
+
function about() {
|
187
|
+
info = document.getElementById('about-content');
|
188
|
+
if (window.XMLHttpRequest)
|
189
|
+
{ xhr = new XMLHttpRequest(); }
|
190
|
+
else
|
191
|
+
{ xhr = new ActiveXObject("Microsoft.XMLHTTP"); }
|
192
|
+
xhr.open("GET","rails/info/properties",false);
|
193
|
+
xhr.send("");
|
194
|
+
info.innerHTML = xhr.responseText;
|
195
|
+
info.style.display = 'block'
|
196
|
+
}
|
197
|
+
|
198
|
+
function prepend() {
|
199
|
+
search = document.getElementById('search-text');
|
200
|
+
text = search.value;
|
201
|
+
search.value = 'site:rubyonrails.org ' + text;
|
202
|
+
}
|
203
|
+
|
204
|
+
window.onload = function() {
|
205
|
+
document.getElementById('search-text').value = '';
|
206
|
+
}
|
207
|
+
</script>
|
208
|
+
</head>
|
209
|
+
<body>
|
210
|
+
<div id="page">
|
211
|
+
<div id="sidebar">
|
212
|
+
<ul id="sidebar-items">
|
213
|
+
<li>
|
214
|
+
<h3>Browse the documentation</h3>
|
215
|
+
<ul class="links">
|
216
|
+
<li><a href="http://api.rubyonrails.org/">Rails API</a></li>
|
217
|
+
<li><a href="http://stdlib.rubyonrails.org/">Ruby standard library</a></li>
|
218
|
+
<li><a href="http://corelib.rubyonrails.org/">Ruby core</a></li>
|
219
|
+
<li><a href="http://guides.rubyonrails.org/">Rails Guides</a></li>
|
220
|
+
</ul>
|
221
|
+
</li>
|
222
|
+
</ul>
|
223
|
+
</div>
|
224
|
+
|
225
|
+
<div id="content">
|
226
|
+
<div id="header">
|
227
|
+
<h1>Welcome aboard</h1>
|
228
|
+
<h2>You’re riding Ruby on Rails!</h2>
|
229
|
+
</div>
|
230
|
+
|
231
|
+
<div id="about">
|
232
|
+
<h3><a href="rails/info/properties" onclick="about(); return false">About your application’s environment</a></h3>
|
233
|
+
<div id="about-content" style="display: none"></div>
|
234
|
+
</div>
|
235
|
+
|
236
|
+
<div id="getting-started">
|
237
|
+
<h1>Getting started</h1>
|
238
|
+
<h2>Here’s how to get rolling:</h2>
|
239
|
+
|
240
|
+
<ol>
|
241
|
+
<li>
|
242
|
+
<h2>Use <code>rails generate</code> to create your models and controllers</h2>
|
243
|
+
<p>To see all available options, run it without parameters.</p>
|
244
|
+
</li>
|
245
|
+
|
246
|
+
<li>
|
247
|
+
<h2>Set up a default route and remove or rename this file</h2>
|
248
|
+
<p>Routes are set up in config/routes.rb.</p>
|
249
|
+
</li>
|
250
|
+
|
251
|
+
<li>
|
252
|
+
<h2>Create your database</h2>
|
253
|
+
<p>Run <code>rake db:migrate</code> to create your database. If you're not using SQLite (the default), edit <code>config/database.yml</code> with your username and password.</p>
|
254
|
+
</li>
|
255
|
+
</ol>
|
256
|
+
</div>
|
257
|
+
</div>
|
258
|
+
|
259
|
+
<div id="footer"> </div>
|
260
|
+
</div>
|
261
|
+
</body>
|
262
|
+
</html>
|