visualci-gallery 0.1.0 → 0.2.0
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 +9 -2
- data/app/assets/javascripts/visualci_gallery.js +1157 -390
- data/lib/visualci/gallery/renderer.rb +26 -3
- data/lib/visualci/gallery/version.rb +1 -1
- data/lib/visualci/gallery.rb +53 -4
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5ad79ebeb86c60e0c610e9de800ec3849b467f4e0dbce1c07bebc051a8ccf553
|
|
4
|
+
data.tar.gz: 5631cedbe6228ecd12cf3196cac8355fe94d02a1bb408dbbef7fb917c34c08f8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4d691856415f8e01573e767b2161fa182c7413b51f9d4adc0477333ab2a6b4b64e1886eedfa829670cb7ff68726f1414d5345cd603dc47f293f0ce4f51bfff0d
|
|
7
|
+
data.tar.gz: d27e731383cc596879f0b040006b376020a34d02e2f272eca8be6c6c582c58521b78b4c21fa8cc2b3f6063869910300d4da57c4c18ce82b012d67c23157296c3
|
data/README.md
CHANGED
|
@@ -4,6 +4,9 @@ A screenshots page from a VisualCI [public gallery](https://visualci.com/docs/ga
|
|
|
4
4
|
the [gallery contract](../contract/SPEC.md)'s markup: byte for byte what the `visualci-gallery` JS library renders, so
|
|
5
5
|
the library's script hydrates it (tabs, light and dark, desktop and phone, the full-size view).
|
|
6
6
|
|
|
7
|
+
[The guide](https://visualci.com/docs/gallery/ruby/) covers Rails, Rack, theming and deploys. Its examples are apps in
|
|
8
|
+
[examples/](examples/), and their tests boot them.
|
|
9
|
+
|
|
7
10
|
```ruby
|
|
8
11
|
require 'visualci/gallery'
|
|
9
12
|
|
|
@@ -40,9 +43,13 @@ stylesheet, styled through the `--vg-*` CSS variables.
|
|
|
40
43
|
|
|
41
44
|
Keyword arguments, the contract's options in Ruby spelling: `title` (default "Screenshots"; `nil` for no heading),
|
|
42
45
|
`heading_level`, `id`, `screens`, `order`, `groups` (`{ 'Mac approver' => { size: 'desktop', fit: 'contain' } }` for an app's windows), `group_order`, `credit`, `layout` (`'grid'` or `'strip'`),
|
|
43
|
-
`theme_switch`, `see_all
|
|
46
|
+
`theme_switch`, `see_all`, `preload` (`false` turns predictive preloading off; `{ count: 100, bytes: 20_000_000 }`
|
|
47
|
+
sets its caps, any of `fold`, `count`, `bytes` and `parallel`, the rest keeping their defaults). Hash keys may be
|
|
48
|
+
strings or symbols.
|
|
44
49
|
|
|
45
50
|
## Development
|
|
46
51
|
|
|
47
|
-
`ruby -Ilib test/gallery_test.rb` checks the contract's golden fixtures.
|
|
52
|
+
`ruby -Ilib test/gallery_test.rb` checks the contract's golden fixtures. The example apps have their own Gemfiles:
|
|
53
|
+
`bundle install && bundle exec ruby test/app_test.rb` in `examples/rails` (and with `BUNDLE_GEMFILE=Gemfile.sprockets`)
|
|
54
|
+
and in `examples/rack`, after `bin/assets`. `bin/assets` copies the JS library's build
|
|
48
55
|
into `app/assets` before `gem build`.
|