magic_addresses 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/magic_addresses/rails.rb +16 -0
- data/lib/magic_addresses/version.rb +1 -1
- data/lib/magic_addresses.rb +6 -9
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 949edc8b5ca53118e79d375d3d4a2fc4716059d2
|
4
|
+
data.tar.gz: d0271b3f87056b996f5b83f99676d64369c8608b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d9d762f95aeb6defac7c961f894ed109217f466e76b10d0402a14fa39b6850fd69c0b1e0218a78bd9c0e9c21b18ac4d229d0961d9d4178be1bb2c6e33bc58ed
|
7
|
+
data.tar.gz: 6373d2347204e22752ea7f1ebf74cf40c8eb511656e11910935a28196c0c83e2cc28c51693ed81674d15e10da081247abf6bbf10c6e0c39d882ad02610fe0b65
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'magic_addresses'
|
2
|
+
require 'rails'
|
3
|
+
|
4
|
+
module MagicAddresses
|
5
|
+
class Engine < ::Rails::Engine
|
6
|
+
|
7
|
+
initializer "my_gem.view_helpers" do
|
8
|
+
ActionView::Base.send :include, MgcaHelper
|
9
|
+
|
10
|
+
#Sprockets.append_path( "../../vendor/assets" )
|
11
|
+
Rails.application.config.assets.precompile += %w( flags/*.* )
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
data/lib/magic_addresses.rb
CHANGED
@@ -13,7 +13,8 @@ require "app/models/magic_addresses"
|
|
13
13
|
|
14
14
|
require "helpers/mgca_helper"
|
15
15
|
|
16
|
-
require "magic_addresses/railtie" if defined?(Rails::Railtie)
|
16
|
+
# require "magic_addresses/railtie" if defined?(Rails::Railtie)
|
17
|
+
require "magic_addresses/rails" if defined?(Rails)
|
17
18
|
|
18
19
|
module MagicAddresses
|
19
20
|
|
@@ -55,16 +56,12 @@ module MagicAddresses
|
|
55
56
|
yield(configuration)
|
56
57
|
end
|
57
58
|
|
58
|
-
|
59
|
-
|
60
|
-
|
59
|
+
def self.root
|
60
|
+
File.expand_path '../..', __FILE__
|
61
|
+
end
|
61
62
|
|
62
63
|
end
|
63
64
|
|
64
|
-
def self.root
|
65
|
-
File.expand_path '../..', __FILE__
|
66
|
-
end
|
67
|
-
|
68
65
|
end
|
69
66
|
|
70
67
|
ActiveSupport.on_load(:active_record) do
|
@@ -72,7 +69,7 @@ ActiveSupport.on_load(:active_record) do
|
|
72
69
|
require 'geocoder'
|
73
70
|
end
|
74
71
|
|
75
|
-
ActionController::Base.prepend_view_path "#{root}/app/views"
|
72
|
+
ActionController::Base.prepend_view_path "#{MagicAddresses.root}/app/views"
|
76
73
|
# => ActionController::Base.append_view_path File.dirname(__FILE__) + "app/views"
|
77
74
|
|
78
75
|
#require 'geocoder'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: magic_addresses
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Torsten Wetzel
|
@@ -153,6 +153,7 @@ files:
|
|
153
153
|
- lib/geocoder/results/nominatim_decorator.rb
|
154
154
|
- lib/helpers/mgca_helper.rb
|
155
155
|
- lib/magic_addresses/configuration.rb
|
156
|
+
- lib/magic_addresses/rails.rb
|
156
157
|
- lib/magic_addresses/railtie.rb
|
157
158
|
- lib/magic_addresses/version.rb
|
158
159
|
- lib/magic_addresses.rb
|