simple-address-generator 0.0.3 → 0.0.4

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.
@@ -18,10 +18,35 @@ module SimpleAddressGenerator
18
18
 
19
19
  def insert_code_application
20
20
  inject_into_file "app/views/layouts/application.html.erb", after: "<%= yield %>" do
21
- a = "\n\n <%= yield :scripts %>"
22
- a
21
+ a = "\n\n attr_accessor :gmaps"
22
+ b = "\n\n geocoded_by :full_address"
23
+ c = "\n\n after_validation :geocode"
24
+ d = "\n\n acts_as_gmappable"
25
+ e = "\n\n def full_address"
26
+ f = "\n [self.address_line_1, self.address_line_2, self.city, self.state, self.country, self.postal_code].compact.join(", ")"
27
+ g = "\n end"
28
+ h = "\n\n def gmaps4rails_address"
29
+ i = "\n full_address"
30
+ j = "\n end"
31
+ k = "\n\n def gmaps4rails_marker_picture"
32
+ l = "\n {"
33
+ m = "\n 'picture' => '/assets/icon-1.png',"
34
+ n = "\n 'width => 30,"
35
+ o = "\n height' => 30,"
36
+ p = "\n 'marker_anchor => [ 5, 10],"
37
+ q = "\n 'picture' => '/assets/icon-1.png',"
38
+ r = "\n 'picture' => '/assets/icon-1.png',"
39
+ s = "\n 'picture' => '/assets/icon-1.png',"
40
+ t = "\n }"
41
+ u = "\n end"
42
+ a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u
43
+ end
44
+ end
45
+
46
+ def insert_to_model
47
+ inject_into_file "app/models/address.rb", after: "attr_accessible :address_line_1, :address_line_2, :category_id, :city, :country, :latitude, :longitude, :postal_code, :state, :telephone_number" do
48
+
23
49
  end
24
-
25
50
  end
26
51
 
27
52
  def insert_routes
@@ -1,7 +1,7 @@
1
1
  module Simple
2
2
  module Address
3
3
  module Generator
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-address-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: