sg_postcode 1.2.1 → 1.2.3
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/lib/sg_postcode/converters/long_lat_converter.rb +1 -1
- data/lib/sg_postcode/version.rb +1 -1
- data/test/test_helper.rb +2 -15
- metadata +6 -134
- data/test/dummy/README.rdoc +0 -28
- data/test/dummy/Rakefile +0 -6
- data/test/dummy/app/assets/javascripts/application.js +0 -13
- data/test/dummy/app/assets/stylesheets/application.css +0 -15
- data/test/dummy/app/controllers/application_controller.rb +0 -5
- data/test/dummy/app/controllers/homes_controller.rb +0 -8
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/views/homes/index.html.erb +0 -141
- data/test/dummy/app/views/layouts/application.html.erb +0 -23
- data/test/dummy/bin/bundle +0 -3
- data/test/dummy/bin/rails +0 -4
- data/test/dummy/bin/rake +0 -4
- data/test/dummy/bin/setup +0 -29
- data/test/dummy/config/application.rb +0 -26
- data/test/dummy/config/boot.rb +0 -5
- data/test/dummy/config/database.yml +0 -25
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -41
- data/test/dummy/config/environments/production.rb +0 -79
- data/test/dummy/config/environments/test.rb +0 -42
- data/test/dummy/config/initializers/assets.rb +0 -11
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
- data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/dummy/config/initializers/inflections.rb +0 -16
- data/test/dummy/config/initializers/mime_types.rb +0 -4
- data/test/dummy/config/initializers/session_store.rb +0 -3
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy/config/locales/en.yml +0 -23
- data/test/dummy/config/routes.rb +0 -57
- data/test/dummy/config/secrets.yml +0 -22
- data/test/dummy/config.ru +0 -4
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +0 -6003
- data/test/dummy/log/test.log +0 -225
- data/test/dummy/public/404.html +0 -67
- data/test/dummy/public/422.html +0 -67
- data/test/dummy/public/500.html +0 -66
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/-vQYSUkE9lGmrmiORXoPfBwAf3hR234Yok5jnBQrzyo.cache +0 -1
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/9DGvqRf86Gyp3vd0KXPT1Xhx9MyFgIZywKHd-SN_vj0.cache +0 -1
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/CiSgr1SAu2SQdLy0phRQpULdqgyMSS2NtQpuHlxzB6s.cache +0 -1
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/RCSidKcxbxGQunodZFTx_an2UpxtX0c4CgWUAifF1Zc.cache +0 -3
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/RzQHQwY4ozzo0ESckKkxMAZBV2a9PFG4f27Ao0lIZOk.cache +0 -2
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/VMj2FphcEriKcPhX84DUfL4KLpP8lwwOX3YiUlddU8Q.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/WXAJAhHe2YtSSQHEqqlrP41iupUol2lRZHo9aSDtqDk.cache +0 -1
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/_LRrankhfE2ypIWNdzZlGeJp_CnDa9Limi8PMPenLGs.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/kSxhTk2OTbIhyjFKfQKiwi9N89JVI2KMi2-t4I2nkKo.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/kgKFQq9K2CKWDviK9J2kse2ZTlIFyP_yFiSBv5HAZWY.cache +0 -3
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/l5QHQQcUNuQQC_6QrqHceFwt6ukt54_erDN70ansVL4.cache +0 -1
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/lz1MBX9tRsdihuh-tESZsyE93OVaYcpwQQTOD4WIEG8.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/meCcv5Dm5dZTAH3JEtCm80y9z6fLXLVcTaKDik82Vbs.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/uiSc7dBC0BJJjflpgOIsEPJlC1BL3UAtHZD4yDYa9Zo.cache +0 -2
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/xDi0XH-TKuUZ70g472LXoPtaOpeNK-iGRkR4_A1Nsqw.cache +0 -1
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/zHq3zhOzmWMYy7_JkcW1UXBNAtYl_r4kz_Ax8mdeLOI.cache +0 -1
- data/test/dummy/tmp/pids/server.pid +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 578c112a86f4c2b5a32e389403fe531032d8790e
|
4
|
+
data.tar.gz: 8e3556c3511ecd16559a95583f6bca5bee9c5504
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 789bf329e3918941901e5b3ff925eeeb3ca99fa3fea8097f822a5a22c1c2e1c88f9fbcf52f5b0a525135993d6d3ec567093c101b4e9b965eebaca6c23d830276
|
7
|
+
data.tar.gz: 279adab0b8499e000d3c93f3970ad256961305d42bbf1554ee11d02f1a18643864853c4a6ab81bc8db171c5fde105fcaa78a4a37a509e02d60c6a5680332a5fa
|
data/lib/sg_postcode/version.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -1,26 +1,13 @@
|
|
1
|
-
# Configure Rails Environment
|
2
|
-
ENV["RAILS_ENV"] = "test"
|
3
1
|
require 'simplecov'
|
4
2
|
SimpleCov.start do
|
5
3
|
add_filter "/test/"
|
6
4
|
end
|
7
5
|
|
8
|
-
require File.expand_path("
|
9
|
-
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
|
10
|
-
require "rails/test_help"
|
6
|
+
require File.expand_path("lib/sg_postcode")
|
11
7
|
require "minitest/autorun"
|
12
8
|
|
13
9
|
# Filter out Minitest backtrace while allowing backtrace from other libraries
|
14
10
|
# to be shown.
|
15
11
|
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
16
12
|
|
17
|
-
|
18
|
-
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
19
|
-
|
20
|
-
SgPostcode::CacheAdapter.hash_name = "test_redis_store"
|
21
|
-
|
22
|
-
# Load fixtures from the engine
|
23
|
-
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
|
24
|
-
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
25
|
-
ActiveSupport::TestCase.fixtures :all
|
26
|
-
end
|
13
|
+
SgPostcode::CacheAdapter.hash_name = "redis_store_test"
|
metadata
CHANGED
@@ -1,43 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sg_postcode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Duy Khoa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: redis
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '3.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: sqlite3
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
26
|
+
version: '3.2'
|
41
27
|
description: Convert SG Postcode to long lat array
|
42
28
|
email:
|
43
29
|
- duykhoa12t@gmail.com
|
@@ -60,63 +46,6 @@ files:
|
|
60
46
|
- lib/sg_postcode/version.rb
|
61
47
|
- lib/tasks/sg_postcode_tasks.rake
|
62
48
|
- test/converters/test_long_lat_converter.rb
|
63
|
-
- test/dummy/README.rdoc
|
64
|
-
- test/dummy/Rakefile
|
65
|
-
- test/dummy/app/assets/javascripts/application.js
|
66
|
-
- test/dummy/app/assets/stylesheets/application.css
|
67
|
-
- test/dummy/app/controllers/application_controller.rb
|
68
|
-
- test/dummy/app/controllers/homes_controller.rb
|
69
|
-
- test/dummy/app/helpers/application_helper.rb
|
70
|
-
- test/dummy/app/views/homes/index.html.erb
|
71
|
-
- test/dummy/app/views/layouts/application.html.erb
|
72
|
-
- test/dummy/bin/bundle
|
73
|
-
- test/dummy/bin/rails
|
74
|
-
- test/dummy/bin/rake
|
75
|
-
- test/dummy/bin/setup
|
76
|
-
- test/dummy/config.ru
|
77
|
-
- test/dummy/config/application.rb
|
78
|
-
- test/dummy/config/boot.rb
|
79
|
-
- test/dummy/config/database.yml
|
80
|
-
- test/dummy/config/environment.rb
|
81
|
-
- test/dummy/config/environments/development.rb
|
82
|
-
- test/dummy/config/environments/production.rb
|
83
|
-
- test/dummy/config/environments/test.rb
|
84
|
-
- test/dummy/config/initializers/assets.rb
|
85
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
86
|
-
- test/dummy/config/initializers/cookies_serializer.rb
|
87
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
88
|
-
- test/dummy/config/initializers/inflections.rb
|
89
|
-
- test/dummy/config/initializers/mime_types.rb
|
90
|
-
- test/dummy/config/initializers/session_store.rb
|
91
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
92
|
-
- test/dummy/config/locales/en.yml
|
93
|
-
- test/dummy/config/routes.rb
|
94
|
-
- test/dummy/config/secrets.yml
|
95
|
-
- test/dummy/db/development.sqlite3
|
96
|
-
- test/dummy/db/test.sqlite3
|
97
|
-
- test/dummy/log/development.log
|
98
|
-
- test/dummy/log/test.log
|
99
|
-
- test/dummy/public/404.html
|
100
|
-
- test/dummy/public/422.html
|
101
|
-
- test/dummy/public/500.html
|
102
|
-
- test/dummy/public/favicon.ico
|
103
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/-vQYSUkE9lGmrmiORXoPfBwAf3hR234Yok5jnBQrzyo.cache
|
104
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/9DGvqRf86Gyp3vd0KXPT1Xhx9MyFgIZywKHd-SN_vj0.cache
|
105
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/CiSgr1SAu2SQdLy0phRQpULdqgyMSS2NtQpuHlxzB6s.cache
|
106
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/RCSidKcxbxGQunodZFTx_an2UpxtX0c4CgWUAifF1Zc.cache
|
107
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/RzQHQwY4ozzo0ESckKkxMAZBV2a9PFG4f27Ao0lIZOk.cache
|
108
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/VMj2FphcEriKcPhX84DUfL4KLpP8lwwOX3YiUlddU8Q.cache
|
109
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/WXAJAhHe2YtSSQHEqqlrP41iupUol2lRZHo9aSDtqDk.cache
|
110
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/_LRrankhfE2ypIWNdzZlGeJp_CnDa9Limi8PMPenLGs.cache
|
111
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/kSxhTk2OTbIhyjFKfQKiwi9N89JVI2KMi2-t4I2nkKo.cache
|
112
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/kgKFQq9K2CKWDviK9J2kse2ZTlIFyP_yFiSBv5HAZWY.cache
|
113
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/l5QHQQcUNuQQC_6QrqHceFwt6ukt54_erDN70ansVL4.cache
|
114
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/lz1MBX9tRsdihuh-tESZsyE93OVaYcpwQQTOD4WIEG8.cache
|
115
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/meCcv5Dm5dZTAH3JEtCm80y9z6fLXLVcTaKDik82Vbs.cache
|
116
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/uiSc7dBC0BJJjflpgOIsEPJlC1BL3UAtHZD4yDYa9Zo.cache
|
117
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/xDi0XH-TKuUZ70g472LXoPtaOpeNK-iGRkR4_A1Nsqw.cache
|
118
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/zHq3zhOzmWMYy7_JkcW1UXBNAtYl_r4kz_Ax8mdeLOI.cache
|
119
|
-
- test/dummy/tmp/pids/server.pid
|
120
49
|
- test/response/test_json_output.rb
|
121
50
|
- test/response/test_response_builder.rb
|
122
51
|
- test/sample_response.json
|
@@ -124,7 +53,7 @@ files:
|
|
124
53
|
- test/services/test_proxy.rb
|
125
54
|
- test/test_helper.rb
|
126
55
|
- test/test_sg_postcode.rb
|
127
|
-
homepage:
|
56
|
+
homepage: https://github.com/ManagedApplicationServices/sg_postcode
|
128
57
|
licenses:
|
129
58
|
- MIT
|
130
59
|
metadata: {}
|
@@ -150,63 +79,6 @@ specification_version: 4
|
|
150
79
|
summary: Convert SG Postcode to long lat array
|
151
80
|
test_files:
|
152
81
|
- test/converters/test_long_lat_converter.rb
|
153
|
-
- test/dummy/app/assets/javascripts/application.js
|
154
|
-
- test/dummy/app/assets/stylesheets/application.css
|
155
|
-
- test/dummy/app/controllers/application_controller.rb
|
156
|
-
- test/dummy/app/controllers/homes_controller.rb
|
157
|
-
- test/dummy/app/helpers/application_helper.rb
|
158
|
-
- test/dummy/app/views/homes/index.html.erb
|
159
|
-
- test/dummy/app/views/layouts/application.html.erb
|
160
|
-
- test/dummy/bin/bundle
|
161
|
-
- test/dummy/bin/rails
|
162
|
-
- test/dummy/bin/rake
|
163
|
-
- test/dummy/bin/setup
|
164
|
-
- test/dummy/config/application.rb
|
165
|
-
- test/dummy/config/boot.rb
|
166
|
-
- test/dummy/config/database.yml
|
167
|
-
- test/dummy/config/environment.rb
|
168
|
-
- test/dummy/config/environments/development.rb
|
169
|
-
- test/dummy/config/environments/production.rb
|
170
|
-
- test/dummy/config/environments/test.rb
|
171
|
-
- test/dummy/config/initializers/assets.rb
|
172
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
173
|
-
- test/dummy/config/initializers/cookies_serializer.rb
|
174
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
175
|
-
- test/dummy/config/initializers/inflections.rb
|
176
|
-
- test/dummy/config/initializers/mime_types.rb
|
177
|
-
- test/dummy/config/initializers/session_store.rb
|
178
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
179
|
-
- test/dummy/config/locales/en.yml
|
180
|
-
- test/dummy/config/routes.rb
|
181
|
-
- test/dummy/config/secrets.yml
|
182
|
-
- test/dummy/config.ru
|
183
|
-
- test/dummy/db/development.sqlite3
|
184
|
-
- test/dummy/db/test.sqlite3
|
185
|
-
- test/dummy/log/development.log
|
186
|
-
- test/dummy/log/test.log
|
187
|
-
- test/dummy/public/404.html
|
188
|
-
- test/dummy/public/422.html
|
189
|
-
- test/dummy/public/500.html
|
190
|
-
- test/dummy/public/favicon.ico
|
191
|
-
- test/dummy/Rakefile
|
192
|
-
- test/dummy/README.rdoc
|
193
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/-vQYSUkE9lGmrmiORXoPfBwAf3hR234Yok5jnBQrzyo.cache
|
194
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/9DGvqRf86Gyp3vd0KXPT1Xhx9MyFgIZywKHd-SN_vj0.cache
|
195
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/_LRrankhfE2ypIWNdzZlGeJp_CnDa9Limi8PMPenLGs.cache
|
196
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/CiSgr1SAu2SQdLy0phRQpULdqgyMSS2NtQpuHlxzB6s.cache
|
197
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/kgKFQq9K2CKWDviK9J2kse2ZTlIFyP_yFiSBv5HAZWY.cache
|
198
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/kSxhTk2OTbIhyjFKfQKiwi9N89JVI2KMi2-t4I2nkKo.cache
|
199
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/l5QHQQcUNuQQC_6QrqHceFwt6ukt54_erDN70ansVL4.cache
|
200
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/lz1MBX9tRsdihuh-tESZsyE93OVaYcpwQQTOD4WIEG8.cache
|
201
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/meCcv5Dm5dZTAH3JEtCm80y9z6fLXLVcTaKDik82Vbs.cache
|
202
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/RCSidKcxbxGQunodZFTx_an2UpxtX0c4CgWUAifF1Zc.cache
|
203
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/RzQHQwY4ozzo0ESckKkxMAZBV2a9PFG4f27Ao0lIZOk.cache
|
204
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/uiSc7dBC0BJJjflpgOIsEPJlC1BL3UAtHZD4yDYa9Zo.cache
|
205
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/VMj2FphcEriKcPhX84DUfL4KLpP8lwwOX3YiUlddU8Q.cache
|
206
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/WXAJAhHe2YtSSQHEqqlrP41iupUol2lRZHo9aSDtqDk.cache
|
207
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/xDi0XH-TKuUZ70g472LXoPtaOpeNK-iGRkR4_A1Nsqw.cache
|
208
|
-
- test/dummy/tmp/cache/assets/development/sprockets/v3.0/zHq3zhOzmWMYy7_JkcW1UXBNAtYl_r4kz_Ax8mdeLOI.cache
|
209
|
-
- test/dummy/tmp/pids/server.pid
|
210
82
|
- test/response/test_json_output.rb
|
211
83
|
- test/response/test_response_builder.rb
|
212
84
|
- test/sample_response.json
|
data/test/dummy/README.rdoc
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
== README
|
2
|
-
|
3
|
-
This README would normally document whatever steps are necessary to get the
|
4
|
-
application up and running.
|
5
|
-
|
6
|
-
Things you may want to cover:
|
7
|
-
|
8
|
-
* Ruby version
|
9
|
-
|
10
|
-
* System dependencies
|
11
|
-
|
12
|
-
* Configuration
|
13
|
-
|
14
|
-
* Database creation
|
15
|
-
|
16
|
-
* Database initialization
|
17
|
-
|
18
|
-
* How to run the test suite
|
19
|
-
|
20
|
-
* Services (job queues, cache servers, search engines, etc.)
|
21
|
-
|
22
|
-
* Deployment instructions
|
23
|
-
|
24
|
-
* ...
|
25
|
-
|
26
|
-
|
27
|
-
Please feel free to use a different markup language if you do not plan to run
|
28
|
-
<tt>rake doc:app</tt>.
|
data/test/dummy/Rakefile
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// compiled file.
|
9
|
-
//
|
10
|
-
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
-
// about supported directives.
|
12
|
-
//
|
13
|
-
//= require_tree .
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
-
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
-
* file per style scope.
|
12
|
-
*
|
13
|
-
*= require_tree .
|
14
|
-
*= require_self
|
15
|
-
*/
|
@@ -1,141 +0,0 @@
|
|
1
|
-
<nav class="blue darken-2">
|
2
|
-
<div class="nav-wrapper">
|
3
|
-
<a class="brand-logo" href="#">DEMO APP</a>
|
4
|
-
<ul id="nav-mobile" class="right hide-on-med-and-down">
|
5
|
-
<li>
|
6
|
-
<a href="#">
|
7
|
-
<i class="material-icons">search</i>
|
8
|
-
</a>
|
9
|
-
</li>
|
10
|
-
</ul>
|
11
|
-
</div>
|
12
|
-
</nav>
|
13
|
-
|
14
|
-
<article>
|
15
|
-
<div class="row">
|
16
|
-
<div class="col s12 m4 offset-m1">
|
17
|
-
<div class="card blue darken-1 medium">
|
18
|
-
<div class="card-image waves-effect waves-block waves-light">
|
19
|
-
<img class="activator" src="https://download.unsplash.com/photo-1433785567155-bf5530cab72c" alt="card demo">
|
20
|
-
</div>
|
21
|
-
<div class="card-content">
|
22
|
-
<span class="card-title activator white-text text-darken-4">
|
23
|
-
SgPostcode Demo App
|
24
|
-
<i class="material-icons right">more_vert</i>
|
25
|
-
</span>
|
26
|
-
</div>
|
27
|
-
|
28
|
-
<div class="card-reveal">
|
29
|
-
<span class="grey-text card-title">
|
30
|
-
Introduce
|
31
|
-
<i class="material-icons right">close</i>
|
32
|
-
</span>
|
33
|
-
<p>
|
34
|
-
This is a simple demo for sg_postcode gem.
|
35
|
-
For more information, please check the repository
|
36
|
-
<br>
|
37
|
-
<strong>
|
38
|
-
E.g:
|
39
|
-
<ol>
|
40
|
-
<li>
|
41
|
-
555851, 098537, 098537, 349489, 098537, 098537
|
42
|
-
</li>
|
43
|
-
|
44
|
-
<li>
|
45
|
-
247964, 247964, 247964, 247964, 247964, 247964, 050335, 050335, 050335, 050335, 050335, 050335, 050335, 050335, 050335, 050335, 050335, 050335, 050335, 050335, 050335, 050335, 050335, 050335, 050335, 050335, 050335, 050335
|
46
|
-
</li>
|
47
|
-
|
48
|
-
<li>
|
49
|
-
247964, 238432, 050335, 521110, 546080, 308215
|
50
|
-
</li>
|
51
|
-
</ul>
|
52
|
-
</strong>
|
53
|
-
</p>
|
54
|
-
</div>
|
55
|
-
</div>
|
56
|
-
|
57
|
-
<div class="card medium">
|
58
|
-
<div id="map-canvas"></div>
|
59
|
-
</div>
|
60
|
-
</div>
|
61
|
-
|
62
|
-
<div class="col s12 m6">
|
63
|
-
<div class="card light-green lighten-4">
|
64
|
-
<div class="card-content">
|
65
|
-
<div class="card-title">Convert Form</div>
|
66
|
-
<p>
|
67
|
-
<div class="row">
|
68
|
-
<form action="/" class="s6">
|
69
|
-
<div class="row">
|
70
|
-
<div class="input-field col s6">
|
71
|
-
<input id="postcode" type="text" length="100" name="postcode" value="<%= params[:postcode]%>">
|
72
|
-
<label for="Postcode">Input text</label>
|
73
|
-
</div>
|
74
|
-
</div>
|
75
|
-
|
76
|
-
<div class="row">
|
77
|
-
<div class="input-field col s6">
|
78
|
-
<button type="submit" class="waves-effect waves-light btn">Convert</button>
|
79
|
-
</div>
|
80
|
-
</div>
|
81
|
-
</form>
|
82
|
-
</div>
|
83
|
-
</p>
|
84
|
-
</div>
|
85
|
-
</div>
|
86
|
-
|
87
|
-
<div>
|
88
|
-
<div class="card">
|
89
|
-
<div class="card-content">
|
90
|
-
<span class="card-title">Result</span>
|
91
|
-
<p>
|
92
|
-
<table class="responsive-table">
|
93
|
-
<thead>
|
94
|
-
<th>Name</th>
|
95
|
-
<th>Long</th>
|
96
|
-
<th>Lat</th>
|
97
|
-
<th>Density</th>
|
98
|
-
</thead>
|
99
|
-
|
100
|
-
<tbody>
|
101
|
-
<%- @result.each do |result| %>
|
102
|
-
<tr>
|
103
|
-
<td><%= result.fetch(:format_address)%></td>
|
104
|
-
<td><%= result.fetch(:long)%></td>
|
105
|
-
<td><%= result.fetch(:lat)%></td>
|
106
|
-
<td><%= result.fetch(:density, 1)%></td>
|
107
|
-
</tr>
|
108
|
-
<%end%>
|
109
|
-
</tbody>
|
110
|
-
</table>
|
111
|
-
</p>
|
112
|
-
</div>
|
113
|
-
</div>
|
114
|
-
</div>
|
115
|
-
</div>
|
116
|
-
</div>
|
117
|
-
</article>
|
118
|
-
|
119
|
-
<%-centerLatLong = @result.count > 0 ? [@result.first[:lat], @result.first[:long]] : [1.36, 103.87] %>
|
120
|
-
|
121
|
-
<script>
|
122
|
-
function initialize() {
|
123
|
-
var mapCanvas = document.getElementById('map-canvas');
|
124
|
-
var mapOptions = {
|
125
|
-
center: new google.maps.LatLng(<%= centerLatLong[0] %>, <%= centerLatLong[1] %>),
|
126
|
-
zoom: 10
|
127
|
-
};
|
128
|
-
var map = new google.maps.Map(mapCanvas, mapOptions);
|
129
|
-
<%- @result.each do |result| %>
|
130
|
-
var place = new google.maps.LatLng(<%= result[:lat] %>, <%= result[:long] %>);
|
131
|
-
var marker = new google.maps.Marker({
|
132
|
-
position: place,
|
133
|
-
map: map,
|
134
|
-
title: "<%= result[:format_address] %>",
|
135
|
-
animation: google.maps.Animation.DROP,
|
136
|
-
});
|
137
|
-
<%end%>
|
138
|
-
}
|
139
|
-
|
140
|
-
google.maps.event.addDomListener(window, 'load', initialize);
|
141
|
-
</script>
|
@@ -1,23 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Dummy</title>
|
5
|
-
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
6
|
-
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
7
|
-
<%= csrf_meta_tags %>
|
8
|
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.0/css/materialize.min.css">
|
9
|
-
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
10
|
-
<script src="https://maps.googleapis.com/maps/api/js"></script>
|
11
|
-
<style>
|
12
|
-
#map-canvas {
|
13
|
-
width: 100%;
|
14
|
-
height: 100%;
|
15
|
-
}
|
16
|
-
</style>
|
17
|
-
</head>
|
18
|
-
<body>
|
19
|
-
<%= yield %>
|
20
|
-
</body>
|
21
|
-
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
|
22
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.0/js/materialize.min.js"></script>
|
23
|
-
</html>
|
data/test/dummy/bin/bundle
DELETED
data/test/dummy/bin/rails
DELETED
data/test/dummy/bin/rake
DELETED
data/test/dummy/bin/setup
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
require 'pathname'
|
3
|
-
|
4
|
-
# path to your application root.
|
5
|
-
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
6
|
-
|
7
|
-
Dir.chdir APP_ROOT do
|
8
|
-
# This script is a starting point to setup your application.
|
9
|
-
# Add necessary setup steps to this file:
|
10
|
-
|
11
|
-
puts "== Installing dependencies =="
|
12
|
-
system "gem install bundler --conservative"
|
13
|
-
system "bundle check || bundle install"
|
14
|
-
|
15
|
-
# puts "\n== Copying sample files =="
|
16
|
-
# unless File.exist?("config/database.yml")
|
17
|
-
# system "cp config/database.yml.sample config/database.yml"
|
18
|
-
# end
|
19
|
-
|
20
|
-
puts "\n== Preparing database =="
|
21
|
-
system "bin/rake db:setup"
|
22
|
-
|
23
|
-
puts "\n== Removing old logs and tempfiles =="
|
24
|
-
system "rm -f log/*"
|
25
|
-
system "rm -rf tmp/cache"
|
26
|
-
|
27
|
-
puts "\n== Restarting application server =="
|
28
|
-
system "touch tmp/restart.txt"
|
29
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require 'rails/all'
|
4
|
-
|
5
|
-
Bundler.require(*Rails.groups)
|
6
|
-
require "sg_postcode"
|
7
|
-
|
8
|
-
module Dummy
|
9
|
-
class Application < Rails::Application
|
10
|
-
# Settings in config/environments/* take precedence over those specified here.
|
11
|
-
# Application configuration should go into files in config/initializers
|
12
|
-
# -- all .rb files in that directory are automatically loaded.
|
13
|
-
|
14
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
15
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
16
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
17
|
-
|
18
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
19
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
20
|
-
# config.i18n.default_locale = :de
|
21
|
-
|
22
|
-
# Do not swallow errors in after_commit/after_rollback callbacks.
|
23
|
-
config.active_record.raise_in_transactional_callbacks = true
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
data/test/dummy/config/boot.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
# SQLite version 3.x
|
2
|
-
# gem install sqlite3
|
3
|
-
#
|
4
|
-
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
-
# gem 'sqlite3'
|
6
|
-
#
|
7
|
-
default: &default
|
8
|
-
adapter: sqlite3
|
9
|
-
pool: 5
|
10
|
-
timeout: 5000
|
11
|
-
|
12
|
-
development:
|
13
|
-
<<: *default
|
14
|
-
database: db/development.sqlite3
|
15
|
-
|
16
|
-
# Warning: The database defined as "test" will be erased and
|
17
|
-
# re-generated from your development database when you run "rake".
|
18
|
-
# Do not set this db to the same as development or production.
|
19
|
-
test:
|
20
|
-
<<: *default
|
21
|
-
database: db/test.sqlite3
|
22
|
-
|
23
|
-
production:
|
24
|
-
<<: *default
|
25
|
-
database: db/production.sqlite3
|
@@ -1,41 +0,0 @@
|
|
1
|
-
Rails.application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
# In the development environment your application's code is reloaded on
|
5
|
-
# every request. This slows down response time but is perfect for development
|
6
|
-
# since you don't have to restart the web server when you make code changes.
|
7
|
-
config.cache_classes = false
|
8
|
-
|
9
|
-
# Do not eager load code on boot.
|
10
|
-
config.eager_load = false
|
11
|
-
|
12
|
-
# Show full error reports and disable caching.
|
13
|
-
config.consider_all_requests_local = true
|
14
|
-
config.action_controller.perform_caching = false
|
15
|
-
|
16
|
-
# Don't care if the mailer can't send.
|
17
|
-
config.action_mailer.raise_delivery_errors = false
|
18
|
-
|
19
|
-
# Print deprecation notices to the Rails logger.
|
20
|
-
config.active_support.deprecation = :log
|
21
|
-
|
22
|
-
# Raise an error on page load if there are pending migrations.
|
23
|
-
config.active_record.migration_error = :page_load
|
24
|
-
|
25
|
-
# Debug mode disables concatenation and preprocessing of assets.
|
26
|
-
# This option may cause significant delays in view rendering with a large
|
27
|
-
# number of complex assets.
|
28
|
-
config.assets.debug = true
|
29
|
-
|
30
|
-
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
31
|
-
# yet still be able to expire them through the digest params.
|
32
|
-
config.assets.digest = true
|
33
|
-
|
34
|
-
# Adds additional error checking when serving assets at runtime.
|
35
|
-
# Checks for improperly declared sprockets dependencies.
|
36
|
-
# Raises helpful error messages.
|
37
|
-
config.assets.raise_runtime_errors = true
|
38
|
-
|
39
|
-
# Raises error for missing translations
|
40
|
-
# config.action_view.raise_on_missing_translations = true
|
41
|
-
end
|