pattana 0.1.5 → 0.1.6

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: 19df4972b054e5999dd72c307dc0993335611de6
4
- data.tar.gz: 2d8c724971ea168409135bbcad65c9b5305be3f3
3
+ metadata.gz: 428e36ae17b95c74125c6ecb1790a310679ab872
4
+ data.tar.gz: 429218025bd8c3d5954f52dc03f81156bb6da829
5
5
  SHA512:
6
- metadata.gz: 4aa1e16cbc5665cb034e350425d16a4de717e8813cd131ddb3221f54b3d6727f6061ad0ef7279b70126c93b2352d97987f24f184b108b402361fba9e2cca1be6
7
- data.tar.gz: 630d0c8af2707fa04872ed0bdbdc5f450502a33fcbbab7598dfc67f404ae079d17b05cd62889d15c6ebbaa8bc727cbcf29549e71c4b42fdc67106b5c8663a490
6
+ metadata.gz: fd8d09d949f1016541ba0e9a8f55c0aac309e303eb0618ca47196ba8d5fefe31e3d4c0e50a97222ddd20fb021e83ed2fbd5c0fe5a2161a421d09978e1226c20f
7
+ data.tar.gz: 5c8b51045f779b3265ac86f3233ffda2ec5f5ebedcf7d857d62d0ab8fc610394e93224ffb0ecfd02ef37882e013e92df8c551299d5f974c0ad75949c09639cc2
data/app/models/city.rb CHANGED
@@ -52,7 +52,7 @@ class City < Pattana::ApplicationRecord
52
52
  details = "Stack trace: #{e.backtrace.map {|l| " #{l}\n"}.join}"
53
53
  error_object.errors << { summary: summary, details: details }
54
54
  end
55
- return city, error_object
55
+ return error_object
56
56
  end
57
57
 
58
58
  def self.parse_row_data(row_data)
data/config/routes.rb CHANGED
@@ -2,29 +2,16 @@ Pattana::Engine.routes.draw do
2
2
 
3
3
  get 'dashboard/pattana', to: "dashboard#index", as: :dashboard
4
4
 
5
- resources :countries, as: :countries do
6
- member do
7
- get :regions
5
+ scope :admin do
6
+ resources :countries, as: :countries do
7
+ member do
8
+ get :regions
9
+ end
8
10
  end
9
- end
10
-
11
- resources :regions, as: :regions
12
- resources :cities, as: :cities
13
11
 
14
- # get '/api/v1/countries', :controller => "/api/v1/countries", action: :index, as: :api_v1_countries
15
- # get '/api/v1/:country_id/regions', :controller => "/api/v1/regions", action: :index, as: :api_v1_regions
16
- # get '/api/v1/:country_id/cities', :controller => "/api/v1/cities", action: :cities_in_a_country, as: :api_v1_cities_in_a_country
17
- # get '/api/v1/:country_id/:region_id/cities', :controller => "/api/v1/cities", action: :cities_in_a_region, as: :api_v1_cities_in_a_region
18
-
19
- # namespace :docs do
20
- # namespace :api do
21
- # namespace :v1 do
22
- # get 'countries', to: "/api/v1/docs#countries"
23
- # get 'regions', to: "/api/v1/docs#regions"
24
- # get 'cities', to: "/api/v1/docs#cities"
25
- # end
26
- # end
27
- # end
12
+ resources :regions, as: :regions
13
+ resources :cities, as: :cities
14
+ end
28
15
 
29
16
  namespace :api do
30
17
  namespace :v1 do
@@ -3,6 +3,5 @@
3
3
  # hence this hack.
4
4
  # Read More: https://stackoverflow.com/questions/31700345/how-can-i-share-the-factories-that-i-have-in-a-gem-and-use-it-in-other-project
5
5
 
6
- GEM_ROOT = File.dirname(File.dirname(File.dirname(__FILE__)))
7
- Dir[File.join(GEM_ROOT, 'spec', 'dummy', 'spec', 'factories', '*.rb')].each { |file| require(file) }
8
- # binding.pry
6
+ GEM_PATTANA_ROOT = File.dirname(File.dirname(File.dirname(__FILE__)))
7
+ Dir[File.join(GEM_PATTANA_ROOT, 'spec', 'dummy', 'spec', 'factories', '*.rb')].each { |file| require(file) }
@@ -1,3 +1,3 @@
1
1
  module Pattana
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pattana
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - kpvarma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-07 00:00:00.000000000 Z
11
+ date: 2017-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -388,9 +388,6 @@ files:
388
388
  - config/locales/pattana/api.ar.yml
389
389
  - config/locales/pattana/api.en.yml
390
390
  - config/routes.rb
391
- - db/master_data/backup/cities.sql
392
- - db/master_data/backup/countries.sql
393
- - db/master_data/backup/regions.sql
394
391
  - db/master_data/cities.sql
395
392
  - db/master_data/countries.sql
396
393
  - db/master_data/regions.sql