voom-presenters 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +2 -2
- data/Gemfile +2 -1
- data/Gemfile.lock +15 -6
- data/README.md +8 -1
- data/app/demo/index.pom +5 -5
- data/app/demo/nav/top_nav.pom +3 -9
- data/lib/voom.rb +2 -2
- data/lib/voom/presenters/version.rb +1 -1
- data/presenters.gemspec +1 -1
- data/views/mdc/package-lock.json +23 -9
- metadata +6 -8
- data/app/demo/component_status.pom +0 -76
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d840d92aace441f5618199bac0a7035c81f9598d201aa6b75065c59a351410d
|
4
|
+
data.tar.gz: 4595652fbd9340df29a912d2374166f761d5f62cd28480c50aac09b4ccb4b5ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49323725469caa0f8b1d1268217882727c7133a9077fbcd2105e6e276e7487a3911126a15338e36d538ee91ebb75031030afebae66e20338fedf027a87d5cb5b
|
7
|
+
data.tar.gz: 18872cff6fa887c6698b2710c97ebaffd4be80800e3067a1c9fe641ad9a1f31ca0cc000f7d28cfb912bffa4ae4a0169196b611173e34cbfa3b4962f2533bf033
|
data/.circleci/config.yml
CHANGED
@@ -7,7 +7,7 @@ jobs:
|
|
7
7
|
build:
|
8
8
|
docker:
|
9
9
|
# specify the version you desire here
|
10
|
-
- image: circleci/ruby:2.
|
10
|
+
- image: circleci/ruby:2.7.2-node-browsers
|
11
11
|
|
12
12
|
# Specify service dependencies here if necessary
|
13
13
|
# CircleCI maintains a library of pre-built images
|
data/.ruby-version
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
2.
|
1
|
+
2.7.2
|
2
2
|
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
## [2.0.
|
1
|
+
## [2.0.3](https://github.com/rx/presenters/compare/v2.0.2...v2.0.3) (2021-03-11)
|
2
2
|
|
3
3
|
|
4
4
|
### Bug Fixes
|
5
5
|
|
6
|
-
*
|
6
|
+
* double file edit prints caused by multiple file watchers ([cecd3fe](https://github.com/rx/presenters/commit/cecd3fe0efbb3c73a5885e0c62346f2513bccc2b))
|
7
7
|
|
8
8
|
# Changelog
|
9
9
|
|
data/Gemfile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
3
3
|
|
4
|
-
ruby `cat .ruby-version`
|
4
|
+
ruby `[ -z "$RBENV_VERSION" ] && cat .ruby-version || echo $RBENV_VERSION`
|
5
5
|
# Specify your gem's dependencies in voom-console.gemspec
|
6
6
|
gemspec
|
7
7
|
|
@@ -22,3 +22,4 @@ gem 'image_crop_presenter_plugin', github:'rx/image_crop_presenter_plugin'
|
|
22
22
|
gem 'chart_presenter_plugin', github:'rx/chart_presenter_plugin'
|
23
23
|
gem 'rack-cors'
|
24
24
|
gem 'honeybadger' if ENV.fetch('HONEYBADGER_API_KEY'){false}
|
25
|
+
gem 'puma'
|
data/Gemfile.lock
CHANGED
@@ -56,15 +56,22 @@ GEM
|
|
56
56
|
ice_nine (0.11.2)
|
57
57
|
json (2.3.1)
|
58
58
|
method_source (0.9.0)
|
59
|
-
mini_portile2 (2.
|
59
|
+
mini_portile2 (2.5.0)
|
60
60
|
mustermann (1.1.1)
|
61
61
|
ruby2_keywords (~> 0.0.1)
|
62
|
-
|
63
|
-
|
62
|
+
nio4r (2.5.7)
|
63
|
+
nokogiri (1.11.2)
|
64
|
+
mini_portile2 (~> 2.5.0)
|
65
|
+
racc (~> 1.4)
|
66
|
+
nokogiri (1.11.2-x86_64-darwin)
|
67
|
+
racc (~> 1.4)
|
64
68
|
optimist (3.0.1)
|
65
69
|
pry (0.11.3)
|
66
70
|
coderay (~> 1.1.0)
|
67
71
|
method_source (~> 0.9.0)
|
72
|
+
puma (5.2.2)
|
73
|
+
nio4r (~> 2.0)
|
74
|
+
racc (1.5.2)
|
68
75
|
rack (2.2.3)
|
69
76
|
rack-cors (1.1.0)
|
70
77
|
rack (>= 2.0.0)
|
@@ -130,14 +137,16 @@ GEM
|
|
130
137
|
|
131
138
|
PLATFORMS
|
132
139
|
ruby
|
140
|
+
x86_64-darwin-19
|
133
141
|
|
134
142
|
DEPENDENCIES
|
135
|
-
bundler (
|
143
|
+
bundler (>= 1.13)
|
136
144
|
chart_presenter_plugin!
|
137
145
|
foo_presenter_plugin!
|
138
146
|
gem-release (~> 2.0)
|
139
147
|
image_crop_presenter_plugin!
|
140
148
|
pry
|
149
|
+
puma
|
141
150
|
rack (>= 2.0.6)
|
142
151
|
rack-cors
|
143
152
|
rack-test (~> 0.8)
|
@@ -154,7 +163,7 @@ DEPENDENCIES
|
|
154
163
|
webdrivers (~> 4.1)
|
155
164
|
|
156
165
|
RUBY VERSION
|
157
|
-
ruby 2.
|
166
|
+
ruby 2.7.2p137
|
158
167
|
|
159
168
|
BUNDLED WITH
|
160
|
-
|
169
|
+
2.2.3
|
data/README.md
CHANGED
@@ -39,7 +39,7 @@ This concept was initially inspired by the Presenters concepts of Ivar Jacobson
|
|
39
39
|
|
40
40
|
## Demo
|
41
41
|
|
42
|
-
[Demo]
|
42
|
+
[Demo](https://coprl-ruby.herokuapp.com/)
|
43
43
|
|
44
44
|
Or to run locally:
|
45
45
|
|
@@ -49,6 +49,13 @@ Or to run locally:
|
|
49
49
|
bundle exec rackup
|
50
50
|
|
51
51
|
open http://localhost:9292
|
52
|
+
|
53
|
+
> Note: Demo defaults to Ruby version 2.7.3 in the .ruby-version file. If you want to run a different version
|
54
|
+
> -- set RBENV_VERSION to your desired version.
|
55
|
+
> For example:
|
56
|
+
> ```
|
57
|
+
> RBENV_VERSION=2.5.5 bundle insatall
|
58
|
+
> RBENV_VERSION=2.5.5 bundle exec rackup```
|
52
59
|
|
53
60
|
To see the POM:
|
54
61
|
|
data/app/demo/index.pom
CHANGED
@@ -5,16 +5,16 @@ Voom::Presenters.define(:index) do
|
|
5
5
|
attach :top_nav
|
6
6
|
|
7
7
|
indented_grid do
|
8
|
-
headline '
|
9
|
-
subheading '
|
8
|
+
headline 'COmmon PResenter Language (COPRL) Ruby Demo', id: :headline
|
9
|
+
subheading 'COPRL is to HTML what C is to assembly'
|
10
10
|
|
11
|
-
body ['A presenter describes a user interface using
|
12
|
-
'The presenter is evaluated and a presenter object model (POM) is generated.',
|
11
|
+
body ['A presenter describes a user interface using DSL.',
|
12
|
+
'The presenter is evaluated and a presenter object model (POM) is generated. The POM can be serialized as JSON.',
|
13
13
|
'A client that renders POM can display the given user interface.']
|
14
14
|
|
15
15
|
body 'To get started checkout the components and events.'
|
16
16
|
|
17
|
-
subheading 'For example this is the presenter
|
17
|
+
subheading 'For example this is the complete presenter DSL for this page:', level: 2
|
18
18
|
|
19
19
|
source = File.read(__FILE__)
|
20
20
|
body <<~HEREDOC
|
data/app/demo/nav/top_nav.pom
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
Voom::Presenters.define('top_nav') do
|
2
|
+
TITLE = 'COmmon PResenters Language (COPRL) Ruby Demo'
|
2
3
|
page do
|
3
|
-
title
|
4
|
+
title TITLE
|
4
5
|
end
|
5
6
|
|
6
|
-
header
|
7
|
+
header TITLE do
|
7
8
|
nav do
|
8
9
|
item 'About' do
|
9
10
|
event :click do
|
@@ -52,13 +53,6 @@ Voom::Presenters.define('top_nav') do
|
|
52
53
|
loads :plugins
|
53
54
|
end
|
54
55
|
end
|
55
|
-
|
56
|
-
item 'Status' do
|
57
|
-
event :click do
|
58
|
-
loads :component_status
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
56
|
end
|
63
57
|
end
|
64
58
|
end
|
data/lib/voom.rb
CHANGED
data/presenters.gemspec
CHANGED
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.add_development_dependency 'rack-test', '~>0.8'
|
36
36
|
spec.add_development_dependency 'rack', '>= 2.0.6'
|
37
37
|
spec.add_development_dependency 'pry', '~>0.10'
|
38
|
-
spec.add_development_dependency 'bundler', '
|
38
|
+
spec.add_development_dependency 'bundler', '>= 1.13'
|
39
39
|
spec.add_development_dependency 'rake', '~> 13.0'
|
40
40
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
41
41
|
spec.add_development_dependency 'gem-release', '~> 2.0'
|
data/views/mdc/package-lock.json
CHANGED
@@ -3721,18 +3721,32 @@
|
|
3721
3721
|
"dev": true
|
3722
3722
|
},
|
3723
3723
|
"elliptic": {
|
3724
|
-
"version": "6.5.
|
3725
|
-
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.
|
3726
|
-
"integrity": "sha512-
|
3724
|
+
"version": "6.5.4",
|
3725
|
+
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
|
3726
|
+
"integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==",
|
3727
3727
|
"dev": true,
|
3728
3728
|
"requires": {
|
3729
|
-
"bn.js": "^4.
|
3730
|
-
"brorand": "^1.0
|
3729
|
+
"bn.js": "^4.11.9",
|
3730
|
+
"brorand": "^1.1.0",
|
3731
3731
|
"hash.js": "^1.0.0",
|
3732
|
-
"hmac-drbg": "^1.0.
|
3733
|
-
"inherits": "^2.0.
|
3734
|
-
"minimalistic-assert": "^1.0.
|
3735
|
-
"minimalistic-crypto-utils": "^1.0.
|
3732
|
+
"hmac-drbg": "^1.0.1",
|
3733
|
+
"inherits": "^2.0.4",
|
3734
|
+
"minimalistic-assert": "^1.0.1",
|
3735
|
+
"minimalistic-crypto-utils": "^1.0.1"
|
3736
|
+
},
|
3737
|
+
"dependencies": {
|
3738
|
+
"bn.js": {
|
3739
|
+
"version": "4.12.0",
|
3740
|
+
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
|
3741
|
+
"integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
|
3742
|
+
"dev": true
|
3743
|
+
},
|
3744
|
+
"inherits": {
|
3745
|
+
"version": "2.0.4",
|
3746
|
+
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
3747
|
+
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
3748
|
+
"dev": true
|
3749
|
+
}
|
3736
3750
|
}
|
3737
3751
|
},
|
3738
3752
|
"emoji-regex": {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: voom-presenters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Russell Edens
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ice_nine
|
@@ -228,14 +228,14 @@ dependencies:
|
|
228
228
|
name: bundler
|
229
229
|
requirement: !ruby/object:Gem::Requirement
|
230
230
|
requirements:
|
231
|
-
- - "
|
231
|
+
- - ">="
|
232
232
|
- !ruby/object:Gem::Version
|
233
233
|
version: '1.13'
|
234
234
|
type: :development
|
235
235
|
prerelease: false
|
236
236
|
version_requirements: !ruby/object:Gem::Requirement
|
237
237
|
requirements:
|
238
|
-
- - "
|
238
|
+
- - ">="
|
239
239
|
- !ruby/object:Gem::Version
|
240
240
|
version: '1.13'
|
241
241
|
- !ruby/object:Gem::Dependency
|
@@ -298,7 +298,7 @@ description:
|
|
298
298
|
email:
|
299
299
|
- 'russell@voomify.com
|
300
300
|
|
301
|
-
'
|
301
|
+
'
|
302
302
|
executables:
|
303
303
|
- presenters
|
304
304
|
extensions: []
|
@@ -324,7 +324,6 @@ files:
|
|
324
324
|
- README.md
|
325
325
|
- ROADMAP.md
|
326
326
|
- Rakefile
|
327
|
-
- app/demo/component_status.pom
|
328
327
|
- app/demo/components.pom
|
329
328
|
- app/demo/components/avatars.pom
|
330
329
|
- app/demo/components/badges.pom
|
@@ -891,8 +890,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
891
890
|
- !ruby/object:Gem::Version
|
892
891
|
version: '0'
|
893
892
|
requirements: []
|
894
|
-
|
895
|
-
rubygems_version: 2.7.6.2
|
893
|
+
rubygems_version: 3.1.4
|
896
894
|
signing_key:
|
897
895
|
specification_version: 4
|
898
896
|
summary: Presenters Gem.
|
@@ -1,76 +0,0 @@
|
|
1
|
-
require 'yaml'
|
2
|
-
require_relative 'helpers/indented_grid'
|
3
|
-
|
4
|
-
Voom::Presenters.define(:component_status) do
|
5
|
-
helpers Voom::Presenters::Helpers::Inflector
|
6
|
-
helpers Demo::Helpers::IndentedGrid
|
7
|
-
|
8
|
-
attach 'top_nav'
|
9
|
-
attach 'component_drawer'
|
10
|
-
helpers do
|
11
|
-
def status
|
12
|
-
@status ||= YAML::load_file(File.join(__dir__, '../../component-status.yml'))
|
13
|
-
end
|
14
|
-
|
15
|
-
def item_color(item)
|
16
|
-
trace {item.inspect}
|
17
|
-
case item
|
18
|
-
when ->(i) {['low', 'not planned'].include?(i['Priority'])}
|
19
|
-
:lightgray
|
20
|
-
when ->(i) {(i.fetch('Completeness')||0) > 1}
|
21
|
-
:DarkSeaGreen
|
22
|
-
when ->(i) {(i.fetch('Completeness')||0)==1}
|
23
|
-
:LightYellow
|
24
|
-
when ->(i) {['medium', 'high'].include?(i['Priority']) && i['MDC']=='N' && i['MDL']=='N'}
|
25
|
-
:lightcoral
|
26
|
-
when ->(i) {i['Priority']=='medium'}
|
27
|
-
:coral
|
28
|
-
when ->(i) {i['Priority']=='now'}
|
29
|
-
:CornflowerBlue
|
30
|
-
else
|
31
|
-
nil
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
def key
|
36
|
-
items = [{'Completeness' => 2, text: 'Available'},
|
37
|
-
{'Priority' => 'high', 'Completeness'=>1, 'MDC' => nil, 'MDL' => nil, text: 'Available with caveats'},
|
38
|
-
{'Priority' => 'now', 'Completeness'=>0, 'MDC' => nil, 'MDL' => nil, text: 'In progress'},
|
39
|
-
{'Priority' => 'medium', 'Completeness'=>0, 'MDC' => nil, 'MDL' => nil, text: 'Up Next'},
|
40
|
-
{'Priority' => 'medium', 'Completeness'=>0, 'MDC' => 'N', 'MDL' => 'N', text: 'Implementation needed'},
|
41
|
-
{'Priority' => 'low', 'Completeness'=>0, 'MDC' => 'N', 'MDL' => 'N', text: 'Not Planned'},
|
42
|
-
|
43
|
-
]
|
44
|
-
table do
|
45
|
-
header do
|
46
|
-
items.each do |item|
|
47
|
-
column color: item_color(item)
|
48
|
-
column item[:text]
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
indented_grid do
|
56
|
-
display 'Component Status'
|
57
|
-
key
|
58
|
-
table do
|
59
|
-
header do
|
60
|
-
status.first.keys.each do |heading|
|
61
|
-
column inflector.humanize(heading)
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
status.each do |item|
|
66
|
-
row do
|
67
|
-
status.first.keys.each_with_index do |heading, index|
|
68
|
-
value = item[heading]
|
69
|
-
color = index ==0 ? item_color(item) : nil
|
70
|
-
column value, color: color
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|