jekyll-debug 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +4 -0
- data/.travis.yml +6 -0
- data/Gemfile +3 -0
- data/LICENSE +34 -0
- data/README.md +57 -0
- data/jekyll-debug.gemspec +24 -0
- data/lib/jekyll-debug.rb +22 -0
- metadata +13 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e80592f59a6b3017a5fca0bdc2b8e5f29caca6f
|
4
|
+
data.tar.gz: 86b95225f4384ed7cee1e97545debb5115a15fcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3de0f2af86c66bcb7f2925c92992c16a91855f8d93e6039822bce31b5fdcbbe2e0e66d0afb0e75ef164074a2ed3b8b14f5eadb8b314b88fecb373561ede54eb8
|
7
|
+
data.tar.gz: d53c1242ea0f575ca4a945688617556a43787de64cf3d2cf84f2e434ff45cfe62382d506dbdda04935757694bbcf9696230975ec4c72bfd8a0676aa06d07589e
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
This project includes a mix of the following:
|
2
|
+
|
3
|
+
* Open source works that are not in the public domain
|
4
|
+
* Open source work by the U.S. government that is in the public domain
|
5
|
+
|
6
|
+
## Parts of this project that are not in the public domain
|
7
|
+
|
8
|
+
This site is based on the Draft U.S. Web Design Standards (WDS), which also includes works under the SIL Open Font License, MIT license, and public domain. Files from the WDS are in `_sass/_libs/wds/`, and the full license details for those assets are described in the [WDS license file](https://github.com/18F/web-design-standards/blob/staging/LICENSE.md).
|
9
|
+
|
10
|
+
This site also includes a number of images that have various copyright statuses, including Creative Commons licenses and public domain. These images are in the `assets` directory, and license details are available on the posts and pages that display the images.
|
11
|
+
|
12
|
+
## The rest of this project is in the worldwide public domain
|
13
|
+
|
14
|
+
As a work of the United States government, this project is in the public domain within the United States.
|
15
|
+
|
16
|
+
Additionally, we waive copyright and related rights in the work worldwide through the [CC0 1.0 Universal public domain dedication](https://creativecommons.org/publicdomain/zero/1.0/).
|
17
|
+
|
18
|
+
### CC0 1.0 Universal Summary
|
19
|
+
|
20
|
+
This is a human-readable summary of the
|
21
|
+
[Legal Code (read the full text)](https://creativecommons.org/publicdomain/zero/1.0/legalcode).
|
22
|
+
|
23
|
+
#### No copyright
|
24
|
+
|
25
|
+
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
|
26
|
+
|
27
|
+
You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
|
28
|
+
|
29
|
+
#### Other information
|
30
|
+
|
31
|
+
In no way are the patent or trademark rights of any person affected by CC0, nor are the rights that other persons may have in the work or in how the work is used, such as publicity or privacy rights.
|
32
|
+
|
33
|
+
Unless expressly stated otherwise, the person who associated a work with this deed makes no warranties about the work, and disclaims liability for all uses of the work, to the fullest extent permitted by applicable law. When using or citing the work, you should not imply endorsement by the author or the affirmer.
|
34
|
+
|
data/README.md
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
# Jekyll debug
|
2
|
+
|
3
|
+
*A Jekyll filter that enables runtime debugging.*
|
4
|
+
|
5
|
+
[![Gem Version](https://img.shields.io/gem/v/jekyll-debug.svg)](https://rubygems.org/gems/jekyll-debug)
|
6
|
+
[![Build Status](https://img.shields.io/travis/gemfarmer/jekyll-debug/master.svg)](https://travis-ci.org/gemfarmer/jekyll-debug)
|
7
|
+
[![Dependency Status](https://img.shields.io/gemnasium/gemfarmer/jekyll-debug.svg)](https://gemnasium.com/gemfarmer/jekyll-debug)
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
1. Add `gem 'jekyll-debug'` to your site's Gemfile and run `bundle`
|
12
|
+
2. Add the following to your site's `_config.yml`:
|
13
|
+
|
14
|
+
```yml
|
15
|
+
gems:
|
16
|
+
- jekyll-debug
|
17
|
+
```
|
18
|
+
|
19
|
+
To use in your project, add liquid tags to front matter and use the `debug` filter to catch variables at run time. `jekyll-debug` extends the [`pry`](https://github.com/pry/pry) debugger, so when the debugging console shows appears, all `pry` commands are valid commands.
|
20
|
+
|
21
|
+
**example.md**
|
22
|
+
|
23
|
+
```
|
24
|
+
---
|
25
|
+
title: My first page
|
26
|
+
---
|
27
|
+
|
28
|
+
# Welcome to {{ test | debug }}!
|
29
|
+
|
30
|
+
>> ---------------------
|
31
|
+
My first page is a String
|
32
|
+
---------------------
|
33
|
+
|
34
|
+
From: /Users/brianhedberg/Projects/jekyll-debug/lib/jekyll-liquify.rb @ line 12 LiquidFilter#debug:
|
35
|
+
5: def debug(*args)
|
36
|
+
6: if args.any?
|
37
|
+
7: args.map do |arg|
|
38
|
+
8: type = arg.class
|
39
|
+
9: puts '---------------------'
|
40
|
+
10: puts "#{arg} is a #{type}"
|
41
|
+
11: puts '---------------------'
|
42
|
+
=> 12: binding.pry
|
43
|
+
13: end
|
44
|
+
14: else
|
45
|
+
15: args
|
46
|
+
16: end
|
47
|
+
17: end
|
48
|
+
|
49
|
+
[1] pry(#<#<Class:0x007f8a1ccbe7a8>>)>
|
50
|
+
```
|
51
|
+
|
52
|
+
## Contributing
|
53
|
+
|
54
|
+
1. Fork the project
|
55
|
+
2. Create a descriptively named feature branch
|
56
|
+
3. Add your feature
|
57
|
+
4. Submit a pull request
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = "jekyll-debug"
|
5
|
+
spec.summary = "A Jekyll filter that enables runtime debugging."
|
6
|
+
spec.version = "0.0.2"
|
7
|
+
spec.authors = ["Brian Hedberg"]
|
8
|
+
spec.email = "briansheahedberg@gmail.com"
|
9
|
+
spec.homepage = "https://github.com/gemfarmer/jekyll-debug"
|
10
|
+
spec.licenses = ["Nonstandard"]
|
11
|
+
|
12
|
+
spec.files = `git ls-files -z`.split("\x0")
|
13
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
14
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
15
|
+
spec.require_paths = ["lib"]
|
16
|
+
|
17
|
+
|
18
|
+
spec.add_runtime_dependency "liquid", [">= 2.5", "< 5.0"]
|
19
|
+
spec.add_runtime_dependency "pry", '~> 0.10'
|
20
|
+
spec.add_runtime_dependency "rb-readline", '~> 0.5'
|
21
|
+
|
22
|
+
spec.add_development_dependency "jekyll", [">= 2.0", "< 4.0"]
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
24
|
+
end
|
data/lib/jekyll-debug.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'pry'
|
2
|
+
require 'rb-readline'
|
3
|
+
|
4
|
+
module Jekyll
|
5
|
+
module DebugFilter
|
6
|
+
def debug(*args)
|
7
|
+
if args.any?
|
8
|
+
args.map do |arg|
|
9
|
+
type = arg.class
|
10
|
+
puts '---------------------'
|
11
|
+
puts "#{arg} is a #{type}"
|
12
|
+
puts '---------------------'
|
13
|
+
binding.pry
|
14
|
+
end
|
15
|
+
else
|
16
|
+
args
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
Liquid::Template.register_filter(Jekyll::DebugFilter)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-debug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Hedberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: liquid
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '2.5'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '5.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '2.5'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '5.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: pry
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -97,7 +97,14 @@ email: briansheahedberg@gmail.com
|
|
97
97
|
executables: []
|
98
98
|
extensions: []
|
99
99
|
extra_rdoc_files: []
|
100
|
-
files:
|
100
|
+
files:
|
101
|
+
- ".gitignore"
|
102
|
+
- ".travis.yml"
|
103
|
+
- Gemfile
|
104
|
+
- LICENSE
|
105
|
+
- README.md
|
106
|
+
- jekyll-debug.gemspec
|
107
|
+
- lib/jekyll-debug.rb
|
101
108
|
homepage: https://github.com/gemfarmer/jekyll-debug
|
102
109
|
licenses:
|
103
110
|
- Nonstandard
|
@@ -118,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
125
|
version: '0'
|
119
126
|
requirements: []
|
120
127
|
rubyforge_project:
|
121
|
-
rubygems_version: 2.6.
|
128
|
+
rubygems_version: 2.6.12
|
122
129
|
signing_key:
|
123
130
|
specification_version: 4
|
124
131
|
summary: A Jekyll filter that enables runtime debugging.
|