gb_mapfish_appserver 0.9.5 → 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -296,7 +296,7 @@ class PrintController < ApplicationController
296
296
  #send_data response.body, :status => response.code, :type=>'application/x-pdf', :disposition=>'attachment', :filename=>'map.pdf'
297
297
  tempId = SecureRandom.random_number(2**31)
298
298
  temp = TMP_PREFIX + tempId.to_s + TMP_SUFFIX
299
- File.open(temp, 'w') {|f| f.write(response.body) }
299
+ File.open(temp, 'wb') {|f| f.write(response.body) }
300
300
  convert_and_send_link(temp, tempId, request.parameters["dpi"], request.parameters["outputFormat"])
301
301
  end
302
302
 
@@ -355,7 +355,7 @@ class PrintController < ApplicationController
355
355
  result
356
356
  end
357
357
 
358
- #Mapfish print comaptible report delivery
358
+ #Mapfish print compatible report delivery
359
359
  def call_report(request)
360
360
  result = create_report(request)
361
361
  if result.nil?
@@ -366,7 +366,7 @@ class PrintController < ApplicationController
366
366
  if result.kind_of? Net::HTTPSuccess
367
367
  temp_id = SecureRandom.random_number(2**31)
368
368
  temp = TMP_PREFIX + temp_id.to_s + TMP_SUFFIX
369
- File.open(temp, 'w') {|f| f.write(result.body) }
369
+ File.open(temp, 'wb') {|f| f.write(result.body) }
370
370
 
371
371
  render :json=>{ 'getURL' => url_for(:action=> 'show', :id=> temp_id) + ".pdf" }
372
372
  else
@@ -1,6 +1,7 @@
1
1
  class SearchModel < GeoModel
2
2
 
3
3
  LOCATE_MAX_COUNT = 50
4
+ SEARCH_MAX_COUNT = 50
4
5
 
5
6
  self.abstract_class = true
6
7
 
@@ -44,7 +44,8 @@ class Topic < ActiveRecord::Base
44
44
  unless category.nil?
45
45
  category_topics = category.topics.accessible_by(current_ability)
46
46
  category_topics = category_topics.includes(:organisation).includes(:bg_topic).includes(:overlay_topics) # optimize query performance
47
- category_topics.select('topics.*,categories_topics.sort AS categories_topics_sort')
47
+ category_topics = category_topics.select('topics.*,categories_topics.sort AS categories_topics_sort')
48
+
48
49
  topics += category_topics.collect do |topic|
49
50
  subtopics = category_topics.select{|t| t.parent_id == topic.id}.collect do |subtopic|
50
51
  {
@@ -1,10 +1,19 @@
1
1
  <script type="text/javascript">
2
2
  var requestState = {
3
3
  <% if user_signed_in? %>
4
- user: '<%= current_user.login %>',
4
+ user: {
5
+ login: '<%= current_user.login %>',
6
+ email: '<%= current_user.email %>'
7
+ },
8
+ roles: <%= raw @current_roles.to_json %>,
5
9
  <% end %>
6
10
  mainRequestedTopic: '<%= @topic_name %>',
11
+ <% if @back_topic_name.nil? %>
7
12
  backRequestedTopic: null,
13
+ <% else %>
14
+ backRequestedTopic: '<%= @back_topic_name %>',
15
+ <% end %>
16
+ overRequestedTopic: <%=raw @over_topic_name %>,
8
17
  mainDefaultTopic: '<%= @main_default_topic %>',
9
18
  backDefaultTopic: null,
10
19
  offlayers: <%= raw @offlayers.to_json %>,
@@ -1,7 +1,5 @@
1
1
  Rails.application.routes.draw do
2
2
 
3
- mount RailsAdmin::Engine => '/gbadmin', :as => 'rails_admin'
4
-
5
3
  devise_for :users,
6
4
  :path => "session", :controllers => {:registrations => "registrations"},
7
5
  :sign_out_via => [ :get, :delete ]
@@ -14,6 +12,8 @@ Rails.application.routes.draw do
14
12
  match '/session/confirm' => "registrations#confirm", :as => :user_confirm
15
13
  end
16
14
 
15
+ mount RailsAdmin::Engine => '/gbadmin', :as => 'rails_admin'
16
+
17
17
  resources :token_authentications, :only => [:create, :destroy]
18
18
 
19
19
  resources :groups_users do
@@ -22,7 +22,8 @@ Gem::Specification.new do |s|
22
22
  s.add_dependency "devise", "~> 2.2.0"
23
23
  s.add_dependency "cancan", "1.6.8" # 1.6.9 breaks aliasing to :show (https://github.com/ryanb/cancan/pull/660#issuecomment-13257667)
24
24
 
25
- s.add_dependency "rails_admin", "~> 0.4.0"
25
+ s.add_dependency "rails_admin", "~> 0.4.9"
26
+
26
27
  s.add_dependency "fastercsv" # required for rails_admin and Ruby <= 1.8
27
28
  s.add_dependency "sass", "~> 3.2.12" # rails_admin 0.0.5 does not work with sass >=3.3
28
29
 
@@ -1,3 +1,3 @@
1
1
  module GbMapfishAppserver
2
- VERSION = "0.9.5"
2
+ VERSION = "0.9.6"
3
3
  end
@@ -51,6 +51,7 @@ namespace :mapfile do
51
51
  topic.main_layer = true if topic.main_layer.nil?
52
52
  topic.save!
53
53
 
54
+ topic.topics_layers.destroy_all
54
55
  Layer.unused.destroy_all
55
56
  SublayerGroup.unused.destroy_all
56
57
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gb_mapfish_appserver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.9.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-02 00:00:00.000000000 Z
12
+ date: 2014-08-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &13079460 !ruby/object:Gem::Requirement
16
+ requirement: &4201140 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.13
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *13079460
24
+ version_requirements: *4201140
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: json
27
- requirement: &13091140 !ruby/object:Gem::Requirement
27
+ requirement: &4200640 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *13091140
35
+ version_requirements: *4200640
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: acts_as_tree
38
- requirement: &13088220 !ruby/object:Gem::Requirement
38
+ requirement: &4200020 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - =
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.2.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *13088220
46
+ version_requirements: *4200020
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: devise
49
- requirement: &13102320 !ruby/object:Gem::Requirement
49
+ requirement: &4199360 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 2.2.0
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *13102320
57
+ version_requirements: *4199360
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: cancan
60
- requirement: &13099000 !ruby/object:Gem::Requirement
60
+ requirement: &4198860 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - =
@@ -65,21 +65,21 @@ dependencies:
65
65
  version: 1.6.8
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *13099000
68
+ version_requirements: *4198860
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rails_admin
71
- requirement: &13095780 !ruby/object:Gem::Requirement
71
+ requirement: &4198360 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
75
75
  - !ruby/object:Gem::Version
76
- version: 0.4.0
76
+ version: 0.4.9
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *13095780
79
+ version_requirements: *4198360
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: fastercsv
82
- requirement: &13109120 !ruby/object:Gem::Requirement
82
+ requirement: &4197860 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *13109120
90
+ version_requirements: *4197860
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: sass
93
- requirement: &13106760 !ruby/object:Gem::Requirement
93
+ requirement: &4197280 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 3.2.12
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *13106760
101
+ version_requirements: *4197280
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: GeoRuby
104
- requirement: &12738520 !ruby/object:Gem::Requirement
104
+ requirement: &4196660 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: 0.1.4
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *12738520
112
+ version_requirements: *4196660
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: rgeo
115
- requirement: &12816320 !ruby/object:Gem::Requirement
115
+ requirement: &4196180 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ~>
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: 0.3.20
121
121
  type: :runtime
122
122
  prerelease: false
123
- version_requirements: *12816320
123
+ version_requirements: *4196180
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: rgeo-geojson
126
- requirement: &12810900 !ruby/object:Gem::Requirement
126
+ requirement: &4211880 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ~>
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: 0.2.3
132
132
  type: :runtime
133
133
  prerelease: false
134
- version_requirements: *12810900
134
+ version_requirements: *4211880
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: hpricot
137
- requirement: &12829520 !ruby/object:Gem::Requirement
137
+ requirement: &4211280 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: '0'
143
143
  type: :runtime
144
144
  prerelease: false
145
- version_requirements: *12829520
145
+ version_requirements: *4211280
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: pg
148
- requirement: &12836620 !ruby/object:Gem::Requirement
148
+ requirement: &4210640 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ~>
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: 0.14.0
154
154
  type: :runtime
155
155
  prerelease: false
156
- version_requirements: *12836620
156
+ version_requirements: *4210640
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: activerecord-postgis-adapter
159
- requirement: &12860020 !ruby/object:Gem::Requirement
159
+ requirement: &4210120 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - =
@@ -164,7 +164,7 @@ dependencies:
164
164
  version: 0.4.1
165
165
  type: :runtime
166
166
  prerelease: false
167
- version_requirements: *12860020
167
+ version_requirements: *4210120
168
168
  description: Mapfish Appserver is a framework for web mapping applications using OGC
169
169
  standards and the Mapfish protocol.
170
170
  email: