addresses 0.0.7 → 0.0.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b392ab523750e9e0d9d2cec83af5dd1d1eddfc7
4
- data.tar.gz: 7f7b5d931178085ec664efb9aae031d3daceb3fd
3
+ metadata.gz: 6d26005d1b1200ec7a4f51acfc7d706011af93df
4
+ data.tar.gz: 129811371ce7b9056b4b8c82ac7bb4a2c2b13590
5
5
  SHA512:
6
- metadata.gz: fc24f05ddb0d02a82ca44d8e9fc0a4d79adcf37514e38c1e342f28eefd77a7973b41aa361240b7d915f65ec6e9cebada00e011f42314a1eb7b23581ecb5ccb33
7
- data.tar.gz: dc9da4587d03feb943adc6e201fb412a0d416f84fee2651dc91ec93d01ea91ddec1f9922c432d7d1be88b7676433a46d4e71778285363014a8fa771a2a7c69a6
6
+ metadata.gz: 1187cc369d16c8ea515fe7c6b926883c58397459a7f04743259dcf00fa0f6bb334c3575af230ef5dc48a81050d7e489cacef57d57d70af8738302a6e6d5c16f8
7
+ data.tar.gz: 465727f10b8fa0327fca69e9af81d1a7e83e9f86e0feb26f66599ae3edc96215de2461b64ae3f5ac40a51e70e2ca3f551b10dfa685a2b09a6f7761175d7468a1
@@ -8,16 +8,16 @@ module Addresses
8
8
 
9
9
  validates :zipcode, :number, :city_id, :state_id, presence: true
10
10
 
11
- after_find :after_find
11
+ after_find :set_state_id
12
+ before_validation :set_state_id
12
13
 
13
14
  def to_s
14
- "#{self.street}, #{self.number}, #{self.neighborhood}. #{self.city.name} - #{self.city.state.acronym}"
15
+ "#{self.street}, #{self.number}, #{self.neighborhood.name}. #{self.city.name} - #{self.city.state.acronym}"
15
16
  end
16
17
 
17
18
  private
18
- # => Used to fill state_id
19
- def after_find
20
- self.state_id = self.city.state.id unless self.city.nil?
19
+ def set_state_id
20
+ self.state_id = self.city.state.id unless self.city.nil?
21
21
  end
22
22
  end
23
23
  end
@@ -1,3 +1,3 @@
1
1
  module Addresses
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -0,0 +1,50 @@
1
+ namespace :addresses do
2
+ desc 'Creates neighborhood, city, state and country for Natal/RN'
3
+ task :'city:natal' => [:environment] do
4
+ # Country
5
+ Addresses::Country.create(id: '33', name: 'Brasil', acronym: 'BRA')
6
+
7
+ # State
8
+ Addresses::State.create(id: '47', name: 'Rio Grande do Norte', acronym: 'RN', country_id: 33)
9
+
10
+ # City
11
+ Addresses::City.create(id: '9346', name: 'Natal', state_id: 47)
12
+
13
+ # Neighborhood
14
+ Addresses::Neighborhood.create(id: 10626, city_id: 9346, name: 'Alecrim')
15
+ Addresses::Neighborhood.create(id: 10627, city_id: 9346, name: 'Areia Preta')
16
+ Addresses::Neighborhood.create(id: 10628, city_id: 9346, name: 'Barro Vermelho')
17
+ Addresses::Neighborhood.create(id: 10629, city_id: 9346, name: 'Bom Pastor')
18
+ Addresses::Neighborhood.create(id: 10630, city_id: 9346, name: 'Candelária')
19
+ Addresses::Neighborhood.create(id: 10631, city_id: 9346, name: 'Capim Macio')
20
+ Addresses::Neighborhood.create(id: 10632, city_id: 9346, name: 'Cidade Alta')
21
+ Addresses::Neighborhood.create(id: 10633, city_id: 9346, name: 'Cidade da Esperança')
22
+ Addresses::Neighborhood.create(id: 10634, city_id: 9346, name: 'Cidade Nova')
23
+ Addresses::Neighborhood.create(id: 10635, city_id: 9346, name: 'Dix-Sept Rosado')
24
+ Addresses::Neighborhood.create(id: 10636, city_id: 9346, name: 'Felipe Camarão')
25
+ Addresses::Neighborhood.create(id: 10637, city_id: 9346, name: 'Guarapes')
26
+ Addresses::Neighborhood.create(id: 10638, city_id: 9346, name: 'Igapó')
27
+ Addresses::Neighborhood.create(id: 10639, city_id: 9346, name: 'Lagoa Azul')
28
+ Addresses::Neighborhood.create(id: 10640, city_id: 9346, name: 'Lagoa Nova')
29
+ Addresses::Neighborhood.create(id: 10641, city_id: 9346, name: 'Lagoa Seca')
30
+ Addresses::Neighborhood.create(id: 10642, city_id: 9346, name: 'Mãe Luiza')
31
+ Addresses::Neighborhood.create(id: 10643, city_id: 9346, name: 'Neópolis')
32
+ Addresses::Neighborhood.create(id: 10644, city_id: 9346, name: 'Nordeste')
33
+ Addresses::Neighborhood.create(id: 10645, city_id: 9346, name: 'Nossa Senhora da Apresentação')
34
+ Addresses::Neighborhood.create(id: 10646, city_id: 9346, name: 'Nossa Senhora de Nazaré')
35
+ Addresses::Neighborhood.create(id: 10647, city_id: 9346, name: 'Nova Descoberta')
36
+ Addresses::Neighborhood.create(id: 10648, city_id: 9346, name: 'Pajuçara')
37
+ Addresses::Neighborhood.create(id: 10649, city_id: 9346, name: 'Petrópolis')
38
+ Addresses::Neighborhood.create(id: 10650, city_id: 9346, name: 'Pitimbu')
39
+ Addresses::Neighborhood.create(id: 10651, city_id: 9346, name: 'Ponta Negra')
40
+ Addresses::Neighborhood.create(id: 10652, city_id: 9346, name: 'Potengi')
41
+ Addresses::Neighborhood.create(id: 10653, city_id: 9346, name: 'Praia do Meio')
42
+ Addresses::Neighborhood.create(id: 10654, city_id: 9346, name: 'Quintas')
43
+ Addresses::Neighborhood.create(id: 10655, city_id: 9346, name: 'Redinha')
44
+ Addresses::Neighborhood.create(id: 10656, city_id: 9346, name: 'Ribeira')
45
+ Addresses::Neighborhood.create(id: 10657, city_id: 9346, name: 'Rocas')
46
+ Addresses::Neighborhood.create(id: 10658, city_id: 9346, name: 'Salinas')
47
+ Addresses::Neighborhood.create(id: 10659, city_id: 9346, name: 'Santos Reis')
48
+ Addresses::Neighborhood.create(id: 10660, city_id: 9346, name: 'Tirol')
49
+ end
50
+ end
@@ -1,84 +1,104 @@
1
1
  PATH
2
2
  remote: ../../../addresses
3
3
  specs:
4
- addresses (0.0.1)
5
- rails (~> 4.0.4)
4
+ addresses (0.0.9)
5
+ rails (~> 4.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actionmailer (4.0.4)
11
- actionpack (= 4.0.4)
12
- mail (~> 2.5.4)
13
- actionpack (4.0.4)
14
- activesupport (= 4.0.4)
15
- builder (~> 3.1.0)
16
- erubis (~> 2.7.0)
17
- rack (~> 1.5.2)
10
+ actionmailer (4.2.1)
11
+ actionpack (= 4.2.1)
12
+ actionview (= 4.2.1)
13
+ activejob (= 4.2.1)
14
+ mail (~> 2.5, >= 2.5.4)
15
+ rails-dom-testing (~> 1.0, >= 1.0.5)
16
+ actionpack (4.2.1)
17
+ actionview (= 4.2.1)
18
+ activesupport (= 4.2.1)
19
+ rack (~> 1.6)
18
20
  rack-test (~> 0.6.2)
19
- activemodel (4.0.4)
20
- activesupport (= 4.0.4)
21
- builder (~> 3.1.0)
22
- activerecord (4.0.4)
23
- activemodel (= 4.0.4)
24
- activerecord-deprecated_finders (~> 1.0.2)
25
- activesupport (= 4.0.4)
26
- arel (~> 4.0.0)
27
- activerecord-deprecated_finders (1.0.3)
28
- activesupport (4.0.4)
29
- i18n (~> 0.6, >= 0.6.9)
30
- minitest (~> 4.2)
31
- multi_json (~> 1.3)
32
- thread_safe (~> 0.1)
33
- tzinfo (~> 0.3.37)
34
- arel (4.0.2)
35
- atomic (1.1.16)
36
- builder (3.1.4)
21
+ rails-dom-testing (~> 1.0, >= 1.0.5)
22
+ rails-html-sanitizer (~> 1.0, >= 1.0.1)
23
+ actionview (4.2.1)
24
+ activesupport (= 4.2.1)
25
+ builder (~> 3.1)
26
+ erubis (~> 2.7.0)
27
+ rails-dom-testing (~> 1.0, >= 1.0.5)
28
+ rails-html-sanitizer (~> 1.0, >= 1.0.1)
29
+ activejob (4.2.1)
30
+ activesupport (= 4.2.1)
31
+ globalid (>= 0.3.0)
32
+ activemodel (4.2.1)
33
+ activesupport (= 4.2.1)
34
+ builder (~> 3.1)
35
+ activerecord (4.2.1)
36
+ activemodel (= 4.2.1)
37
+ activesupport (= 4.2.1)
38
+ arel (~> 6.0)
39
+ activesupport (4.2.1)
40
+ i18n (~> 0.7)
41
+ json (~> 1.7, >= 1.7.7)
42
+ minitest (~> 5.1)
43
+ thread_safe (~> 0.3, >= 0.3.4)
44
+ tzinfo (~> 1.1)
45
+ arel (6.0.0)
46
+ builder (3.2.2)
47
+ concurrent-ruby (1.0.2)
37
48
  erubis (2.7.0)
38
- hike (1.2.3)
39
- i18n (0.6.9)
40
- mail (2.5.4)
41
- mime-types (~> 1.16)
42
- treetop (~> 1.4.8)
43
- mime-types (1.25.1)
44
- minitest (4.7.5)
45
- multi_json (1.9.2)
46
- polyglot (0.3.4)
47
- rack (1.5.2)
48
- rack-test (0.6.2)
49
+ globalid (0.3.6)
50
+ activesupport (>= 4.1.0)
51
+ i18n (0.7.0)
52
+ json (1.8.2)
53
+ loofah (2.0.1)
54
+ nokogiri (>= 1.5.9)
55
+ mail (2.6.3)
56
+ mime-types (>= 1.16, < 3)
57
+ mime-types (2.4.3)
58
+ mini_portile (0.6.2)
59
+ minitest (5.5.1)
60
+ nokogiri (1.6.6.2)
61
+ mini_portile (~> 0.6.0)
62
+ rack (1.6.0)
63
+ rack-test (0.6.3)
49
64
  rack (>= 1.0)
50
- rails (4.0.4)
51
- actionmailer (= 4.0.4)
52
- actionpack (= 4.0.4)
53
- activerecord (= 4.0.4)
54
- activesupport (= 4.0.4)
65
+ rails (4.2.1)
66
+ actionmailer (= 4.2.1)
67
+ actionpack (= 4.2.1)
68
+ actionview (= 4.2.1)
69
+ activejob (= 4.2.1)
70
+ activemodel (= 4.2.1)
71
+ activerecord (= 4.2.1)
72
+ activesupport (= 4.2.1)
55
73
  bundler (>= 1.3.0, < 2.0)
56
- railties (= 4.0.4)
57
- sprockets-rails (~> 2.0.0)
58
- railties (4.0.4)
59
- actionpack (= 4.0.4)
60
- activesupport (= 4.0.4)
74
+ railties (= 4.2.1)
75
+ sprockets-rails
76
+ rails-deprecated_sanitizer (1.0.3)
77
+ activesupport (>= 4.2.0.alpha)
78
+ rails-dom-testing (1.0.6)
79
+ activesupport (>= 4.2.0.beta, < 5.0)
80
+ nokogiri (~> 1.6.0)
81
+ rails-deprecated_sanitizer (>= 1.0.1)
82
+ rails-html-sanitizer (1.0.2)
83
+ loofah (~> 2.0)
84
+ railties (4.2.1)
85
+ actionpack (= 4.2.1)
86
+ activesupport (= 4.2.1)
61
87
  rake (>= 0.8.7)
62
88
  thor (>= 0.18.1, < 2.0)
63
- rake (10.2.1)
64
- sprockets (2.12.0)
65
- hike (~> 1.2)
66
- multi_json (~> 1.0)
67
- rack (~> 1.0)
68
- tilt (~> 1.1, != 1.3.0)
69
- sprockets-rails (2.0.1)
89
+ rake (10.4.2)
90
+ sprockets (3.6.0)
91
+ concurrent-ruby (~> 1.0)
92
+ rack (> 1, < 3)
93
+ sprockets-rails (2.2.4)
70
94
  actionpack (>= 3.0)
71
95
  activesupport (>= 3.0)
72
- sprockets (~> 2.8)
96
+ sprockets (>= 2.8, < 4.0)
73
97
  sqlite3 (1.3.9)
74
98
  thor (0.19.1)
75
- thread_safe (0.3.1)
76
- atomic (>= 1.1.7, < 2)
77
- tilt (1.4.1)
78
- treetop (1.4.15)
79
- polyglot
80
- polyglot (>= 0.3.1)
81
- tzinfo (0.3.39)
99
+ thread_safe (0.3.5)
100
+ tzinfo (1.2.2)
101
+ thread_safe (~> 0.1)
82
102
 
83
103
  PLATFORMS
84
104
  ruby
@@ -86,3 +106,6 @@ PLATFORMS
86
106
  DEPENDENCIES
87
107
  addresses!
88
108
  sqlite3
109
+
110
+ BUNDLED WITH
111
+ 1.11.2
@@ -551,3 +551,185 @@ Processing by Addresses::NeighborhoodsController#index as JSON
551
551
  Addresses::Neighborhood Load (0.1ms) SELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."city_id" = ? ORDER BY name asc [["city_id", 1]]
552
552
  Completed 200 OK in 19ms (Views: 1.0ms | ActiveRecord: 0.3ms)
553
553
   (0.7ms) rollback transaction
554
+  (0.4ms) begin transaction
555
+  (0.1ms) SAVEPOINT active_record_1
556
+ SQL (0.5ms) INSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["acronym", "MyString"], ["created_at", "2016-05-07 13:53:15.898210"], ["name", "MyString"], ["updated_at", "2016-05-07 13:53:15.898210"]]
557
+  (0.1ms) RELEASE SAVEPOINT active_record_1
558
+  (0.1ms) SAVEPOINT active_record_1
559
+ SQL (0.7ms) INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2016-05-07 13:53:15.911266"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2016-05-07 13:53:15.911266"]]
560
+  (0.1ms) RELEASE SAVEPOINT active_record_1
561
+  (0.1ms) SAVEPOINT active_record_1
562
+ SQL (0.2ms) INSERT INTO "addresses_neighborhoods" ("city_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["created_at", "2016-05-07 13:53:15.922794"], ["name", "MyString"], ["updated_at", "2016-05-07 13:53:15.922794"]]
563
+  (0.1ms) RELEASE SAVEPOINT active_record_1
564
+ Processing by Addresses::NeighborhoodsController#index as JSON
565
+ Parameters: {"city_id"=>1}
566
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT 1 [["id", 1]]
567
+ Addresses::Neighborhood Load (0.2ms) SELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."city_id" = ? ORDER BY name asc [["city_id", 1]]
568
+ Completed 200 OK in 26ms (Views: 1.1ms | ActiveRecord: 0.3ms)
569
+  (0.8ms) rollback transaction
570
+  (0.1ms) begin transaction
571
+  (0.0ms) SAVEPOINT active_record_1
572
+ SQL (0.3ms) INSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["acronym", "MyString"], ["created_at", "2016-05-07 13:53:15.956553"], ["name", "MyString"], ["updated_at", "2016-05-07 13:53:15.956553"]]
573
+  (0.0ms) RELEASE SAVEPOINT active_record_1
574
+  (0.0ms) SAVEPOINT active_record_1
575
+ SQL (0.3ms) INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2016-05-07 13:53:15.958224"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2016-05-07 13:53:15.958224"]]
576
+  (0.0ms) RELEASE SAVEPOINT active_record_1
577
+  (0.0ms) SAVEPOINT active_record_1
578
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["created_at", "2016-05-07 13:53:15.959763"], ["name", "MyString"], ["updated_at", "2016-05-07 13:53:15.959763"]]
579
+  (0.0ms) RELEASE SAVEPOINT active_record_1
580
+ Processing by Addresses::NeighborhoodsController#index as JSON
581
+ Parameters: {"city_id"=>1}
582
+ Addresses::City Load (0.0ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT 1 [["id", 1]]
583
+ Addresses::Neighborhood Load (0.1ms) SELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."city_id" = ? ORDER BY name asc [["city_id", 1]]
584
+ Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)
585
+  (0.7ms) rollback transaction
586
+  (0.1ms) begin transaction
587
+  (0.1ms) SAVEPOINT active_record_1
588
+ SQL (0.3ms) INSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["acronym", "MyString"], ["created_at", "2016-05-07 13:53:15.967670"], ["name", "MyString"], ["updated_at", "2016-05-07 13:53:15.967670"]]
589
+  (0.1ms) RELEASE SAVEPOINT active_record_1
590
+  (0.0ms) SAVEPOINT active_record_1
591
+ SQL (0.5ms) INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2016-05-07 13:53:15.969687"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2016-05-07 13:53:15.969687"]]
592
+  (0.1ms) RELEASE SAVEPOINT active_record_1
593
+ Processing by Addresses::CitiesController#index as JSON
594
+ Parameters: {"state_id"=>1}
595
+ Addresses::State Load (0.1ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT 1 [["id", 1]]
596
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
597
+ Completed 200 OK in 6ms (Views: 0.7ms | ActiveRecord: 0.3ms)
598
+  (0.9ms) rollback transaction
599
+  (0.1ms) begin transaction
600
+  (0.1ms) SAVEPOINT active_record_1
601
+ SQL (0.3ms) INSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["acronym", "MyString"], ["created_at", "2016-05-07 13:53:15.983683"], ["name", "MyString"], ["updated_at", "2016-05-07 13:53:15.983683"]]
602
+  (0.1ms) RELEASE SAVEPOINT active_record_1
603
+  (0.0ms) SAVEPOINT active_record_1
604
+ SQL (0.3ms) INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2016-05-07 13:53:15.985626"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2016-05-07 13:53:15.985626"]]
605
+  (0.1ms) RELEASE SAVEPOINT active_record_1
606
+ Processing by Addresses::CitiesController#index as JSON
607
+ Parameters: {"state_id"=>1}
608
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT 1 [["id", 1]]
609
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
610
+ Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)
611
+  (1.0ms) rollback transaction
612
+  (0.1ms) begin transaction
613
+  (0.0ms) SAVEPOINT active_record_1
614
+ SQL (0.3ms) INSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["acronym", "MyString"], ["created_at", "2016-05-07 13:53:15.994056"], ["name", "MyString"], ["updated_at", "2016-05-07 13:53:15.994056"]]
615
+  (0.0ms) RELEASE SAVEPOINT active_record_1
616
+  (0.0ms) SAVEPOINT active_record_1
617
+ SQL (0.3ms) INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2016-05-07 13:53:15.995879"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2016-05-07 13:53:15.995879"]]
618
+  (0.0ms) RELEASE SAVEPOINT active_record_1
619
+  (0.0ms) SAVEPOINT active_record_1
620
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["created_at", "2016-05-07 13:53:15.997495"], ["name", "MyString"], ["updated_at", "2016-05-07 13:53:15.997495"]]
621
+  (0.0ms) RELEASE SAVEPOINT active_record_1
622
+ Started GET "/addresses/neighborhoods?format=json&city_id=1" for 127.0.0.1 at 2016-05-07 10:53:16 -0300
623
+ Processing by Addresses::NeighborhoodsController#index as JSON
624
+ Parameters: {"city_id"=>"1"}
625
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT 1 [["id", 1]]
626
+ Addresses::Neighborhood Load (0.1ms) SELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."city_id" = ? ORDER BY name asc [["city_id", 1]]
627
+ Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.1ms)
628
+  (0.8ms) rollback transaction
629
+  (0.1ms) begin transaction
630
+  (0.0ms) SAVEPOINT active_record_1
631
+ SQL (0.3ms) INSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["acronym", "MyString"], ["created_at", "2016-05-07 13:53:16.013402"], ["name", "MyString"], ["updated_at", "2016-05-07 13:53:16.013402"]]
632
+  (0.0ms) RELEASE SAVEPOINT active_record_1
633
+  (0.0ms) SAVEPOINT active_record_1
634
+ SQL (0.5ms) INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2016-05-07 13:53:16.015118"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2016-05-07 13:53:16.015118"]]
635
+  (0.1ms) RELEASE SAVEPOINT active_record_1
636
+ Started GET "/addresses/cities?format=json&state_id=1" for 127.0.0.1 at 2016-05-07 10:53:16 -0300
637
+ Processing by Addresses::CitiesController#index as JSON
638
+ Parameters: {"state_id"=>"1"}
639
+ Addresses::State Load (0.1ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT 1 [["id", 1]]
640
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
641
+ Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)
642
+  (1.0ms) rollback transaction
643
+  (0.1ms) begin transaction
644
+  (0.0ms) rollback transaction
645
+  (0.4ms) begin transaction
646
+  (0.1ms) SAVEPOINT active_record_1
647
+ SQL (0.4ms) INSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["acronym", "MyString"], ["created_at", "2016-05-07 13:54:53.489536"], ["name", "MyString"], ["updated_at", "2016-05-07 13:54:53.489536"]]
648
+  (0.1ms) RELEASE SAVEPOINT active_record_1
649
+  (0.1ms) SAVEPOINT active_record_1
650
+ SQL (0.4ms) INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2016-05-07 13:54:53.499320"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2016-05-07 13:54:53.499320"]]
651
+  (0.0ms) RELEASE SAVEPOINT active_record_1
652
+ Processing by Addresses::CitiesController#index as JSON
653
+ Parameters: {"state_id"=>1}
654
+ Addresses::State Load (0.2ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT 1 [["id", 1]]
655
+ Addresses::City Load (0.2ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
656
+ Completed 200 OK in 23ms (Views: 1.0ms | ActiveRecord: 0.3ms)
657
+  (7.3ms) rollback transaction
658
+  (0.1ms) begin transaction
659
+  (0.1ms) SAVEPOINT active_record_1
660
+ SQL (0.5ms) INSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["acronym", "MyString"], ["created_at", "2016-05-07 13:54:53.538570"], ["name", "MyString"], ["updated_at", "2016-05-07 13:54:53.538570"]]
661
+  (0.1ms) RELEASE SAVEPOINT active_record_1
662
+  (0.1ms) SAVEPOINT active_record_1
663
+ SQL (0.4ms) INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2016-05-07 13:54:53.541976"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2016-05-07 13:54:53.541976"]]
664
+  (0.1ms) RELEASE SAVEPOINT active_record_1
665
+ Processing by Addresses::CitiesController#index as JSON
666
+ Parameters: {"state_id"=>1}
667
+ Addresses::State Load (0.1ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT 1 [["id", 1]]
668
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
669
+ Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.2ms)
670
+  (0.9ms) rollback transaction
671
+  (0.1ms) begin transaction
672
+  (0.0ms) SAVEPOINT active_record_1
673
+ SQL (0.3ms) INSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["acronym", "MyString"], ["created_at", "2016-05-07 13:54:53.553206"], ["name", "MyString"], ["updated_at", "2016-05-07 13:54:53.553206"]]
674
+  (0.0ms) RELEASE SAVEPOINT active_record_1
675
+  (0.0ms) SAVEPOINT active_record_1
676
+ SQL (0.3ms) INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2016-05-07 13:54:53.555052"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2016-05-07 13:54:53.555052"]]
677
+  (0.1ms) RELEASE SAVEPOINT active_record_1
678
+  (0.1ms) SAVEPOINT active_record_1
679
+ SQL (0.3ms) INSERT INTO "addresses_neighborhoods" ("city_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["created_at", "2016-05-07 13:54:53.562245"], ["name", "MyString"], ["updated_at", "2016-05-07 13:54:53.562245"]]
680
+  (0.1ms) RELEASE SAVEPOINT active_record_1
681
+ Started GET "/addresses/neighborhoods?format=json&city_id=1" for 127.0.0.1 at 2016-05-07 10:54:53 -0300
682
+ Processing by Addresses::NeighborhoodsController#index as JSON
683
+ Parameters: {"city_id"=>"1"}
684
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT 1 [["id", 1]]
685
+ Addresses::Neighborhood Load (0.1ms) SELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."city_id" = ? ORDER BY name asc [["city_id", 1]]
686
+ Completed 200 OK in 7ms (Views: 0.8ms | ActiveRecord: 0.3ms)
687
+  (1.0ms) rollback transaction
688
+  (0.1ms) begin transaction
689
+  (0.1ms) SAVEPOINT active_record_1
690
+ SQL (0.3ms) INSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["acronym", "MyString"], ["created_at", "2016-05-07 13:54:53.584197"], ["name", "MyString"], ["updated_at", "2016-05-07 13:54:53.584197"]]
691
+  (0.0ms) RELEASE SAVEPOINT active_record_1
692
+  (0.0ms) SAVEPOINT active_record_1
693
+ SQL (0.5ms) INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2016-05-07 13:54:53.586093"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2016-05-07 13:54:53.586093"]]
694
+  (0.1ms) RELEASE SAVEPOINT active_record_1
695
+  (0.1ms) SAVEPOINT active_record_1
696
+ SQL (0.2ms) INSERT INTO "addresses_neighborhoods" ("city_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["created_at", "2016-05-07 13:54:53.588986"], ["name", "MyString"], ["updated_at", "2016-05-07 13:54:53.588986"]]
697
+  (0.1ms) RELEASE SAVEPOINT active_record_1
698
+ Processing by Addresses::NeighborhoodsController#index as JSON
699
+ Parameters: {"city_id"=>1}
700
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT 1 [["id", 1]]
701
+ Addresses::Neighborhood Load (0.1ms) SELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."city_id" = ? ORDER BY name asc [["city_id", 1]]
702
+ Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.1ms)
703
+  (0.7ms) rollback transaction
704
+  (0.1ms) begin transaction
705
+  (0.0ms) SAVEPOINT active_record_1
706
+ SQL (0.3ms) INSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["acronym", "MyString"], ["created_at", "2016-05-07 13:54:53.599321"], ["name", "MyString"], ["updated_at", "2016-05-07 13:54:53.599321"]]
707
+  (0.0ms) RELEASE SAVEPOINT active_record_1
708
+  (0.0ms) SAVEPOINT active_record_1
709
+ SQL (0.3ms) INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2016-05-07 13:54:53.601356"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2016-05-07 13:54:53.601356"]]
710
+  (0.0ms) RELEASE SAVEPOINT active_record_1
711
+  (0.0ms) SAVEPOINT active_record_1
712
+ SQL (0.2ms) INSERT INTO "addresses_neighborhoods" ("city_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["created_at", "2016-05-07 13:54:53.603182"], ["name", "MyString"], ["updated_at", "2016-05-07 13:54:53.603182"]]
713
+  (0.1ms) RELEASE SAVEPOINT active_record_1
714
+ Processing by Addresses::NeighborhoodsController#index as JSON
715
+ Parameters: {"city_id"=>1}
716
+ Addresses::City Load (0.0ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT 1 [["id", 1]]
717
+ Addresses::Neighborhood Load (0.1ms) SELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."city_id" = ? ORDER BY name asc [["city_id", 1]]
718
+ Completed 200 OK in 2ms (Views: 0.9ms | ActiveRecord: 0.2ms)
719
+  (0.7ms) rollback transaction
720
+  (0.1ms) begin transaction
721
+  (0.1ms) rollback transaction
722
+  (0.1ms) begin transaction
723
+  (0.1ms) SAVEPOINT active_record_1
724
+ SQL (0.3ms) INSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["acronym", "MyString"], ["created_at", "2016-05-07 13:54:53.613415"], ["name", "MyString"], ["updated_at", "2016-05-07 13:54:53.613415"]]
725
+  (0.1ms) RELEASE SAVEPOINT active_record_1
726
+  (0.0ms) SAVEPOINT active_record_1
727
+ SQL (0.3ms) INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2016-05-07 13:54:53.615236"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2016-05-07 13:54:53.615236"]]
728
+  (0.1ms) RELEASE SAVEPOINT active_record_1
729
+ Started GET "/addresses/cities?format=json&state_id=1" for 127.0.0.1 at 2016-05-07 10:54:53 -0300
730
+ Processing by Addresses::CitiesController#index as JSON
731
+ Parameters: {"state_id"=>"1"}
732
+ Addresses::State Load (0.1ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT 1 [["id", 1]]
733
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
734
+ Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.1ms)
735
+  (0.8ms) rollback transaction
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: addresses
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wilbert Ribeiro
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-23 00:00:00.000000000 Z
12
+ date: 2016-05-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -75,6 +75,7 @@ files:
75
75
  - lib/addresses/engine.rb
76
76
  - lib/addresses/version.rb
77
77
  - lib/tasks/addresses_tasks.rake
78
+ - lib/tasks/natal_city.rake
78
79
  - lib/tasks/populate_cities.rake
79
80
  - lib/tasks/populate_countries.rake
80
81
  - lib/tasks/populate_neighborhoods.rake
@@ -159,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
160
  version: '0'
160
161
  requirements: []
161
162
  rubyforge_project:
162
- rubygems_version: 2.2.2
163
+ rubygems_version: 2.4.5.1
163
164
  signing_key:
164
165
  specification_version: 4
165
166
  summary: This engine allows create default addresses models for any usage.