octopress-debugger 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 85422aaa18a4d38133c0e88323d614734e7e9d8a
4
+ data.tar.gz: 243162514fc526c1dacd340f2698e122b88aff7e
5
+ SHA512:
6
+ metadata.gz: ae44ee6b8122c590b4b975c7df5b9c68cd2a368c2001bc65e046ecca7faaeaf7193f75a95de64cbd2c478046d5639dd413047181133736bab83af07e74545929
7
+ data.tar.gz: f48b2e0296058fe7d7b596a4de43383595229e97a2bbd1e7937f35c166cc6e979c7493f22c1c802f0bcde77aabf18c3c6fcd856420778c524fa5395169e50625
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Brandon Mathis
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # Octopress Debugger
2
+
3
+ A simple liquid tag for debugging Jekyll sites with a fancy debugger console.
4
+
5
+ [![Gem Version](http://img.shields.io/gem/v/octopress-debugger.svg)](https://rubygems.org/gems/octopress-debugger)
6
+ [![License](http://img.shields.io/:license-mit-blue.svg)](http://octopress.mit-license.org)
7
+
8
+ ## Installation
9
+
10
+ If you're using bundler add this gem to your site's Gemfile in the `:jekyll_plugins` group:
11
+
12
+ group :jekyll_plugins do
13
+ gem 'octopress-debugger'
14
+ end
15
+
16
+ Then install the gem with Bundler
17
+
18
+ $ bundle
19
+
20
+ To install manually without bundler:
21
+
22
+ $ gem install octopress-debugger
23
+
24
+ Then add the gem to your Jekyll configuration.
25
+
26
+ gems:
27
+ -octopress-debugger
28
+
29
+ ## Usage
30
+
31
+ Add the `{% debug %}` tag to any page to get access to the `site` and `page` instance from the debugger console.
32
+
33
+ ## Contributing
34
+
35
+ 1. Fork it ( https://github.com/octopress/debugger/fork )
36
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
37
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
38
+ 4. Push to the branch (`git push origin my-new-feature`)
39
+ 5. Create a new Pull Request
@@ -0,0 +1,40 @@
1
+ require "octopress-debugger/version"
2
+ require "jekyll"
3
+
4
+ if RUBY_VERSION >= "2"
5
+ require 'pry-byebug'
6
+ else
7
+ require 'pry-debugger'
8
+ end
9
+
10
+ module Octopress
11
+ module Debugger
12
+ class Tag < Liquid::Tag
13
+ def render(context)
14
+ site = context.registers[:site]
15
+ page_hash = context.registers[:page]
16
+ page = site.pages.find{|p| p.url == page_hash['url'] }
17
+
18
+ binding.pry
19
+ # site: site instance
20
+ # page_hash: page instance in hash form
21
+ # page: page instance
22
+
23
+ return ''
24
+ end
25
+ end
26
+ end
27
+ end
28
+
29
+ Liquid::Template.register_tag('debug', Octopress::Debugger::Tag)
30
+
31
+ if defined? Octopress::Docs
32
+ Octopress::Docs.add({
33
+ name: "Octopress Debugger",
34
+ gem: "octopress-debugger",
35
+ version: Octopress::Debugger::VERSION,
36
+ description: "Debug Jekyll sites with a fancy console.",
37
+ path: File.expand_path(File.join(File.dirname(__FILE__), "../")),
38
+ source_url: "https://github.com/octopress/debugger"
39
+ })
40
+ end
@@ -0,0 +1,5 @@
1
+ module Octopress
2
+ module Debugger
3
+ VERSION = "1.0.0"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,104 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: octopress-debugger
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Brandon Mathis
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-01-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: jekyll
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: pry-byebug
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
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: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.7'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.7'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.0'
69
+ description:
70
+ email:
71
+ - brandon@imathis.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - LICENSE.txt
77
+ - README.md
78
+ - lib/octopress-debugger.rb
79
+ - lib/octopress-debugger/version.rb
80
+ homepage: https://github.com/octopress/debugger
81
+ licenses:
82
+ - MIT
83
+ metadata: {}
84
+ post_install_message:
85
+ rdoc_options: []
86
+ require_paths:
87
+ - lib
88
+ required_ruby_version: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
93
+ required_rubygems_version: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ requirements: []
99
+ rubyforge_project:
100
+ rubygems_version: 2.2.2
101
+ signing_key:
102
+ specification_version: 4
103
+ summary: A debugger for Jekyll templates
104
+ test_files: []