addresses 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/app/controllers/addresses/cities_controller.rb +1 -1
- data/app/controllers/addresses/neighborhoods_controller.rb +15 -0
- data/app/views/addresses/neighborhoods/index.html.erb +2 -0
- data/config/routes.rb +3 -0
- data/lib/addresses/version.rb +1 -1
- data/spec/controllers/addresses/cities_controller_spec.rb +3 -2
- data/spec/controllers/addresses/neighborhoods_controller_spec.rb +26 -0
- data/spec/dummy/log/test.log +265 -0
- data/spec/factories/addresses_neighborhoods.rb +1 -1
- data/spec/requests/cities_spec.rb +1 -1
- data/spec/requests/neighborhoods_spec.rb +21 -0
- data/spec/spec_helper.rb +3 -0
- metadata +26 -6
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NWViYTUxMmIzZTQwN2RkYmI4MjAxMjJkZTU0YWE3YTE2NjkzMmI4ZQ==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0b392ab523750e9e0d9d2cec83af5dd1d1eddfc7
|
4
|
+
data.tar.gz: 7f7b5d931178085ec664efb9aae031d3daceb3fd
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
OTI2YjhhNmIyZTZhMDU3NTc2ZDMyYTQ1NjRjYzY1YTU0YWYwYzMwM2VjMTQy
|
11
|
-
MTBhZmRkMmQyYTM2YWMxNGMzMTE2ODkwMDQyNmE4NmIwOTkwMGY=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NzA1MzcyMDNhOGE1YmJmNzQxY2NlZDZkNDIxODQwYzFkMDI2OTMxZGIxNTRi
|
14
|
-
MjQyYzhjNGNlM2I0OGU3MDViYzljYWQ5ZTE5OWE3Y2VmYTcxMWU5YmU0ZGMz
|
15
|
-
ZTkyMjQ4ZWVjOTM4NWVmZWQ1NTMxZGY3NDFkM2FjNWEwOWQ5MmQ=
|
6
|
+
metadata.gz: fc24f05ddb0d02a82ca44d8e9fc0a4d79adcf37514e38c1e342f28eefd77a7973b41aa361240b7d915f65ec6e9cebada00e011f42314a1eb7b23581ecb5ccb33
|
7
|
+
data.tar.gz: dc9da4587d03feb943adc6e201fb412a0d416f84fee2651dc91ec93d01ea91ddec1f9922c432d7d1be88b7676433a46d4e71778285363014a8fa771a2a7c69a6
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require_dependency "addresses/application_controller"
|
2
|
+
|
3
|
+
module Addresses
|
4
|
+
class NeighborhoodsController < ApplicationController
|
5
|
+
respond_to :json
|
6
|
+
|
7
|
+
def index
|
8
|
+
@city = City.find(params[:city_id])
|
9
|
+
|
10
|
+
@neighborhoods = @city.neighborhoods.order("name asc")
|
11
|
+
|
12
|
+
respond_with @neighborhoods
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/config/routes.rb
CHANGED
data/lib/addresses/version.rb
CHANGED
@@ -6,17 +6,18 @@ module Addresses
|
|
6
6
|
|
7
7
|
before do
|
8
8
|
@state = FactoryGirl.create(:addresses_state)
|
9
|
+
|
9
10
|
@city = FactoryGirl.create(:addresses_city, state: @state)
|
10
11
|
end
|
11
12
|
|
12
13
|
describe "GET 'index'" do
|
13
14
|
it "returns http success" do
|
14
|
-
get 'index', { state_id: @state.id }
|
15
|
+
get 'index', { state_id: @state.id, format: :json }
|
15
16
|
response.should be_success
|
16
17
|
end
|
17
18
|
|
18
19
|
it "assings correct variables" do
|
19
|
-
get 'index', { state_id: @state.id }
|
20
|
+
get 'index', { state_id: @state.id, format: :json }
|
20
21
|
assigns(:cities).should eq([@city])
|
21
22
|
end
|
22
23
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Addresses
|
4
|
+
describe NeighborhoodsController do
|
5
|
+
routes { Addresses::Engine.routes }
|
6
|
+
|
7
|
+
before do
|
8
|
+
@state = FactoryGirl.create(:addresses_state)
|
9
|
+
@city = FactoryGirl.create(:addresses_city, state: @state)
|
10
|
+
@neighborhood = FactoryGirl.create(:addresses_neighborhood, city: @city)
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "GET 'index'" do
|
14
|
+
it "returns http success" do
|
15
|
+
get 'index', { city_id: @state.id, format: :json }
|
16
|
+
|
17
|
+
response.should be_success
|
18
|
+
end
|
19
|
+
|
20
|
+
it "assings correct variables" do
|
21
|
+
get 'index', { city_id: @state.id, format: :json }
|
22
|
+
assigns(:neighborhoods).should eq([@neighborhood])
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/spec/dummy/log/test.log
CHANGED
@@ -286,3 +286,268 @@ Processing by Addresses::CitiesController#index as JSON
|
|
286
286
|
[1m[36mAddresses::City Load (0.2ms)[0m [1mSELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ?[0m [["state_id", 1]]
|
287
287
|
Completed 200 OK in 52ms (Views: 2.0ms | ActiveRecord: 0.4ms)
|
288
288
|
[1m[35m (0.5ms)[0m rollback transaction
|
289
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
290
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
291
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
292
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
293
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
294
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
295
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
296
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
297
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
298
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
299
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
300
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
301
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
302
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
303
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
304
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
305
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
306
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
307
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
308
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
309
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
310
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
311
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
312
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
313
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
314
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
315
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
316
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
317
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
318
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
319
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
320
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
321
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
322
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
323
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
324
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
325
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
326
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
327
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
328
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
329
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
330
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
331
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2014-05-23 15:54:27.241742"], ["name", "MyString"], ["updated_at", "2014-05-23 15:54:27.241742"]]
|
332
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
333
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
334
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-05-23 15:54:27.252202"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2014-05-23 15:54:27.252202"]]
|
335
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
336
|
+
Processing by Addresses::CitiesController#index as HTML
|
337
|
+
Parameters: {"state_id"=>"1"}
|
338
|
+
[1m[35mAddresses::State Load (0.1ms)[0m SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT 1 [["id", 1]]
|
339
|
+
Completed 406 Not Acceptable in 32ms
|
340
|
+
[1m[36m (6.6ms)[0m [1mrollback transaction[0m
|
341
|
+
[1m[35m (0.1ms)[0m begin transaction
|
342
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
343
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["acronym", "MyString"], ["created_at", "2014-05-23 15:54:27.300013"], ["name", "MyString"], ["updated_at", "2014-05-23 15:54:27.300013"]]
|
344
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
345
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
346
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-05-23 15:54:27.302239"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2014-05-23 15:54:27.302239"]]
|
347
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
348
|
+
Processing by Addresses::CitiesController#index as HTML
|
349
|
+
Parameters: {"state_id"=>"1"}
|
350
|
+
[1m[36mAddresses::State Load (0.0ms)[0m [1mSELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT 1[0m [["id", 1]]
|
351
|
+
Completed 406 Not Acceptable in 1ms
|
352
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
353
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
354
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
355
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2014-05-23 15:54:44.118558"], ["name", "MyString"], ["updated_at", "2014-05-23 15:54:44.118558"]]
|
356
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
357
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
358
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-05-23 15:54:44.128684"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2014-05-23 15:54:44.128684"]]
|
359
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
360
|
+
Processing by Addresses::CitiesController#index as JSON
|
361
|
+
Parameters: {"state_id"=>1}
|
362
|
+
[1m[35mAddresses::State Load (0.1ms)[0m SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT 1 [["id", 1]]
|
363
|
+
[1m[36mAddresses::City Load (0.3ms)[0m [1mSELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name as[0m [["state_id", 1]]
|
364
|
+
SQLite3::SQLException: near "as": syntax error: SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name as
|
365
|
+
Completed 500 Internal Server Error in 18ms
|
366
|
+
[1m[35m (6.7ms)[0m rollback transaction
|
367
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
368
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
369
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2014-05-23 15:55:13.336225"], ["name", "MyString"], ["updated_at", "2014-05-23 15:55:13.336225"]]
|
370
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
371
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
372
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-05-23 15:55:13.346847"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2014-05-23 15:55:13.346847"]]
|
373
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
374
|
+
Processing by Addresses::CitiesController#index as JSON
|
375
|
+
Parameters: {"state_id"=>1}
|
376
|
+
[1m[35mAddresses::State Load (0.2ms)[0m SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT 1 [["id", 1]]
|
377
|
+
[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]]
|
378
|
+
Completed 200 OK in 18ms (Views: 1.4ms | ActiveRecord: 0.3ms)
|
379
|
+
[1m[35m (6.7ms)[0m rollback transaction
|
380
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
381
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
382
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2014-05-23 15:55:13.380947"], ["name", "MyString"], ["updated_at", "2014-05-23 15:55:13.380947"]]
|
383
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
384
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
385
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-05-23 15:55:13.383282"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2014-05-23 15:55:13.383282"]]
|
386
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
387
|
+
Processing by Addresses::CitiesController#index as JSON
|
388
|
+
Parameters: {"state_id"=>1}
|
389
|
+
[1m[35mAddresses::State Load (0.1ms)[0m SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT 1 [["id", 1]]
|
390
|
+
[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]]
|
391
|
+
Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.1ms)
|
392
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
393
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
394
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
395
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2014-05-23 15:55:19.506267"], ["name", "MyString"], ["updated_at", "2014-05-23 15:55:19.506267"]]
|
396
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
397
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
398
|
+
[1m[35mSQL (1.2ms)[0m INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-05-23 15:55:19.516265"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2014-05-23 15:55:19.516265"]]
|
399
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
400
|
+
[1m[35m (6.9ms)[0m rollback transaction
|
401
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
402
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
403
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2014-05-23 15:55:19.529701"], ["name", "MyString"], ["updated_at", "2014-05-23 15:55:19.529701"]]
|
404
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
405
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
406
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-05-23 15:55:19.531796"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2014-05-23 15:55:19.531796"]]
|
407
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
408
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
409
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
410
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
411
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2014-05-23 15:55:31.715025"], ["name", "MyString"], ["updated_at", "2014-05-23 15:55:31.715025"]]
|
412
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
413
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
414
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-05-23 15:55:31.725400"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2014-05-23 15:55:31.725400"]]
|
415
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
416
|
+
[1m[35m (6.7ms)[0m rollback transaction
|
417
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
418
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
419
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2014-05-23 15:55:31.739746"], ["name", "MyString"], ["updated_at", "2014-05-23 15:55:31.739746"]]
|
420
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
421
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
422
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-05-23 15:55:31.742664"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2014-05-23 15:55:31.742664"]]
|
423
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
424
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
425
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
426
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
427
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2014-05-23 15:56:29.743829"], ["name", "MyString"], ["updated_at", "2014-05-23 15:56:29.743829"]]
|
428
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
429
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
430
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-05-23 15:56:29.754197"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2014-05-23 15:56:29.754197"]]
|
431
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
432
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
433
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "addresses_neighborhoods" ("city_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["city_id", 1], ["created_at", "2014-05-23 15:56:29.762166"], ["name", "MyString"], ["updated_at", "2014-05-23 15:56:29.762166"]]
|
434
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
435
|
+
Processing by Addresses::CitiesController#index as HTML
|
436
|
+
Parameters: {"city_id"=>"1"}
|
437
|
+
Completed 404 Not Found in 0ms
|
438
|
+
[1m[36m (6.9ms)[0m [1mrollback transaction[0m
|
439
|
+
[1m[35m (0.1ms)[0m begin transaction
|
440
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
441
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["acronym", "MyString"], ["created_at", "2014-05-23 15:56:29.776548"], ["name", "MyString"], ["updated_at", "2014-05-23 15:56:29.776548"]]
|
442
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
443
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
444
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-05-23 15:56:29.779307"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2014-05-23 15:56:29.779307"]]
|
445
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
446
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
447
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "addresses_neighborhoods" ("city_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["created_at", "2014-05-23 15:56:29.806744"], ["name", "MyString"], ["updated_at", "2014-05-23 15:56:29.806744"]]
|
448
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
449
|
+
Processing by Addresses::CitiesController#index as HTML
|
450
|
+
Parameters: {"city_id"=>"1"}
|
451
|
+
Completed 404 Not Found in 0ms
|
452
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
453
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
454
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
455
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2014-05-23 15:56:56.745299"], ["name", "MyString"], ["updated_at", "2014-05-23 15:56:56.745299"]]
|
456
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
457
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
458
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-05-23 15:56:56.757207"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2014-05-23 15:56:56.757207"]]
|
459
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
460
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
461
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "addresses_neighborhoods" ("city_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["city_id", 1], ["created_at", "2014-05-23 15:56:56.764669"], ["name", "MyString"], ["updated_at", "2014-05-23 15:56:56.764669"]]
|
462
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
463
|
+
[1m[36m (6.6ms)[0m [1mrollback transaction[0m
|
464
|
+
[1m[35m (0.1ms)[0m begin transaction
|
465
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
466
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["acronym", "MyString"], ["created_at", "2014-05-23 15:56:56.776813"], ["name", "MyString"], ["updated_at", "2014-05-23 15:56:56.776813"]]
|
467
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
468
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
469
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-05-23 15:56:56.778844"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2014-05-23 15:56:56.778844"]]
|
470
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
471
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
472
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "addresses_neighborhoods" ("city_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["created_at", "2014-05-23 15:56:56.780420"], ["name", "MyString"], ["updated_at", "2014-05-23 15:56:56.780420"]]
|
473
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
474
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
475
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
476
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
477
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2014-05-23 15:57:19.202505"], ["name", "MyString"], ["updated_at", "2014-05-23 15:57:19.202505"]]
|
478
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
479
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
480
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-05-23 15:57:19.213042"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2014-05-23 15:57:19.213042"]]
|
481
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
482
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
483
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "addresses_neighborhoods" ("city_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["city_id", 1], ["created_at", "2014-05-23 15:57:19.221021"], ["name", "MyString"], ["updated_at", "2014-05-23 15:57:19.221021"]]
|
484
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
485
|
+
Processing by Addresses::NeighborhoodsController#index as HTML
|
486
|
+
Parameters: {"city_id"=>"1"}
|
487
|
+
[1m[36mAddresses::City Load (0.1ms)[0m [1mSELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT 1[0m [["id", 1]]
|
488
|
+
Completed 406 Not Acceptable in 11ms
|
489
|
+
[1m[35m (6.6ms)[0m rollback transaction
|
490
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
491
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
492
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2014-05-23 15:57:19.245790"], ["name", "MyString"], ["updated_at", "2014-05-23 15:57:19.245790"]]
|
493
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
494
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
495
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-05-23 15:57:19.248087"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2014-05-23 15:57:19.248087"]]
|
496
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
497
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
498
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "addresses_neighborhoods" ("city_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["city_id", 1], ["created_at", "2014-05-23 15:57:19.249743"], ["name", "MyString"], ["updated_at", "2014-05-23 15:57:19.249743"]]
|
499
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
500
|
+
Processing by Addresses::NeighborhoodsController#index as HTML
|
501
|
+
Parameters: {"city_id"=>"1"}
|
502
|
+
[1m[36mAddresses::City Load (0.0ms)[0m [1mSELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT 1[0m [["id", 1]]
|
503
|
+
Completed 406 Not Acceptable in 1ms
|
504
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
505
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
506
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
507
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2014-05-23 15:57:38.635619"], ["name", "MyString"], ["updated_at", "2014-05-23 15:57:38.635619"]]
|
508
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
509
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
510
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-05-23 15:57:38.647821"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2014-05-23 15:57:38.647821"]]
|
511
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
512
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
513
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "addresses_neighborhoods" ("city_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["city_id", 1], ["created_at", "2014-05-23 15:57:38.656173"], ["name", "MyString"], ["updated_at", "2014-05-23 15:57:38.656173"]]
|
514
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
515
|
+
Processing by Addresses::NeighborhoodsController#index as JSON
|
516
|
+
Parameters: {"city_id"=>1}
|
517
|
+
[1m[36mAddresses::City Load (0.1ms)[0m [1mSELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT 1[0m [["id", 1]]
|
518
|
+
[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]]
|
519
|
+
Completed 200 OK in 17ms (Views: 1.0ms | ActiveRecord: 0.3ms)
|
520
|
+
[1m[36m (6.6ms)[0m [1mrollback transaction[0m
|
521
|
+
[1m[35m (0.1ms)[0m begin transaction
|
522
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
523
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["acronym", "MyString"], ["created_at", "2014-05-23 15:57:38.712760"], ["name", "MyString"], ["updated_at", "2014-05-23 15:57:38.712760"]]
|
524
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
525
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
526
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-05-23 15:57:38.715131"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2014-05-23 15:57:38.715131"]]
|
527
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
528
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
529
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "addresses_neighborhoods" ("city_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["created_at", "2014-05-23 15:57:38.716913"], ["name", "MyString"], ["updated_at", "2014-05-23 15:57:38.716913"]]
|
530
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
531
|
+
Processing by Addresses::NeighborhoodsController#index as JSON
|
532
|
+
Parameters: {"city_id"=>1}
|
533
|
+
[1m[35mAddresses::City Load (0.0ms)[0m SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT 1 [["id", 1]]
|
534
|
+
[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]]
|
535
|
+
Completed 200 OK in 3ms (Views: 1.2ms | ActiveRecord: 0.2ms)
|
536
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
537
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
538
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
539
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "addresses_states" ("acronym", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["acronym", "MyString"], ["created_at", "2014-05-23 15:58:37.187596"], ["name", "MyString"], ["updated_at", "2014-05-23 15:58:37.187596"]]
|
540
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
541
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
542
|
+
[1m[35mSQL (1.4ms)[0m INSERT INTO "addresses_cities" ("created_at", "name", "state_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-05-23 15:58:37.197225"], ["name", "MyString"], ["state_id", 1], ["updated_at", "2014-05-23 15:58:37.197225"]]
|
543
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
544
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
545
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "addresses_neighborhoods" ("city_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["city_id", 1], ["created_at", "2014-05-23 15:58:37.205419"], ["name", "MyString"], ["updated_at", "2014-05-23 15:58:37.205419"]]
|
546
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
547
|
+
Started GET "/addresses/neighborhoods?format=json&city_id=1" for 127.0.0.1 at 2014-05-23 12:58:37 -0300
|
548
|
+
Processing by Addresses::NeighborhoodsController#index as JSON
|
549
|
+
Parameters: {"city_id"=>"1"}
|
550
|
+
[1m[36mAddresses::City Load (0.2ms)[0m [1mSELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT 1[0m [["id", 1]]
|
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
|
+
Completed 200 OK in 19ms (Views: 1.0ms | ActiveRecord: 0.3ms)
|
553
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
@@ -8,7 +8,7 @@ describe Addresses::CitiesController do
|
|
8
8
|
@city = FactoryGirl.create(:addresses_city, state: @state)
|
9
9
|
end
|
10
10
|
|
11
|
-
describe "GET /
|
11
|
+
describe "GET /cities" do
|
12
12
|
it "should return an interview" do
|
13
13
|
get addresses.cities_path(state_id: @state.id), format: "json"
|
14
14
|
json = JSON.parse(response.body)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Addresses::NeighborhoodsController do
|
4
|
+
#routes { Addresses::Engine.routes }
|
5
|
+
|
6
|
+
before (:each) do
|
7
|
+
@state = FactoryGirl.create(:addresses_state)
|
8
|
+
@city = FactoryGirl.create(:addresses_city, state: @state)
|
9
|
+
@neighborhood = FactoryGirl.create(:addresses_neighborhood, city: @city)
|
10
|
+
end
|
11
|
+
|
12
|
+
describe "GET /neighborhoods" do
|
13
|
+
it "should return an interview" do
|
14
|
+
get addresses.neighborhoods_path(city_id: @city.id), format: "json"
|
15
|
+
|
16
|
+
json = JSON.parse(response.body)
|
17
|
+
|
18
|
+
json[0]["name"].should == @neighborhood.name
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -7,6 +7,9 @@ require 'factory_girl_rails'
|
|
7
7
|
|
8
8
|
Rails.backtrace_cleaner.remove_silencers!
|
9
9
|
|
10
|
+
FactoryGirl.definition_file_paths << File.join(File.dirname(__FILE__), 'factories')
|
11
|
+
FactoryGirl.find_definitions
|
12
|
+
|
10
13
|
# Load support files
|
11
14
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
12
15
|
RSpec.configure do |config|
|
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.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wilbert Ribeiro
|
@@ -9,22 +9,36 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-05-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - ~>
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '4.0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - ~>
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '4.0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: sqlite3
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - '='
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 1.3.9
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - '='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 1.3.9
|
28
42
|
description: Create Country, State, City, Neighborhood and a polymorphic model called
|
29
43
|
Address that can be related as addessable.
|
30
44
|
email:
|
@@ -41,6 +55,7 @@ files:
|
|
41
55
|
- app/assets/stylesheets/addresses/application.css
|
42
56
|
- app/controllers/addresses/application_controller.rb
|
43
57
|
- app/controllers/addresses/cities_controller.rb
|
58
|
+
- app/controllers/addresses/neighborhoods_controller.rb
|
44
59
|
- app/helpers/addresses/application_helper.rb
|
45
60
|
- app/models/addresses/address.rb
|
46
61
|
- app/models/addresses/city.rb
|
@@ -48,6 +63,7 @@ files:
|
|
48
63
|
- app/models/addresses/neighborhood.rb
|
49
64
|
- app/models/addresses/state.rb
|
50
65
|
- app/views/addresses/cities/index.html.erb
|
66
|
+
- app/views/addresses/neighborhoods/index.html.erb
|
51
67
|
- app/views/layouts/addresses/application.html.erb
|
52
68
|
- config/routes.rb
|
53
69
|
- db/migrate/20140327141509_create_addresses_countries.rb
|
@@ -64,6 +80,7 @@ files:
|
|
64
80
|
- lib/tasks/populate_neighborhoods.rake
|
65
81
|
- lib/tasks/populate_states.rake
|
66
82
|
- spec/controllers/addresses/cities_controller_spec.rb
|
83
|
+
- spec/controllers/addresses/neighborhoods_controller_spec.rb
|
67
84
|
- spec/dummy/Gemfile
|
68
85
|
- spec/dummy/Gemfile.lock
|
69
86
|
- spec/dummy/README.rdoc
|
@@ -119,6 +136,7 @@ files:
|
|
119
136
|
- spec/models/addresses/neighborhood_spec.rb
|
120
137
|
- spec/models/addresses/state_spec.rb
|
121
138
|
- spec/requests/cities_spec.rb
|
139
|
+
- spec/requests/neighborhoods_spec.rb
|
122
140
|
- spec/routing/cities_routing_spec.rb
|
123
141
|
- spec/spec_helper.rb
|
124
142
|
homepage: http://www.github.com/wilbert/addresses
|
@@ -131,12 +149,12 @@ require_paths:
|
|
131
149
|
- lib
|
132
150
|
required_ruby_version: !ruby/object:Gem::Requirement
|
133
151
|
requirements:
|
134
|
-
- -
|
152
|
+
- - ">="
|
135
153
|
- !ruby/object:Gem::Version
|
136
154
|
version: '0'
|
137
155
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
156
|
requirements:
|
139
|
-
- -
|
157
|
+
- - ">="
|
140
158
|
- !ruby/object:Gem::Version
|
141
159
|
version: '0'
|
142
160
|
requirements: []
|
@@ -147,6 +165,7 @@ specification_version: 4
|
|
147
165
|
summary: This engine allows create default addresses models for any usage.
|
148
166
|
test_files:
|
149
167
|
- spec/controllers/addresses/cities_controller_spec.rb
|
168
|
+
- spec/controllers/addresses/neighborhoods_controller_spec.rb
|
150
169
|
- spec/dummy/app/assets/javascripts/application.js
|
151
170
|
- spec/dummy/app/assets/stylesheets/application.css
|
152
171
|
- spec/dummy/app/controllers/application_controller.rb
|
@@ -202,5 +221,6 @@ test_files:
|
|
202
221
|
- spec/models/addresses/neighborhood_spec.rb
|
203
222
|
- spec/models/addresses/state_spec.rb
|
204
223
|
- spec/requests/cities_spec.rb
|
224
|
+
- spec/requests/neighborhoods_spec.rb
|
205
225
|
- spec/routing/cities_routing_spec.rb
|
206
226
|
- spec/spec_helper.rb
|