addresses 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0d7154181ed373a82fcfcc78a21023d55397a105
4
- data.tar.gz: d5632da7e1d99386b7e4fd3f9090d7eedde0e804
3
+ metadata.gz: cacaf27c0c21dbb7e7aed5c2f01f4c952be99858
4
+ data.tar.gz: d81969670a2e69e50261e8924a30f747a9f50d50
5
5
  SHA512:
6
- metadata.gz: 16aa66c596f719e5360d18adea079556e2c840750ad21e72c89e47d92e5720105dfc214ac4ec6255236e0a5ba90ab59d270e61e91018ceb7a450df6fb8e446fe
7
- data.tar.gz: 5f709bfa7cec85865116c6da142667cb9f21295dc1237d10c6e84eb5131f534656c8c9385215363d706c2ef223da13093f662a1541e7a94f691edf0bee9a8ffc
6
+ metadata.gz: f6934812395d383eafd2165a725cac1e89e6c0ca020d0945b386028c2a5f17fa3bfaf9e663704366c661660102675811eebf0718c26bd20f576809c37e17ef5c
7
+ data.tar.gz: 46962a8ca0b4b91a85dc615ecc75207099414c3701f72f4b7c67192950feb75851b23efb3ea568aba423e1836ef507bb83af58787d2a325cb00de2f7336342f0
@@ -9,5 +9,11 @@ module Addresses
9
9
 
10
10
  render json: @cities
11
11
  end
12
+
13
+ def show
14
+ @city = City.find(params[:id])
15
+
16
+ render json: @city
17
+ end
12
18
  end
13
19
  end
data/config/routes.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  Addresses::Engine.routes.draw do
2
- resources :cities, only: :index
2
+ resources :cities, only: [:index, :show]
3
3
 
4
4
  resources :neighborhoods, only: :index
5
5
 
@@ -13,4 +13,11 @@ RSpec.describe Addresses::CitiesController, type: :controller do
13
13
  it { expect(response).to have_http_status(:success) }
14
14
  it { expect(assigns(:cities)).to eq([city]) }
15
15
  end
16
+
17
+ describe "GET #show" do
18
+ before { get :show, params: { id: city.id, format: :json } }
19
+
20
+ it { expect(response).to have_http_status(:success) }
21
+ it { expect(assigns(:city)).to eq(city) }
22
+ end
16
23
  end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../../../addresses
3
3
  specs:
4
- addresses (1.0.0)
4
+ addresses (1.0.3)
5
5
  rails (~> 5.0)
6
6
 
7
7
  GEM
@@ -315728,3 +315728,234 @@ Processing by Addresses::ZipcodesController#show as JSON
315728
315728
  Completed 200 OK in 101ms (Views: 0.8ms | ActiveRecord: 3.3ms)
315729
315729
 
315730
315730
 
315731
+ Started GET "/cities/" for ::1 at 2016-11-23 12:31:03 -0200
315732
+
315733
+ ActionController::RoutingError (No route matches [GET] "/cities"):
315734
+
315735
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call'
315736
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
315737
+ railties (5.0.0.1) lib/rails/rack/logger.rb:36:in `call_app'
315738
+ railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `block in call'
315739
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `block in tagged'
315740
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:26:in `tagged'
315741
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `tagged'
315742
+ railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `call'
315743
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/request_id.rb:24:in `call'
315744
+ rack (2.0.1) lib/rack/method_override.rb:22:in `call'
315745
+ rack (2.0.1) lib/rack/runtime.rb:22:in `call'
315746
+ activesupport (5.0.0.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
315747
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/executor.rb:12:in `call'
315748
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/static.rb:136:in `call'
315749
+ rack (2.0.1) lib/rack/sendfile.rb:111:in `call'
315750
+ railties (5.0.0.1) lib/rails/engine.rb:522:in `call'
315751
+ rack (2.0.1) lib/rack/handler/webrick.rb:86:in `service'
315752
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
315753
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
315754
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
315755
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout
315756
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
315757
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.0ms)
315758
+ Rendered collection of /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb [1 times] (47.3ms)
315759
+ Rendered collection of /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb [4 times] (1.3ms)
315760
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_table.html.erb (57.2ms)
315761
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
315762
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (27.8ms)
315763
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (296.4ms)
315764
+ Started GET "/cities" for ::1 at 2016-11-23 12:31:14 -0200
315765
+
315766
+ ActionController::RoutingError (No route matches [GET] "/cities"):
315767
+
315768
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call'
315769
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
315770
+ railties (5.0.0.1) lib/rails/rack/logger.rb:36:in `call_app'
315771
+ railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `block in call'
315772
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `block in tagged'
315773
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:26:in `tagged'
315774
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `tagged'
315775
+ railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `call'
315776
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/request_id.rb:24:in `call'
315777
+ rack (2.0.1) lib/rack/method_override.rb:22:in `call'
315778
+ rack (2.0.1) lib/rack/runtime.rb:22:in `call'
315779
+ activesupport (5.0.0.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
315780
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/executor.rb:12:in `call'
315781
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/static.rb:136:in `call'
315782
+ rack (2.0.1) lib/rack/sendfile.rb:111:in `call'
315783
+ railties (5.0.0.1) lib/rails/engine.rb:522:in `call'
315784
+ rack (2.0.1) lib/rack/handler/webrick.rb:86:in `service'
315785
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
315786
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
315787
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
315788
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout
315789
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
315790
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.7ms)
315791
+ Rendered collection of /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb [1 times] (1.1ms)
315792
+ Rendered collection of /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb [4 times] (1.4ms)
315793
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.5ms)
315794
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
315795
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.4ms)
315796
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (119.2ms)
315797
+ Started GET "/cities" for ::1 at 2016-11-23 12:31:23 -0200
315798
+
315799
+ ActionController::RoutingError (No route matches [GET] "/cities"):
315800
+
315801
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call'
315802
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
315803
+ railties (5.0.0.1) lib/rails/rack/logger.rb:36:in `call_app'
315804
+ railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `block in call'
315805
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `block in tagged'
315806
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:26:in `tagged'
315807
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `tagged'
315808
+ railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `call'
315809
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/request_id.rb:24:in `call'
315810
+ rack (2.0.1) lib/rack/method_override.rb:22:in `call'
315811
+ rack (2.0.1) lib/rack/runtime.rb:22:in `call'
315812
+ activesupport (5.0.0.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
315813
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/executor.rb:12:in `call'
315814
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/static.rb:136:in `call'
315815
+ rack (2.0.1) lib/rack/sendfile.rb:111:in `call'
315816
+ railties (5.0.0.1) lib/rails/engine.rb:522:in `call'
315817
+ rack (2.0.1) lib/rack/handler/webrick.rb:86:in `service'
315818
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
315819
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
315820
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
315821
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout
315822
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
315823
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.7ms)
315824
+ Rendered collection of /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb [1 times] (1.2ms)
315825
+ Rendered collection of /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb [4 times] (1.5ms)
315826
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.5ms)
315827
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
315828
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.4ms)
315829
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (121.8ms)
315830
+ Started GET "/cities.json" for ::1 at 2016-11-23 12:31:34 -0200
315831
+
315832
+ ActionController::RoutingError (No route matches [GET] "/cities.json"):
315833
+
315834
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call'
315835
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
315836
+ railties (5.0.0.1) lib/rails/rack/logger.rb:36:in `call_app'
315837
+ railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `block in call'
315838
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `block in tagged'
315839
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:26:in `tagged'
315840
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `tagged'
315841
+ railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `call'
315842
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/request_id.rb:24:in `call'
315843
+ rack (2.0.1) lib/rack/method_override.rb:22:in `call'
315844
+ rack (2.0.1) lib/rack/runtime.rb:22:in `call'
315845
+ activesupport (5.0.0.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
315846
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/executor.rb:12:in `call'
315847
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/static.rb:136:in `call'
315848
+ rack (2.0.1) lib/rack/sendfile.rb:111:in `call'
315849
+ railties (5.0.0.1) lib/rails/engine.rb:522:in `call'
315850
+ rack (2.0.1) lib/rack/handler/webrick.rb:86:in `service'
315851
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
315852
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
315853
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
315854
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout
315855
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
315856
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.1ms)
315857
+ Rendered collection of /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb [1 times] (1.4ms)
315858
+ Rendered collection of /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb [4 times] (1.6ms)
315859
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.8ms)
315860
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
315861
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.5ms)
315862
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (119.9ms)
315863
+ Started GET "/cities.json?state_id=33" for ::1 at 2016-11-23 12:31:49 -0200
315864
+
315865
+ ActionController::RoutingError (No route matches [GET] "/cities.json"):
315866
+
315867
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call'
315868
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
315869
+ railties (5.0.0.1) lib/rails/rack/logger.rb:36:in `call_app'
315870
+ railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `block in call'
315871
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `block in tagged'
315872
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:26:in `tagged'
315873
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `tagged'
315874
+ railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `call'
315875
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/request_id.rb:24:in `call'
315876
+ rack (2.0.1) lib/rack/method_override.rb:22:in `call'
315877
+ rack (2.0.1) lib/rack/runtime.rb:22:in `call'
315878
+ activesupport (5.0.0.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
315879
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/executor.rb:12:in `call'
315880
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/static.rb:136:in `call'
315881
+ rack (2.0.1) lib/rack/sendfile.rb:111:in `call'
315882
+ railties (5.0.0.1) lib/rails/engine.rb:522:in `call'
315883
+ rack (2.0.1) lib/rack/handler/webrick.rb:86:in `service'
315884
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
315885
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
315886
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
315887
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout
315888
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
315889
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.6ms)
315890
+ Rendered collection of /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb [1 times] (1.9ms)
315891
+ Rendered collection of /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb [4 times] (1.9ms)
315892
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_table.html.erb (2.0ms)
315893
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
315894
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (2.4ms)
315895
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (123.8ms)
315896
+ Started GET "/zipcodes/05012010.json" for ::1 at 2016-11-23 12:32:21 -0200
315897
+
315898
+ ActionController::RoutingError (No route matches [GET] "/zipcodes/05012010.json"):
315899
+
315900
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call'
315901
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
315902
+ railties (5.0.0.1) lib/rails/rack/logger.rb:36:in `call_app'
315903
+ railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `block in call'
315904
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `block in tagged'
315905
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:26:in `tagged'
315906
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `tagged'
315907
+ railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `call'
315908
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/request_id.rb:24:in `call'
315909
+ rack (2.0.1) lib/rack/method_override.rb:22:in `call'
315910
+ rack (2.0.1) lib/rack/runtime.rb:22:in `call'
315911
+ activesupport (5.0.0.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
315912
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/executor.rb:12:in `call'
315913
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/static.rb:136:in `call'
315914
+ rack (2.0.1) lib/rack/sendfile.rb:111:in `call'
315915
+ railties (5.0.0.1) lib/rails/engine.rb:522:in `call'
315916
+ rack (2.0.1) lib/rack/handler/webrick.rb:86:in `service'
315917
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
315918
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
315919
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
315920
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout
315921
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
315922
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.2ms)
315923
+ Rendered collection of /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb [1 times] (1.0ms)
315924
+ Rendered collection of /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb [4 times] (1.8ms)
315925
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_table.html.erb (2.0ms)
315926
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
315927
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.8ms)
315928
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (116.6ms)
315929
+ Started GET "/zipcodes/05012010.json" for ::1 at 2016-11-23 12:32:35 -0200
315930
+
315931
+ ActionController::RoutingError (No route matches [GET] "/zipcodes/05012010.json"):
315932
+
315933
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call'
315934
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
315935
+ railties (5.0.0.1) lib/rails/rack/logger.rb:36:in `call_app'
315936
+ railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `block in call'
315937
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `block in tagged'
315938
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:26:in `tagged'
315939
+ activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `tagged'
315940
+ railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `call'
315941
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/request_id.rb:24:in `call'
315942
+ rack (2.0.1) lib/rack/method_override.rb:22:in `call'
315943
+ rack (2.0.1) lib/rack/runtime.rb:22:in `call'
315944
+ activesupport (5.0.0.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
315945
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/executor.rb:12:in `call'
315946
+ actionpack (5.0.0.1) lib/action_dispatch/middleware/static.rb:136:in `call'
315947
+ rack (2.0.1) lib/rack/sendfile.rb:111:in `call'
315948
+ railties (5.0.0.1) lib/rails/engine.rb:522:in `call'
315949
+ rack (2.0.1) lib/rack/handler/webrick.rb:86:in `service'
315950
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
315951
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
315952
+ /Users/joice/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
315953
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout
315954
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
315955
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.5ms)
315956
+ Rendered collection of /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb [1 times] (0.9ms)
315957
+ Rendered collection of /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb [4 times] (1.3ms)
315958
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.3ms)
315959
+ Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
315960
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.3ms)
315961
+ Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (122.5ms)
@@ -13341,3 +13341,389 @@ Completed 200 OK in 2ms (Views: 0.8ms | ActiveRecord: 0.2ms)
13341
13341
  SQL (0.2ms) INSERT INTO "addresses_addresses" ("number", "created_at", "updated_at", "zipcode_id") VALUES (?, ?, ?, ?) [["number", "Number"], ["created_at", 2016-09-22 21:21:32 UTC], ["updated_at", 2016-09-22 21:21:32 UTC], ["zipcode_id", 1]]
13342
13342
   (0.0ms) RELEASE SAVEPOINT active_record_1
13343
13343
   (1.2ms) rollback transaction
13344
+  (0.6ms) begin transaction
13345
+  (0.1ms) rollback transaction
13346
+  (0.1ms) begin transaction
13347
+  (0.0ms) rollback transaction
13348
+  (0.5ms) begin transaction
13349
+  (0.1ms) rollback transaction
13350
+  (0.1ms) begin transaction
13351
+  (0.1ms) rollback transaction
13352
+  (0.6ms) begin transaction
13353
+  (0.1ms) rollback transaction
13354
+  (0.1ms) begin transaction
13355
+  (0.1ms) rollback transaction
13356
+  (0.6ms) begin transaction
13357
+  (0.1ms) rollback transaction
13358
+  (0.1ms) begin transaction
13359
+  (0.1ms) rollback transaction
13360
+  (0.6ms) begin transaction
13361
+  (0.1ms) rollback transaction
13362
+  (0.1ms) begin transaction
13363
+  (0.0ms) rollback transaction
13364
+  (0.5ms) begin transaction
13365
+  (0.1ms) SAVEPOINT active_record_1
13366
+ SQL (12.0ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:36:19 UTC], ["updated_at", 2016-11-23 14:36:19 UTC]]
13367
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13368
+  (0.1ms) SAVEPOINT active_record_1
13369
+ SQL (0.8ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:36:19 UTC], ["updated_at", 2016-11-23 14:36:19 UTC]]
13370
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13371
+  (0.1ms) SAVEPOINT active_record_1
13372
+ SQL (0.5ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:36:19 UTC], ["updated_at", 2016-11-23 14:36:19 UTC]]
13373
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13374
+ Processing by Addresses::CitiesController#show as JSON
13375
+ Parameters: {"id"=>"1"}
13376
+ Addresses::City Load (0.2ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13377
+ Completed 200 OK in 14ms (Views: 1.0ms | ActiveRecord: 0.2ms)
13378
+  (0.7ms) rollback transaction
13379
+  (0.1ms) begin transaction
13380
+  (0.1ms) SAVEPOINT active_record_1
13381
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:36:19 UTC], ["updated_at", 2016-11-23 14:36:19 UTC]]
13382
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13383
+  (0.0ms) SAVEPOINT active_record_1
13384
+ SQL (0.1ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:36:19 UTC], ["updated_at", 2016-11-23 14:36:19 UTC]]
13385
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13386
+  (0.0ms) SAVEPOINT active_record_1
13387
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:36:19 UTC], ["updated_at", 2016-11-23 14:36:19 UTC]]
13388
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13389
+ Processing by Addresses::CitiesController#show as JSON
13390
+ Parameters: {"id"=>"1"}
13391
+ Addresses::City Load (0.0ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13392
+ Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
13393
+  (0.7ms) rollback transaction
13394
+  (0.0ms) begin transaction
13395
+  (0.1ms) SAVEPOINT active_record_1
13396
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:36:19 UTC], ["updated_at", 2016-11-23 14:36:19 UTC]]
13397
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13398
+  (0.0ms) SAVEPOINT active_record_1
13399
+ SQL (0.2ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:36:19 UTC], ["updated_at", 2016-11-23 14:36:19 UTC]]
13400
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13401
+  (0.0ms) SAVEPOINT active_record_1
13402
+ SQL (0.2ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:36:19 UTC], ["updated_at", 2016-11-23 14:36:19 UTC]]
13403
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13404
+ Processing by Addresses::CitiesController#index as JSON
13405
+ Parameters: {"state_id"=>"1"}
13406
+ Addresses::State Load (0.1ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13407
+ Addresses::City Load (0.2ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
13408
+ Completed 200 OK in 36ms (Views: 4.8ms | ActiveRecord: 0.3ms)
13409
+  (0.5ms) rollback transaction
13410
+  (0.1ms) begin transaction
13411
+  (0.0ms) SAVEPOINT active_record_1
13412
+ SQL (0.4ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:36:19 UTC], ["updated_at", 2016-11-23 14:36:19 UTC]]
13413
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13414
+  (0.1ms) SAVEPOINT active_record_1
13415
+ SQL (0.1ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:36:19 UTC], ["updated_at", 2016-11-23 14:36:19 UTC]]
13416
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13417
+  (0.0ms) SAVEPOINT active_record_1
13418
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:36:19 UTC], ["updated_at", 2016-11-23 14:36:19 UTC]]
13419
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13420
+ Processing by Addresses::CitiesController#index as JSON
13421
+ Parameters: {"state_id"=>"1"}
13422
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13423
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
13424
+ Completed 200 OK in 3ms (Views: 1.1ms | ActiveRecord: 0.2ms)
13425
+  (1.1ms) rollback transaction
13426
+  (0.6ms) begin transaction
13427
+  (0.1ms) SAVEPOINT active_record_1
13428
+ SQL (0.6ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:36:39 UTC], ["updated_at", 2016-11-23 14:36:39 UTC]]
13429
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13430
+  (0.1ms) SAVEPOINT active_record_1
13431
+ SQL (0.2ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:36:39 UTC], ["updated_at", 2016-11-23 14:36:39 UTC]]
13432
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13433
+  (0.1ms) SAVEPOINT active_record_1
13434
+ SQL (0.2ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:36:39 UTC], ["updated_at", 2016-11-23 14:36:39 UTC]]
13435
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13436
+ Processing by Addresses::CitiesController#index as JSON
13437
+ Parameters: {"state_id"=>"1"}
13438
+ Addresses::State Load (0.2ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13439
+ Addresses::City Load (0.2ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
13440
+ Completed 200 OK in 17ms (Views: 3.4ms | ActiveRecord: 0.4ms)
13441
+  (0.7ms) rollback transaction
13442
+  (0.1ms) begin transaction
13443
+  (0.1ms) SAVEPOINT active_record_1
13444
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:36:39 UTC], ["updated_at", 2016-11-23 14:36:39 UTC]]
13445
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13446
+  (0.1ms) SAVEPOINT active_record_1
13447
+ SQL (0.1ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:36:39 UTC], ["updated_at", 2016-11-23 14:36:39 UTC]]
13448
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13449
+  (0.1ms) SAVEPOINT active_record_1
13450
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:36:39 UTC], ["updated_at", 2016-11-23 14:36:39 UTC]]
13451
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13452
+ Processing by Addresses::CitiesController#index as JSON
13453
+ Parameters: {"state_id"=>"1"}
13454
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13455
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
13456
+ Completed 200 OK in 3ms (Views: 1.1ms | ActiveRecord: 0.2ms)
13457
+  (0.6ms) rollback transaction
13458
+  (0.1ms) begin transaction
13459
+  (0.0ms) SAVEPOINT active_record_1
13460
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:36:39 UTC], ["updated_at", 2016-11-23 14:36:39 UTC]]
13461
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13462
+  (0.0ms) SAVEPOINT active_record_1
13463
+ SQL (0.2ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:36:39 UTC], ["updated_at", 2016-11-23 14:36:39 UTC]]
13464
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13465
+  (0.0ms) SAVEPOINT active_record_1
13466
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:36:39 UTC], ["updated_at", 2016-11-23 14:36:39 UTC]]
13467
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13468
+ Processing by Addresses::CitiesController#show as JSON
13469
+ Parameters: {"id"=>"1"}
13470
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13471
+ Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)
13472
+  (0.6ms) rollback transaction
13473
+  (0.1ms) begin transaction
13474
+  (0.0ms) SAVEPOINT active_record_1
13475
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:36:39 UTC], ["updated_at", 2016-11-23 14:36:39 UTC]]
13476
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13477
+  (0.0ms) SAVEPOINT active_record_1
13478
+ SQL (0.2ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:36:39 UTC], ["updated_at", 2016-11-23 14:36:39 UTC]]
13479
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13480
+  (0.1ms) SAVEPOINT active_record_1
13481
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:36:39 UTC], ["updated_at", 2016-11-23 14:36:39 UTC]]
13482
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13483
+ Processing by Addresses::CitiesController#show as JSON
13484
+ Parameters: {"id"=>"1"}
13485
+ Addresses::City Load (0.0ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13486
+ Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
13487
+  (0.5ms) rollback transaction
13488
+  (0.5ms) begin transaction
13489
+  (0.1ms) SAVEPOINT active_record_1
13490
+ SQL (0.5ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:38:28 UTC], ["updated_at", 2016-11-23 14:38:28 UTC]]
13491
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13492
+  (0.0ms) SAVEPOINT active_record_1
13493
+ SQL (0.2ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:38:28 UTC], ["updated_at", 2016-11-23 14:38:28 UTC]]
13494
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13495
+  (0.1ms) SAVEPOINT active_record_1
13496
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:38:28 UTC], ["updated_at", 2016-11-23 14:38:28 UTC]]
13497
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13498
+ Started GET "/addresses/cities?state_id=1&format=json" for 127.0.0.1 at 2016-11-23 12:38:28 -0200
13499
+ Processing by Addresses::CitiesController#index as JSON
13500
+ Parameters: {"state_id"=>"1"}
13501
+ Addresses::State Load (0.2ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13502
+ Addresses::City Load (0.2ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
13503
+ Completed 200 OK in 16ms (Views: 2.7ms | ActiveRecord: 0.3ms)
13504
+  (0.8ms) rollback transaction
13505
+  (0.1ms) begin transaction
13506
+  (0.1ms) SAVEPOINT active_record_1
13507
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:38:35 UTC], ["updated_at", 2016-11-23 14:38:35 UTC]]
13508
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13509
+  (0.1ms) SAVEPOINT active_record_1
13510
+ SQL (0.1ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:38:35 UTC], ["updated_at", 2016-11-23 14:38:35 UTC]]
13511
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13512
+  (0.0ms) SAVEPOINT active_record_1
13513
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:38:35 UTC], ["updated_at", 2016-11-23 14:38:35 UTC]]
13514
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13515
+ Started GET "/addresses/cities?id=1&format=json" for 127.0.0.1 at 2016-11-23 12:38:35 -0200
13516
+ Processing by Addresses::CitiesController#index as JSON
13517
+ Parameters: {"id"=>"1"}
13518
+ Addresses::State Load (0.1ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", nil], ["LIMIT", 1]]
13519
+ Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)
13520
+  (0.6ms) rollback transaction
13521
+  (0.5ms) begin transaction
13522
+  (0.2ms) SAVEPOINT active_record_1
13523
+ SQL (1.5ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:39:21 UTC], ["updated_at", 2016-11-23 14:39:21 UTC]]
13524
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13525
+  (0.0ms) SAVEPOINT active_record_1
13526
+ SQL (0.2ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:39:21 UTC], ["updated_at", 2016-11-23 14:39:21 UTC]]
13527
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13528
+  (0.1ms) SAVEPOINT active_record_1
13529
+ SQL (0.2ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:39:21 UTC], ["updated_at", 2016-11-23 14:39:21 UTC]]
13530
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13531
+ Started GET "/addresses/cities?id=1&format=json" for 127.0.0.1 at 2016-11-23 12:39:21 -0200
13532
+ Processing by Addresses::CitiesController#index as JSON
13533
+ Parameters: {"id"=>"1"}
13534
+ Addresses::State Load (0.2ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", nil], ["LIMIT", 1]]
13535
+ Completed 404 Not Found in 3ms (ActiveRecord: 0.2ms)
13536
+  (0.6ms) rollback transaction
13537
+  (0.1ms) begin transaction
13538
+  (0.1ms) SAVEPOINT active_record_1
13539
+ SQL (0.4ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:39:21 UTC], ["updated_at", 2016-11-23 14:39:21 UTC]]
13540
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13541
+  (0.0ms) SAVEPOINT active_record_1
13542
+ SQL (0.1ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:39:21 UTC], ["updated_at", 2016-11-23 14:39:21 UTC]]
13543
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13544
+  (0.0ms) SAVEPOINT active_record_1
13545
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:39:21 UTC], ["updated_at", 2016-11-23 14:39:21 UTC]]
13546
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13547
+ Started GET "/addresses/cities?state_id=1&format=json" for 127.0.0.1 at 2016-11-23 12:39:21 -0200
13548
+ Processing by Addresses::CitiesController#index as JSON
13549
+ Parameters: {"state_id"=>"1"}
13550
+ Addresses::State Load (0.1ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13551
+ Addresses::City Load (0.2ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
13552
+ Completed 200 OK in 14ms (Views: 2.7ms | ActiveRecord: 0.2ms)
13553
+  (0.7ms) rollback transaction
13554
+  (0.6ms) begin transaction
13555
+  (0.1ms) SAVEPOINT active_record_1
13556
+ SQL (0.4ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:39:46 UTC], ["updated_at", 2016-11-23 14:39:46 UTC]]
13557
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13558
+  (0.1ms) SAVEPOINT active_record_1
13559
+ SQL (0.2ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:39:46 UTC], ["updated_at", 2016-11-23 14:39:46 UTC]]
13560
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13561
+  (0.1ms) SAVEPOINT active_record_1
13562
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:39:46 UTC], ["updated_at", 2016-11-23 14:39:46 UTC]]
13563
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13564
+ Started GET "/addresses/cities?state_id=1&format=json" for 127.0.0.1 at 2016-11-23 12:39:46 -0200
13565
+ Processing by Addresses::CitiesController#index as JSON
13566
+ Parameters: {"state_id"=>"1"}
13567
+ Addresses::State Load (0.1ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13568
+ Addresses::City Load (0.2ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
13569
+ Completed 200 OK in 16ms (Views: 2.8ms | ActiveRecord: 0.3ms)
13570
+  (0.7ms) rollback transaction
13571
+  (0.1ms) begin transaction
13572
+  (0.1ms) SAVEPOINT active_record_1
13573
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:39:46 UTC], ["updated_at", 2016-11-23 14:39:46 UTC]]
13574
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13575
+  (0.0ms) SAVEPOINT active_record_1
13576
+ SQL (0.1ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:39:46 UTC], ["updated_at", 2016-11-23 14:39:46 UTC]]
13577
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13578
+  (0.0ms) SAVEPOINT active_record_1
13579
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:39:46 UTC], ["updated_at", 2016-11-23 14:39:46 UTC]]
13580
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13581
+ Started GET "/addresses/cities/?id=1&format=json" for 127.0.0.1 at 2016-11-23 12:39:46 -0200
13582
+ Processing by Addresses::CitiesController#index as JSON
13583
+ Parameters: {"id"=>"1"}
13584
+ Addresses::State Load (0.1ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", nil], ["LIMIT", 1]]
13585
+ Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)
13586
+  (0.7ms) rollback transaction
13587
+  (0.5ms) begin transaction
13588
+  (0.1ms) SAVEPOINT active_record_1
13589
+ SQL (0.4ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:41:38 UTC], ["updated_at", 2016-11-23 14:41:38 UTC]]
13590
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13591
+  (0.1ms) SAVEPOINT active_record_1
13592
+ SQL (0.2ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:41:38 UTC], ["updated_at", 2016-11-23 14:41:38 UTC]]
13593
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13594
+  (0.0ms) SAVEPOINT active_record_1
13595
+ SQL (0.2ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:41:38 UTC], ["updated_at", 2016-11-23 14:41:38 UTC]]
13596
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13597
+  (0.7ms) rollback transaction
13598
+  (0.1ms) begin transaction
13599
+  (0.0ms) SAVEPOINT active_record_1
13600
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:41:38 UTC], ["updated_at", 2016-11-23 14:41:38 UTC]]
13601
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13602
+  (0.0ms) SAVEPOINT active_record_1
13603
+ SQL (0.1ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:41:38 UTC], ["updated_at", 2016-11-23 14:41:38 UTC]]
13604
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13605
+  (0.0ms) SAVEPOINT active_record_1
13606
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:41:38 UTC], ["updated_at", 2016-11-23 14:41:38 UTC]]
13607
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13608
+ Started GET "/addresses/cities?state_id=1&format=json" for 127.0.0.1 at 2016-11-23 12:41:38 -0200
13609
+ Processing by Addresses::CitiesController#index as JSON
13610
+ Parameters: {"state_id"=>"1"}
13611
+ Addresses::State Load (0.1ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13612
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
13613
+ Completed 200 OK in 15ms (Views: 2.6ms | ActiveRecord: 0.3ms)
13614
+  (0.7ms) rollback transaction
13615
+  (0.6ms) begin transaction
13616
+  (0.1ms) SAVEPOINT active_record_1
13617
+ SQL (0.4ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:41:58 UTC], ["updated_at", 2016-11-23 14:41:58 UTC]]
13618
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13619
+  (0.1ms) SAVEPOINT active_record_1
13620
+ SQL (0.2ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:41:58 UTC], ["updated_at", 2016-11-23 14:41:58 UTC]]
13621
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13622
+  (0.1ms) SAVEPOINT active_record_1
13623
+ SQL (0.2ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:41:58 UTC], ["updated_at", 2016-11-23 14:41:58 UTC]]
13624
+  (0.2ms) RELEASE SAVEPOINT active_record_1
13625
+ Started GET "/addresses/cities?state_id=1&format=json" for 127.0.0.1 at 2016-11-23 12:41:58 -0200
13626
+ Processing by Addresses::CitiesController#index as JSON
13627
+ Parameters: {"state_id"=>"1"}
13628
+ Addresses::State Load (0.1ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13629
+ Addresses::City Load (0.2ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
13630
+ Completed 200 OK in 16ms (Views: 2.7ms | ActiveRecord: 0.3ms)
13631
+  (0.7ms) rollback transaction
13632
+  (0.1ms) begin transaction
13633
+  (0.0ms) SAVEPOINT active_record_1
13634
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:41:58 UTC], ["updated_at", 2016-11-23 14:41:58 UTC]]
13635
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13636
+  (0.0ms) SAVEPOINT active_record_1
13637
+ SQL (0.1ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:41:58 UTC], ["updated_at", 2016-11-23 14:41:58 UTC]]
13638
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13639
+  (0.0ms) SAVEPOINT active_record_1
13640
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:41:58 UTC], ["updated_at", 2016-11-23 14:41:58 UTC]]
13641
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13642
+  (0.6ms) rollback transaction
13643
+  (0.5ms) begin transaction
13644
+  (0.1ms) SAVEPOINT active_record_1
13645
+ SQL (1.6ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:43:38 UTC], ["updated_at", 2016-11-23 14:43:38 UTC]]
13646
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13647
+  (0.1ms) SAVEPOINT active_record_1
13648
+ SQL (0.2ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:43:38 UTC], ["updated_at", 2016-11-23 14:43:38 UTC]]
13649
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13650
+  (0.0ms) SAVEPOINT active_record_1
13651
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:43:38 UTC], ["updated_at", 2016-11-23 14:43:38 UTC]]
13652
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13653
+  (0.7ms) rollback transaction
13654
+  (0.6ms) begin transaction
13655
+  (0.1ms) SAVEPOINT active_record_1
13656
+ SQL (0.5ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:43:54 UTC], ["updated_at", 2016-11-23 14:43:54 UTC]]
13657
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13658
+  (0.1ms) SAVEPOINT active_record_1
13659
+ SQL (0.2ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:43:54 UTC], ["updated_at", 2016-11-23 14:43:54 UTC]]
13660
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13661
+  (0.1ms) SAVEPOINT active_record_1
13662
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:43:54 UTC], ["updated_at", 2016-11-23 14:43:54 UTC]]
13663
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13664
+  (0.7ms) rollback transaction
13665
+  (0.5ms) begin transaction
13666
+  (0.1ms) SAVEPOINT active_record_1
13667
+ SQL (0.4ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:44:26 UTC], ["updated_at", 2016-11-23 14:44:26 UTC]]
13668
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13669
+  (0.1ms) SAVEPOINT active_record_1
13670
+ SQL (0.2ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:44:26 UTC], ["updated_at", 2016-11-23 14:44:26 UTC]]
13671
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13672
+  (0.1ms) SAVEPOINT active_record_1
13673
+ SQL (0.2ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:44:26 UTC], ["updated_at", 2016-11-23 14:44:26 UTC]]
13674
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13675
+  (0.7ms) rollback transaction
13676
+  (0.5ms) begin transaction
13677
+  (0.1ms) SAVEPOINT active_record_1
13678
+ SQL (0.5ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:44:39 UTC], ["updated_at", 2016-11-23 14:44:39 UTC]]
13679
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13680
+  (0.1ms) SAVEPOINT active_record_1
13681
+ SQL (0.2ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:44:39 UTC], ["updated_at", 2016-11-23 14:44:39 UTC]]
13682
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13683
+  (0.1ms) SAVEPOINT active_record_1
13684
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:44:39 UTC], ["updated_at", 2016-11-23 14:44:39 UTC]]
13685
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13686
+ Started GET "/addresses/cities/1?format=json" for 127.0.0.1 at 2016-11-23 12:44:39 -0200
13687
+ Processing by Addresses::CitiesController#show as JSON
13688
+ Parameters: {"id"=>"1"}
13689
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13690
+ Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 0.1ms)
13691
+  (23.5ms) rollback transaction
13692
+  (0.5ms) begin transaction
13693
+  (0.1ms) SAVEPOINT active_record_1
13694
+ SQL (1.6ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:44:57 UTC], ["updated_at", 2016-11-23 14:44:57 UTC]]
13695
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13696
+  (0.1ms) SAVEPOINT active_record_1
13697
+ SQL (0.2ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:44:57 UTC], ["updated_at", 2016-11-23 14:44:57 UTC]]
13698
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13699
+  (0.1ms) SAVEPOINT active_record_1
13700
+ SQL (0.2ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:44:57 UTC], ["updated_at", 2016-11-23 14:44:57 UTC]]
13701
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13702
+ Started GET "/addresses/cities/1?format=json" for 127.0.0.1 at 2016-11-23 12:44:57 -0200
13703
+ Processing by Addresses::CitiesController#show as JSON
13704
+ Parameters: {"id"=>"1"}
13705
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13706
+ Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 0.1ms)
13707
+  (0.7ms) rollback transaction
13708
+  (0.5ms) begin transaction
13709
+  (0.1ms) SAVEPOINT active_record_1
13710
+ SQL (0.5ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:45:52 UTC], ["updated_at", 2016-11-23 14:45:52 UTC]]
13711
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13712
+  (0.1ms) SAVEPOINT active_record_1
13713
+ SQL (0.2ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:45:52 UTC], ["updated_at", 2016-11-23 14:45:52 UTC]]
13714
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13715
+  (0.0ms) SAVEPOINT active_record_1
13716
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:45:52 UTC], ["updated_at", 2016-11-23 14:45:52 UTC]]
13717
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13718
+  (0.6ms) rollback transaction
13719
+  (0.6ms) begin transaction
13720
+  (0.1ms) SAVEPOINT active_record_1
13721
+ SQL (1.0ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-11-23 14:46:04 UTC], ["updated_at", 2016-11-23 14:46:04 UTC]]
13722
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13723
+  (0.1ms) SAVEPOINT active_record_1
13724
+ SQL (0.2ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-11-23 14:46:04 UTC], ["updated_at", 2016-11-23 14:46:04 UTC]]
13725
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13726
+  (0.1ms) SAVEPOINT active_record_1
13727
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-11-23 14:46:04 UTC], ["updated_at", 2016-11-23 14:46:04 UTC]]
13728
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13729
+  (0.7ms) rollback transaction
@@ -8,11 +8,24 @@ RSpec.describe Addresses::CitiesController, type: :request do
8
8
  describe "GET /cities" do
9
9
  before { get '/addresses/cities', params: { state_id: state.id, format: "json" } }
10
10
 
11
- it "should return an interview" do
11
+ it "should return an list of cities" do
12
12
  json = JSON.parse(response.body)
13
13
 
14
14
  expect(response.status).to be(200)
15
+ expect(json.size).to eq(1)
15
16
  expect(json[0]["name"]).to eq(city.name)
16
17
  end
17
18
  end
19
+
20
+ describe "GET /cities/:id" do
21
+ before { get "/addresses/cities/#{city.id}", params: { format: "json" } }
22
+
23
+ it "should return a specific city" do
24
+ json = JSON.parse(response.body)
25
+
26
+ expect(response.status).to be(200)
27
+ expect(json["id"]).to eq(city.id)
28
+ expect(json["name"]).to eq(city.name)
29
+ end
30
+ end
18
31
  end
@@ -7,5 +7,9 @@ RSpec.describe Addresses::CitiesController, type: :routing do
7
7
  it "routes to #index" do
8
8
  expect(get: "/cities").to route_to("addresses/cities#index")
9
9
  end
10
+
11
+ it "routes to #show" do
12
+ expect(get: "/cities/1").to route_to("addresses/cities#show", id: '1')
13
+ end
10
14
  end
11
15
  end
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: 1.0.3
4
+ version: 1.0.4
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: 2016-09-22 00:00:00.000000000 Z
12
+ date: 2016-11-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails