ood_appkit 0.3.2 → 0.3.3
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.
- checksums.yaml +4 -4
- data/README.md +75 -2
- data/lib/ood_appkit/configuration.rb +7 -3
- data/lib/ood_appkit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c177ccb73485ccb2b696d81115449f50bb62d9dc
|
4
|
+
data.tar.gz: 049ae0e1579bd53c6eee7b1f7135b0c8ad151058
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf19980e306e95b4d9d6cb5993a83440ad3c33efbe5bf0a1814e52240f1ef7e036ebed9301600f8f5bd856c4f96e10354ba8065a319b895c5eb71babf337c26f
|
7
|
+
data.tar.gz: 181bb0a5e7b14196416fde67e9fa51b66ab8a1390094204fd47a8efef7cd25ca70b9aa455e80e158f7509ab0ec50502e1535887b0995fe8ab418b518e15a54fd
|
data/README.md
CHANGED
@@ -1,12 +1,32 @@
|
|
1
|
+
# OOD App Kit
|
2
|
+
|
3
|
+
The `ood_appkit` gem is a package of utility functions and engines for
|
4
|
+
applications running on the Open OnDemand platform.
|
5
|
+
|
6
|
+
Functionality includes:
|
7
|
+
* [Rake tasks](#rake-tasks)
|
8
|
+
* [URL handlers for OOD System applciations](#url-handlers-for-system-apps)
|
9
|
+
* [Rack middleware for handling files under a configured dataroot](#rack-middleware-for-handling-files-under-dataroot)
|
10
|
+
* [A wiki static page engine](#wiki-static-page-engine)
|
11
|
+
* [Override Bootstrap Variables](#override-bootstrap-variables)
|
12
|
+
* [A markdown handler](#markdown-handler)
|
13
|
+
* [Custom Log Formatting](#custom-log-formatting)
|
14
|
+
* [Branding Features](#branding-features)
|
15
|
+
* [Information on Configured Clusters](#cluster-information)
|
16
|
+
|
1
17
|
## Installation
|
2
18
|
|
3
19
|
To use, add this line to your application's Gemfile:
|
4
20
|
|
5
|
-
|
21
|
+
```bash
|
22
|
+
gem 'ood_appkit'
|
23
|
+
```
|
6
24
|
|
7
25
|
And then execute:
|
8
26
|
|
9
|
-
|
27
|
+
```bash
|
28
|
+
bundle install
|
29
|
+
```
|
10
30
|
|
11
31
|
## Usage
|
12
32
|
|
@@ -329,6 +349,17 @@ for these to take effect
|
|
329
349
|
@import "bootstrap";
|
330
350
|
```
|
331
351
|
|
352
|
+
**Note:** After changing an environment variable or configuration option in the
|
353
|
+
initalizer you must **clobber** your assets and **restart** the app:
|
354
|
+
|
355
|
+
```bash
|
356
|
+
# clobber assets
|
357
|
+
bin/rake assets:clobber
|
358
|
+
|
359
|
+
# restart app
|
360
|
+
touch tmp/restart.txt
|
361
|
+
```
|
362
|
+
|
332
363
|
### Markdown Handler
|
333
364
|
|
334
365
|
A simple markdown handler is included with this gem. Any views with the
|
@@ -359,6 +390,16 @@ rendered markdown to resemble GitHub's display of markdown.
|
|
359
390
|
```scss
|
360
391
|
// app/assets/stylesheets/application.scss
|
361
392
|
|
393
|
+
// load the bootstrap sprockets first
|
394
|
+
@import "bootstrap-sprockets";
|
395
|
+
|
396
|
+
// this MUST occur before you import bootstrap
|
397
|
+
@import "ood_appkit/bootstrap-overrides";
|
398
|
+
|
399
|
+
// this MUST occur after the bootstrap overrides
|
400
|
+
@import "bootstrap";
|
401
|
+
|
402
|
+
// this MUST occur after the bootstrap import
|
362
403
|
@import "ood_appkit/markdown";
|
363
404
|
```
|
364
405
|
|
@@ -368,6 +409,16 @@ It is also included if you import the default stylesheet:
|
|
368
409
|
```scss
|
369
410
|
// app/assets/stylesheets/application.scss
|
370
411
|
|
412
|
+
// load the bootstrap sprockets first
|
413
|
+
@import "bootstrap-sprockets";
|
414
|
+
|
415
|
+
// this MUST occur before you import bootstrap
|
416
|
+
@import "ood_appkit/bootstrap-overrides";
|
417
|
+
|
418
|
+
// this MUST occur after the bootstrap overrides
|
419
|
+
@import "bootstrap";
|
420
|
+
|
421
|
+
// this MUST occur after the bootstrap import
|
371
422
|
@import "ood_appkit";
|
372
423
|
```
|
373
424
|
|
@@ -411,6 +462,16 @@ To take advantage of branding features you must import it in your stylesheet:
|
|
411
462
|
```scss
|
412
463
|
// app/assets/stylesheets/application.scss
|
413
464
|
|
465
|
+
// load the bootstrap sprockets first
|
466
|
+
@import "bootstrap-sprockets";
|
467
|
+
|
468
|
+
// this MUST occur before you import bootstrap
|
469
|
+
@import "ood_appkit/bootstrap-overrides";
|
470
|
+
|
471
|
+
// this MUST occur after the bootstrap overrides
|
472
|
+
@import "bootstrap";
|
473
|
+
|
474
|
+
// this MUST occur after the bootstrap import
|
414
475
|
@import "ood_appkit/branding";
|
415
476
|
```
|
416
477
|
|
@@ -420,6 +481,16 @@ It is also included if you import the default stylesheet:
|
|
420
481
|
```scss
|
421
482
|
// app/assets/stylesheets/application.scss
|
422
483
|
|
484
|
+
// load the bootstrap sprockets first
|
485
|
+
@import "bootstrap-sprockets";
|
486
|
+
|
487
|
+
// this MUST occur before you import bootstrap
|
488
|
+
@import "ood_appkit/bootstrap-overrides";
|
489
|
+
|
490
|
+
// this MUST occur after the bootstrap overrides
|
491
|
+
@import "bootstrap";
|
492
|
+
|
493
|
+
// this MUST occur after the bootstrap import
|
423
494
|
@import "ood_appkit";
|
424
495
|
```
|
425
496
|
|
@@ -599,6 +670,8 @@ cluster):
|
|
599
670
|
OOD_CLUSTERS="/path/to/configs.d"
|
600
671
|
```
|
601
672
|
|
673
|
+
The default location is: `/etc/ood/config/clusters.d`
|
674
|
+
|
602
675
|
## Develop
|
603
676
|
|
604
677
|
Generated using:
|
@@ -65,10 +65,14 @@ module OodAppkit
|
|
65
65
|
self.dataroot = ENV['OOD_DATAROOT'] || ENV['RAILS_DATAROOT']
|
66
66
|
|
67
67
|
# Initialize list of available clusters
|
68
|
+
c_config = Pathname.new(ENV['OOD_CLUSTERS'] || '/etc/ood/config/clusters.d')
|
68
69
|
self.clusters = Clusters.new(
|
69
|
-
|
70
|
-
config:
|
71
|
-
|
70
|
+
begin
|
71
|
+
ConfigParser.parse(config: c_config).map { |k, v| ClusterDecorator.new(id: k.to_sym, **v) }
|
72
|
+
rescue ConfigParser::InvalidConfigPath
|
73
|
+
STDERR.puts "Invalid cluster config specified: #{c_config}"
|
74
|
+
[]
|
75
|
+
end
|
72
76
|
)
|
73
77
|
|
74
78
|
# Add markdown template support
|
data/lib/ood_appkit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ood_appkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Franz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|