direct_address 0.0.3 → 0.0.4
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/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/direct_address.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{direct_address}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Mike Nelson"]
|
12
|
-
s.date = %q{2010-02-
|
12
|
+
s.date = %q{2010-02-20}
|
13
13
|
s.description = %q{Direct Address provides a rails app with simple address features. This is a streamlined implementation of address functionality. Direct Address provides you with address, country, and region classes. It also provides a generator which generates the necessary javascript and rake tasks to implement properly. You'll also get form helpers to easily implement Direct Address in your views. A rake task is provided that allows up to date country and region information to be downloaded from geoname.org.}
|
14
14
|
s.email = %q{mdnelson30@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -17,6 +17,7 @@ class DirectAddressGenerator < Rails::Generator::Base
|
|
17
17
|
|
18
18
|
m.migration_template "migrations/direct_address_migration.rb", "db/migrate", {:migration_file_name => "direct_address_migration"}
|
19
19
|
|
20
|
+
m.directory "lib/tasks"
|
20
21
|
m.file "tasks/harvest.rake", "lib/tasks/direct_address_harvest.rake"
|
21
22
|
|
22
23
|
end
|
@@ -1,13 +1,17 @@
|
|
1
1
|
|
2
2
|
begin
|
3
|
-
|
4
|
-
|
3
|
+
|
5
4
|
namespace :direct_address do
|
6
5
|
desc "pulls up to date country and region data from geonames.org"
|
7
|
-
task :
|
6
|
+
task :seed do
|
7
|
+
require File.join(File.dirname(__FILE__),'..','..','config','boot')
|
8
|
+
Rails::Initializer.run do |config|
|
9
|
+
config.gem 'direct_address'
|
10
|
+
end
|
8
11
|
Geoname.retrieve_to_db
|
9
12
|
end
|
10
13
|
end
|
14
|
+
|
11
15
|
rescue
|
12
16
|
puts "Direct address harvester not properly installed"
|
13
17
|
end
|
data/spec/debug.log
CHANGED
@@ -410,3 +410,74 @@ WARNING: Can't mass-assign these protected attributes: region, country, addressa
|
|
410
410
|
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
411
411
|
[4;35;1mCountry Create (0.2ms)[0m [0mINSERT INTO `countries` (`name`, `created_at`, `updated_at`, `abbreviation`) VALUES('All Americas', '2010-02-17 17:59:03', '2010-02-17 17:59:03', 'AA')[0m
|
412
412
|
[4;36;1mSQL (0.7ms)[0m [0;1mCOMMIT[0m
|
413
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mSET NAMES 'utf8'[0m
|
414
|
+
[4;35;1mSQL (0.1ms)[0m [0mSET SQL_AUTO_IS_NULL=0[0m
|
415
|
+
[4;36;1mSQL (46.1ms)[0m [0;1mSHOW TABLES[0m
|
416
|
+
[4;35;1mSQL (69.1ms)[0m [0mDROP TABLE `addresses`[0m
|
417
|
+
[4;36;1mSQL (119.5ms)[0m [0;1mCREATE TABLE `addresses` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `addressable_id` int(11) NOT NULL, `addressable_type` varchar(255) NOT NULL, `country_id` int(11), `region_id` int(11), `street1` varchar(255), `street2` varchar(255), `city` varchar(255), `postal` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB[0m
|
418
|
+
[4;35;1mSQL (0.5ms)[0m [0mSHOW TABLES[0m
|
419
|
+
[4;36;1mSQL (1.8ms)[0m [0;1mDROP TABLE `countries`[0m
|
420
|
+
[4;35;1mSQL (253.6ms)[0m [0mCREATE TABLE `countries` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `abbreviation` varchar(255), `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB[0m
|
421
|
+
[4;36;1mSQL (0.8ms)[0m [0;1mSHOW TABLES[0m
|
422
|
+
[4;35;1mSQL (3.8ms)[0m [0mDROP TABLE `regions`[0m
|
423
|
+
[4;36;1mSQL (117.2ms)[0m [0;1mCREATE TABLE `regions` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `country_id` int(11), `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB[0m
|
424
|
+
[4;35;1mSQL (0.6ms)[0m [0mSHOW TABLES[0m
|
425
|
+
[4;36;1mSQL (120.4ms)[0m [0;1mCREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB[0m
|
426
|
+
[4;35;1mSQL (1.0ms)[0m [0mSHOW TABLES[0m
|
427
|
+
[4;36;1mSQL (0.4ms)[0m [0;1mSELECT version FROM `schema_migrations`[0m
|
428
|
+
[4;35;1mSQL (0.7ms)[0m [0mINSERT INTO `schema_migrations` (version) VALUES ('0')[0m
|
429
|
+
[4;36;1mCountry Columns (1.5ms)[0m [0;1mSHOW FIELDS FROM `countries`[0m
|
430
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
431
|
+
[4;36;1mCountry Create (0.3ms)[0m [0;1mINSERT INTO `countries` (`name`, `created_at`, `updated_at`, `abbreviation`) VALUES('United States', '2010-02-18 12:33:52', '2010-02-18 12:33:52', 'US')[0m
|
432
|
+
[4;35;1mSQL (0.6ms)[0m [0mCOMMIT[0m
|
433
|
+
[4;36;1mRegion Columns (1.3ms)[0m [0;1mSHOW FIELDS FROM `regions`[0m
|
434
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
435
|
+
[4;36;1mRegion Create (0.2ms)[0m [0;1mINSERT INTO `regions` (`name`, `created_at`, `updated_at`, `country_id`) VALUES('Kansas', '2010-02-18 12:33:52', '2010-02-18 12:33:52', 1)[0m
|
436
|
+
[4;35;1mSQL (0.9ms)[0m [0mCOMMIT[0m
|
437
|
+
[4;36;1mUser Columns (1.3ms)[0m [0;1mSHOW FIELDS FROM `users`[0m
|
438
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
439
|
+
[4;36;1mUser Create (0.6ms)[0m [0;1mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-18 12:33:52', '2010-02-18 12:33:52')[0m
|
440
|
+
[4;35;1mSQL (0.6ms)[0m [0mCOMMIT[0m
|
441
|
+
[4;36;1mAddress Columns (1.4ms)[0m [0;1mSHOW FIELDS FROM `addresses`[0m
|
442
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
443
|
+
[4;36;1mAddress Create (0.6ms)[0m [0;1mINSERT INTO `addresses` (`city`, `created_at`, `postal`, `street1`, `updated_at`, `addressable_type`, `country_id`, `street2`, `addressable_id`, `region_id`) VALUES('Whitmore', '2010-02-18 12:33:52', '04330', '54 Parkins Way', '2010-02-18 12:33:52', 'User', 1, NULL, 1, 1)[0m
|
444
|
+
[4;35;1mSQL (0.5ms)[0m [0mCOMMIT[0m
|
445
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
446
|
+
[4;35;1mCountry Create (0.2ms)[0m [0mINSERT INTO `countries` (`name`, `created_at`, `updated_at`, `abbreviation`) VALUES('All Americas', '2010-02-18 12:33:52', '2010-02-18 12:33:52', 'AA')[0m
|
447
|
+
[4;36;1mSQL (0.5ms)[0m [0;1mCOMMIT[0m
|
448
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mSET NAMES 'utf8'[0m
|
449
|
+
[4;35;1mSQL (0.1ms)[0m [0mSET SQL_AUTO_IS_NULL=0[0m
|
450
|
+
[4;36;1mSQL (0.4ms)[0m [0;1mSHOW TABLES[0m
|
451
|
+
[4;35;1mSQL (1.9ms)[0m [0mDROP TABLE `addresses`[0m
|
452
|
+
[4;36;1mSQL (61.2ms)[0m [0;1mCREATE TABLE `addresses` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `addressable_id` int(11) NOT NULL, `addressable_type` varchar(255) NOT NULL, `country_id` int(11), `region_id` int(11), `street1` varchar(255), `street2` varchar(255), `city` varchar(255), `postal` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB[0m
|
453
|
+
[4;35;1mSQL (0.8ms)[0m [0mSHOW TABLES[0m
|
454
|
+
[4;36;1mSQL (2.3ms)[0m [0;1mDROP TABLE `countries`[0m
|
455
|
+
[4;35;1mSQL (148.3ms)[0m [0mCREATE TABLE `countries` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `abbreviation` varchar(255), `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB[0m
|
456
|
+
[4;36;1mSQL (0.7ms)[0m [0;1mSHOW TABLES[0m
|
457
|
+
[4;35;1mSQL (2.5ms)[0m [0mDROP TABLE `regions`[0m
|
458
|
+
[4;36;1mSQL (107.0ms)[0m [0;1mCREATE TABLE `regions` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `country_id` int(11), `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB[0m
|
459
|
+
[4;35;1mSQL (1.4ms)[0m [0mSHOW TABLES[0m
|
460
|
+
[4;36;1mSQL (2.3ms)[0m [0;1mDROP TABLE `users`[0m
|
461
|
+
[4;35;1mSQL (116.1ms)[0m [0mCREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB[0m
|
462
|
+
[4;36;1mSQL (0.7ms)[0m [0;1mSHOW TABLES[0m
|
463
|
+
[4;35;1mSQL (0.3ms)[0m [0mSELECT version FROM `schema_migrations`[0m
|
464
|
+
[4;36;1mCountry Columns (2.1ms)[0m [0;1mSHOW FIELDS FROM `countries`[0m
|
465
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
466
|
+
[4;36;1mCountry Create (0.3ms)[0m [0;1mINSERT INTO `countries` (`name`, `created_at`, `updated_at`, `abbreviation`) VALUES('United States', '2010-02-18 12:34:07', '2010-02-18 12:34:07', 'US')[0m
|
467
|
+
[4;35;1mSQL (0.6ms)[0m [0mCOMMIT[0m
|
468
|
+
[4;36;1mRegion Columns (1.4ms)[0m [0;1mSHOW FIELDS FROM `regions`[0m
|
469
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
470
|
+
[4;36;1mRegion Create (0.2ms)[0m [0;1mINSERT INTO `regions` (`name`, `created_at`, `updated_at`, `country_id`) VALUES('Kansas', '2010-02-18 12:34:07', '2010-02-18 12:34:07', 1)[0m
|
471
|
+
[4;35;1mSQL (0.6ms)[0m [0mCOMMIT[0m
|
472
|
+
[4;36;1mUser Columns (1.3ms)[0m [0;1mSHOW FIELDS FROM `users`[0m
|
473
|
+
WARNING: Can't mass-assign these protected attributes: name
|
474
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
475
|
+
[4;36;1mUser Create (0.3ms)[0m [0;1mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES(NULL, '2010-02-18 12:34:07', '2010-02-18 12:34:07')[0m
|
476
|
+
[4;35;1mSQL (0.6ms)[0m [0mCOMMIT[0m
|
477
|
+
[4;36;1mAddress Columns (1.5ms)[0m [0;1mSHOW FIELDS FROM `addresses`[0m
|
478
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
479
|
+
[4;36;1mAddress Create (0.2ms)[0m [0;1mINSERT INTO `addresses` (`city`, `created_at`, `postal`, `street1`, `updated_at`, `addressable_type`, `country_id`, `street2`, `addressable_id`, `region_id`) VALUES('Whitmore', '2010-02-18 12:34:07', '04330', '54 Parkins Way', '2010-02-18 12:34:07', 'User', 1, NULL, 1, 1)[0m
|
480
|
+
[4;35;1mSQL (0.6ms)[0m [0mCOMMIT[0m
|
481
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mBEGIN[0m
|
482
|
+
[4;35;1mCountry Create (0.2ms)[0m [0mINSERT INTO `countries` (`name`, `created_at`, `updated_at`, `abbreviation`) VALUES('All Americas', '2010-02-18 12:34:07', '2010-02-18 12:34:07', 'AA')[0m
|
483
|
+
[4;36;1mSQL (0.7ms)[0m [0;1mCOMMIT[0m
|
data/spec/model/user.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: direct_address
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Nelson
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-02-
|
12
|
+
date: 2010-02-20 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|