url_field 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -0
- data/README.textile +11 -2
- data/Rakefile +18 -16
- data/lib/url_field.rb +15 -9
- data/rails/init.rb +1 -0
- data/spec/database.yml +21 -0
- data/spec/debug.log +77 -0
- data/spec/schema.rb +7 -0
- data/spec/spec_helper.rb +30 -2
- data/spec/url_field_spec.rb +31 -18
- data/url_field.gemspec +52 -0
- metadata +17 -9
data/CHANGELOG
ADDED
data/README.textile
CHANGED
@@ -26,6 +26,16 @@ Https? That works too (but one way only)
|
|
26
26
|
|
27
27
|
h2. Extra
|
28
28
|
|
29
|
+
h3. Multiple fields
|
30
|
+
|
31
|
+
If you have multiple url_fields in a single model, just pass them as arguments to the url_field method, eg:
|
32
|
+
|
33
|
+
<pre><code>class Company < ActiveRecord::Base
|
34
|
+
url_field :website, :support_website, :more_info_website
|
35
|
+
end</code></pre>
|
36
|
+
|
37
|
+
h3. Access the correctly formed URL at any time
|
38
|
+
|
29
39
|
If you want access to the correctly formatted URL at any time (for example if you're passing it to URI.parse, before you save your model), you can prefix your URL field method name with "cleaned_" eg. "cleaned_website" if your field name was website:
|
30
40
|
|
31
41
|
<pre><code>class Company < ActiveRecord::Base
|
@@ -34,8 +44,7 @@ end
|
|
34
44
|
|
35
45
|
@company = Company.new
|
36
46
|
@company.website = "www.example.com"
|
37
|
-
@company.cleaned_website # => "http://www.example.com"
|
38
|
-
</code></pre>
|
47
|
+
@company.cleaned_website # => "http://www.example.com"</code></pre>
|
39
48
|
|
40
49
|
h2. Install
|
41
50
|
|
data/Rakefile
CHANGED
@@ -19,21 +19,23 @@ PKG_FILES = FileList[
|
|
19
19
|
'spec/**/*'
|
20
20
|
]
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
22
|
+
begin
|
23
|
+
require 'jeweler'
|
24
|
+
Jeweler::Tasks.new do |s|
|
25
|
+
s.name = "url_field"
|
26
|
+
s.version = "0.0.2"
|
27
|
+
s.author = "Paul Campbell"
|
28
|
+
s.email = "paul@rslw.com"
|
29
|
+
s.homepage = "http://www.github.com/paulca/url_field"
|
30
|
+
s.platform = Gem::Platform::RUBY
|
31
|
+
s.summary = "A simple ActiveRecord plugin to correctly format a URL in the database whether the user enters 'http://' or not"
|
32
|
+
s.files = PKG_FILES.to_a
|
33
|
+
s.require_path = "lib"
|
34
|
+
s.has_rdoc = false
|
35
|
+
s.extra_rdoc_files = ["README.textile"]
|
36
|
+
end
|
37
|
+
rescue LoadError
|
38
|
+
puts "Jeweler not available. Install it with: sudo gem install jeweler"
|
34
39
|
end
|
35
40
|
|
36
|
-
|
37
|
-
Rake::GemPackageTask.new(spec) do |pkg|
|
38
|
-
pkg.gem_spec = spec
|
39
|
-
end
|
41
|
+
Jeweler::GemcutterTasks.new
|
data/lib/url_field.rb
CHANGED
@@ -4,22 +4,28 @@ module UrlField
|
|
4
4
|
end
|
5
5
|
|
6
6
|
module UrlFieldMethod
|
7
|
-
def url_field(
|
7
|
+
def url_field(*args)
|
8
8
|
|
9
|
-
|
9
|
+
args.each do |field_name|
|
10
|
+
before_validation :"clean_#{field_name}_url_field" # before_save :clean_url_url_field
|
11
|
+
end
|
10
12
|
|
11
13
|
class_eval do
|
12
14
|
|
13
|
-
|
14
|
-
|
15
|
+
args.each do |field_name|
|
16
|
+
define_method(:"clean_#{field_name}_url_field") do # def clean_url_url_field
|
17
|
+
self.send("#{field_name}=", send("cleaned_#{field_name}")) # self.url = cleaned_url
|
18
|
+
end # end
|
15
19
|
end
|
16
20
|
|
17
21
|
private
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
22
|
+
|
23
|
+
args.each do |field_name|
|
24
|
+
define_method("cleaned_#{field_name}") do
|
25
|
+
return nil if send(field_name).nil? or send(field_name).blank?
|
26
|
+
return "http://#{send(field_name)}" unless send(field_name).match(/https?:\/\/.*$/)
|
27
|
+
send(field_name)
|
28
|
+
end
|
23
29
|
end
|
24
30
|
end
|
25
31
|
end
|
data/rails/init.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), "..", "lib", "url_field")
|
data/spec/database.yml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
sqlite:
|
2
|
+
:adapter: sqlite
|
3
|
+
:database: spec/url_field.sqlite.db
|
4
|
+
|
5
|
+
sqlite3:
|
6
|
+
:adapter: sqlite3
|
7
|
+
:database: spec/url_field.sqlite3.db
|
8
|
+
|
9
|
+
postgresql:
|
10
|
+
:adapter: postgresql
|
11
|
+
:username: postgres
|
12
|
+
:password: postgres
|
13
|
+
:database: url_field_test
|
14
|
+
:min_messages: ERROR
|
15
|
+
|
16
|
+
mysql:
|
17
|
+
:adapter: mysql
|
18
|
+
:host: localhost
|
19
|
+
:username: root
|
20
|
+
:password: password
|
21
|
+
:database: url_field_test
|
data/spec/debug.log
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
# Logfile created on Thu Dec 03 23:32:32 +0000 2009 by /
|
2
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mselect sqlite_version(*)[0m
|
3
|
+
[4;35;1mSQL (0.2ms)[0m [0m SELECT name
|
4
|
+
FROM sqlite_master
|
5
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
6
|
+
[0m
|
7
|
+
[4;36;1mSQL (79.6ms)[0m [0;1mCREATE TABLE "test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "url" varchar(255), "other_url" varchar(255), "another_url" varchar(255)) [0m
|
8
|
+
[4;35;1mSQL (0.6ms)[0m [0m SELECT name
|
9
|
+
FROM sqlite_master
|
10
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
11
|
+
[0m
|
12
|
+
[4;36;1mSQL (5.0ms)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
13
|
+
[4;35;1mSQL (13.5ms)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
14
|
+
[4;36;1mSQL (0.3ms)[0m [0;1m SELECT name
|
15
|
+
FROM sqlite_master
|
16
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
17
|
+
[0m
|
18
|
+
[4;35;1mSQL (0.2ms)[0m [0mSELECT version FROM "schema_migrations"[0m
|
19
|
+
[4;36;1mSQL (1.1ms)[0m [0;1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
20
|
+
[4;36;1mSQL (0.3ms)[0m [0;1mselect sqlite_version(*)[0m
|
21
|
+
[4;35;1mSQL (0.5ms)[0m [0m SELECT name
|
22
|
+
FROM sqlite_master
|
23
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
24
|
+
[0m
|
25
|
+
[4;36;1mSQL (2.4ms)[0m [0;1mDROP TABLE "test_models"[0m
|
26
|
+
[4;35;1mSQL (2.9ms)[0m [0mCREATE TABLE "test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "url" varchar(255), "other_url" varchar(255), "another_url" varchar(255)) [0m
|
27
|
+
[4;36;1mSQL (0.5ms)[0m [0;1m SELECT name
|
28
|
+
FROM sqlite_master
|
29
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
30
|
+
[0m
|
31
|
+
[4;35;1mSQL (0.4ms)[0m [0mSELECT version FROM "schema_migrations"[0m
|
32
|
+
[4;36;1mTestModel Create (0.5ms)[0m [0;1mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES(NULL, NULL, NULL)[0m
|
33
|
+
[4;35;1mTestModel Create (0.4ms)[0m [0mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES(NULL, NULL, NULL)[0m
|
34
|
+
[4;36;1mTestModel Create (0.3ms)[0m [0;1mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES(NULL, 'http://www.example.com', NULL)[0m
|
35
|
+
[4;35;1mTestModel Create (0.3ms)[0m [0mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES(NULL, 'http://www.example.com', NULL)[0m
|
36
|
+
[4;36;1mTestModel Create (0.4ms)[0m [0;1mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES(NULL, 'https://www.example.com', NULL)[0m
|
37
|
+
[4;35;1mTestModel Create (0.5ms)[0m [0mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES(NULL, 'https://www.example.com', NULL)[0m
|
38
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mselect sqlite_version(*)[0m
|
39
|
+
[4;35;1mSQL (0.4ms)[0m [0m SELECT name
|
40
|
+
FROM sqlite_master
|
41
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
42
|
+
[0m
|
43
|
+
[4;36;1mSQL (3.1ms)[0m [0;1mDROP TABLE "test_models"[0m
|
44
|
+
[4;35;1mSQL (2.9ms)[0m [0mCREATE TABLE "test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "url" varchar(255), "other_url" varchar(255), "another_url" varchar(255)) [0m
|
45
|
+
[4;36;1mSQL (0.3ms)[0m [0;1m SELECT name
|
46
|
+
FROM sqlite_master
|
47
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
48
|
+
[0m
|
49
|
+
[4;35;1mSQL (0.2ms)[0m [0mSELECT version FROM "schema_migrations"[0m
|
50
|
+
[4;36;1mTestModel Create (0.4ms)[0m [0;1mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES(NULL, NULL, NULL)[0m
|
51
|
+
[4;35;1mTestModel Create (0.5ms)[0m [0mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES(NULL, NULL, NULL)[0m
|
52
|
+
[4;36;1mTestModel Create (0.3ms)[0m [0;1mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES(NULL, 'http://www.example.com', NULL)[0m
|
53
|
+
[4;35;1mTestModel Create (4.3ms)[0m [0mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES(NULL, 'http://www.example.com', NULL)[0m
|
54
|
+
[4;36;1mTestModel Create (11.4ms)[0m [0;1mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES(NULL, 'https://www.example.com', NULL)[0m
|
55
|
+
[4;35;1mTestModel Create (0.4ms)[0m [0mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES(NULL, 'https://www.example.com', NULL)[0m
|
56
|
+
[4;36;1mTestModel Create (0.5ms)[0m [0;1mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES(NULL, NULL, 'http://www.example.com')[0m
|
57
|
+
[4;35;1mTestModel Create (0.4ms)[0m [0mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES('http://www.example.com', NULL, NULL)[0m
|
58
|
+
[4;36;1mSQL (0.3ms)[0m [0;1mselect sqlite_version(*)[0m
|
59
|
+
[4;35;1mSQL (1.6ms)[0m [0m SELECT name
|
60
|
+
FROM sqlite_master
|
61
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
62
|
+
[0m
|
63
|
+
[4;36;1mSQL (3.1ms)[0m [0;1mDROP TABLE "test_models"[0m
|
64
|
+
[4;35;1mSQL (2.6ms)[0m [0mCREATE TABLE "test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "url" varchar(255), "other_url" varchar(255), "another_url" varchar(255)) [0m
|
65
|
+
[4;36;1mSQL (0.3ms)[0m [0;1m SELECT name
|
66
|
+
FROM sqlite_master
|
67
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
68
|
+
[0m
|
69
|
+
[4;35;1mSQL (0.1ms)[0m [0mSELECT version FROM "schema_migrations"[0m
|
70
|
+
[4;36;1mTestModel Create (0.4ms)[0m [0;1mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES(NULL, NULL, NULL)[0m
|
71
|
+
[4;35;1mTestModel Create (0.4ms)[0m [0mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES(NULL, NULL, NULL)[0m
|
72
|
+
[4;36;1mTestModel Create (0.9ms)[0m [0;1mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES(NULL, 'http://www.example.com', NULL)[0m
|
73
|
+
[4;35;1mTestModel Create (0.4ms)[0m [0mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES(NULL, 'http://www.example.com', NULL)[0m
|
74
|
+
[4;36;1mTestModel Create (0.3ms)[0m [0;1mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES(NULL, 'https://www.example.com', NULL)[0m
|
75
|
+
[4;35;1mTestModel Create (0.4ms)[0m [0mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES(NULL, 'https://www.example.com', NULL)[0m
|
76
|
+
[4;36;1mTestModel Create (0.5ms)[0m [0;1mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES(NULL, NULL, 'http://www.example.com')[0m
|
77
|
+
[4;35;1mTestModel Create (0.4ms)[0m [0mINSERT INTO "test_models" ("another_url", "url", "other_url") VALUES('http://www.example.com', NULL, NULL)[0m
|
data/spec/schema.rb
ADDED
data/spec/spec_helper.rb
CHANGED
@@ -4,7 +4,35 @@ rescue LoadError
|
|
4
4
|
puts "You need to install rspec in your base app"
|
5
5
|
exit
|
6
6
|
end
|
7
|
-
|
7
|
+
|
8
8
|
plugin_spec_dir = File.dirname(__FILE__)
|
9
9
|
ActiveRecord::Base.logger = Logger.new(plugin_spec_dir + "/debug.log")
|
10
|
-
|
10
|
+
|
11
|
+
def load_schema
|
12
|
+
config = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml'))
|
13
|
+
ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log")
|
14
|
+
|
15
|
+
db_adapter = ENV['DB']
|
16
|
+
|
17
|
+
# no db passed, try one of these fine config-free DBs before bombing.
|
18
|
+
db_adapter ||=
|
19
|
+
begin
|
20
|
+
require 'rubygems'
|
21
|
+
require 'sqlite'
|
22
|
+
'sqlite'
|
23
|
+
rescue MissingSourceFile
|
24
|
+
begin
|
25
|
+
require 'sqlite3'
|
26
|
+
'sqlite3'
|
27
|
+
rescue MissingSourceFile
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
if db_adapter.nil?
|
32
|
+
raise "No DB Adapter selected. Pass the DB= option to pick one, or install Sqlite or Sqlite3."
|
33
|
+
end
|
34
|
+
|
35
|
+
ActiveRecord::Base.establish_connection(config[db_adapter])
|
36
|
+
load(File.dirname(__FILE__) + "/schema.rb")
|
37
|
+
require File.dirname(__FILE__) + '/../rails/init.rb'
|
38
|
+
end
|
data/spec/url_field_spec.rb
CHANGED
@@ -3,55 +3,68 @@ require File.dirname(__FILE__) + '/spec_helper'
|
|
3
3
|
require File.dirname(__FILE__) + '/../lib/url_field'
|
4
4
|
|
5
5
|
class TestModel < ActiveRecord::Base
|
6
|
-
url_field :
|
7
|
-
|
8
|
-
def self.table_name
|
9
|
-
'boojas'
|
10
|
-
end
|
6
|
+
url_field :url, :other_url, :another_url
|
11
7
|
end
|
12
8
|
|
13
9
|
describe TestModel do
|
10
|
+
|
11
|
+
load_schema
|
12
|
+
|
14
13
|
before do
|
15
14
|
@test_model = TestModel.new
|
16
15
|
end
|
17
16
|
|
18
17
|
it "should leave well enough alone" do
|
19
18
|
@test_model.save
|
20
|
-
@test_model.
|
19
|
+
@test_model.url.should be_nil
|
21
20
|
end
|
22
21
|
|
23
22
|
it "should REALLY leave well enough alone" do
|
24
|
-
@test_model.
|
23
|
+
@test_model.url = ""
|
25
24
|
@test_model.save
|
26
|
-
@test_model.
|
25
|
+
@test_model.url.should be_nil
|
27
26
|
end
|
28
27
|
|
29
28
|
it "should add http://" do
|
30
|
-
@test_model.
|
29
|
+
@test_model.url = "www.example.com"
|
31
30
|
@test_model.save
|
32
|
-
@test_model.
|
31
|
+
@test_model.url.should == "http://www.example.com"
|
33
32
|
end
|
34
33
|
|
35
34
|
it "should ignore http://" do
|
36
|
-
@test_model.
|
35
|
+
@test_model.url = "http://www.example.com"
|
37
36
|
@test_model.save
|
38
|
-
@test_model.
|
37
|
+
@test_model.url.should == "http://www.example.com"
|
39
38
|
end
|
40
39
|
|
41
40
|
it "should allow https://" do
|
42
|
-
@test_model.
|
41
|
+
@test_model.url = "https://www.example.com"
|
43
42
|
@test_model.save
|
44
|
-
@test_model.
|
43
|
+
@test_model.url.should == "https://www.example.com"
|
45
44
|
end
|
46
45
|
|
47
46
|
it "should ignore https://" do
|
48
|
-
@test_model.
|
47
|
+
@test_model.url = "https://www.example.com"
|
49
48
|
@test_model.save
|
50
|
-
@test_model.
|
49
|
+
@test_model.url.should == "https://www.example.com"
|
51
50
|
end
|
52
51
|
|
53
52
|
it "should expose the cleaned method" do
|
54
|
-
@test_model.
|
55
|
-
@test_model.
|
53
|
+
@test_model.url = "www.example.com"
|
54
|
+
@test_model.cleaned_url.should == "http://www.example.com"
|
55
|
+
end
|
56
|
+
|
57
|
+
it "should work for other_url" do
|
58
|
+
@test_model.other_url = "www.example.com"
|
59
|
+
@test_model.cleaned_other_url.should == "http://www.example.com"
|
60
|
+
@test_model.save
|
61
|
+
@test_model.other_url.should == "http://www.example.com"
|
62
|
+
end
|
63
|
+
|
64
|
+
it "should work for another_url" do
|
65
|
+
@test_model.another_url = "www.example.com"
|
66
|
+
@test_model.cleaned_another_url.should == "http://www.example.com"
|
67
|
+
@test_model.save
|
68
|
+
@test_model.another_url.should == "http://www.example.com"
|
56
69
|
end
|
57
70
|
end
|
data/url_field.gemspec
ADDED
@@ -0,0 +1,52 @@
|
|
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{url_field}
|
8
|
+
s.version = "0.0.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Paul Campbell"]
|
12
|
+
s.date = %q{2009-12-04}
|
13
|
+
s.email = %q{paul@rslw.com}
|
14
|
+
s.extra_rdoc_files = [
|
15
|
+
"README.textile"
|
16
|
+
]
|
17
|
+
s.files = [
|
18
|
+
"CHANGELOG",
|
19
|
+
"README.textile",
|
20
|
+
"Rakefile",
|
21
|
+
"init.rb",
|
22
|
+
"lib/url_field.rb",
|
23
|
+
"rails/init.rb",
|
24
|
+
"spec/database.yml",
|
25
|
+
"spec/debug.log",
|
26
|
+
"spec/schema.rb",
|
27
|
+
"spec/spec_helper.rb",
|
28
|
+
"spec/url_field_spec.rb",
|
29
|
+
"url_field.gemspec"
|
30
|
+
]
|
31
|
+
s.homepage = %q{http://www.github.com/paulca/url_field}
|
32
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
33
|
+
s.require_paths = ["lib"]
|
34
|
+
s.rubygems_version = %q{1.3.5}
|
35
|
+
s.summary = %q{A simple ActiveRecord plugin to correctly format a URL in the database whether the user enters 'http://' or not}
|
36
|
+
s.test_files = [
|
37
|
+
"spec/schema.rb",
|
38
|
+
"spec/spec_helper.rb",
|
39
|
+
"spec/url_field_spec.rb"
|
40
|
+
]
|
41
|
+
|
42
|
+
if s.respond_to? :specification_version then
|
43
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
44
|
+
s.specification_version = 3
|
45
|
+
|
46
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
47
|
+
else
|
48
|
+
end
|
49
|
+
else
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: url_field
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Campbell
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-12-04 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -22,19 +22,25 @@ extensions: []
|
|
22
22
|
extra_rdoc_files:
|
23
23
|
- README.textile
|
24
24
|
files:
|
25
|
+
- CHANGELOG
|
26
|
+
- README.textile
|
27
|
+
- Rakefile
|
25
28
|
- init.rb
|
26
29
|
- lib/url_field.rb
|
27
|
-
-
|
28
|
-
-
|
30
|
+
- rails/init.rb
|
31
|
+
- spec/database.yml
|
32
|
+
- spec/debug.log
|
33
|
+
- spec/schema.rb
|
29
34
|
- spec/spec_helper.rb
|
30
35
|
- spec/url_field_spec.rb
|
36
|
+
- url_field.gemspec
|
31
37
|
has_rdoc: true
|
32
38
|
homepage: http://www.github.com/paulca/url_field
|
33
39
|
licenses: []
|
34
40
|
|
35
41
|
post_install_message:
|
36
|
-
rdoc_options:
|
37
|
-
|
42
|
+
rdoc_options:
|
43
|
+
- --charset=UTF-8
|
38
44
|
require_paths:
|
39
45
|
- lib
|
40
46
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -52,9 +58,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
52
58
|
requirements: []
|
53
59
|
|
54
60
|
rubyforge_project:
|
55
|
-
rubygems_version: 1.3.
|
61
|
+
rubygems_version: 1.3.5
|
56
62
|
signing_key:
|
57
63
|
specification_version: 3
|
58
64
|
summary: A simple ActiveRecord plugin to correctly format a URL in the database whether the user enters 'http://' or not
|
59
|
-
test_files:
|
60
|
-
|
65
|
+
test_files:
|
66
|
+
- spec/schema.rb
|
67
|
+
- spec/spec_helper.rb
|
68
|
+
- spec/url_field_spec.rb
|