blocks 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +8 -1
- data/CHANGELOG.rdoc +1 -1
- data/Gemfile +0 -1
- data/bin/deploy_docs +50 -2
- data/docs/_layouts/slate.html +10 -0
- data/lib/blocks/renderers/nesting_blocks_renderer.rb +2 -1
- data/lib/blocks/renderers/renderer.rb +4 -7
- data/lib/blocks/renderers/wrapper_renderer.rb +1 -1
- data/lib/blocks/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: 93dbb97673a2c7e10c4bba840f67b450c4ee628b
|
4
|
+
data.tar.gz: 92f4f46effa8d0c83ae77bd59c8df7d1e602d002
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa02f120d51659829fddc845fc35bbba7ffc9e35213be02af22821e11e92b89b894d8ef14d75d5a2e2b7f58ad8622172353e88ce617e4a50df1a197f333e4792
|
7
|
+
data.tar.gz: 4b716a9f65de171269efaf6b69c328e525f0d039aca355ca90eacdb22084ae06947648c3c49d379d5a96afb95bd0cbceaf9e2cd822d82bd5792a41a1219da10d
|
data/.travis.yml
CHANGED
@@ -46,9 +46,16 @@ matrix:
|
|
46
46
|
gemfile: Gemfile
|
47
47
|
script: 'bundle exec rake'
|
48
48
|
|
49
|
+
jobs:
|
50
|
+
include:
|
51
|
+
- stage: documentation
|
52
|
+
script: './bin/deploy_docs'
|
53
|
+
rvm: 2.4.1
|
54
|
+
gemfile: Gemfile
|
55
|
+
|
49
56
|
notifications:
|
50
57
|
email:
|
51
58
|
recipients:
|
52
59
|
- hunterae@gmail.com
|
53
60
|
on_failure: change
|
54
|
-
on_success: never
|
61
|
+
on_success: never
|
data/CHANGELOG.rdoc
CHANGED
data/Gemfile
CHANGED
data/bin/deploy_docs
CHANGED
@@ -1,2 +1,50 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
set -e
|
2
|
+
|
3
|
+
DEPLOY_REPO="https://${GITHUB_TOKEN}@github.com/hunterae/blocks.git"
|
4
|
+
|
5
|
+
function main {
|
6
|
+
clean
|
7
|
+
get_current_site
|
8
|
+
build_site
|
9
|
+
deploy
|
10
|
+
}
|
11
|
+
|
12
|
+
function clean {
|
13
|
+
echo "cleaning _site folder"
|
14
|
+
if [ -d "_site" ]; then rm -Rf _site; fi
|
15
|
+
}
|
16
|
+
|
17
|
+
function get_current_site {
|
18
|
+
echo "getting latest site"
|
19
|
+
git clone --depth 1 $DEPLOY_REPO _site
|
20
|
+
}
|
21
|
+
|
22
|
+
function build_site {
|
23
|
+
echo "building site"
|
24
|
+
bundle exec jekyll build
|
25
|
+
}
|
26
|
+
|
27
|
+
function deploy {
|
28
|
+
echo "deploying changes"
|
29
|
+
|
30
|
+
if [ -z "$TRAVIS_PULL_REQUEST" ]; then
|
31
|
+
echo "except don't publish site for pull requests"
|
32
|
+
exit 0
|
33
|
+
fi
|
34
|
+
|
35
|
+
if [ "$TRAVIS_BRANCH" != "master" ]; then
|
36
|
+
echo "except we should only publish the master branch. stopping here"
|
37
|
+
exit 0
|
38
|
+
fi
|
39
|
+
|
40
|
+
cd _site
|
41
|
+
git config --global user.name "Travis CI"
|
42
|
+
git config --global user.email 'Deployment Bot'
|
43
|
+
git add -A
|
44
|
+
git status
|
45
|
+
git commit -m "Lastest site built on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to github"
|
46
|
+
git push --force $DEPLOY_REPO master:gh-pages
|
47
|
+
}
|
48
|
+
|
49
|
+
|
50
|
+
main
|
data/docs/_layouts/slate.html
CHANGED
@@ -23,6 +23,16 @@ under the License.
|
|
23
23
|
{% assign images_url = '/' | prepend: site.images_dir | prepend: '/' | prepend: site_url %}
|
24
24
|
<html>
|
25
25
|
<head>
|
26
|
+
<!-- Global Site Tag (gtag.js) - Google Analytics -->
|
27
|
+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-104699666-1"></script>
|
28
|
+
<script>
|
29
|
+
window.dataLayer = window.dataLayer || [];
|
30
|
+
function gtag(){dataLayer.push(arguments)};
|
31
|
+
gtag('js', new Date());
|
32
|
+
|
33
|
+
gtag('config', 'UA-104699666-1');
|
34
|
+
</script>
|
35
|
+
|
26
36
|
<meta charset="utf-8">
|
27
37
|
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
28
38
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Blocks
|
2
2
|
class NestingBlocksRenderer < AbstractRenderer
|
3
|
-
def render(hook, runtime_context
|
3
|
+
def render(hook, runtime_context)
|
4
4
|
block = block_for(runtime_context.block_name)
|
5
5
|
hooks = block.try(:hooks_for, hook)
|
6
6
|
if hooks.present?
|
@@ -19,6 +19,7 @@ module Blocks
|
|
19
19
|
else
|
20
20
|
yield
|
21
21
|
end
|
22
|
+
|
22
23
|
end
|
23
24
|
end
|
24
25
|
end
|
@@ -29,13 +29,10 @@ module Blocks
|
|
29
29
|
end
|
30
30
|
|
31
31
|
AbstractRenderer::RENDERERS.each do |klass|
|
32
|
-
name = klass.to_s.demodulize.underscore
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
@#{name} ||= #{klass}.new(self)
|
37
|
-
end
|
38
|
-
RUBY
|
32
|
+
name = klass.to_s.demodulize.underscore.to_sym
|
33
|
+
define_method name do
|
34
|
+
klass.new(self)
|
35
|
+
end
|
39
36
|
end
|
40
37
|
end
|
41
38
|
end
|
data/lib/blocks/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blocks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Hunter
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: call_with_params
|