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 +4 -4
- data/app/models/addresses/address.rb +5 -5
- data/lib/addresses/version.rb +1 -1
- data/lib/tasks/natal_city.rake +50 -0
- data/spec/dummy/Gemfile.lock +87 -64
- data/spec/dummy/log/test.log +182 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d26005d1b1200ec7a4f51acfc7d706011af93df
|
4
|
+
data.tar.gz: 129811371ce7b9056b4b8c82ac7bb4a2c2b13590
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 :
|
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
|
-
|
19
|
-
|
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
|
data/lib/addresses/version.rb
CHANGED
@@ -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
|
data/spec/dummy/Gemfile.lock
CHANGED
@@ -1,84 +1,104 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../../../addresses
|
3
3
|
specs:
|
4
|
-
addresses (0.0.
|
5
|
-
rails (~> 4.0
|
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.
|
11
|
-
actionpack (= 4.
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
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
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
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
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
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.
|
51
|
-
actionmailer (= 4.
|
52
|
-
actionpack (= 4.
|
53
|
-
|
54
|
-
|
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.
|
57
|
-
sprockets-rails
|
58
|
-
|
59
|
-
|
60
|
-
|
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
|
64
|
-
sprockets (
|
65
|
-
|
66
|
-
|
67
|
-
|
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 (
|
96
|
+
sprockets (>= 2.8, < 4.0)
|
73
97
|
sqlite3 (1.3.9)
|
74
98
|
thor (0.19.1)
|
75
|
-
thread_safe (0.3.
|
76
|
-
|
77
|
-
|
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
|
data/spec/dummy/log/test.log
CHANGED
@@ -551,3 +551,185 @@ Processing by Addresses::NeighborhoodsController#index as JSON
|
|
551
551
|
[1m[35mAddresses::Neighborhood Load (0.1ms)[0m 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
|
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
554
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
555
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
556
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2016-05-07 13:53:15.898210"], ["name", "MyString"], ["updated_at", "2016-05-07 13:53:15.898210"]]
|
557
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
558
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
559
|
+
[1m[35mSQL (0.7ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
561
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
562
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "addresses_neighborhoods" ("city_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["city_id", 1], ["created_at", "2016-05-07 13:53:15.922794"], ["name", "MyString"], ["updated_at", "2016-05-07 13:53:15.922794"]]
|
563
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
564
|
+
Processing by Addresses::NeighborhoodsController#index as JSON
|
565
|
+
Parameters: {"city_id"=>1}
|
566
|
+
[1m[36mAddresses::City Load (0.1ms)[0m [1mSELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT 1[0m [["id", 1]]
|
567
|
+
[1m[35mAddresses::Neighborhood Load (0.2ms)[0m 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
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
570
|
+
[1m[35m (0.1ms)[0m begin transaction
|
571
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
572
|
+
[1m[35mSQL (0.3ms)[0m 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
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
574
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
575
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2016-05-07 13:53:15.958224"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2016-05-07 13:53:15.958224"]]
|
576
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
577
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
578
|
+
[1m[35mSQL (0.1ms)[0m 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
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
580
|
+
Processing by Addresses::NeighborhoodsController#index as JSON
|
581
|
+
Parameters: {"city_id"=>1}
|
582
|
+
[1m[35mAddresses::City Load (0.0ms)[0m SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT 1 [["id", 1]]
|
583
|
+
[1m[36mAddresses::Neighborhood Load (0.1ms)[0m [1mSELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."city_id" = ? ORDER BY name asc[0m [["city_id", 1]]
|
584
|
+
Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)
|
585
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
586
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
587
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
588
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2016-05-07 13:53:15.967670"], ["name", "MyString"], ["updated_at", "2016-05-07 13:53:15.967670"]]
|
589
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
590
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
591
|
+
[1m[35mSQL (0.5ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
593
|
+
Processing by Addresses::CitiesController#index as JSON
|
594
|
+
Parameters: {"state_id"=>1}
|
595
|
+
[1m[35mAddresses::State Load (0.1ms)[0m SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT 1 [["id", 1]]
|
596
|
+
[1m[36mAddresses::City Load (0.1ms)[0m [1mSELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc[0m [["state_id", 1]]
|
597
|
+
Completed 200 OK in 6ms (Views: 0.7ms | ActiveRecord: 0.3ms)
|
598
|
+
[1m[35m (0.9ms)[0m rollback transaction
|
599
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
600
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
601
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2016-05-07 13:53:15.983683"], ["name", "MyString"], ["updated_at", "2016-05-07 13:53:15.983683"]]
|
602
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
603
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
604
|
+
[1m[35mSQL (0.3ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
606
|
+
Processing by Addresses::CitiesController#index as JSON
|
607
|
+
Parameters: {"state_id"=>1}
|
608
|
+
[1m[35mAddresses::State Load (0.0ms)[0m SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT 1 [["id", 1]]
|
609
|
+
[1m[36mAddresses::City Load (0.1ms)[0m [1mSELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc[0m [["state_id", 1]]
|
610
|
+
Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)
|
611
|
+
[1m[35m (1.0ms)[0m rollback transaction
|
612
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
613
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
614
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2016-05-07 13:53:15.994056"], ["name", "MyString"], ["updated_at", "2016-05-07 13:53:15.994056"]]
|
615
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
616
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
617
|
+
[1m[35mSQL (0.3ms)[0m 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
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
619
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
620
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "addresses_neighborhoods" ("city_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["city_id", 1], ["created_at", "2016-05-07 13:53:15.997495"], ["name", "MyString"], ["updated_at", "2016-05-07 13:53:15.997495"]]
|
621
|
+
[1m[35m (0.0ms)[0m 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
|
+
[1m[36mAddresses::City Load (0.1ms)[0m [1mSELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT 1[0m [["id", 1]]
|
626
|
+
[1m[35mAddresses::Neighborhood Load (0.1ms)[0m 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
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
629
|
+
[1m[35m (0.1ms)[0m begin transaction
|
630
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
631
|
+
[1m[35mSQL (0.3ms)[0m 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
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
633
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
634
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2016-05-07 13:53:16.015118"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2016-05-07 13:53:16.015118"]]
|
635
|
+
[1m[35m (0.1ms)[0m 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
|
+
[1m[36mAddresses::State Load (0.1ms)[0m [1mSELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT 1[0m [["id", 1]]
|
640
|
+
[1m[35mAddresses::City Load (0.1ms)[0m 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
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
643
|
+
[1m[35m (0.1ms)[0m begin transaction
|
644
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
645
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
646
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
647
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2016-05-07 13:54:53.489536"], ["name", "MyString"], ["updated_at", "2016-05-07 13:54:53.489536"]]
|
648
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
649
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
650
|
+
[1m[35mSQL (0.4ms)[0m 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
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
652
|
+
Processing by Addresses::CitiesController#index as JSON
|
653
|
+
Parameters: {"state_id"=>1}
|
654
|
+
[1m[35mAddresses::State Load (0.2ms)[0m SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT 1 [["id", 1]]
|
655
|
+
[1m[36mAddresses::City Load (0.2ms)[0m [1mSELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc[0m [["state_id", 1]]
|
656
|
+
Completed 200 OK in 23ms (Views: 1.0ms | ActiveRecord: 0.3ms)
|
657
|
+
[1m[35m (7.3ms)[0m rollback transaction
|
658
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
659
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
660
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2016-05-07 13:54:53.538570"], ["name", "MyString"], ["updated_at", "2016-05-07 13:54:53.538570"]]
|
661
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
662
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
663
|
+
[1m[35mSQL (0.4ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
665
|
+
Processing by Addresses::CitiesController#index as JSON
|
666
|
+
Parameters: {"state_id"=>1}
|
667
|
+
[1m[35mAddresses::State Load (0.1ms)[0m SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT 1 [["id", 1]]
|
668
|
+
[1m[36mAddresses::City Load (0.1ms)[0m [1mSELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc[0m [["state_id", 1]]
|
669
|
+
Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.2ms)
|
670
|
+
[1m[35m (0.9ms)[0m rollback transaction
|
671
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
672
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
673
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2016-05-07 13:54:53.553206"], ["name", "MyString"], ["updated_at", "2016-05-07 13:54:53.553206"]]
|
674
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
675
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
676
|
+
[1m[35mSQL (0.3ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
678
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
679
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "addresses_neighborhoods" ("city_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["city_id", 1], ["created_at", "2016-05-07 13:54:53.562245"], ["name", "MyString"], ["updated_at", "2016-05-07 13:54:53.562245"]]
|
680
|
+
[1m[35m (0.1ms)[0m 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
|
+
[1m[36mAddresses::City Load (0.1ms)[0m [1mSELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT 1[0m [["id", 1]]
|
685
|
+
[1m[35mAddresses::Neighborhood Load (0.1ms)[0m 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
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
688
|
+
[1m[35m (0.1ms)[0m begin transaction
|
689
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
690
|
+
[1m[35mSQL (0.3ms)[0m 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
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
692
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
693
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2016-05-07 13:54:53.586093"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2016-05-07 13:54:53.586093"]]
|
694
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
695
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
696
|
+
[1m[35mSQL (0.2ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
698
|
+
Processing by Addresses::NeighborhoodsController#index as JSON
|
699
|
+
Parameters: {"city_id"=>1}
|
700
|
+
[1m[35mAddresses::City Load (0.1ms)[0m SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT 1 [["id", 1]]
|
701
|
+
[1m[36mAddresses::Neighborhood Load (0.1ms)[0m [1mSELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."city_id" = ? ORDER BY name asc[0m [["city_id", 1]]
|
702
|
+
Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.1ms)
|
703
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
704
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
705
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
706
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2016-05-07 13:54:53.599321"], ["name", "MyString"], ["updated_at", "2016-05-07 13:54:53.599321"]]
|
707
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
708
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
709
|
+
[1m[35mSQL (0.3ms)[0m 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
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
711
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
712
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "addresses_neighborhoods" ("city_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["city_id", 1], ["created_at", "2016-05-07 13:54:53.603182"], ["name", "MyString"], ["updated_at", "2016-05-07 13:54:53.603182"]]
|
713
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
714
|
+
Processing by Addresses::NeighborhoodsController#index as JSON
|
715
|
+
Parameters: {"city_id"=>1}
|
716
|
+
[1m[36mAddresses::City Load (0.0ms)[0m [1mSELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT 1[0m [["id", 1]]
|
717
|
+
[1m[35mAddresses::Neighborhood Load (0.1ms)[0m 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
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
720
|
+
[1m[35m (0.1ms)[0m begin transaction
|
721
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
722
|
+
[1m[35m (0.1ms)[0m begin transaction
|
723
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
724
|
+
[1m[35mSQL (0.3ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
726
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
727
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2016-05-07 13:54:53.615236"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2016-05-07 13:54:53.615236"]]
|
728
|
+
[1m[35m (0.1ms)[0m 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
|
+
[1m[36mAddresses::State Load (0.1ms)[0m [1mSELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT 1[0m [["id", 1]]
|
733
|
+
[1m[35mAddresses::City Load (0.1ms)[0m 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
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
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.
|
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:
|
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.
|
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.
|