middleman-breadcrumbs 0.0.3 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 72ea8c2165ff420bbc4783888895bc4111c7c088
4
- data.tar.gz: a6fb2b6bb868589974144835957f6f912832ac51
3
+ metadata.gz: 83dcb89e82965bc056aa9bd462c0e053986d8aec
4
+ data.tar.gz: c627539d0dda42aef51f00b6d4857fb73f4715db
5
5
  SHA512:
6
- metadata.gz: 8acc1fc4079d27d82a57b40a47f9db77ad1d37de926ab5c2fc44ce0a933f3e643d21bec35c4aee33ccb374c4461b780be4849546276b309f428b4a6dc3874775
7
- data.tar.gz: 5d67302b8dd2d037c6524f9468d17efccd1de2f9aae9800c3f31126f754593c182caa913013b2103e417ec287fe901df771ad55b67e890b57b1d921cdc949353
6
+ metadata.gz: b0bbe26a46ff1167a3f20910d69637b8ba749472c2a3cd4246436e853c30c4e0bf81d0eb082db7106fa4d267058c1ae3ff9fb82636c3968c86496495c5b01a3b
7
+ data.tar.gz: ad04c8ad5cbba50a74f30fafa12ab527b38a6a4fc3637cc85685bdd7213a56d79a29588e26564702112abfaff0a9ca7a4557a47c593916522200413764d9fb01
data/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # middleman-breadcrumbs changelog
2
+
3
+ ## 0.1.0
4
+
5
+ 26 Feb 2015
6
+
7
+ * Fix an issue where this gem would break `wrap_layout`. [#1]
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- ruby '2.0.0'
2
1
  source 'https://rubygems.org'
3
2
 
4
- gemspec
3
+ # Specify your gem's dependencies in middleman-breadcrumbs.gemspec
4
+ gemspec
data/Guardfile CHANGED
@@ -9,7 +9,7 @@ guard :minitest do
9
9
 
10
10
  # with Minitest::Spec
11
11
  watch(%r{^spec/(.*)_spec\.rb$})
12
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
12
+ watch(%r{^lib/middleman-breadcrumbs/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
13
13
  watch(%r{^spec/spec_helper\.rb$}) { 'spec' }
14
14
 
15
15
  # Rails 4
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Marnen Laibow-Koser
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "middleman/breadcrumbs"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -1,7 +1,10 @@
1
+ require 'rack/utils'
1
2
  require 'padrino-helpers'
2
3
 
3
4
  module BreadcrumbsHelper
4
- include Padrino::Helpers
5
+ def self.included(klass)
6
+ klass.send(:include, Padrino::Helpers) unless klass.instance_methods.include? :link_to
7
+ end
5
8
 
6
9
  def breadcrumbs(page)
7
10
  hierarchy = [page]
@@ -1,2 +1,2 @@
1
1
  require File.join(File.dirname(__FILE__), 'breadcrumbs')
2
- Breadcrumbs::VERSION = '0.0.3'
2
+ Breadcrumbs::VERSION = '0.1.0'
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13
13
  s.license = 'MIT'
14
14
 
15
15
  s.add_runtime_dependency "middleman", '>= 3.3.5'
16
- ['guard-minitest', 'ffaker'].each {|gem| s.add_development_dependency gem }
16
+ ['byebug', ['guard', '~> 2.10.5'], 'guard-minitest', 'ffaker', 'rake'].each {|gem| s.add_development_dependency *gem }
17
17
 
18
18
  s.files = `git ls-files`.split("\n")
19
19
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -5,11 +5,31 @@ require 'middleman-breadcrumbs/breadcrumbs_helper'
5
5
  describe BreadcrumbsHelper do
6
6
  before do
7
7
  @helper = Object.new
8
- @helper.singleton_class.send :include, BreadcrumbsHelper
8
+ @helper_class = @helper.singleton_class
9
+ end
10
+
11
+ describe '.included' do
12
+ describe 'link_to is defined' do
13
+ it 'does not include Padrino::Helpers' do
14
+ methods = @helper_class.instance_methods
15
+ @helper_class.stub :instance_methods, methods + [:link_to] do
16
+ @helper_class.send :include, BreadcrumbsHelper
17
+ @helper_class.wont_include Padrino::Helpers
18
+ end
19
+ end
20
+ end
21
+
22
+ describe 'link_to is not defined' do
23
+ it 'includes Padrino::Helpers' do
24
+ @helper_class.send :include, BreadcrumbsHelper
25
+ @helper_class.must_include Padrino::Helpers
26
+ end
27
+ end
9
28
  end
10
29
 
11
30
  describe '#breadcrumbs' do
12
31
  before do
32
+ @helper.singleton_class.send :include, BreadcrumbsHelper
13
33
  self.singleton_class.send :include, Padrino::Helpers
14
34
  @page = page
15
35
  end
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  require 'minitest/autorun'
2
+ require 'byebug'
2
3
  require 'middleman'
3
4
  require 'ffaker'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-breadcrumbs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marnen Laibow-Koser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-10 00:00:00.000000000 Z
11
+ date: 2015-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman
@@ -24,6 +24,34 @@ dependencies:
24
24
  - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 3.3.5
27
+ - !ruby/object:Gem::Dependency
28
+ name: byebug
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: guard
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 2.10.5
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 2.10.5
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: guard-minitest
29
57
  requirement: !ruby/object:Gem::Requirement
@@ -52,18 +80,39 @@ dependencies:
52
80
  - - '>='
53
81
  - !ruby/object:Gem::Version
54
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rake
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
55
97
  description: Breadcrumbs helper for Middleman
56
98
  email:
57
99
  - marnen@marnen.org
58
- executables: []
100
+ executables:
101
+ - console
102
+ - setup
59
103
  extensions: []
60
104
  extra_rdoc_files: []
61
105
  files:
62
106
  - .gitignore
107
+ - CHANGELOG.md
63
108
  - Gemfile
64
109
  - Guardfile
65
110
  - LICENSE
111
+ - LICENSE.txt
66
112
  - README.md
113
+ - Rakefile
114
+ - bin/console
115
+ - bin/setup
67
116
  - lib/middleman-breadcrumbs.rb
68
117
  - lib/middleman-breadcrumbs/breadcrumbs.rb
69
118
  - lib/middleman-breadcrumbs/breadcrumbs_helper.rb
@@ -91,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
140
  version: '0'
92
141
  requirements: []
93
142
  rubyforge_project:
94
- rubygems_version: 2.1.11
143
+ rubygems_version: 2.0.14
95
144
  signing_key:
96
145
  specification_version: 4
97
146
  summary: Breadcrumbs helper for Middleman