middleman-disqus 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/features/disqus.feature +28 -0
- data/lib/middleman-disqus/extension.rb +2 -2
- data/lib/middleman-disqus/version.rb +1 -1
- data/middleman-disqus.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe6f06e5afcebd8e68d944d67b78304472af8b67
|
4
|
+
data.tar.gz: 332c3de284937f11eada22d8ff30eede9642ea0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: feeda2b05a136d69426154080b572d76ec5e005b92fcbabfc62bf9fb342268c01e23b2b96da26a12999824627cf1e171c099d75c05ea1c2a582d9e942b48bc7b
|
7
|
+
data.tar.gz: 868a4e42c27f7cba8ee6620aa4de094084148beb16460a2214e71aac5483955fe595be498b25a428e36d4dc66c3d28550e2c3cbc914a21a752dfc9bf0503a86d
|
data/Gemfile
CHANGED
data/features/disqus.feature
CHANGED
@@ -68,3 +68,31 @@ Feature: Disqus Integration
|
|
68
68
|
And the file "options.html" should not contain "var disqus_url"
|
69
69
|
And the file "options.html" should contain "var disqus_category_id = 4;"
|
70
70
|
And the file "options.html" should contain "var disqus_disable_mobile = false;"
|
71
|
+
|
72
|
+
Scenario: Per call Disqus variables
|
73
|
+
Given a fixture app "disqus-app"
|
74
|
+
And a file named "source/per-call-options.html.erb" with:
|
75
|
+
"""
|
76
|
+
<%= disqus disqus_url: "http://example.com/2012/the-best-day-of-my-life.html" %>
|
77
|
+
"""
|
78
|
+
And a successfully built app at "disqus-app"
|
79
|
+
When I cd to "build"
|
80
|
+
Then the following files should exist:
|
81
|
+
| per-call-options.html |
|
82
|
+
And the file "per-call-options.html" should contain "var disqus_url = 'http://example.com/2012/the-best-day-of-my-life.html';"
|
83
|
+
|
84
|
+
Scenario: Per call Disqus variables overriding page variables
|
85
|
+
Given a fixture app "disqus-app"
|
86
|
+
And a file named "source/per-call-options.html.erb" with:
|
87
|
+
"""
|
88
|
+
---
|
89
|
+
disqus_identifier: /2012/the-best-day-of-my-life.html
|
90
|
+
disqus_url: http://example.com/2012/better-day-of-my-life.html
|
91
|
+
---
|
92
|
+
<%= disqus disqus_url: "http://example.com/2012/the-best-day-of-my-life.html" %>
|
93
|
+
"""
|
94
|
+
And a successfully built app at "disqus-app"
|
95
|
+
When I cd to "build"
|
96
|
+
Then the following files should exist:
|
97
|
+
| per-call-options.html |
|
98
|
+
And the file "per-call-options.html" should contain "var disqus_url = 'http://example.com/2012/the-best-day-of-my-life.html';"
|
@@ -19,8 +19,8 @@ module Middleman
|
|
19
19
|
end
|
20
20
|
|
21
21
|
helpers do
|
22
|
-
def disqus
|
23
|
-
page_options = current_resource.metadata[:page]
|
22
|
+
def disqus(call_options = {})
|
23
|
+
page_options = current_resource.metadata[:page].merge(call_options)
|
24
24
|
@options = Middleman::DisqusExtension.options(page_options)
|
25
25
|
return '' unless @options[:shortname]
|
26
26
|
|
data/middleman-disqus.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-disqus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Rice
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-06-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: middleman-core
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '3.
|
20
|
+
version: '3.3'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '3.
|
27
|
+
version: '3.3'
|
28
28
|
description: |
|
29
29
|
A Middleman extension to integrate Disqus into your site,
|
30
30
|
supporting Disqus configuration variables and comment counts.
|
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
version: '0'
|
73
73
|
requirements: []
|
74
74
|
rubyforge_project:
|
75
|
-
rubygems_version: 2.
|
75
|
+
rubygems_version: 2.4.5
|
76
76
|
signing_key:
|
77
77
|
specification_version: 4
|
78
78
|
summary: Quickly integrate Disqus comments into your Middleman site
|