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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d552d193d5f180f06a48f7e49e4ce16deb72e467
4
- data.tar.gz: 50615410d5a80e524dad1f174f0b1a55b0b7df29
3
+ metadata.gz: fe6f06e5afcebd8e68d944d67b78304472af8b67
4
+ data.tar.gz: 332c3de284937f11eada22d8ff30eede9642ea0f
5
5
  SHA512:
6
- metadata.gz: 86258d1c47c86f6def9738621cfcb8cc3a68e6ce3923783496a228d0786f75565d807d1285e61706327dc2db92d340fe80b898230b25c0c4b8bde2bf3e3c2cf8
7
- data.tar.gz: 063392125c3309b40cdbe86df182eb0bc7f540e6c95eb878d5d7fbbf8e1edcc0bae7dce3b2c3c5eb8777e8869f805dd8daca0da6ff004974d358e7b9a9fc477d
6
+ metadata.gz: feeda2b05a136d69426154080b572d76ec5e005b92fcbabfc62bf9fb342268c01e23b2b96da26a12999824627cf1e171c099d75c05ea1c2a582d9e942b48bc7b
7
+ data.tar.gz: 868a4e42c27f7cba8ee6620aa4de094084148beb16460a2214e71aac5483955fe595be498b25a428e36d4dc66c3d28550e2c3cbc914a21a752dfc9bf0503a86d
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in middleman-google-analytics.gemspec
3
+ # Specify your gem's dependencies in middleman-disqus.gemspec
4
4
  gemspec
5
5
 
6
6
  group :development do
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Disqus
3
- VERSION = '1.0.0'
3
+ VERSION = '1.1.0'
4
4
  end
5
5
  end
@@ -19,5 +19,5 @@ EOL
19
19
  s.test_files = `git ls-files -- {features,fixtures}/*`.split("\n")
20
20
  s.require_paths = ["lib"]
21
21
 
22
- s.add_runtime_dependency("middleman-core", ["~> 3.1"])
22
+ s.add_runtime_dependency("middleman-core", ["~> 3.3"])
23
23
  end
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.0.0
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: 2014-09-06 00:00:00.000000000 Z
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.1'
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.1'
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.2.0
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