pattana 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/city.rb +1 -1
- data/config/routes.rb +8 -21
- data/lib/pattana/factories.rb +2 -3
- data/lib/pattana/version.rb +1 -1
- metadata +2 -5
- data/db/master_data/backup/cities.sql +0 -43757
- data/db/master_data/backup/countries.sql +0 -251
- data/db/master_data/backup/regions.sql +0 -5488
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 428e36ae17b95c74125c6ecb1790a310679ab872
|
4
|
+
data.tar.gz: 429218025bd8c3d5954f52dc03f81156bb6da829
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
6
|
-
|
7
|
-
|
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
|
-
|
15
|
-
|
16
|
-
|
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
|
data/lib/pattana/factories.rb
CHANGED
@@ -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
|
-
|
7
|
-
Dir[File.join(
|
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) }
|
data/lib/pattana/version.rb
CHANGED
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.
|
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-
|
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
|