china_city_custom 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +31 -0
  4. data/app/assets/javascripts/china_city/application.js.coffee +3 -0
  5. data/app/assets/javascripts/china_city/jquery.china_city.js.coffee +20 -0
  6. data/app/assets/stylesheets/china_city/application.css +13 -0
  7. data/app/controllers/china_city/application_controller.rb +4 -0
  8. data/app/controllers/china_city/data_controller.rb +13 -0
  9. data/app/helpers/china_city/application_helper.rb +4 -0
  10. data/app/views/china_city/data/index.html.erb +37 -0
  11. data/app/views/layouts/china_city/application.html.erb +12 -0
  12. data/config/routes.rb +4 -0
  13. data/db/areas.json +190634 -0
  14. data/db/district_gb2260_taobao.yml +109 -0
  15. data/lib/china_city.rb +118 -0
  16. data/lib/china_city/engine.rb +13 -0
  17. data/lib/china_city/version.rb +3 -0
  18. data/lib/china_city_tasks.rake +136 -0
  19. data/spec/controllers/china_city/data_controller_spec.rb +12 -0
  20. data/spec/dummy/README.rdoc +28 -0
  21. data/spec/dummy/Rakefile +6 -0
  22. data/spec/dummy/app/assets/javascripts/application.js +14 -0
  23. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  24. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  25. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  26. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  27. data/spec/dummy/bin/bundle +3 -0
  28. data/spec/dummy/bin/rails +4 -0
  29. data/spec/dummy/bin/rake +4 -0
  30. data/spec/dummy/config.ru +4 -0
  31. data/spec/dummy/config/application.rb +35 -0
  32. data/spec/dummy/config/boot.rb +5 -0
  33. data/spec/dummy/config/database.yml +25 -0
  34. data/spec/dummy/config/environment.rb +5 -0
  35. data/spec/dummy/config/environments/development.rb +29 -0
  36. data/spec/dummy/config/environments/production.rb +80 -0
  37. data/spec/dummy/config/environments/test.rb +36 -0
  38. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  39. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  40. data/spec/dummy/config/initializers/inflections.rb +16 -0
  41. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  42. data/spec/dummy/config/initializers/secret_token.rb +13 -0
  43. data/spec/dummy/config/initializers/session_store.rb +3 -0
  44. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  45. data/spec/dummy/config/locales/en.yml +23 -0
  46. data/spec/dummy/config/routes.rb +4 -0
  47. data/spec/dummy/log/development.log +306 -0
  48. data/spec/dummy/public/404.html +58 -0
  49. data/spec/dummy/public/422.html +58 -0
  50. data/spec/dummy/public/500.html +57 -0
  51. data/spec/dummy/public/favicon.ico +0 -0
  52. data/spec/dummy/script/rails +6 -0
  53. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/33/33HmA0GjeNhg7VINETW_vaHZQASd814swoVw0nP_LiQ.cache +1 -0
  54. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3Z/3ZCuJK9qFvHLIh780uS09GQhocvDDCo08bqOC5Ho07U.cache +1 -0
  55. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4G/4GsFOVGgD_Ut6KlTgRqT6xQUnnyF_duoqGrT6Zs0bgs.cache +1 -0
  56. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4q/4qhT5ujJUsJ7UA75QoJUnnEoR2GdTWh9JK-8A8bdyV8.cache +2 -0
  57. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5X/5Xg8XePGf8hA9mtLAFILtb4bYGdG2S2dIefOZw8Es3c.cache +1 -0
  58. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7P/7PBzxJvlkvXfNnJe5evaCrsNr9cl1izwyNnbXp60Htc.cache +3 -0
  59. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7b/7bqoYtvfQl2f06MVkcd_wOkQ1xtJ-EWFGNgCcIraWKE.cache +1 -0
  60. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8Y/8YGxnPLNW5Ks2AAN4WuXK-AHe9s-5G15Ns2NwonPACk.cache +1 -0
  61. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9-/9-OZsdqLnIw-113M7RzVhuHVJOGwsi889f5dJay-H5g.cache +1 -0
  62. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/98/98HLPKePQQ5i3t4-IQBi39VVOFqzeikEbEP0Paq5E0U.cache +0 -0
  63. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9O/9OXRKwOWpRQRNGGdsUjALL9jUCefUFZPMf7BmixQTds.cache +0 -0
  64. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/AT/ATRmM9yBFMMR7AP_m5mS2wDET7jn9Ng1IZw6HShV6LU.cache +1 -0
  65. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/CT/CTE71e15rzBB7hZw4eAiB6p-8CgAJb8brGtpgXDVJME.cache +2 -0
  66. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/D-/D-aC5qb-oQGA-X6dTF9GD4JNRuiWVPNqzl70JJwMhDE.cache +0 -0
  67. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Em/Emy67V_UBIEIXIIR3umgdCsrlMs9OZFl3p_r2giOvew.cache +0 -0
  68. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/I8/I8ofewVBYPjkI6UBSmcubGxn2pW7hLeOtbVMs7mWByE.cache +1 -0
  69. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ii/IiLK3BUtosCpHabq_G4mYv_d7js1550dQAUJOeGamtc.cache +1 -0
  70. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Jy/JyGj_nbetYmgMWLwPsVrgfmOZ-PV1-sujoG18R9f9hg.cache +1 -0
  71. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/K2/K2kTLbinwbmfmnaal-AWcEUBjjGDLHOcTHdLZWVVYyQ.cache +5 -0
  72. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/KL/KLw397sf9uehitdqhxKYDOm1Q8vxG1-9UT-aKdK_fCU.cache +0 -0
  73. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/M-/M-apf7yLJ1vuAm7xH7-9lQCFkW0ikiTdqqzVu4HmQ0E.cache +2 -0
  74. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Nj/Nj_-MPlFTqlaEW9FgO4cmtAe48x3xxaF3NKzQrfb2qs.cache +0 -0
  75. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/OJ/OJPcAQ0uEQdn9zUtLmc_bKOZ_Gac6iVNarFXhoT4pkI.cache +2 -0
  76. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/OK/OKnrjViY3cCWGYVE33avjFeV_LYrPXffTbUFVAaY7Tw.cache +2 -0
  77. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Pv/Pvt3RgYTzrZs2COds9PqGhV3MeJvOe7ZlvA4-Hdhgrc.cache +2 -0
  78. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Sh/ShnK5bU37zUiSM9Mul7vI9XfdCk1V6DObjK5nepa5ns.cache +0 -0
  79. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/TX/TX9CLTSCMVBnrcj8mvf3-K0Tx3TK-w3Olnd9d1xBII4.cache +3 -0
  80. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Tw/TwdtXnsW0DvMMdW_1UcDpgSaZYzEwzRcAEOi6KYXIDg.cache +1 -0
  81. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/U0/U0ygFtEbyCbFSFIs0BeDio2ax3HE00xt3xN4HFL8n4U.cache +0 -0
  82. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/U5/U5toC7YdNOr8xK6mGj50xNHEBuJx0BfRkIM-KZKBUU0.cache +38 -0
  83. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ur/UrKCad3bch2Zi8rc9c3gd4wS7BryCbgVIUa1_EUOHUo.cache +2 -0
  84. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/WH/WHXdny1yoV40hsb8CXIplE4rI22FOjyDxlKOftMICh8.cache +1 -0
  85. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/WN/WNFI9vZTiVx0oxycAwxu5E2g2j7hjZqvbh2yl3_IeU0.cache +1 -0
  86. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Xr/XrMhrpfdjPnbinzkKGnhoa2dZrICh55_VvFzpyWMxQo.cache +0 -0
  87. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Xv/Xvx8iRk0x7tcARxDassziL3f5_jquO5UoalxkjmhcKQ.cache +0 -0
  88. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ZW/ZWl4hNK2UA_ivqo8pK3RpeErnpVTZo4dbb-WjTE_LNs.cache +1 -0
  89. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Zm/ZmQsdS3Lww09iC7jB_VKCelhx2kaZz5nDbwsC3fSidE.cache +0 -0
  90. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dn/dnsZY0XCAQpo6Gx_kBJ_6JqtQ2K39uehtoeAGn2-KKU.cache +0 -0
  91. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dt/dtWiKb0dyTaIsuB15xw_QeAwJVr6N0wWw8-QNH3qrvE.cache +1 -0
  92. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/eA/eA4b_UTuargo0Vc8ES-RiQ_StwvZxWydegfn_nylB1k.cache +0 -0
  93. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iV/iVr9QYQZc2Ze0AdCzSjIqnsZA5JqjSex6EhAZ5_seIY.cache +1 -0
  94. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/jB/jBunWgqiY37wrN_MdR9KTwWqQ2n8KNUOGpmnjDUZdrM.cache +1 -0
  95. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/kS/kSQdc3K8NPHmTWbGu_Dlc9Mi7FFIR62OMFLO0UMENM0.cache +0 -0
  96. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/l8/l8gLlD7duZLmP5pPMXJJ-O1jFNJGHlRgzDa9CW7pWec.cache +1 -0
  97. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pA/pAfH96wHUcQSUscI24kNUj7KVT5A0WH68yDEvZ1PbjU.cache +1 -0
  98. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/q6/q6BYa32YJF11eGVapO4ouNl6gayPIsARgMavlzZmoi0.cache +2 -0
  99. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rI/rIS7t_cNtHDMD4qiFn_jQSCNKgIsrWM9oUnNFKTX-ug.cache +0 -0
  100. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sX/sXUdKpzI0Mu6hdNKEwiqZ6M-vzGf3Mpr5iNmLatcaCg.cache +0 -0
  101. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/tO/tO0LQLcPrnOUjhB5Naa4v62heRLe_A0PQjdZVEUcJeA.cache +1 -0
  102. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uN/uNK5PSRmy--W_V9kPGPE5qE9EO0Ue4bvDAKCb3rxYKU.cache +0 -0
  103. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wZ/wZZdqNARp6G2Dyg2SNgYRLvdBHYkeIXyiVL--FCLPuA.cache +1 -0
  104. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/x7/x7KkTV3ibfIEysLB_ug5bfmnn2VLV_BldukPR3EoPBk.cache +2 -0
  105. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xY/xYtALLOCvcWjKeBdgNwzfvRqlp0LVLP7y6PLYkAHpe0.cache +2 -0
  106. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xp/xpok6d_Mo9WwxYhAB9UB0hOePQ9YoEtrLNFLZ_0s0HY.cache +1 -0
  107. data/spec/features/china_city_spec.rb +69 -0
  108. data/spec/lib/china_city_spec.rb +60 -0
  109. data/spec/spec_helper.rb +29 -0
  110. metadata +398 -0
@@ -0,0 +1,58 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/404.html -->
52
+ <div class="dialog">
53
+ <h1>The page you were looking for doesn't exist.</h1>
54
+ <p>You may have mistyped the address or the page may have moved.</p>
55
+ </div>
56
+ <p>If you are the application owner check the logs for more information.</p>
57
+ </body>
58
+ </html>
@@ -0,0 +1,58 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/422.html -->
52
+ <div class="dialog">
53
+ <h1>The change you wanted was rejected.</h1>
54
+ <p>Maybe you tried to change something you didn't have access to.</p>
55
+ </div>
56
+ <p>If you are the application owner check the logs for more information.</p>
57
+ </body>
58
+ </html>
@@ -0,0 +1,57 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/500.html -->
52
+ <div class="dialog">
53
+ <h1>We're sorry, but something went wrong.</h1>
54
+ </div>
55
+ <p>If you are the application owner check the logs for more information.</p>
56
+ </body>
57
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1 @@
1
+ "%l��Z���>�L� �7R�}~�\��o�-B!c]
@@ -0,0 +1 @@
1
+ I"�app/assets/javascripts/application.js?type=application/javascript&id=4d88218baf0a471230c41c29f077d1affb94040af325caf55c2f1076325a4455:ET
@@ -0,0 +1 @@
1
+ I"�/vagrant_data/china_city/app/assets/javascripts/china_city/application.js.coffee?type=application/javascript&pipeline=self&id=2f8b61c243802e0ed6f9723437f59969fe7d51aa261de4849d79b81ed91324f4:ET
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash{$I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"cfile-digest:///vagrant_data/china_city/app/assets/javascripts/china_city/application.js.coffee;TTI"$file-digest://app/assets/images;TTI"+file-digest://app/assets/images/jquery;TTI")file-digest://app/assets/javascripts;TTI"0file-digest://app/assets/javascripts/jquery;TTI")file-digest://app/assets/stylesheets;TTI"0file-digest://app/assets/stylesheets/jquery;TTI"=file-digest:///vagrant_data/china_city/app/assets/images;TTI"Dfile-digest:///vagrant_data/china_city/app/assets/images/jquery;TTI"Bfile-digest:///vagrant_data/china_city/app/assets/javascripts;TTI"Ifile-digest:///vagrant_data/china_city/app/assets/javascripts/jquery;TTI"Bfile-digest:///vagrant_data/china_city/app/assets/stylesheets;TTI"Ifile-digest:///vagrant_data/china_city/app/assets/stylesheets/jquery;TTI"gfile-digest:///home/vagrant/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.4/vendor/assets/javascripts;TTI"nfile-digest:///home/vagrant/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.4/vendor/assets/javascripts/jquery;TTI"qfile-digest:///home/vagrant/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.4/vendor/assets/javascripts/jquery.js;TTI"/file-digest://app/assets/images/china_city;TTI"Afile-digest://app/assets/images/china_city/jquery.china_city;TTI"4file-digest://app/assets/javascripts/china_city;TTI"Ffile-digest://app/assets/javascripts/china_city/jquery.china_city;TTI"4file-digest://app/assets/stylesheets/china_city;TTI"Ffile-digest://app/assets/stylesheets/china_city/jquery.china_city;TTI"Hfile-digest:///vagrant_data/china_city/app/assets/images/china_city;TTI"Zfile-digest:///vagrant_data/china_city/app/assets/images/china_city/jquery.china_city;TTI"Mfile-digest:///vagrant_data/china_city/app/assets/javascripts/china_city;TTI"_file-digest:///vagrant_data/china_city/app/assets/javascripts/china_city/jquery.china_city;TTI"ifile-digest:///vagrant_data/china_city/app/assets/javascripts/china_city/jquery.china_city.js.coffee;TT
@@ -0,0 +1 @@
1
+ I"�/vagrant_data/china_city/app/assets/stylesheets/china_city/application.css?type=text/css&pipeline=self&id=c16c6cfa08c8a05e1a1a7e837c622a1d7aa4b020a1073472acde72ec87d3b38c:ET
@@ -0,0 +1,3 @@
1
+ [o:Set:
2
+ @hash{
3
+ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"qfile-digest:///home/vagrant/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.4/vendor/assets/javascripts/jquery.js;TT
@@ -0,0 +1 @@
1
+ I"�/vagrant_data/china_city/app/assets/stylesheets/china_city/application.css?type=text/css&id=13234b347626814a2dc2331731b73ae561c153d7f5621fa008501a64df559e65:ET
@@ -0,0 +1 @@
1
+ "%��B�����șo�$'�A�d��L���xR�U
@@ -0,0 +1 @@
1
+ "%��)��~&�mP�C?��EF@ �'���|k��
@@ -0,0 +1 @@
1
+ "%�k���n�E�J(�V�B}�nO5���-�vy
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash{$I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"8file-digest://app/assets/javascripts/application.js;TTI"$file-digest://app/assets/images;TTI"+file-digest://app/assets/images/jquery;TTI")file-digest://app/assets/javascripts;TTI"0file-digest://app/assets/javascripts/jquery;TTI")file-digest://app/assets/stylesheets;TTI"0file-digest://app/assets/stylesheets/jquery;TTI"=file-digest:///vagrant_data/china_city/app/assets/images;TTI"Dfile-digest:///vagrant_data/china_city/app/assets/images/jquery;TTI"Bfile-digest:///vagrant_data/china_city/app/assets/javascripts;TTI"Ifile-digest:///vagrant_data/china_city/app/assets/javascripts/jquery;TTI"Bfile-digest:///vagrant_data/china_city/app/assets/stylesheets;TTI"Ifile-digest:///vagrant_data/china_city/app/assets/stylesheets/jquery;TTI"gfile-digest:///home/vagrant/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.4/vendor/assets/javascripts;TTI"nfile-digest:///home/vagrant/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.4/vendor/assets/javascripts/jquery;TTI"qfile-digest:///home/vagrant/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.4/vendor/assets/javascripts/jquery.js;TTI"/file-digest://app/assets/images/china_city;TTI"Afile-digest://app/assets/images/china_city/jquery.china_city;TTI"4file-digest://app/assets/javascripts/china_city;TTI"Ffile-digest://app/assets/javascripts/china_city/jquery.china_city;TTI"4file-digest://app/assets/stylesheets/china_city;TTI"Ffile-digest://app/assets/stylesheets/china_city/jquery.china_city;TTI"Hfile-digest:///vagrant_data/china_city/app/assets/images/china_city;TTI"Zfile-digest:///vagrant_data/china_city/app/assets/images/china_city/jquery.china_city;TTI"Mfile-digest:///vagrant_data/china_city/app/assets/javascripts/china_city;TTI"_file-digest:///vagrant_data/china_city/app/assets/javascripts/china_city/jquery.china_city;TTI"ifile-digest:///vagrant_data/china_city/app/assets/javascripts/china_city/jquery.china_city.js.coffee;TT
@@ -0,0 +1 @@
1
+ I"�app/assets/javascripts/application.js?type=application/javascript&pipeline=self&id=72a1d292aa174e417d502dd857390778df77c07ce0ef4cadd104fb2558dfc6ae:ET
@@ -0,0 +1 @@
1
+ "%��Rm�v�S3.��O�L���ڹc�ƕq�=_j�
@@ -0,0 +1 @@
1
+ I"�/vagrant_data/china_city/app/assets/javascripts/china_city/jquery.china_city.js.coffee?type=application/javascript&pipeline=self&id=09f47a41ac28a6c40051dc2256c8da1b693d345508d168d7b58c453e8792142e:ET
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"0processors:type=text/css&file_type=text/css;TTI"]file-digest:///vagrant_data/china_city/app/assets/stylesheets/china_city/application.css;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI"Mfile-digest:///vagrant_data/china_city/app/assets/stylesheets/china_city;TT
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI"]file-digest:///vagrant_data/china_city/app/assets/stylesheets/china_city/application.css;TTI"Mfile-digest:///vagrant_data/china_city/app/assets/stylesheets/china_city;TT
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash{&I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"8file-digest://app/assets/javascripts/application.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"qfile-digest:///home/vagrant/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.4/vendor/assets/javascripts/jquery.js;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"ifile-digest:///vagrant_data/china_city/app/assets/javascripts/china_city/jquery.china_city.js.coffee;TTI"$file-digest://app/assets/images;TTI"+file-digest://app/assets/images/jquery;TTI")file-digest://app/assets/javascripts;TTI"0file-digest://app/assets/javascripts/jquery;TTI")file-digest://app/assets/stylesheets;TTI"0file-digest://app/assets/stylesheets/jquery;TTI"=file-digest:///vagrant_data/china_city/app/assets/images;TTI"Dfile-digest:///vagrant_data/china_city/app/assets/images/jquery;TTI"Bfile-digest:///vagrant_data/china_city/app/assets/javascripts;TTI"Ifile-digest:///vagrant_data/china_city/app/assets/javascripts/jquery;TTI"Bfile-digest:///vagrant_data/china_city/app/assets/stylesheets;TTI"Ifile-digest:///vagrant_data/china_city/app/assets/stylesheets/jquery;TTI"gfile-digest:///home/vagrant/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.4/vendor/assets/javascripts;TTI"nfile-digest:///home/vagrant/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.4/vendor/assets/javascripts/jquery;TTI"/file-digest://app/assets/images/china_city;TTI"Afile-digest://app/assets/images/china_city/jquery.china_city;TTI"4file-digest://app/assets/javascripts/china_city;TTI"Ffile-digest://app/assets/javascripts/china_city/jquery.china_city;TTI"4file-digest://app/assets/stylesheets/china_city;TTI"Ffile-digest://app/assets/stylesheets/china_city/jquery.china_city;TTI"Hfile-digest:///vagrant_data/china_city/app/assets/images/china_city;TTI"Zfile-digest:///vagrant_data/china_city/app/assets/images/china_city/jquery.china_city;TTI"Mfile-digest:///vagrant_data/china_city/app/assets/javascripts/china_city;TTI"_file-digest:///vagrant_data/china_city/app/assets/javascripts/china_city/jquery.china_city;TT
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash{&I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"kprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=debug;TTI"cfile-digest:///vagrant_data/china_city/app/assets/javascripts/china_city/application.js.coffee;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"qfile-digest:///home/vagrant/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.4/vendor/assets/javascripts/jquery.js;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"ifile-digest:///vagrant_data/china_city/app/assets/javascripts/china_city/jquery.china_city.js.coffee;TTI"$file-digest://app/assets/images;TTI"+file-digest://app/assets/images/jquery;TTI")file-digest://app/assets/javascripts;TTI"0file-digest://app/assets/javascripts/jquery;TTI")file-digest://app/assets/stylesheets;TTI"0file-digest://app/assets/stylesheets/jquery;TTI"=file-digest:///vagrant_data/china_city/app/assets/images;TTI"Dfile-digest:///vagrant_data/china_city/app/assets/images/jquery;TTI"Bfile-digest:///vagrant_data/china_city/app/assets/javascripts;TTI"Ifile-digest:///vagrant_data/china_city/app/assets/javascripts/jquery;TTI"Bfile-digest:///vagrant_data/china_city/app/assets/stylesheets;TTI"Ifile-digest:///vagrant_data/china_city/app/assets/stylesheets/jquery;TTI"gfile-digest:///home/vagrant/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.4/vendor/assets/javascripts;TTI"nfile-digest:///home/vagrant/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.4/vendor/assets/javascripts/jquery;TTI"/file-digest://app/assets/images/china_city;TTI"Afile-digest://app/assets/images/china_city/jquery.china_city;TTI"4file-digest://app/assets/javascripts/china_city;TTI"Ffile-digest://app/assets/javascripts/china_city/jquery.china_city;TTI"4file-digest://app/assets/stylesheets/china_city;TTI"Ffile-digest://app/assets/stylesheets/china_city/jquery.china_city;TTI"Hfile-digest:///vagrant_data/china_city/app/assets/images/china_city;TTI"Zfile-digest:///vagrant_data/china_city/app/assets/images/china_city/jquery.china_city;TTI"Mfile-digest:///vagrant_data/china_city/app/assets/javascripts/china_city;TTI"_file-digest:///vagrant_data/china_city/app/assets/javascripts/china_city/jquery.china_city;TT
@@ -0,0 +1,3 @@
1
+ [o:Set:
2
+ @hash{
3
+ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"ifile-digest:///vagrant_data/china_city/app/assets/javascripts/china_city/jquery.china_city.js.coffee;TT
@@ -0,0 +1 @@
1
+ I"�/vagrant_data/china_city/app/assets/javascripts/china_city/application.js.coffee?type=application/javascript&pipeline=debug&id=b41cafcd0b1f55b3e90d13214c3f45d2619bbd2bfd5f3c25563c6d1dc84ded5d:ET
@@ -0,0 +1,38 @@
1
+ I"2(function() {
2
+ (function($) {
3
+ $.fn.china_city = function() {
4
+ return this.each(function() {
5
+ var selects;
6
+ selects = $(this).find('.city-select');
7
+ return selects.change(function() {
8
+ var $this, customfunc, next_selects;
9
+ $this = $(this);
10
+ next_selects = selects.slice(selects.index(this) + 1);
11
+ customfunc = $this.data("customfunc") ? $this.data("customfunc") : false;
12
+ $("option:gt(0)", next_selects).remove();
13
+ if (next_selects.first()[0] && $this.val() && !$this.val().match(/--.*--/)) {
14
+ return $.get("/china_city/" + ($(this).val()), function(data) {
15
+ var i, len, option;
16
+ if (data.data != null) {
17
+ data = data.data;
18
+ }
19
+ for (i = 0, len = data.length; i < len; i++) {
20
+ option = data[i];
21
+ next_selects.first()[0].options.add(new Option(option[0], option[1]));
22
+ }
23
+ if (customfunc) {
24
+ eval(customfunc);
25
+ }
26
+ return next_selects.trigger('china_city:load_data_completed');
27
+ });
28
+ }
29
+ });
30
+ });
31
+ };
32
+ return $(document).on('ready page:load', function() {
33
+ return $('.city-group').china_city();
34
+ });
35
+ })(jQuery);
36
+
37
+ }).call(this);
38
+ :ET
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash{&I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"\processors:type=application/javascript&file_type=application/javascript&engines=.coffee;TTI"cfile-digest:///vagrant_data/china_city/app/assets/javascripts/china_city/application.js.coffee;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"qfile-digest:///home/vagrant/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.4/vendor/assets/javascripts/jquery.js;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"ifile-digest:///vagrant_data/china_city/app/assets/javascripts/china_city/jquery.china_city.js.coffee;TTI"$file-digest://app/assets/images;TTI"+file-digest://app/assets/images/jquery;TTI")file-digest://app/assets/javascripts;TTI"0file-digest://app/assets/javascripts/jquery;TTI")file-digest://app/assets/stylesheets;TTI"0file-digest://app/assets/stylesheets/jquery;TTI"=file-digest:///vagrant_data/china_city/app/assets/images;TTI"Dfile-digest:///vagrant_data/china_city/app/assets/images/jquery;TTI"Bfile-digest:///vagrant_data/china_city/app/assets/javascripts;TTI"Ifile-digest:///vagrant_data/china_city/app/assets/javascripts/jquery;TTI"Bfile-digest:///vagrant_data/china_city/app/assets/stylesheets;TTI"Ifile-digest:///vagrant_data/china_city/app/assets/stylesheets/jquery;TTI"gfile-digest:///home/vagrant/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.4/vendor/assets/javascripts;TTI"nfile-digest:///home/vagrant/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.4/vendor/assets/javascripts/jquery;TTI"/file-digest://app/assets/images/china_city;TTI"Afile-digest://app/assets/images/china_city/jquery.china_city;TTI"4file-digest://app/assets/javascripts/china_city;TTI"Ffile-digest://app/assets/javascripts/china_city/jquery.china_city;TTI"4file-digest://app/assets/stylesheets/china_city;TTI"Ffile-digest://app/assets/stylesheets/china_city/jquery.china_city;TTI"Hfile-digest:///vagrant_data/china_city/app/assets/images/china_city;TTI"Zfile-digest:///vagrant_data/china_city/app/assets/images/china_city/jquery.china_city;TTI"Mfile-digest:///vagrant_data/china_city/app/assets/javascripts/china_city;TTI"_file-digest:///vagrant_data/china_city/app/assets/javascripts/china_city/jquery.china_city;TT
@@ -0,0 +1 @@
1
+ "%��B�����șo�$'�A�d��L���xR�U
@@ -0,0 +1 @@
1
+ "%��Rm�v�S3.��O�L���ڹc�ƕq�=_j�
@@ -0,0 +1 @@
1
+ "%E��v����g���;�|Xn�P=����GSb_
@@ -0,0 +1 @@
1
+ I"�app/assets/stylesheets/application.css?type=text/css&pipeline=self&id=05ce6ac867486200952612965708ccae8f4c5abce328cb61da60f65b9a4671e6:ET
@@ -0,0 +1 @@
1
+ I"�/vagrant_data/china_city/app/assets/javascripts/china_city/application.js.coffee?type=application/javascript&id=0ca3e6665aefe8aff074a08c84bb86ef10a1bd8e1a2660525cf3bc197b4edfc9:ET
@@ -0,0 +1 @@
1
+ I"�/vagrant_data/china_city/app/assets/stylesheets/china_city/application.css?type=text/css&pipeline=debug&id=840049dfae42e45862dfd3483e1317d81ac5d60dbaa4530ca20cde006cfda4e9:ET
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI"9file-digest://app/assets/stylesheets/application.css;TTI")file-digest://app/assets/stylesheets;TT
@@ -0,0 +1 @@
1
+ I"}app/assets/stylesheets/application.css?type=text/css&id=c445ff7e611442a22a2d023d11d8075cc83afc5e2e8f23ff8bb5a1b7d638bb61:ET
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"0processors:type=text/css&file_type=text/css;TTI"9file-digest://app/assets/stylesheets/application.css;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI")file-digest://app/assets/stylesheets;TT
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash{ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"?processors:type=text/css&file_type=text/css&pipeline=debug;TTI"]file-digest:///vagrant_data/china_city/app/assets/stylesheets/china_city/application.css;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI"Mfile-digest:///vagrant_data/china_city/app/assets/stylesheets/china_city;TT
@@ -0,0 +1 @@
1
+ I"�/home/vagrant/.rvm/gems/ruby-2.2.1/gems/jquery-rails-3.1.4/vendor/assets/javascripts/jquery.js?type=application/javascript&pipeline=self&id=241527e1580842473709ee54aa25394233288c13531c44ba84383acc3800c875:ET
@@ -0,0 +1,69 @@
1
+ # encoding: utf-8
2
+ require 'spec_helper'
3
+
4
+ feature 'china city', js: true do
5
+ scenario 'select' do
6
+ visit '/china_city'
7
+ within '.rails-helper' do
8
+ select '广东省'
9
+ select '深圳市'
10
+ select '南山区'
11
+ end
12
+ within '.html-tag' do
13
+ select '广东省'
14
+ select '深圳市'
15
+ select '南山区'
16
+ end
17
+ end
18
+
19
+ describe 'clean' do
20
+ before do
21
+ visit '/china_city'
22
+ within '.rails-helper' do
23
+ select '广东省'
24
+ select '深圳市'
25
+ select '南山区'
26
+ end
27
+ end
28
+ context 'select empty parent' do
29
+ scenario 'city and district' do
30
+ within '.rails-helper' do
31
+ select '--省份--'
32
+ expect(find('.city-city').value).to be_blank
33
+ expect(find('.city-district').value).to be_blank
34
+ sleep 2
35
+ expect(all('.city-city option').size).to eql 1
36
+ expect(all('.city-district option').size).to eql 1
37
+ end
38
+ end
39
+ scenario 'district' do
40
+ within '.rails-helper' do
41
+ select '--城市--'
42
+ expect(find('.city-district').value).to be_blank
43
+ sleep 2
44
+ expect(all('.city-district option').size).to eql 1
45
+ end
46
+ end
47
+ end
48
+ context 'select other parent' do
49
+ scenario 'city and district' do
50
+ within '.rails-helper' do
51
+ select '江苏省'
52
+ expect(find('.city-city').value).to be_blank
53
+ expect(find('.city-district').value).to be_blank
54
+ sleep 2
55
+ expect(all('.city-city option').size).to eql 14
56
+ expect(all('.city-district option').size).to eql 1
57
+ end
58
+ end
59
+ scenario 'district' do
60
+ within '.rails-helper' do
61
+ select '广州市'
62
+ expect(find('.city-district').value).to be_blank
63
+ sleep 2
64
+ expect(all('.city-district option').size).to eql 14
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end