map_layers 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- map_layers (0.0.3)
4
+ map_layers (0.0.5)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
data/README.md CHANGED
@@ -222,8 +222,8 @@ The MapLayers plugin for Rails is released under the MIT license.
222
222
  Development
223
223
  -----------
224
224
 
225
- * Source hosted at [GitHub](https://github.com/ldonnet/map_layers).
226
- * Report issues and feature requests to [GitHub Issues](https://github.com/ldonnet/map_layers/issues).
225
+ * Source hosted at [GitHub](https://github.com/dryade/map_layers).
226
+ * Report issues and feature requests to [GitHub Issues](https://github.com/dryade/map_layers/issues).
227
227
 
228
228
  Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make. Please **do not change** the version in your pull-request.
229
229
 
data/install.rb CHANGED
@@ -3,7 +3,8 @@
3
3
  Dir.chdir(Dir.getwd.sub(/vendor.*/, '')) do
4
4
 
5
5
  def copy_files(source_path, destination_path, plugin_root)
6
- source, destination = File.join(File.expand_path(plugin_root), source_path), File.join(RAILS_ROOT, destination_path)
6
+ rails_root = ( defined?( RAILS_ROOT)) ? RAILS_ROOT : Rails.root
7
+ source, destination = File.join(File.expand_path(plugin_root), source_path), File.join( rails_root, destination_path)
7
8
  FileUtils.mkdir(destination) unless File.exist?(destination)
8
9
  FileUtils.cp_r(source, destination)
9
10
  end
@@ -1,3 +1,3 @@
1
1
  module MapLayers
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -27,7 +27,16 @@ module MapLayers
27
27
  if options.has_key?(:img_path)
28
28
  img_path = options[:img_path]
29
29
  end
30
- if RAILS_ENV == "development" && File.exist?(File.join(RAILS_ROOT, 'public/javascripts/lib/OpenLayers.js'))
30
+ if defined?( RAILS_ROOT)
31
+ rails_env = RAILS_ENV
32
+ rails_root = RAILS_ROOT
33
+ rails_relative_url_root = ENV['RAILS_RELATIVE_URL_ROOT']
34
+ else
35
+ rails_env = Rails.env
36
+ rails_root = Rails.root
37
+ rails_relative_url_root = controller.config.relative_url_root
38
+ end
39
+ if rails_env == "development" && File.exist?(File.join( rails_root, 'public/javascripts/lib/OpenLayers.js'))
31
40
  html << '<script src="/javascripts/lib/Firebug/firebug.js"></script>'
32
41
  html << '<script src="/javascripts/lib/OpenLayers.js"></script>'
33
42
  else
@@ -36,7 +45,7 @@ module MapLayers
36
45
 
37
46
 
38
47
  html << stylesheet_link_tag("map")
39
- img_path=(Pathname(ActionController::Base.relative_url_root||"") +img_path).cleanpath.to_s
48
+ img_path=(Pathname(rails_relative_url_root||"") +img_path).cleanpath.to_s
40
49
  html << javascript_tag("OpenLayers.ImgPath='"+ img_path + "/';")
41
50
  proxy = options.has_key?(:proxy) ? options[:proxy] : controller.controller_name
42
51
  html << javascript_tag("OpenLayers.ProxyHost='/#{proxy}/proxy?url=';")
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Luc Donnet", "Alban Peignier", "Pirmin Kalberer"]
10
10
  s.email = ["luc.donnet@free.fr", "alban.peignier@free.fr", "pka@sourcepole.ch"]
11
- s.homepage = "http://github.com/ldonnet/map_layers"
11
+ s.homepage = "http://github.com/dryade/map_layers"
12
12
  s.summary = %q{library dedicated to generate OSM javascript}
13
13
  s.description = %q{library dedicated to generate OSM javascript}
14
14
 
@@ -7,15 +7,16 @@ namespace :map_layers do
7
7
  end
8
8
 
9
9
  def copy_files(source_path, destination_path, plugin_root)
10
- source, destination = File.join(plugin_root, source_path), File.join(RAILS_ROOT, destination_path)
10
+ rails_root = ( defined?(RAILS_ROOT)) ? RAILS_ROOT : Rails.root
11
+ source, destination = File.join(plugin_root, source_path), File.join(rails_root, destination_path)
11
12
  FileUtils.mkdir(destination) unless File.exist?(destination)
12
13
  FileUtils.cp_r(source, destination)
13
14
  end
14
15
 
15
16
  desc "Remove development libraries"
16
17
  task :uninstall_dev_lib do
17
- FileUtils.rm_r(File.join(RAILS_ROOT, "/public/javascripts/lib"))
18
+ FileUtils.rm_r(File.join(Rails.root, "/public/javascripts/lib"))
18
19
  end
19
20
 
20
21
 
21
- end
22
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: map_layers
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
5
- prerelease: false
4
+ hash: 21
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Luc Donnet
@@ -17,13 +17,10 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-09-30 00:00:00 +02:00
21
- default_executable:
20
+ date: 2012-02-13 00:00:00 Z
22
21
  dependencies:
23
22
  - !ruby/object:Gem::Dependency
24
- name: rails
25
- prerelease: false
26
- requirement: &id001 !ruby/object:Gem::Requirement
23
+ version_requirements: &id001 !ruby/object:Gem::Requirement
27
24
  none: false
28
25
  requirements:
29
26
  - - ">="
@@ -34,12 +31,12 @@ dependencies:
34
31
  - 3
35
32
  - 8
36
33
  version: 2.3.8
34
+ requirement: *id001
37
35
  type: :development
38
- version_requirements: *id001
39
- - !ruby/object:Gem::Dependency
40
- name: rspec
36
+ name: rails
41
37
  prerelease: false
42
- requirement: &id002 !ruby/object:Gem::Requirement
38
+ - !ruby/object:Gem::Dependency
39
+ version_requirements: &id002 !ruby/object:Gem::Requirement
43
40
  none: false
44
41
  requirements:
45
42
  - - ~>
@@ -50,12 +47,12 @@ dependencies:
50
47
  - 0
51
48
  - 0
52
49
  version: 2.0.0
50
+ requirement: *id002
53
51
  type: :development
54
- version_requirements: *id002
55
- - !ruby/object:Gem::Dependency
56
- name: rspec-rails
52
+ name: rspec
57
53
  prerelease: false
58
- requirement: &id003 !ruby/object:Gem::Requirement
54
+ - !ruby/object:Gem::Dependency
55
+ version_requirements: &id003 !ruby/object:Gem::Requirement
59
56
  none: false
60
57
  requirements:
61
58
  - - ~>
@@ -66,12 +63,12 @@ dependencies:
66
63
  - 0
67
64
  - 0
68
65
  version: 2.0.0
66
+ requirement: *id003
69
67
  type: :development
70
- version_requirements: *id003
71
- - !ruby/object:Gem::Dependency
72
- name: rake
68
+ name: rspec-rails
73
69
  prerelease: false
74
- requirement: &id004 !ruby/object:Gem::Requirement
70
+ - !ruby/object:Gem::Dependency
71
+ version_requirements: &id004 !ruby/object:Gem::Requirement
75
72
  none: false
76
73
  requirements:
77
74
  - - ">="
@@ -80,12 +77,12 @@ dependencies:
80
77
  segments:
81
78
  - 0
82
79
  version: "0"
80
+ requirement: *id004
83
81
  type: :development
84
- version_requirements: *id004
85
- - !ruby/object:Gem::Dependency
86
- name: autotest-rails
82
+ name: rake
87
83
  prerelease: false
88
- requirement: &id005 !ruby/object:Gem::Requirement
84
+ - !ruby/object:Gem::Dependency
85
+ version_requirements: &id005 !ruby/object:Gem::Requirement
89
86
  none: false
90
87
  requirements:
91
88
  - - ">="
@@ -94,12 +91,12 @@ dependencies:
94
91
  segments:
95
92
  - 0
96
93
  version: "0"
94
+ requirement: *id005
97
95
  type: :development
98
- version_requirements: *id005
99
- - !ruby/object:Gem::Dependency
100
- name: autotest-notification
96
+ name: autotest-rails
101
97
  prerelease: false
102
- requirement: &id006 !ruby/object:Gem::Requirement
98
+ - !ruby/object:Gem::Dependency
99
+ version_requirements: &id006 !ruby/object:Gem::Requirement
103
100
  none: false
104
101
  requirements:
105
102
  - - ">="
@@ -108,8 +105,10 @@ dependencies:
108
105
  segments:
109
106
  - 0
110
107
  version: "0"
108
+ requirement: *id006
111
109
  type: :development
112
- version_requirements: *id006
110
+ name: autotest-notification
111
+ prerelease: false
113
112
  description: library dedicated to generate OSM javascript
114
113
  email:
115
114
  - luc.donnet@free.fr
@@ -157,8 +156,7 @@ files:
157
156
  - spec/spec_helper.rb~
158
157
  - tasks/map_layers_tasks.rake
159
158
  - uninstall.rb
160
- has_rdoc: true
161
- homepage: http://github.com/ldonnet/map_layers
159
+ homepage: http://github.com/dryade/map_layers
162
160
  licenses: []
163
161
 
164
162
  post_install_message:
@@ -187,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
187
185
  requirements: []
188
186
 
189
187
  rubyforge_project: map_layers
190
- rubygems_version: 1.3.7
188
+ rubygems_version: 1.8.10
191
189
  signing_key:
192
190
  specification_version: 3
193
191
  summary: library dedicated to generate OSM javascript