taiwan_city 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +29 -0
  4. data/app/assets/javascripts/taiwan_city/application.js.coffee +3 -0
  5. data/app/assets/javascripts/taiwan_city/jquery.taiwan_city.js.coffee +15 -0
  6. data/app/assets/stylesheets/taiwan_city/application.css +13 -0
  7. data/app/controllers/taiwan_city/application_controller.rb +4 -0
  8. data/app/controllers/taiwan_city/data_controller.rb +13 -0
  9. data/app/helpers/taiwan_city/application_helper.rb +4 -0
  10. data/app/views/layouts/taiwan_city/application.html.erb +12 -0
  11. data/app/views/taiwan_city/data/index.html.erb +21 -0
  12. data/config/routes.rb +4 -0
  13. data/db/areas.json +429 -0
  14. data/lib/taiwan_city/engine.rb +13 -0
  15. data/lib/taiwan_city/version.rb +3 -0
  16. data/lib/taiwan_city.rb +82 -0
  17. data/lib/tasks/taiwan_city_tasks.rake +4 -0
  18. data/spec/controllers/taiwan_city/data_controller_spec.rb +12 -0
  19. data/spec/dummy/README.rdoc +28 -0
  20. data/spec/dummy/Rakefile +6 -0
  21. data/spec/dummy/app/assets/javascripts/application.js +14 -0
  22. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  23. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  24. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  25. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  26. data/spec/dummy/bin/bundle +3 -0
  27. data/spec/dummy/bin/rails +4 -0
  28. data/spec/dummy/bin/rake +4 -0
  29. data/spec/dummy/config/application.rb +35 -0
  30. data/spec/dummy/config/boot.rb +5 -0
  31. data/spec/dummy/config/database.yml +25 -0
  32. data/spec/dummy/config/environment.rb +5 -0
  33. data/spec/dummy/config/environments/development.rb +29 -0
  34. data/spec/dummy/config/environments/production.rb +80 -0
  35. data/spec/dummy/config/environments/test.rb +36 -0
  36. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  37. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  38. data/spec/dummy/config/initializers/inflections.rb +16 -0
  39. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  40. data/spec/dummy/config/initializers/secret_token.rb +13 -0
  41. data/spec/dummy/config/initializers/session_store.rb +3 -0
  42. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  43. data/spec/dummy/config/locales/en.yml +23 -0
  44. data/spec/dummy/config/routes.rb +4 -0
  45. data/spec/dummy/config.ru +4 -0
  46. data/spec/dummy/log/development.log +484 -0
  47. data/spec/dummy/log/production.log +32 -0
  48. data/spec/dummy/log/test.log +3 -0
  49. data/spec/dummy/public/404.html +58 -0
  50. data/spec/dummy/public/422.html +58 -0
  51. data/spec/dummy/public/500.html +57 -0
  52. data/spec/dummy/public/favicon.ico +0 -0
  53. data/spec/dummy/script/rails +6 -0
  54. data/spec/dummy/tmp/cache/assets/CE6/E70/sprockets%2Fa6c63954e523c34f8376ec83c437c2d1 +0 -0
  55. data/spec/dummy/tmp/cache/assets/D0E/3D0/sprockets%2F8a0dc352946b98ecba565e3c074534b3 +21 -0
  56. data/spec/dummy/tmp/cache/assets/D0F/790/sprockets%2Fb19824f150c4f7f1162f3ac294f17ff3 +20 -0
  57. data/spec/dummy/tmp/cache/assets/D32/000/sprockets%2Fa5e6bd4b9b39e37ac37c0e00801a0577 +11 -0
  58. data/spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  59. data/spec/dummy/tmp/cache/assets/D40/F70/sprockets%2F32ccef3c74c0d96753ec56716a0075df +0 -0
  60. data/spec/dummy/tmp/cache/assets/D54/ED0/sprockets%2F71c9fa01091d432b131da3bb73faf3d4 +21 -0
  61. data/spec/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 +22 -0
  62. data/spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  63. data/spec/features/taiwan_city_spec.rb +69 -0
  64. data/spec/lib/taiwan_city_spec.rb +30 -0
  65. data/spec/spec_helper.rb +29 -0
  66. metadata +268 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 12df281afca7ba63b95e2af3bf901a8ed391fe16
4
+ data.tar.gz: ce6dfb67a6969d3b527be9c6d62edc0f0461afad
5
+ SHA512:
6
+ metadata.gz: b05a8f01394e439c61e73c22c392990a038205682fea6e28f5e2e7ec28fcf9970dc8ba8b2670f19a666c5f9966e9e613ae7ef806e19d6878d4996f05ec137291
7
+ data.tar.gz: fe09e9e12d66e6446c2601b2b92a3a3fbdbe1fdadb7a054a06ccbead605475af0cf7b786749f62846d5441bca5ce91e31e480315aa0f332c84c21af3fb7fe67d
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2013 saberma
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,29 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+ require 'appraisal'
9
+
10
+ RDoc::Task.new(:rdoc) do |rdoc|
11
+ rdoc.rdoc_dir = 'rdoc'
12
+ rdoc.title = 'TaiwanCity'
13
+ rdoc.options << '--line-numbers'
14
+ rdoc.rdoc_files.include('README.rdoc')
15
+ rdoc.rdoc_files.include('lib/**/*.rb')
16
+ end
17
+
18
+ APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
19
+ load 'rails/tasks/engine.rake'
20
+
21
+
22
+
23
+ Bundler::GemHelper.install_tasks
24
+
25
+ require 'rspec/core'
26
+ require 'rspec/core/rake_task'
27
+ desc "Run all specs in spec directory (excluding plugin specs)"
28
+ RSpec::Core::RakeTask.new(:spec)
29
+ task :default => :spec
@@ -0,0 +1,3 @@
1
+ #= require jquery
2
+ #= require taiwan_city/jquery.taiwan_city
3
+ #= require_tree .
@@ -0,0 +1,15 @@
1
+ (($) ->
2
+ $.fn.taiwan_city = () ->
3
+ @each ->
4
+ selects = $(@).find('.city-select')
5
+ selects.change ->
6
+ $this = $(@)
7
+ next_selects = selects.slice(selects.index(@) + 1) # empty all children city
8
+ $("option:gt(0)", next_selects).remove()
9
+ if next_selects.first()[0] and $this.val() # init next child
10
+ $.get "/taiwan_city/#{$(@).val()}", (data) ->
11
+ next_selects.first()[0].options.add(new Option(option[0], option[1])) for option in data
12
+
13
+ $ ->
14
+ $('.city-group').taiwan_city()
15
+ )(jQuery)
@@ -0,0 +1,13 @@
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 vendor/assets/stylesheets of plugins, if any, 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 top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require_tree .
13
+ */
@@ -0,0 +1,4 @@
1
+ module TaiwanCity
2
+ class ApplicationController < ActionController::Base
3
+ end
4
+ end
@@ -0,0 +1,13 @@
1
+ require_dependency "taiwan_city/application_controller"
2
+
3
+ module TaiwanCity
4
+ class DataController < ApplicationController
5
+ def show
6
+ data = TaiwanCity.list(params[:id])
7
+ render json: data, layout: nil
8
+ end
9
+
10
+ def index
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,4 @@
1
+ module TaiwanCity
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,12 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <title>TaiwanCity</title>
5
+ <%= stylesheet_link_tag "taiwan_city/application", media: "all" %>
6
+ <%= javascript_include_tag "taiwan_city/application" %>
7
+ <%= csrf_meta_tags %>
8
+
9
+ <body>
10
+ <%= yield %>
11
+ </body>
12
+ </html>
@@ -0,0 +1,21 @@
1
+ <%-
2
+ city = '01000'
3
+ district = '01100'
4
+ cities = TaiwanCity.list
5
+ districtes = TaiwanCity.list(city)
6
+ %>
7
+ <div class='rails-helper city-group'>
8
+ <%= select_tag :city , options_for_select(cities, city) , prompt: '--縣市--', class: ['city-select', 'city-city'] %>
9
+ <%= select_tag :district, options_for_select(districtes, district), prompt: '--鄉鎮市區--', class: ['city-select', 'city-district'] %>
10
+ </div>
11
+
12
+ <div class='html-tag city-group'>
13
+ <select class='city-select city-city'>
14
+ <option>--縣市--</option>
15
+ <%= options_for_select(TaiwanCity.list, city) %>
16
+ </select>
17
+ <select class='city-select city-district'>
18
+ <option>--鄉鎮市區--</option>
19
+ <%= options_for_select(districtes, district) %>
20
+ </select>
21
+ </div>
data/config/routes.rb ADDED
@@ -0,0 +1,4 @@
1
+ TaiwanCity::Engine.routes.draw do
2
+ root to: 'data#index'
3
+ get ':id', to: 'data#show'
4
+ end
data/db/areas.json ADDED
@@ -0,0 +1,429 @@
1
+ {
2
+ "city": [
3
+ {"text": "臺北市","id": "01000"},
4
+ {"text": "新北市","id": "02000"},
5
+ {"text": "基隆","id": "03000"},
6
+ {"text": "桃園","id": "04000"},
7
+ {"text": "新竹","id": "05000"},
8
+ {"text": "苗栗","id": "06000"},
9
+ {"text": "台中","id": "07000"},
10
+ {"text": "彰化","id": "08000"},
11
+ {"text": "南投","id": "09000"},
12
+ {"text": "雲林","id": "10000"},
13
+ {"text": "嘉義","id": "11000"},
14
+ {"text": "台南","id": "12000"},
15
+ {"text": "高雄","id": "13000"},
16
+ {"text": "屏東","id": "14000"},
17
+ {"text": "宜蘭","id": "15000"},
18
+ {"text": "花蓮","id": "16000"},
19
+ {"text": "台東","id": "17000"},
20
+ {"text": "澎湖","id": "18000"},
21
+ {"text": "金門","id": "19000"},
22
+ {"text": "馬祖","id": "20000"},
23
+ {"text": "離島地區","id": "21000"}
24
+ ],
25
+ "district": [
26
+ {"text": "中正區","id": "01100"},
27
+ {"text": "大同區","id": "01103"},
28
+ {"text": "中山區","id": "01104"},
29
+ {"text": "松山區","id": "01105"},
30
+ {"text": "大安區","id": "01106"},
31
+ {"text": "萬華區","id": "01108"},
32
+ {"text": "信義區","id": "01110"},
33
+ {"text": "士林區","id": "01111"},
34
+ {"text": "北投區","id": "01112"},
35
+ {"text": "內湖區","id": "01114"},
36
+ {"text": "南港區","id": "01115"},
37
+ {"text": "文山區","id": "01116"},
38
+
39
+ {"text": "萬里區","id": "02207"},
40
+ {"text": "金山區","id": "02208"},
41
+ {"text": "板橋區","id": "02220"},
42
+ {"text": "汐止區","id": "02221"},
43
+ {"text": "深坑區","id": "02222"},
44
+ {"text": "石碇區","id": "02223"},
45
+ {"text": "瑞芳區","id": "02224"},
46
+ {"text": "平溪區","id": "02226"},
47
+ {"text": "雙溪區","id": "02227"},
48
+ {"text": "貢寮區","id": "02228"},
49
+ {"text": "新店區","id": "02231"},
50
+ {"text": "坪林區","id": "02232"},
51
+ {"text": "烏來區","id": "02233"},
52
+ {"text": "永和區","id": "02234"},
53
+ {"text": "中和區","id": "02235"},
54
+ {"text": "土城區","id": "02236"},
55
+ {"text": "三峽區","id": "02237"},
56
+ {"text": "樹林區","id": "02238"},
57
+ {"text": "鶯歌區","id": "02239"},
58
+ {"text": "三重區","id": "02241"},
59
+ {"text": "新莊區","id": "02242"},
60
+ {"text": "泰山區","id": "02243"},
61
+ {"text": "林口區","id": "02244"},
62
+ {"text": "蘆洲區","id": "02247"},
63
+ {"text": "五股區","id": "02248"},
64
+ {"text": "八里區","id": "02249"},
65
+ {"text": "淡水區","id": "02251"},
66
+ {"text": "三芝區","id": "02252"},
67
+ {"text": "石門區","id": "02253"},
68
+
69
+ {"text": "仁愛區","id": "03200"},
70
+ {"text": "信義區","id": "03201"},
71
+ {"text": "中正區","id": "03202"},
72
+ {"text": "中山區","id": "03203"},
73
+ {"text": "安樂區","id": "03204"},
74
+ {"text": "暖暖區","id": "03205"},
75
+ {"text": "七堵區","id": "03206"},
76
+
77
+ {"text": "宜蘭市","id": "15260"},
78
+ {"text": "頭城鎮","id": "15261"},
79
+ {"text": "礁溪鄉","id": "15262"},
80
+ {"text": "壯圍鄉","id": "15263"},
81
+ {"text": "員山鄉","id": "15264"},
82
+ {"text": "羅東鎮","id": "15265"},
83
+ {"text": "三星鄉","id": "15266"},
84
+ {"text": "大同鄉","id": "15267"},
85
+ {"text": "五結鄉","id": "15268"},
86
+ {"text": "冬山鄉","id": "15269"},
87
+ {"text": "蘇澳鎮","id": "15270"},
88
+ {"text": "南澳鄉","id": "15272"},
89
+
90
+ {"text": "新竹市","id": "05300"},
91
+ {"text": "竹北市","id": "05302"},
92
+ {"text": "湖口鄉","id": "05303"},
93
+ {"text": "新豐鄉","id": "05304"},
94
+ {"text": "新埔鎮","id": "05305"},
95
+ {"text": "關西鎮","id": "05306"},
96
+ {"text": "芎林鄉","id": "05307"},
97
+ {"text": "寶山鄉","id": "05308"},
98
+ {"text": "竹東鎮","id": "05310"},
99
+ {"text": "五峰鄉","id": "05311"},
100
+ {"text": "橫山鄉","id": "05312"},
101
+ {"text": "尖石鄉","id": "05313"},
102
+ {"text": "北埔鄉","id": "05314"},
103
+ {"text": "峨眉鄉","id": "05315"},
104
+
105
+ {"text": "中壢市","id": "04320"},
106
+ {"text": "平鎮市","id": "04324"},
107
+ {"text": "龍潭鄉","id": "04325"},
108
+ {"text": "楊梅市","id": "04326"},
109
+ {"text": "新屋鄉","id": "04327"},
110
+ {"text": "觀音鄉","id": "04328"},
111
+ {"text": "桃園市","id": "04330"},
112
+ {"text": "龜山鄉","id": "04333"},
113
+ {"text": "八德市","id": "04334"},
114
+ {"text": "大溪鎮","id": "04335"},
115
+ {"text": "復興鄉","id": "04336"},
116
+ {"text": "大園鄉","id": "04337"},
117
+ {"text": "蘆竹鄉","id": "04338"},
118
+
119
+ {"text": "竹南鎮","id": "06350"},
120
+ {"text": "頭份鎮","id": "06351"},
121
+ {"text": "三灣鄉","id": "06352"},
122
+ {"text": "南庄鄉","id": "06353"},
123
+ {"text": "獅潭鄉","id": "06354"},
124
+ {"text": "後龍鎮","id": "06356"},
125
+ {"text": "通霄鎮","id": "06357"},
126
+ {"text": "苑裡鎮","id": "06358"},
127
+ {"text": "苗栗市","id": "06360"},
128
+ {"text": "造橋鄉","id": "06361"},
129
+ {"text": "頭屋鄉","id": "06362"},
130
+ {"text": "公館鄉","id": "06363"},
131
+ {"text": "大湖鄉","id": "06364"},
132
+ {"text": "泰安鄉","id": "06365"},
133
+ {"text": "銅鑼鄉","id": "06366"},
134
+ {"text": "三義鄉","id": "06367"},
135
+ {"text": "西湖鄉","id": "06368"},
136
+ {"text": "卓蘭鎮","id": "06369"},
137
+
138
+ {"text": "中區" ,"id": "07400"},
139
+ {"text": "東區" ,"id": "07401"},
140
+ {"text": "南區" ,"id": "07402"},
141
+ {"text": "西區" ,"id": "07403"},
142
+ {"text": "北區" ,"id": "07404"},
143
+ {"text": "北屯區","id": "07406"},
144
+ {"text": "西屯區","id": "07407"},
145
+ {"text": "南屯區","id": "07408"},
146
+ {"text": "太平區","id": "07411"},
147
+ {"text": "大里區","id": "07412"},
148
+ {"text": "霧峰區","id": "07413"},
149
+ {"text": "烏日區","id": "07414"},
150
+ {"text": "豐原區","id": "07420"},
151
+ {"text": "后里區","id": "07421"},
152
+ {"text": "石岡區","id": "07422"},
153
+ {"text": "東勢區","id": "07423"},
154
+ {"text": "和平區","id": "07424"},
155
+ {"text": "新社區","id": "07426"},
156
+ {"text": "潭子區","id": "07427"},
157
+ {"text": "大雅區","id": "07428"},
158
+ {"text": "神岡區","id": "07429"},
159
+ {"text": "大肚區","id": "07432"},
160
+ {"text": "沙鹿區","id": "07433"},
161
+ {"text": "龍井區","id": "07434"},
162
+ {"text": "梧棲區","id": "07435"},
163
+ {"text": "清水區","id": "07436"},
164
+ {"text": "大甲區","id": "07437"},
165
+ {"text": "外埔區","id": "07438"},
166
+ {"text": "大安區","id": "07439"},
167
+
168
+ {"text": "彰化市","id": "08500"},
169
+ {"text": "芬園鄉","id": "08502"},
170
+ {"text": "花壇鄉","id": "08503"},
171
+ {"text": "秀水鄉","id": "08504"},
172
+ {"text": "鹿港鎮","id": "08505"},
173
+ {"text": "福興鄉","id": "08506"},
174
+ {"text": "線西鄉","id": "08507"},
175
+ {"text": "和美鎮","id": "08508"},
176
+ {"text": "伸港鄉","id": "08509"},
177
+ {"text": "員林鎮","id": "08510"},
178
+ {"text": "社頭鄉","id": "08511"},
179
+ {"text": "永靖鄉","id": "08512"},
180
+ {"text": "埔心鄉","id": "08513"},
181
+ {"text": "溪湖鎮","id": "08514"},
182
+ {"text": "大村鄉","id": "08515"},
183
+ {"text": "埔鹽鄉","id": "08516"},
184
+ {"text": "田中鎮","id": "08520"},
185
+ {"text": "北斗鎮","id": "08521"},
186
+ {"text": "田尾鄉","id": "08522"},
187
+ {"text": "埤頭鄉","id": "08523"},
188
+ {"text": "溪州鄉","id": "08524"},
189
+ {"text": "竹塘鄉","id": "08525"},
190
+ {"text": "二林鎮","id": "08526"},
191
+ {"text": "大城鄉","id": "08527"},
192
+ {"text": "芳苑鄉","id": "08528"},
193
+ {"text": "二水鄉","id": "08530"},
194
+
195
+ {"text": "南投市","id": "09540"},
196
+ {"text": "中寮鄉","id": "09541"},
197
+ {"text": "草屯鎮","id": "09542"},
198
+ {"text": "國姓鄉","id": "09544"},
199
+ {"text": "埔里鎮","id": "09545"},
200
+ {"text": "仁愛鄉","id": "09546"},
201
+ {"text": "名間鄉","id": "09551"},
202
+ {"text": "集集鎮","id": "09552"},
203
+ {"text": "水里鄉","id": "09553"},
204
+ {"text": "魚池鄉","id": "09555"},
205
+ {"text": "信義鄉","id": "09556"},
206
+ {"text": "竹山鎮","id": "09557"},
207
+ {"text": "鹿谷鄉","id": "09558"},
208
+
209
+ {"text": "斗南鎮","id": "10630"},
210
+ {"text": "大埤鄉","id": "10631"},
211
+ {"text": "虎尾鎮","id": "10632"},
212
+ {"text": "土庫鎮","id": "10633"},
213
+ {"text": "褒忠鄉","id": "10634"},
214
+ {"text": "東勢鄉","id": "10635"},
215
+ {"text": "台西鄉","id": "10636"},
216
+ {"text": "崙背鄉","id": "10637"},
217
+ {"text": "麥寮鄉","id": "10638"},
218
+ {"text": "斗六市","id": "10640"},
219
+ {"text": "林內鄉","id": "10643"},
220
+ {"text": "古坑鄉","id": "10646"},
221
+ {"text": "莿桐鄉","id": "10647"},
222
+ {"text": "西螺鎮","id": "10648"},
223
+ {"text": "二崙鄉","id": "10649"},
224
+ {"text": "北港鎮","id": "10651"},
225
+ {"text": "水林鄉","id": "10652"},
226
+ {"text": "口湖鄉","id": "10653"},
227
+ {"text": "四湖鄉","id": "10654"},
228
+ {"text": "元長鄉","id": "10655"},
229
+
230
+ {"text": "西區" ,"id": "11600"},
231
+ {"text": "東區" ,"id": "11600"},
232
+ {"text": "番路鄉" ,"id": "11602"},
233
+ {"text": "梅山鄉" ,"id": "11603"},
234
+ {"text": "竹崎鄉" ,"id": "11604"},
235
+ {"text": "阿里山鄉" ,"id": "11605"},
236
+ {"text": "中埔鄉" ,"id": "11606"},
237
+ {"text": "大埔鄉" ,"id": "11607"},
238
+ {"text": "水上鄉" ,"id": "11608"},
239
+ {"text": "鹿草鄉" ,"id": "11611"},
240
+ {"text": "太保市" ,"id": "11612"},
241
+ {"text": "朴子市" ,"id": "11613"},
242
+ {"text": "東石鄉" ,"id": "11614"},
243
+ {"text": "六腳鄉" ,"id": "11615"},
244
+ {"text": "新港鄉" ,"id": "11616"},
245
+ {"text": "民雄鄉" ,"id": "11621"},
246
+ {"text": "大林鎮" ,"id": "11622"},
247
+ {"text": "溪口鄉" ,"id": "11623"},
248
+ {"text": "義竹鄉" ,"id": "11624"},
249
+ {"text": "布袋鎮" ,"id": "11625"},
250
+
251
+ {"text": "中西區" ,"id": "12700"},
252
+ {"text": "東區" ,"id": "12701"},
253
+ {"text": "南區" ,"id": "12702"},
254
+ {"text": "北區" ,"id": "12704"},
255
+ {"text": "安平區" ,"id": "12708"},
256
+ {"text": "安南區" ,"id": "12709"},
257
+ {"text": "永康區" ,"id": "12710"},
258
+ {"text": "歸仁區" ,"id": "12711"},
259
+ {"text": "新化區" ,"id": "12712"},
260
+ {"text": "左鎮區" ,"id": "12713"},
261
+ {"text": "玉井區" ,"id": "12714"},
262
+ {"text": "楠西區" ,"id": "12715"},
263
+ {"text": "南化區" ,"id": "12716"},
264
+ {"text": "仁德區" ,"id": "12717"},
265
+ {"text": "關廟區" ,"id": "12718"},
266
+ {"text": "龍崎區" ,"id": "12719"},
267
+ {"text": "官田區" ,"id": "12720"},
268
+ {"text": "麻豆區" ,"id": "12721"},
269
+ {"text": "佳里區" ,"id": "12722"},
270
+ {"text": "西港區" ,"id": "12723"},
271
+ {"text": "七股區" ,"id": "12724"},
272
+ {"text": "將軍區" ,"id": "12725"},
273
+ {"text": "學甲區" ,"id": "12726"},
274
+ {"text": "北門區" ,"id": "12727"},
275
+ {"text": "新營區" ,"id": "12730"},
276
+ {"text": "後壁區" ,"id": "12731"},
277
+ {"text": "白河區" ,"id": "12732"},
278
+ {"text": "東山區" ,"id": "12733"},
279
+ {"text": "六甲區" ,"id": "12734"},
280
+ {"text": "下營區" ,"id": "12735"},
281
+ {"text": "柳營區" ,"id": "12736"},
282
+ {"text": "鹽水區" ,"id": "12737"},
283
+ {"text": "善化區" ,"id": "12741"},
284
+ {"text": "新市區" ,"id": "12742"},
285
+ {"text": "大內區" ,"id": "12743"},
286
+ {"text": "山上區" ,"id": "12744"},
287
+ {"text": "安定區" ,"id": "12745"},
288
+
289
+ {"text": "新興區","id": "13800"},
290
+ {"text": "前金區","id": "13801"},
291
+ {"text": "苓雅區","id": "13802"},
292
+ {"text": "鹽埕區","id": "13803"},
293
+ {"text": "鼓山區","id": "13804"},
294
+ {"text": "旗津區","id": "13805"},
295
+ {"text": "前鎮區","id": "13806"},
296
+ {"text": "三民區","id": "13807"},
297
+ {"text": "楠梓區","id": "13811"},
298
+ {"text": "小港區","id": "13812"},
299
+ {"text": "左營區","id": "13813"},
300
+ {"text": "仁武區","id": "13814"},
301
+ {"text": "大社區","id": "13815"},
302
+ {"text": "岡山區","id": "13820"},
303
+ {"text": "路竹區","id": "13821"},
304
+ {"text": "阿蓮區","id": "13822"},
305
+ {"text": "田寮區","id": "13823"},
306
+ {"text": "燕巢區","id": "13824"},
307
+ {"text": "橋頭區","id": "13825"},
308
+ {"text": "梓官區","id": "13826"},
309
+ {"text": "彌陀區","id": "13827"},
310
+ {"text": "永安區","id": "13828"},
311
+ {"text": "湖內區","id": "13829"},
312
+ {"text": "鳳山區","id": "13830"},
313
+ {"text": "大寮區","id": "13831"},
314
+ {"text": "林園區","id": "13832"},
315
+ {"text": "鳥松區","id": "13833"},
316
+ {"text": "大樹區","id": "13840"},
317
+ {"text": "旗山區","id": "13842"},
318
+ {"text": "美濃區","id": "13843"},
319
+ {"text": "六龜區","id": "13844"},
320
+ {"text": "內門區","id": "13845"},
321
+ {"text": "杉林區","id": "13846"},
322
+ {"text": "甲仙區","id": "13847"},
323
+ {"text": "桃源區","id": "13848"},
324
+ {"text": "那瑪夏","id": "13849"},
325
+ {"text": "茂林區","id": "13851"},
326
+ {"text": "茄萣區","id": "13852"},
327
+
328
+ {"text": "屏東市","id": "14900"},
329
+ {"text": "三地門","id": "14901"},
330
+ {"text": "霧台鄉","id": "14902"},
331
+ {"text": "瑪家鄉","id": "14903"},
332
+ {"text": "九如鄉","id": "14904"},
333
+ {"text": "里港鄉","id": "14905"},
334
+ {"text": "高樹鄉","id": "14906"},
335
+ {"text": "鹽埔鄉","id": "14907"},
336
+ {"text": "長治鄉","id": "14908"},
337
+ {"text": "麟洛鄉","id": "14909"},
338
+ {"text": "竹田鄉","id": "14911"},
339
+ {"text": "內埔鄉","id": "14912"},
340
+ {"text": "萬丹鄉","id": "14913"},
341
+ {"text": "潮州鎮","id": "14920"},
342
+ {"text": "泰武鄉","id": "14921"},
343
+ {"text": "來義鄉","id": "14922"},
344
+ {"text": "萬巒鄉","id": "14923"},
345
+ {"text": "崁頂鄉","id": "14924"},
346
+ {"text": "新埤鄉","id": "14925"},
347
+ {"text": "南州鄉","id": "14926"},
348
+ {"text": "林邊鄉","id": "14927"},
349
+ {"text": "東港鎮","id": "14928"},
350
+ {"text": "琉球鄉","id": "14929"},
351
+ {"text": "佳冬鄉","id": "14931"},
352
+ {"text": "新園鄉","id": "14932"},
353
+ {"text": "枋寮鄉","id": "14940"},
354
+ {"text": "枋山鄉","id": "14941"},
355
+ {"text": "春日鄉","id": "14942"},
356
+ {"text": "獅子鄉","id": "14943"},
357
+ {"text": "車城鄉","id": "14944"},
358
+ {"text": "牡丹鄉","id": "14945"},
359
+ {"text": "恆春鎮","id": "14946"},
360
+ {"text": "滿州鄉","id": "14947"},
361
+
362
+ {"text": "宜蘭市","id": "15260"},
363
+ {"text": "頭城鎮","id": "15261"},
364
+ {"text": "礁溪鄉","id": "15262"},
365
+ {"text": "壯圍鄉","id": "15263"},
366
+ {"text": "員山鄉","id": "15264"},
367
+ {"text": "羅東鎮","id": "15265"},
368
+ {"text": "三星鄉","id": "15266"},
369
+ {"text": "大同鄉","id": "15267"},
370
+ {"text": "五結鄉","id": "15268"},
371
+ {"text": "冬山鄉","id": "15269"},
372
+ {"text": "蘇澳鎮","id": "15270"},
373
+ {"text": "南澳鄉","id": "15272"},
374
+
375
+ {"text": "花蓮市","id": "16970"},
376
+ {"text": "新城鄉","id": "16971"},
377
+ {"text": "秀林鄉","id": "16972"},
378
+ {"text": "吉安鄉","id": "16973"},
379
+ {"text": "壽豐鄉","id": "16974"},
380
+ {"text": "鳳林鎮","id": "16975"},
381
+ {"text": "光復鄉","id": "16976"},
382
+ {"text": "豐濱鄉","id": "16977"},
383
+ {"text": "瑞穗鄉","id": "16978"},
384
+ {"text": "萬榮鄉","id": "16979"},
385
+ {"text": "玉里鎮","id": "16981"},
386
+ {"text": "卓溪鄉","id": "16982"},
387
+ {"text": "富里鄉","id": "16983"},
388
+
389
+ {"text": "台東市","id": "17950"},
390
+ {"text": "綠島鄉","id": "17951"},
391
+ {"text": "蘭嶼鄉","id": "17952"},
392
+ {"text": "延平鄉","id": "17953"},
393
+ {"text": "卑南鄉","id": "17954"},
394
+ {"text": "鹿野鄉","id": "17955"},
395
+ {"text": "關山鎮","id": "17956"},
396
+ {"text": "海端鄉","id": "17957"},
397
+ {"text": "池上鄉","id": "17958"},
398
+ {"text": "東河鄉","id": "17959"},
399
+ {"text": "成功鎮","id": "17961"},
400
+ {"text": "長濱鄉","id": "17962"},
401
+ {"text": "太麻里","id": "17963"},
402
+ {"text": "金峰鄉","id": "17964"},
403
+ {"text": "大武鄉","id": "17965"},
404
+ {"text": "達仁鄉","id": "17966"},
405
+
406
+ {"text": "馬公市","id": "18880"},
407
+ {"text": "西嶼鄉","id": "18881"},
408
+ {"text": "望安鄉","id": "18882"},
409
+ {"text": "七美鄉","id": "18883"},
410
+ {"text": "白沙鄉","id": "18884"},
411
+ {"text": "湖西鄉","id": "18885"},
412
+
413
+ {"text": "金沙鎮","id": "19890"},
414
+ {"text": "金湖鎮","id": "19891"},
415
+ {"text": "金寧鄉","id": "19892"},
416
+ {"text": "金城鎮","id": "19893"},
417
+ {"text": "烈嶼鄉","id": "19894"},
418
+ {"text": "烏坵鄉","id": "19896"},
419
+
420
+ {"text": "南竿鄉","id": "20209"},
421
+ {"text": "北竿鄉","id": "20210"},
422
+ {"text": "莒光鄉","id": "20211"},
423
+ {"text": "東引鄉","id": "20212"},
424
+
425
+ {"text": "釣魚台","id": "21290"},
426
+ {"text": "東沙","id": "21817"},
427
+ {"text": "南沙","id": "21819"}
428
+ ]
429
+ }
@@ -0,0 +1,13 @@
1
+ module TaiwanCity
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace TaiwanCity
4
+
5
+ config.generators do |g|
6
+ g.test_framework :rspec, fixture: false
7
+ # g.fixture_replacement :factory_girl, dir: 'spec/factories'
8
+ g.assets false
9
+ g.helper false
10
+ g.view_specs false
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,3 @@
1
+ module TaiwanCity
2
+ VERSION = "0.0.3"
3
+ end