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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2db13e9c6eec57ea11f32c6d9fd5de2674d3991a
4
- data.tar.gz: 546e2c4294ff2e2e2d9722b11984b51b13d6d799
3
+ metadata.gz: 93dbb97673a2c7e10c4bba840f67b450c4ee628b
4
+ data.tar.gz: 92f4f46effa8d0c83ae77bd59c8df7d1e602d002
5
5
  SHA512:
6
- metadata.gz: b28c7c12c2e3a3635b28255094ba2abe13ad4b35d7806d043e7f9717e48c04751b0354f019f944e2b01e1dd0c55e1d8a81f3b22c93f99036b86d9ea470e950a5
7
- data.tar.gz: e23e4a7a45ad3ebf981332494583f2ff23dd7493c9dbf25e7165c67c92152024909e00b6ced6780ca0de2da6f4fd0ddd21be6bc41dbdeb8290a7cb9c5e7e7c13
6
+ metadata.gz: fa02f120d51659829fddc845fc35bbba7ffc9e35213be02af22821e11e92b89b894d8ef14d75d5a2e2b7f58ad8622172353e88ce617e4a50df1a197f333e4792
7
+ data.tar.gz: 4b716a9f65de171269efaf6b69c328e525f0d039aca355ca90eacdb22084ae06947648c3c49d379d5a96afb95bd0cbceaf9e2cd822d82bd5792a41a1219da10d
@@ -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
@@ -1,4 +1,4 @@
1
- 3.0.0 ()
1
+ 3.0.0 (September 27, 2017)
2
2
  * Complete rewrite of the blocks gem
3
3
  * Extensive test coverage added
4
4
  * Jenkins CI integration
data/Gemfile CHANGED
@@ -20,7 +20,6 @@ gem "codeclimate-test-reporter", "~> 1.0.8"
20
20
 
21
21
  group :development, :test do
22
22
  gem "jekyll"
23
- gem "jgd"
24
23
  gem "jekyll-feed", "~> 0.6"
25
24
  gem "jekyll-coffeescript"
26
25
  end
@@ -1,2 +1,50 @@
1
- #!/usr/bin/env bash
2
- jgd -r master
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
@@ -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, &block)
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
- class_eval <<-RUBY, __FILE__, __LINE__ + 1
35
- def #{name}
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
@@ -1,6 +1,6 @@
1
1
  module Blocks
2
2
  class WrapperRenderer < AbstractRenderer
3
- def render(wrapper, runtime_context, &block)
3
+ def render(wrapper, runtime_context)
4
4
  content_block = Proc.new { with_output_buffer { yield } }
5
5
  if wrapper.nil?
6
6
  yield
@@ -1,3 +1,3 @@
1
1
  module Blocks
2
- VERSION = "3.0.0"
2
+ VERSION = "3.0.1"
3
3
  end
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.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-09-27 00:00:00.000000000 Z
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