autocomplete_zipcode 0.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +2 -1
  3. data/Gemfile +1 -2
  4. data/README.md +79 -0
  5. data/autocomplete_zipcode.gemspec +3 -3
  6. data/lib/autocomplete_zipcode.rb +1 -1
  7. data/lib/autocomplete_zipcode/simple_form/ibge_input.rb +7 -0
  8. data/lib/autocomplete_zipcode/version.rb +1 -1
  9. data/vendor/assets/javascripts/autocomplete_zipcode.js +28 -15
  10. metadata +9 -107
  11. data/.rspec +0 -2
  12. data/example/.gitignore +0 -21
  13. data/example/Gemfile +0 -55
  14. data/example/Gemfile.lock +0 -184
  15. data/example/README.md +0 -24
  16. data/example/Rakefile +0 -6
  17. data/example/app/assets/config/manifest.js +0 -3
  18. data/example/app/assets/images/.keep +0 -0
  19. data/example/app/assets/javascripts/addresses.coffee +0 -3
  20. data/example/app/assets/javascripts/application.js +0 -17
  21. data/example/app/assets/javascripts/cable.js +0 -13
  22. data/example/app/assets/javascripts/channels/.keep +0 -0
  23. data/example/app/assets/stylesheets/addresses.scss +0 -3
  24. data/example/app/assets/stylesheets/application.css +0 -15
  25. data/example/app/assets/stylesheets/scaffolds.scss +0 -89
  26. data/example/app/channels/application_cable/channel.rb +0 -4
  27. data/example/app/channels/application_cable/connection.rb +0 -4
  28. data/example/app/controllers/addresses_controller.rb +0 -74
  29. data/example/app/controllers/application_controller.rb +0 -3
  30. data/example/app/controllers/concerns/.keep +0 -0
  31. data/example/app/helpers/addresses_helper.rb +0 -2
  32. data/example/app/helpers/application_helper.rb +0 -2
  33. data/example/app/jobs/application_job.rb +0 -2
  34. data/example/app/mailers/application_mailer.rb +0 -4
  35. data/example/app/models/address.rb +0 -2
  36. data/example/app/models/application_record.rb +0 -3
  37. data/example/app/models/concerns/.keep +0 -0
  38. data/example/app/views/addresses/_address.json.jbuilder +0 -2
  39. data/example/app/views/addresses/_form.html.erb +0 -17
  40. data/example/app/views/addresses/edit.html.erb +0 -6
  41. data/example/app/views/addresses/index.html.erb +0 -33
  42. data/example/app/views/addresses/index.json.jbuilder +0 -1
  43. data/example/app/views/addresses/new.html.erb +0 -5
  44. data/example/app/views/addresses/show.html.erb +0 -24
  45. data/example/app/views/addresses/show.json.jbuilder +0 -1
  46. data/example/app/views/layouts/application.html.erb +0 -14
  47. data/example/app/views/layouts/mailer.html.erb +0 -13
  48. data/example/app/views/layouts/mailer.text.erb +0 -1
  49. data/example/bin/bundle +0 -3
  50. data/example/bin/rails +0 -9
  51. data/example/bin/rake +0 -9
  52. data/example/bin/setup +0 -34
  53. data/example/bin/spring +0 -17
  54. data/example/bin/update +0 -29
  55. data/example/config.ru +0 -5
  56. data/example/config/application.rb +0 -15
  57. data/example/config/boot.rb +0 -3
  58. data/example/config/cable.yml +0 -9
  59. data/example/config/database.yml +0 -25
  60. data/example/config/environment.rb +0 -5
  61. data/example/config/environments/development.rb +0 -54
  62. data/example/config/environments/production.rb +0 -86
  63. data/example/config/environments/test.rb +0 -42
  64. data/example/config/initializers/application_controller_renderer.rb +0 -6
  65. data/example/config/initializers/assets.rb +0 -11
  66. data/example/config/initializers/backtrace_silencers.rb +0 -7
  67. data/example/config/initializers/cookies_serializer.rb +0 -5
  68. data/example/config/initializers/filter_parameter_logging.rb +0 -4
  69. data/example/config/initializers/inflections.rb +0 -16
  70. data/example/config/initializers/mime_types.rb +0 -4
  71. data/example/config/initializers/new_framework_defaults.rb +0 -24
  72. data/example/config/initializers/session_store.rb +0 -3
  73. data/example/config/initializers/simple_form.rb +0 -169
  74. data/example/config/initializers/wrap_parameters.rb +0 -14
  75. data/example/config/locales/en.yml +0 -23
  76. data/example/config/locales/simple_form.en.yml +0 -31
  77. data/example/config/puma.rb +0 -47
  78. data/example/config/routes.rb +0 -4
  79. data/example/config/secrets.yml +0 -22
  80. data/example/config/spring.rb +0 -6
  81. data/example/db/migrate/20170425234824_create_addresses.rb +0 -13
  82. data/example/db/schema.rb +0 -25
  83. data/example/db/seeds.rb +0 -7
  84. data/example/lib/assets/.keep +0 -0
  85. data/example/lib/tasks/.keep +0 -0
  86. data/example/lib/templates/erb/scaffold/_form.html.erb +0 -13
  87. data/example/log/.keep +0 -0
  88. data/example/public/404.html +0 -67
  89. data/example/public/422.html +0 -67
  90. data/example/public/500.html +0 -66
  91. data/example/public/apple-touch-icon-precomposed.png +0 -0
  92. data/example/public/apple-touch-icon.png +0 -0
  93. data/example/public/favicon.ico +0 -0
  94. data/example/public/robots.txt +0 -5
  95. data/example/test/controllers/.keep +0 -0
  96. data/example/test/controllers/addresses_controller_test.rb +0 -48
  97. data/example/test/fixtures/.keep +0 -0
  98. data/example/test/fixtures/addresses.yml +0 -13
  99. data/example/test/fixtures/files/.keep +0 -0
  100. data/example/test/helpers/.keep +0 -0
  101. data/example/test/integration/.keep +0 -0
  102. data/example/test/mailers/.keep +0 -0
  103. data/example/test/models/.keep +0 -0
  104. data/example/test/models/address_test.rb +0 -7
  105. data/example/test/test_helper.rb +0 -10
  106. data/example/tmp/.keep +0 -0
  107. data/example/vendor/assets/javascripts/.keep +0 -0
  108. data/example/vendor/assets/stylesheets/.keep +0 -0
data/example/Gemfile.lock DELETED
@@ -1,184 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- autocomplete_zipcode (0.0.1)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- actioncable (5.0.2)
10
- actionpack (= 5.0.2)
11
- nio4r (>= 1.2, < 3.0)
12
- websocket-driver (~> 0.6.1)
13
- actionmailer (5.0.2)
14
- actionpack (= 5.0.2)
15
- actionview (= 5.0.2)
16
- activejob (= 5.0.2)
17
- mail (~> 2.5, >= 2.5.4)
18
- rails-dom-testing (~> 2.0)
19
- actionpack (5.0.2)
20
- actionview (= 5.0.2)
21
- activesupport (= 5.0.2)
22
- rack (~> 2.0)
23
- rack-test (~> 0.6.3)
24
- rails-dom-testing (~> 2.0)
25
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
26
- actionview (5.0.2)
27
- activesupport (= 5.0.2)
28
- builder (~> 3.1)
29
- erubis (~> 2.7.0)
30
- rails-dom-testing (~> 2.0)
31
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
32
- activejob (5.0.2)
33
- activesupport (= 5.0.2)
34
- globalid (>= 0.3.6)
35
- activemodel (5.0.2)
36
- activesupport (= 5.0.2)
37
- activerecord (5.0.2)
38
- activemodel (= 5.0.2)
39
- activesupport (= 5.0.2)
40
- arel (~> 7.0)
41
- activesupport (5.0.2)
42
- concurrent-ruby (~> 1.0, >= 1.0.2)
43
- i18n (~> 0.7)
44
- minitest (~> 5.1)
45
- tzinfo (~> 1.1)
46
- arel (7.1.4)
47
- bindex (0.5.0)
48
- builder (3.2.3)
49
- byebug (9.0.6)
50
- coffee-rails (4.2.1)
51
- coffee-script (>= 2.2.0)
52
- railties (>= 4.0.0, < 5.2.x)
53
- coffee-script (2.4.1)
54
- coffee-script-source
55
- execjs
56
- coffee-script-source (1.12.2)
57
- concurrent-ruby (1.0.5)
58
- erubis (2.7.0)
59
- execjs (2.7.0)
60
- ffi (1.9.18)
61
- globalid (0.4.0)
62
- activesupport (>= 4.2.0)
63
- i18n (0.8.1)
64
- jbuilder (2.6.3)
65
- activesupport (>= 3.0.0, < 5.2)
66
- multi_json (~> 1.2)
67
- jquery-rails (4.3.1)
68
- rails-dom-testing (>= 1, < 3)
69
- railties (>= 4.2.0)
70
- thor (>= 0.14, < 2.0)
71
- listen (3.0.8)
72
- rb-fsevent (~> 0.9, >= 0.9.4)
73
- rb-inotify (~> 0.9, >= 0.9.7)
74
- loofah (2.0.3)
75
- nokogiri (>= 1.5.9)
76
- mail (2.6.4)
77
- mime-types (>= 1.16, < 4)
78
- method_source (0.8.2)
79
- mime-types (3.1)
80
- mime-types-data (~> 3.2015)
81
- mime-types-data (3.2016.0521)
82
- mini_portile2 (2.1.0)
83
- minitest (5.10.1)
84
- multi_json (1.12.1)
85
- nio4r (2.0.0)
86
- nokogiri (1.7.1)
87
- mini_portile2 (~> 2.1.0)
88
- puma (3.8.2)
89
- rack (2.0.1)
90
- rack-test (0.6.3)
91
- rack (>= 1.0)
92
- rails (5.0.2)
93
- actioncable (= 5.0.2)
94
- actionmailer (= 5.0.2)
95
- actionpack (= 5.0.2)
96
- actionview (= 5.0.2)
97
- activejob (= 5.0.2)
98
- activemodel (= 5.0.2)
99
- activerecord (= 5.0.2)
100
- activesupport (= 5.0.2)
101
- bundler (>= 1.3.0, < 2.0)
102
- railties (= 5.0.2)
103
- sprockets-rails (>= 2.0.0)
104
- rails-dom-testing (2.0.2)
105
- activesupport (>= 4.2.0, < 6.0)
106
- nokogiri (~> 1.6)
107
- rails-html-sanitizer (1.0.3)
108
- loofah (~> 2.0)
109
- railties (5.0.2)
110
- actionpack (= 5.0.2)
111
- activesupport (= 5.0.2)
112
- method_source
113
- rake (>= 0.8.7)
114
- thor (>= 0.18.1, < 2.0)
115
- rake (12.0.0)
116
- rb-fsevent (0.9.8)
117
- rb-inotify (0.9.8)
118
- ffi (>= 0.5.0)
119
- sass (3.4.23)
120
- sass-rails (5.0.6)
121
- railties (>= 4.0.0, < 6)
122
- sass (~> 3.1)
123
- sprockets (>= 2.8, < 4.0)
124
- sprockets-rails (>= 2.0, < 4.0)
125
- tilt (>= 1.1, < 3)
126
- simple_form (3.4.0)
127
- actionpack (> 4, < 5.1)
128
- activemodel (> 4, < 5.1)
129
- spring (2.0.1)
130
- activesupport (>= 4.2)
131
- spring-watcher-listen (2.0.1)
132
- listen (>= 2.7, < 4.0)
133
- spring (>= 1.2, < 3.0)
134
- sprockets (3.7.1)
135
- concurrent-ruby (~> 1.0)
136
- rack (> 1, < 3)
137
- sprockets-rails (3.2.0)
138
- actionpack (>= 4.0)
139
- activesupport (>= 4.0)
140
- sprockets (>= 3.0.0)
141
- sqlite3 (1.3.13)
142
- thor (0.19.4)
143
- thread_safe (0.3.6)
144
- tilt (2.0.7)
145
- turbolinks (5.0.1)
146
- turbolinks-source (~> 5)
147
- turbolinks-source (5.0.0)
148
- tzinfo (1.2.3)
149
- thread_safe (~> 0.1)
150
- uglifier (3.2.0)
151
- execjs (>= 0.3.0, < 3)
152
- web-console (3.5.0)
153
- actionview (>= 5.0)
154
- activemodel (>= 5.0)
155
- bindex (>= 0.4.0)
156
- railties (>= 5.0)
157
- websocket-driver (0.6.5)
158
- websocket-extensions (>= 0.1.0)
159
- websocket-extensions (0.1.2)
160
-
161
- PLATFORMS
162
- ruby
163
-
164
- DEPENDENCIES
165
- autocomplete_zipcode!
166
- byebug
167
- coffee-rails (~> 4.2)
168
- jbuilder (~> 2.5)
169
- jquery-rails
170
- listen (~> 3.0.5)
171
- puma (~> 3.0)
172
- rails (~> 5.0.2)
173
- sass-rails (~> 5.0)
174
- simple_form
175
- spring
176
- spring-watcher-listen (~> 2.0.0)
177
- sqlite3
178
- turbolinks (~> 5)
179
- tzinfo-data
180
- uglifier (>= 1.3.0)
181
- web-console (>= 3.3.0)
182
-
183
- BUNDLED WITH
184
- 1.14.6
data/example/README.md DELETED
@@ -1,24 +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
- * ...
data/example/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- # Add your own tasks in files placed in lib/tasks ending in .rake,
2
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
-
4
- require_relative 'config/application'
5
-
6
- Rails.application.load_tasks
@@ -1,3 +0,0 @@
1
- //= link_tree ../images
2
- //= link_directory ../javascripts .js
3
- //= link_directory ../stylesheets .css
File without changes
@@ -1,3 +0,0 @@
1
- # Place all the behaviors and hooks related to the matching controller here.
2
- # All this logic will automatically be available in application.js.
3
- # You can use CoffeeScript in this file: http://coffeescript.org/
@@ -1,17 +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. JavaScript code in this file should be added after the last require_* statement.
9
- //
10
- // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- //= require jquery
14
- //= require jquery_ujs
15
- //= require turbolinks
16
- //= require autocomplete_zipcode
17
- //= require_tree .
@@ -1,13 +0,0 @@
1
- // Action Cable provides the framework to deal with WebSockets in Rails.
2
- // You can generate new channels where WebSocket features live using the rails generate channel command.
3
- //
4
- //= require action_cable
5
- //= require_self
6
- //= require_tree ./channels
7
-
8
- (function() {
9
- this.App || (this.App = {});
10
-
11
- App.cable = ActionCable.createConsumer();
12
-
13
- }).call(this);
File without changes
@@ -1,3 +0,0 @@
1
- // Place all the styles related to the Addresses controller here.
2
- // They will automatically be included in application.css.
3
- // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -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 other CSS/SCSS
10
- * files in this directory. Styles in this file should be added after the last require_* statement.
11
- * It is generally better to create a new file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
@@ -1,89 +0,0 @@
1
- body {
2
- background-color: #fff;
3
- color: #333;
4
- font-family: verdana, arial, helvetica, sans-serif;
5
- font-size: 13px;
6
- line-height: 18px;
7
- margin: 33px;
8
- }
9
-
10
- p, ol, ul, td {
11
- font-family: verdana, arial, helvetica, sans-serif;
12
- font-size: 13px;
13
- line-height: 18px;
14
- margin: 33px;
15
- }
16
-
17
- pre {
18
- background-color: #eee;
19
- padding: 10px;
20
- font-size: 11px;
21
- }
22
-
23
- a {
24
- color: #000;
25
-
26
- &:visited {
27
- color: #666;
28
- }
29
-
30
- &:hover {
31
- color: #fff;
32
- background-color: #000;
33
- }
34
- }
35
-
36
- th {
37
- padding-bottom: 5px;
38
- }
39
-
40
- td {
41
- padding-bottom: 7px;
42
- padding-left: 5px;
43
- padding-right: 5px;
44
- }
45
-
46
- div {
47
- &.field, &.actions {
48
- margin-bottom: 10px;
49
- }
50
- }
51
-
52
- #notice {
53
- color: green;
54
- }
55
-
56
- .field_with_errors {
57
- padding: 2px;
58
- background-color: red;
59
- display: table;
60
- }
61
-
62
- #error_explanation {
63
- width: 450px;
64
- border: 2px solid red;
65
- padding: 7px;
66
- padding-bottom: 0;
67
- margin-bottom: 20px;
68
- background-color: #f0f0f0;
69
-
70
- h2 {
71
- text-align: left;
72
- font-weight: bold;
73
- padding: 5px 5px 5px 15px;
74
- font-size: 12px;
75
- margin: -7px;
76
- margin-bottom: 0;
77
- background-color: #c00;
78
- color: #fff;
79
- }
80
-
81
- ul li {
82
- font-size: 12px;
83
- list-style: square;
84
- }
85
- }
86
-
87
- label {
88
- display: block;
89
- }
@@ -1,4 +0,0 @@
1
- module ApplicationCable
2
- class Channel < ActionCable::Channel::Base
3
- end
4
- end
@@ -1,4 +0,0 @@
1
- module ApplicationCable
2
- class Connection < ActionCable::Connection::Base
3
- end
4
- end
@@ -1,74 +0,0 @@
1
- class AddressesController < ApplicationController
2
- before_action :set_address, only: [:show, :edit, :update, :destroy]
3
-
4
- # GET /addresses
5
- # GET /addresses.json
6
- def index
7
- @addresses = Address.all
8
- end
9
-
10
- # GET /addresses/1
11
- # GET /addresses/1.json
12
- def show
13
- end
14
-
15
- # GET /addresses/new
16
- def new
17
- @address = Address.new
18
- end
19
-
20
- # GET /addresses/1/edit
21
- def edit
22
- end
23
-
24
- # POST /addresses
25
- # POST /addresses.json
26
- def create
27
- @address = Address.new(address_params)
28
-
29
- respond_to do |format|
30
- if @address.save
31
- format.html { redirect_to @address, notice: 'Address was successfully created.' }
32
- format.json { render :show, status: :created, location: @address }
33
- else
34
- format.html { render :new }
35
- format.json { render json: @address.errors, status: :unprocessable_entity }
36
- end
37
- end
38
- end
39
-
40
- # PATCH/PUT /addresses/1
41
- # PATCH/PUT /addresses/1.json
42
- def update
43
- respond_to do |format|
44
- if @address.update(address_params)
45
- format.html { redirect_to @address, notice: 'Address was successfully updated.' }
46
- format.json { render :show, status: :ok, location: @address }
47
- else
48
- format.html { render :edit }
49
- format.json { render json: @address.errors, status: :unprocessable_entity }
50
- end
51
- end
52
- end
53
-
54
- # DELETE /addresses/1
55
- # DELETE /addresses/1.json
56
- def destroy
57
- @address.destroy
58
- respond_to do |format|
59
- format.html { redirect_to addresses_url, notice: 'Address was successfully destroyed.' }
60
- format.json { head :no_content }
61
- end
62
- end
63
-
64
- private
65
- # Use callbacks to share common setup or constraints between actions.
66
- def set_address
67
- @address = Address.find(params[:id])
68
- end
69
-
70
- # Never trust parameters from the scary internet, only allow the white list through.
71
- def address_params
72
- params.require(:address).permit(:zipcode, :neighborhood, :city, :state)
73
- end
74
- end