pattana 0.2.0.pre.materialize → 0.2.1.pre.materialize
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/country.rb +2 -2
- data/lib/pattana/version.rb +1 -1
- data/lib/tasks/data.rake +29 -0
- metadata +6 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cac5f03735deefd7fa7000af6bea0405d6dc5dfa077e24cb37d84c941da4b90
|
4
|
+
data.tar.gz: fda17ff7256cfd2cd442e7296b0b8f1900ddeb969f75e3274667a3202e18c534
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ace906cf9df9a2423dc8dc81d32aca2cfd6f578b42d15966b620dedbcb6ce30c5e574f12533aeb93a6f5df41ce3a9ce90ec1cf8da2448d9d3badb86f271d381f
|
7
|
+
data.tar.gz: 5efba0b8e72bfe3f85a4a83993722756174a6fe9369bf7ee85c9e9187130358fb5e209160e89735f93c3feec16549fdb2dcd6a93eb6d5ee4dd7650ed96887abb
|
data/app/models/country.rb
CHANGED
@@ -146,11 +146,11 @@ class Country < Pattana::ApplicationRecord
|
|
146
146
|
end
|
147
147
|
|
148
148
|
else
|
149
|
-
puts "Unsupported File encountered'#{
|
149
|
+
puts "Unsupported File encountered'#{csv_path.to_s}'.".red if verbose
|
150
150
|
return
|
151
151
|
end
|
152
152
|
else
|
153
|
-
puts "Import File not found at '#{
|
153
|
+
puts "Import File not found at '#{csv_path.to_s}'.".red if verbose
|
154
154
|
end
|
155
155
|
end
|
156
156
|
end
|
data/lib/pattana/version.rb
CHANGED
data/lib/tasks/data.rake
CHANGED
@@ -42,6 +42,35 @@ namespace 'pattana' do
|
|
42
42
|
City.update_all(show_in_api: true)
|
43
43
|
end
|
44
44
|
|
45
|
+
namespace 'dummy' do
|
46
|
+
|
47
|
+
desc "Mark Operational"
|
48
|
+
task :mark_operational => :environment do
|
49
|
+
verbose = true
|
50
|
+
verbose = false if ["false", "f","0","no","n"].include?(ENV["verbose"].to_s.downcase.strip)
|
51
|
+
|
52
|
+
destroy_all = false
|
53
|
+
destroy_all = true if ["true", "t","1","yes","y"].include?(ENV["destroy_all"].to_s.downcase.strip)
|
54
|
+
|
55
|
+
path = Rails.root.join('db', 'data', 'dummy', "operational.csv")
|
56
|
+
path = Pattana::Engine.root.join('db', 'data', 'dummy', "operational.csv") unless File.exists?(path)
|
57
|
+
|
58
|
+
Country.import_operational_data_file(path, true, verbose)
|
59
|
+
puts "Successfully marked the Locations in the CSV as Operational".green if verbose
|
60
|
+
end
|
61
|
+
|
62
|
+
desc "Mark All Operational"
|
63
|
+
task :mark_all_operational => :environment do
|
64
|
+
Rake::Task["pattana:import:data:mark_all_operational"].invoke
|
65
|
+
end
|
66
|
+
|
67
|
+
desc "Mark All Show in API"
|
68
|
+
task :mark_all_show_in_api => :environment do
|
69
|
+
Rake::Task["pattana:import:data:mark_all_show_in_api"].invoke
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
73
|
+
|
45
74
|
end
|
46
75
|
end
|
47
76
|
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.2.
|
4
|
+
version: 0.2.1.pre.materialize
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kpvarma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -102,22 +102,16 @@ dependencies:
|
|
102
102
|
name: kuppayam
|
103
103
|
requirement: !ruby/object:Gem::Requirement
|
104
104
|
requirements:
|
105
|
-
- -
|
106
|
-
- !ruby/object:Gem::Version
|
107
|
-
version: '0.1'
|
108
|
-
- - ">="
|
105
|
+
- - '='
|
109
106
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.1.
|
107
|
+
version: 0.2.1.pre.materialize
|
111
108
|
type: :runtime
|
112
109
|
prerelease: false
|
113
110
|
version_requirements: !ruby/object:Gem::Requirement
|
114
111
|
requirements:
|
115
|
-
- -
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0.1'
|
118
|
-
- - ">="
|
112
|
+
- - '='
|
119
113
|
- !ruby/object:Gem::Version
|
120
|
-
version: 0.1.
|
114
|
+
version: 0.2.1.pre.materialize
|
121
115
|
- !ruby/object:Gem::Dependency
|
122
116
|
name: bcrypt
|
123
117
|
requirement: !ruby/object:Gem::Requirement
|