effective_addresses 1.6.3 → 1.7.0
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/README.md +4 -7
- data/{lib/generators/templates → config}/effective_addresses.rb +1 -2
- data/lib/effective_addresses/engine.rb +1 -1
- data/lib/effective_addresses/version.rb +1 -1
- data/lib/generators/effective_addresses/install_generator.rb +4 -8
- metadata +3 -4
- data/lib/generators/templates/README +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a7c78ac1484e000db6bbcbdf8b46e2599d192bc
|
4
|
+
data.tar.gz: fc43c58d98d63ad21857732eb98668a1de5c840a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7456c3400cc4ac5c179bc3f31de1567573236b707f82c37e7fbd97b7c86269140c0a24c373a75f727867740f6d3da9cb7e2d0b8274554c4433b4422296e20c45
|
7
|
+
data.tar.gz: 4c2e65af3d3d6e4000f25adf250b37e3068c29268321d4eefe657b294649b83b1a5fd5d4c9eeae9ad6380b14e995fa9f06933d580acc0624569962e58f45b86f
|
data/README.md
CHANGED
@@ -166,8 +166,8 @@ The actual permitted parameters are:
|
|
166
166
|
### Form Helpers
|
167
167
|
|
168
168
|
Use the helper in a Formtastic or SimpleForm form to quickly create the address fields. Currently only supports Formtastic and SimpleForm.
|
169
|
-
|
170
|
-
When you select a country from the select input an AJAX GET request will be made to `effective_addresses.address_subregions_path` (`/addresses/subregions/:country_code`)
|
169
|
+
|
170
|
+
When you select a country from the select input an AJAX GET request will be made to `effective_addresses.address_subregions_path` (`/addresses/subregions/:country_code`)
|
171
171
|
which populates the province/state dropdown with the selected country's states or provinces.
|
172
172
|
|
173
173
|
|
@@ -219,14 +219,14 @@ Geocoder.configure(
|
|
219
219
|
# Remote IP address geocoding service (see below for supported options):
|
220
220
|
# https://github.com/alexreisner/geocoder#ip-address-services
|
221
221
|
ip_lookup: :telize,
|
222
|
-
|
222
|
+
|
223
223
|
# Local IP address file database:
|
224
224
|
# 1. gem 'maxminddb'
|
225
225
|
# 2. download database: http://dev.maxmind.com/geoip/geoip2/geolite2/
|
226
226
|
# 3. save file in db/geocoder
|
227
227
|
# ip_lookup: :geoip2,
|
228
228
|
# geoip2: { file: File.expand_path('../../db/geocoder/GeoLite2-City.mmdb', File.dirname(__FILE__)) },
|
229
|
-
|
229
|
+
|
230
230
|
cache: Rails.cache,
|
231
231
|
cache_prefix: 'geocoder:'
|
232
232
|
)
|
@@ -254,9 +254,6 @@ end
|
|
254
254
|
|
255
255
|
MIT License. Copyright [Code and Effect Inc.](http://www.codeandeffect.com/)
|
256
256
|
|
257
|
-
Code and Effect is the product arm of [AgileStyle](http://www.agilestyle.com/), an Edmonton-based shop that specializes in building custom web applications with Ruby on Rails.
|
258
|
-
|
259
|
-
|
260
257
|
## Testing
|
261
258
|
|
262
259
|
The test suite for this gem is unfortunately not yet complete.
|
@@ -7,7 +7,7 @@ EffectiveAddresses.setup do |config|
|
|
7
7
|
config.use_full_name = true
|
8
8
|
|
9
9
|
# Country codes to display in country_select dropdowns.
|
10
|
-
config.country_codes = :all
|
10
|
+
config.country_codes = :all
|
11
11
|
#config.country_codes = ['US', 'CA'] # Or you can be more selective...
|
12
12
|
|
13
13
|
# Select these countries ontop of the others
|
@@ -41,5 +41,4 @@ EffectiveAddresses.setup do |config|
|
|
41
41
|
# :radio_buttons => :horizontal_radio_and_checkboxes
|
42
42
|
# }
|
43
43
|
# }
|
44
|
-
|
45
44
|
end
|
@@ -21,7 +21,7 @@ module EffectiveAddresses
|
|
21
21
|
|
22
22
|
# Set up our default configuration options.
|
23
23
|
initializer "effective_addresses.defaults", :before => :load_config_initializers do |app|
|
24
|
-
eval File.read("#{config.root}/
|
24
|
+
eval File.read("#{config.root}/config/effective_addresses.rb")
|
25
25
|
end
|
26
26
|
|
27
27
|
end
|
@@ -3,9 +3,9 @@ module EffectiveAddresses
|
|
3
3
|
class InstallGenerator < Rails::Generators::Base
|
4
4
|
include Rails::Generators::Migration
|
5
5
|
|
6
|
-
desc
|
6
|
+
desc 'Creates an EffectiveAddresses initializer in your application.'
|
7
7
|
|
8
|
-
source_root File.expand_path(
|
8
|
+
source_root File.expand_path('../../templates', __FILE__)
|
9
9
|
|
10
10
|
def self.next_migration_number(dirname)
|
11
11
|
if not ActiveRecord::Base.timestamped_migrations
|
@@ -16,16 +16,12 @@ module EffectiveAddresses
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def copy_initializer
|
19
|
-
template
|
19
|
+
template ('../' * 3) + 'config/effective_addresses.rb', 'config/initializers/effective_addresses.rb'
|
20
20
|
end
|
21
21
|
|
22
22
|
def create_migration_file
|
23
23
|
@addresses_table_name = ':' + EffectiveAddresses.addresses_table_name.to_s
|
24
|
-
migration_template '
|
25
|
-
end
|
26
|
-
|
27
|
-
def show_readme
|
28
|
-
readme "README" if behavior == :invoke
|
24
|
+
migration_template ('../' * 3) + 'db/migrate/01_create_effective_addresses.rb.erb', 'db/migrate/create_effective_addresses.rb'
|
29
25
|
end
|
30
26
|
end
|
31
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_addresses
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -244,6 +244,7 @@ files:
|
|
244
244
|
- app/views/effective/addresses/_address_fields_formtastic.html.haml
|
245
245
|
- app/views/effective/addresses/_address_fields_simple_form.html.haml
|
246
246
|
- app/views/effective/addresses/_subregions.html.haml
|
247
|
+
- config/effective_addresses.rb
|
247
248
|
- config/locales/simple_form.en.yml
|
248
249
|
- config/routes.rb
|
249
250
|
- db/migrate/01_create_effective_addresses.rb.erb
|
@@ -251,8 +252,6 @@ files:
|
|
251
252
|
- lib/effective_addresses/engine.rb
|
252
253
|
- lib/effective_addresses/version.rb
|
253
254
|
- lib/generators/effective_addresses/install_generator.rb
|
254
|
-
- lib/generators/templates/README
|
255
|
-
- lib/generators/templates/effective_addresses.rb
|
256
255
|
- lib/tasks/effective_addresses_tasks.rake
|
257
256
|
- spec/controllers/addresses_controller_spec.rb
|
258
257
|
- spec/dummy/README.rdoc
|
@@ -1 +0,0 @@
|
|
1
|
-
Thanks for using EffectiveAddresses
|