ood_appkit 1.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e93d18a9dde285e2ea4192e6432c335fb7a8f0f6
4
- data.tar.gz: 064f4bea76929a57b553bcd3b9cba6f9b55407af
2
+ SHA256:
3
+ metadata.gz: 811bbf36859c70df9408cff3a0d325d7788b002c3965154dd86b10b76adc1ed6
4
+ data.tar.gz: 9a217db98641e688b30789ea37e3bcd65aa34feca3c7ba6ae11ec41215377b4b
5
5
  SHA512:
6
- metadata.gz: db8d0a58f9555aeed9dc4bd5a96fa826f34994fe78c45c913b608fe10ddebdf2ac4bacf8cd9bc7a0729eec344c8764099708a1bef844973f35d40acd0c87259b
7
- data.tar.gz: dd1715a1ee4d7c5403344c4d84cc6a5f668d70a51187980bee0bbb599278e4297d0a6d2603f9991e5e6b674b98872d84cc0eac5e9843df24a3f9523439ce2748
6
+ metadata.gz: 970807498104ae1dc93f8474621ae7d598f90eb489e8ce1779d69f3fb4885e2b94ab918846943742b9d55f29fb7ef436dded331fbafe70bd1cc1d89a54642d78
7
+ data.tar.gz: 16b8fc1371708cad72c4e2e3b2af9cd85ee04adf558defbecc9dc105e9e05417bc96c8645651f112a3de8c6319cba784072e68e5f5405217091103a5c378390c
@@ -63,4 +63,9 @@
63
63
  border: 1px solid #ddd;
64
64
  }
65
65
  }
66
+ pre {
67
+ code {
68
+ white-space: pre;
69
+ }
70
+ }
66
71
  }
@@ -95,11 +95,12 @@ module OodAppkit
95
95
  )
96
96
  self.files = Urls::Files.new(
97
97
  title: ENV['OOD_FILES_TITLE'] || 'Files',
98
- base_url: ENV['OOD_FILES_URL'] || '/pun/sys/files'
98
+ base_url: ENV['OOD_FILES_URL'] || '/pun/sys/dashboard/files'
99
99
  )
100
100
  self.editor = Urls::Editor.new(
101
101
  title: ENV['OOD_EDITOR_TITLE'] || 'Editor',
102
- base_url: ENV['OOD_EDITOR_URL'] || '/pun/sys/file-editor'
102
+ # this is not a typo => the editor is /edit off of the base url
103
+ base_url: ENV['OOD_EDITOR_URL'] || '/pun/sys/dashboard/files'
103
104
  )
104
105
 
105
106
  # Add routes for useful features
@@ -0,0 +1,12 @@
1
+ module OodAppkit
2
+ module DefaultCookieOptions
3
+ def handle_options(options)
4
+ if base_uri = ENV["RAILS_RELATIVE_URL_ROOT"]
5
+ options[:path] = base_uri unless /^#{Regexp.quote base_uri}/ =~ options[:path]
6
+ end
7
+ super(options)
8
+ end
9
+ end
10
+ end
11
+
12
+ ActionDispatch::Cookies::CookieJar.prepend OodAppkit::DefaultCookieOptions
@@ -1,4 +1,6 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module OodAppkit
2
4
  # The current version of OodAppkit
3
- VERSION = "1.0.1"
5
+ VERSION = '2.0.2'
4
6
  end
data/lib/ood_appkit.rb CHANGED
@@ -4,6 +4,7 @@ require 'ood_appkit/url'
4
4
  require 'ood_appkit/files_rack_app'
5
5
  require 'ood_appkit/markdown_template_handler'
6
6
  require 'ood_appkit/log_formatter'
7
+ require 'ood_appkit/default_cookie_options'
7
8
 
8
9
  # The main namespace for OodAppkit. Provides a global configuration.
9
10
  module OodAppkit
@@ -0,0 +1,3 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../javascripts .js
3
+ //= link_directory ../stylesheets .css
@@ -8,7 +8,7 @@ class OodAppkitTest < ActiveSupport::TestCase
8
8
  # FIXME: move these tests elsewhere
9
9
  #
10
10
  test "shell urls" do
11
- s = OodAppkit::ShellUrl.new(base_url: "/sh")
11
+ s = OodAppkit::Urls::Shell.new(base_url: "/sh")
12
12
 
13
13
  assert_equal "/sh/ssh/default", s.url.to_s
14
14
  assert_equal "/sh/ssh/oakley", s.url(host: "oakley").to_s
@@ -19,7 +19,7 @@ class OodAppkitTest < ActiveSupport::TestCase
19
19
  end
20
20
 
21
21
  test "files urls" do
22
- f = OodAppkit::FilesUrl.new(base_url: "/f")
22
+ f = OodAppkit::Urls::Files.new(base_url: "/f")
23
23
 
24
24
  assert_equal "/f/fs/nfs/17/efranz/ood_dev", f.url(path: "/nfs/17/efranz/ood_dev").to_s
25
25
  assert_equal "/f/fs/nfs/17/efranz/ood_dev", f.url(path: Pathname.new("/nfs/17/efranz/ood_dev")).to_s
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ood_appkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Franz
@@ -9,42 +9,42 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-04-28 00:00:00.000000000 Z
12
+ date: 2021-10-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
19
- - !ruby/object:Gem::Version
20
- version: '4.0'
21
18
  - - ">="
22
19
  - !ruby/object:Gem::Version
23
- version: 4.0.7
20
+ version: 5.0.0
21
+ - - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: '7'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
- - - "~>"
29
- - !ruby/object:Gem::Version
30
- version: '4.0'
31
28
  - - ">="
32
29
  - !ruby/object:Gem::Version
33
- version: 4.0.7
30
+ version: 5.0.0
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '7'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: ood_core
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.0.1
40
+ version: '0.1'
41
41
  type: :runtime
42
42
  prerelease: false
43
43
  version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.0.1
47
+ version: '0.1'
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: addressable
50
50
  requirement: !ruby/object:Gem::Requirement
@@ -125,6 +125,7 @@ files:
125
125
  - config/routes.rb
126
126
  - lib/ood_appkit.rb
127
127
  - lib/ood_appkit/configuration.rb
128
+ - lib/ood_appkit/default_cookie_options.rb
128
129
  - lib/ood_appkit/engine.rb
129
130
  - lib/ood_appkit/files_rack_app.rb
130
131
  - lib/ood_appkit/log_formatter.rb
@@ -139,6 +140,7 @@ files:
139
140
  - lib/tasks/ood_appkit_tasks.rake
140
141
  - test/dummy/README.rdoc
141
142
  - test/dummy/Rakefile
143
+ - test/dummy/app/assets/config/manifest.js
142
144
  - test/dummy/app/assets/javascripts/application.js
143
145
  - test/dummy/app/assets/stylesheets/application.css
144
146
  - test/dummy/app/controllers/application_controller.rb
@@ -164,8 +166,6 @@ files:
164
166
  - test/dummy/config/initializers/wrap_parameters.rb
165
167
  - test/dummy/config/locales/en.yml
166
168
  - test/dummy/config/routes.rb
167
- - test/dummy/db/test.sqlite3
168
- - test/dummy/log/test.log
169
169
  - test/dummy/public/404.html
170
170
  - test/dummy/public/422.html
171
171
  - test/dummy/public/500.html
@@ -192,45 +192,43 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
192
  - !ruby/object:Gem::Version
193
193
  version: '0'
194
194
  requirements: []
195
- rubyforge_project:
196
- rubygems_version: 2.4.5
195
+ rubygems_version: 3.1.2
197
196
  signing_key:
198
197
  specification_version: 4
199
198
  summary: Open OnDemand gem to help build OOD apps and interface with other OOD apps.
200
199
  test_files:
201
- - test/dummy/app/assets/javascripts/application.js
202
- - test/dummy/app/assets/stylesheets/application.css
203
- - test/dummy/app/controllers/application_controller.rb
204
- - test/dummy/app/helpers/application_helper.rb
205
- - test/dummy/app/views/layouts/application.html.erb
206
- - test/dummy/bin/bundle
207
- - test/dummy/bin/rails
208
- - test/dummy/bin/rake
209
- - test/dummy/config/environments/development.rb
210
- - test/dummy/config/environments/production.rb
211
- - test/dummy/config/environments/test.rb
212
- - test/dummy/config/initializers/filter_parameter_logging.rb
213
- - test/dummy/config/initializers/backtrace_silencers.rb
214
- - test/dummy/config/initializers/inflections.rb
200
+ - test/ood_appkit_test.rb
201
+ - test/test_helper.rb
202
+ - test/dummy/public/favicon.ico
203
+ - test/dummy/public/500.html
204
+ - test/dummy/public/404.html
205
+ - test/dummy/public/422.html
206
+ - test/dummy/Rakefile
207
+ - test/dummy/config/application.rb
208
+ - test/dummy/config/environment.rb
209
+ - test/dummy/config/database.yml
210
+ - test/dummy/config/routes.rb
211
+ - test/dummy/config/boot.rb
215
212
  - test/dummy/config/initializers/mime_types.rb
216
- - test/dummy/config/initializers/secret_token.rb
217
213
  - test/dummy/config/initializers/session_store.rb
214
+ - test/dummy/config/initializers/filter_parameter_logging.rb
215
+ - test/dummy/config/initializers/inflections.rb
216
+ - test/dummy/config/initializers/backtrace_silencers.rb
218
217
  - test/dummy/config/initializers/wrap_parameters.rb
218
+ - test/dummy/config/initializers/secret_token.rb
219
+ - test/dummy/config/environments/development.rb
220
+ - test/dummy/config/environments/test.rb
221
+ - test/dummy/config/environments/production.rb
219
222
  - test/dummy/config/locales/en.yml
220
- - test/dummy/config/application.rb
221
- - test/dummy/config/boot.rb
222
- - test/dummy/config/database.yml
223
- - test/dummy/config/environment.rb
224
- - test/dummy/config/routes.rb
225
- - test/dummy/db/test.sqlite3
226
- - test/dummy/log/test.log
227
- - test/dummy/public/404.html
228
- - test/dummy/public/422.html
229
- - test/dummy/public/500.html
230
- - test/dummy/public/favicon.ico
231
- - test/dummy/README.rdoc
232
- - test/dummy/Rakefile
223
+ - test/dummy/bin/rails
224
+ - test/dummy/bin/rake
225
+ - test/dummy/bin/bundle
226
+ - test/dummy/app/helpers/application_helper.rb
227
+ - test/dummy/app/assets/config/manifest.js
228
+ - test/dummy/app/assets/javascripts/application.js
229
+ - test/dummy/app/assets/stylesheets/application.css
230
+ - test/dummy/app/controllers/application_controller.rb
231
+ - test/dummy/app/views/layouts/application.html.erb
233
232
  - test/dummy/config.ru
233
+ - test/dummy/README.rdoc
234
234
  - test/integration/navigation_test.rb
235
- - test/ood_appkit_test.rb
236
- - test/test_helper.rb
File without changes
@@ -1,285 +0,0 @@
1
-  (4.3ms) begin transaction
2
- ---------------------------
3
- OodAppkitTest: test_files_urls
4
- ---------------------------
5
-  (0.1ms) rollback transaction
6
-  (0.1ms) begin transaction
7
- ---------------------------
8
- OodAppkitTest: test_shell_urls
9
- ---------------------------
10
-  (0.1ms) rollback transaction
11
-  (0.0ms) begin transaction
12
- ----------------------
13
- OodAppkitTest: test_truth
14
- ----------------------
15
-  (0.0ms) rollback transaction
16
-  (1.9ms) begin transaction
17
- ---------------------------
18
- OodAppkitTest: test_files_urls
19
- ---------------------------
20
-  (0.1ms) rollback transaction
21
-  (0.1ms) begin transaction
22
- ---------------------------
23
- OodAppkitTest: test_shell_urls
24
- ---------------------------
25
-  (0.1ms) rollback transaction
26
-  (0.1ms) begin transaction
27
- ----------------------
28
- OodAppkitTest: test_truth
29
- ----------------------
30
-  (0.0ms) rollback transaction
31
-  (1.9ms) begin transaction
32
- ---------------------------
33
- OodAppkitTest: test_files_urls
34
- ---------------------------
35
-  (0.1ms) rollback transaction
36
-  (0.1ms) begin transaction
37
- ---------------------------
38
- OodAppkitTest: test_shell_urls
39
- ---------------------------
40
-  (0.1ms) rollback transaction
41
-  (0.0ms) begin transaction
42
- ----------------------
43
- OodAppkitTest: test_truth
44
- ----------------------
45
-  (0.1ms) rollback transaction
46
-  (1.1ms) begin transaction
47
- ---------------------------
48
- OodAppkitTest: test_files_urls
49
- ---------------------------
50
-  (0.1ms) rollback transaction
51
-  (0.1ms) begin transaction
52
- ---------------------------
53
- OodAppkitTest: test_shell_urls
54
- ---------------------------
55
-  (0.1ms) rollback transaction
56
-  (0.1ms) begin transaction
57
- ----------------------
58
- OodAppkitTest: test_truth
59
- ----------------------
60
-  (0.0ms) rollback transaction
61
-  (2.5ms) begin transaction
62
- ---------------------------
63
- OodAppkitTest: test_files_urls
64
- ---------------------------
65
-  (0.1ms) rollback transaction
66
-  (0.1ms) begin transaction
67
- ---------------------------
68
- OodAppkitTest: test_shell_urls
69
- ---------------------------
70
-  (0.1ms) rollback transaction
71
-  (0.1ms) begin transaction
72
- ----------------------
73
- OodAppkitTest: test_truth
74
- ----------------------
75
-  (0.0ms) rollback transaction
76
-  (48.7ms) begin transaction
77
- ------------------------------------------------
78
- OodAppkit::WikiControllerTest: test_should_get_show
79
- ------------------------------------------------
80
-  (0.1ms) rollback transaction
81
-  (0.1ms) begin transaction
82
- ---------------------------
83
- OodAppkitTest: test_files_urls
84
- ---------------------------
85
-  (0.1ms) rollback transaction
86
-  (0.1ms) begin transaction
87
- ---------------------------
88
- OodAppkitTest: test_shell_urls
89
- ---------------------------
90
-  (0.1ms) rollback transaction
91
-  (0.1ms) begin transaction
92
- ----------------------
93
- OodAppkitTest: test_truth
94
- ----------------------
95
-  (0.0ms) rollback transaction
96
-  (2.6ms) begin transaction
97
- ------------------------------------------------
98
- OodAppkit::WikiControllerTest: test_should_get_show
99
- ------------------------------------------------
100
-  (0.1ms) rollback transaction
101
-  (0.1ms) begin transaction
102
- ---------------------------
103
- OodAppkitTest: test_files_urls
104
- ---------------------------
105
-  (0.1ms) rollback transaction
106
-  (0.1ms) begin transaction
107
- ---------------------------
108
- OodAppkitTest: test_shell_urls
109
- ---------------------------
110
-  (0.1ms) rollback transaction
111
-  (0.0ms) begin transaction
112
- ----------------------
113
- OodAppkitTest: test_truth
114
- ----------------------
115
-  (0.0ms) rollback transaction
116
-  (1.9ms) begin transaction
117
- ------------------------------------------------
118
- OodAppkit::WikiControllerTest: test_should_get_show
119
- ------------------------------------------------
120
-  (0.1ms) rollback transaction
121
-  (0.1ms) begin transaction
122
- ---------------------------
123
- OodAppkitTest: test_files_urls
124
- ---------------------------
125
-  (0.1ms) rollback transaction
126
-  (0.0ms) begin transaction
127
- ---------------------------
128
- OodAppkitTest: test_shell_urls
129
- ---------------------------
130
-  (0.1ms) rollback transaction
131
-  (0.0ms) begin transaction
132
- ----------------------
133
- OodAppkitTest: test_truth
134
- ----------------------
135
-  (0.1ms) rollback transaction
136
-  (2.5ms) begin transaction
137
- ------------------------------------------------
138
- OodAppkit::WikiControllerTest: test_should_get_show
139
- ------------------------------------------------
140
-  (0.1ms) rollback transaction
141
-  (0.1ms) begin transaction
142
- ---------------------------
143
- OodAppkitTest: test_files_urls
144
- ---------------------------
145
-  (0.1ms) rollback transaction
146
-  (0.0ms) begin transaction
147
- ---------------------------
148
- OodAppkitTest: test_shell_urls
149
- ---------------------------
150
-  (0.1ms) rollback transaction
151
-  (0.0ms) begin transaction
152
- ----------------------
153
- OodAppkitTest: test_truth
154
- ----------------------
155
-  (0.1ms) rollback transaction
156
-  (1.9ms) begin transaction
157
- ------------------------------------------------
158
- OodAppkit::WikiControllerTest: test_should_get_show
159
- ------------------------------------------------
160
-  (0.1ms) rollback transaction
161
-  (0.1ms) begin transaction
162
- ---------------------------
163
- OodAppkitTest: test_files_urls
164
- ---------------------------
165
-  (0.1ms) rollback transaction
166
-  (0.1ms) begin transaction
167
- ---------------------------
168
- OodAppkitTest: test_shell_urls
169
- ---------------------------
170
-  (0.1ms) rollback transaction
171
-  (0.0ms) begin transaction
172
- ----------------------
173
- OodAppkitTest: test_truth
174
- ----------------------
175
-  (0.1ms) rollback transaction
176
-  (2.7ms) begin transaction
177
- ------------------------------------------------
178
- OodAppkit::WikiControllerTest: test_should_get_show
179
- ------------------------------------------------
180
-  (0.1ms) rollback transaction
181
-  (0.1ms) begin transaction
182
- ---------------------------
183
- OodAppkitTest: test_files_urls
184
- ---------------------------
185
-  (0.1ms) rollback transaction
186
-  (0.0ms) begin transaction
187
- ---------------------------
188
- OodAppkitTest: test_shell_urls
189
- ---------------------------
190
-  (0.1ms) rollback transaction
191
-  (0.1ms) begin transaction
192
- ----------------------
193
- OodAppkitTest: test_truth
194
- ----------------------
195
-  (0.1ms) rollback transaction
196
-  (4.1ms) begin transaction
197
- ------------------------------------------------
198
- OodAppkit::WikiControllerTest: test_should_get_show
199
- ------------------------------------------------
200
-  (0.1ms) rollback transaction
201
-  (0.1ms) begin transaction
202
- ---------------------------
203
- OodAppkitTest: test_files_urls
204
- ---------------------------
205
-  (0.1ms) rollback transaction
206
-  (0.1ms) begin transaction
207
- ---------------------------
208
- OodAppkitTest: test_shell_urls
209
- ---------------------------
210
-  (0.1ms) rollback transaction
211
-  (0.1ms) begin transaction
212
- ----------------------
213
- OodAppkitTest: test_truth
214
- ----------------------
215
-  (0.0ms) rollback transaction
216
-  (2.4ms) begin transaction
217
- ------------------------------------------------
218
- OodAppkit::WikiControllerTest: test_should_get_show
219
- ------------------------------------------------
220
-  (0.1ms) rollback transaction
221
-  (0.1ms) begin transaction
222
- ---------------------------
223
- OodAppkitTest: test_files_urls
224
- ---------------------------
225
-  (0.1ms) rollback transaction
226
-  (0.1ms) begin transaction
227
- ---------------------------
228
- OodAppkitTest: test_shell_urls
229
- ---------------------------
230
-  (0.1ms) rollback transaction
231
-  (0.0ms) begin transaction
232
- ----------------------
233
- OodAppkitTest: test_truth
234
- ----------------------
235
-  (0.0ms) rollback transaction
236
-  (2.5ms) begin transaction
237
- ------------------------------------------------
238
- OodAppkit::WikiControllerTest: test_should_get_show
239
- ------------------------------------------------
240
-  (0.1ms) rollback transaction
241
-  (0.1ms) begin transaction
242
- ---------------------------
243
- OodAppkitTest: test_files_urls
244
- ---------------------------
245
-  (0.1ms) rollback transaction
246
-  (0.1ms) begin transaction
247
- ---------------------------
248
- OodAppkitTest: test_shell_urls
249
- ---------------------------
250
-  (0.1ms) rollback transaction
251
-  (0.0ms) begin transaction
252
- ----------------------
253
- OodAppkitTest: test_truth
254
- ----------------------
255
-  (0.1ms) rollback transaction
256
-  (2.5ms) begin transaction
257
- ---------------------------
258
- OodAppkitTest: test_files_urls
259
- ---------------------------
260
-  (0.1ms) rollback transaction
261
-  (0.1ms) begin transaction
262
- ---------------------------
263
- OodAppkitTest: test_shell_urls
264
- ---------------------------
265
-  (0.1ms) rollback transaction
266
-  (0.1ms) begin transaction
267
- ----------------------
268
- OodAppkitTest: test_truth
269
- ----------------------
270
-  (0.0ms) rollback transaction
271
-  (30.5ms) begin transaction
272
- ------------------------------
273
- OodAppkitTest: test_files_urls
274
- ------------------------------
275
-  (0.1ms) rollback transaction
276
-  (0.1ms) begin transaction
277
- ------------------------------
278
- OodAppkitTest: test_shell_urls
279
- ------------------------------
280
-  (0.1ms) rollback transaction
281
-  (0.0ms) begin transaction
282
- -------------------------
283
- OodAppkitTest: test_truth
284
- -------------------------
285
-  (0.0ms) rollback transaction