octopress-debugger 1.0.0 → 1.0.1

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: 85422aaa18a4d38133c0e88323d614734e7e9d8a
4
- data.tar.gz: 243162514fc526c1dacd340f2698e122b88aff7e
3
+ metadata.gz: 3c131591fc3151c379b8e994522ae21562e2ad2e
4
+ data.tar.gz: cfdd31bb6f9f2bfc89444a8b53613ab0c0f1acb6
5
5
  SHA512:
6
- metadata.gz: ae44ee6b8122c590b4b975c7df5b9c68cd2a368c2001bc65e046ecca7faaeaf7193f75a95de64cbd2c478046d5639dd413047181133736bab83af07e74545929
7
- data.tar.gz: f48b2e0296058fe7d7b596a4de43383595229e97a2bbd1e7937f35c166cc6e979c7493f22c1c802f0bcde77aabf18c3c6fcd856420778c524fa5395169e50625
6
+ metadata.gz: d976963a417013811726685d5d9fd4c129202a9585d0619b9c354787689eadc90daa2932fd1ea1ad3d8de971e42199711dd8af55f1cc0b1d8df97fc70c4ea65d
7
+ data.tar.gz: dbb5ab3b0c1141e77a207941229af982d385bf4d57887b457c3ce329712810e9c0e81b9c4b60373bd7e80464f979ab857fe84dae902a925473b6093738290141
data/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Changelog
2
+
3
+ ### 1.0.1 (2015-01-12)
4
+ - Added scopes quick var
5
+ - Improved docs
6
+
7
+ ### 1.0.0 (2015-01-11)
8
+ - Initial release
data/README.md CHANGED
@@ -30,6 +30,44 @@ Then add the gem to your Jekyll configuration.
30
30
 
31
31
  Add the `{% debug %}` tag to any page to get access to the `site` and `page` instance from the debugger console.
32
32
 
33
+ This will launch an interactive debugging console where you can do some cool things.
34
+
35
+ - Type `site` to interact with the site instance.
36
+ - Type `page` to interact with the current page instance.
37
+ - Type `page_hash` to view the page instance as a hash.
38
+ - Type `scopes` to view current template variables.
39
+
40
+ ### Example:
41
+
42
+ Debugging is a great way to learn about how Jekyll works. For example, you can step through a for loop like this.
43
+
44
+ ```
45
+ {% assign test='awesome' %}
46
+ {% for post in site.posts %}
47
+ {% debug %}
48
+ {% endfor %}
49
+ ```
50
+
51
+ In the debugger you can type `scopes` to see a hash representing variables in the for loop. Here's a look at what you might see:
52
+
53
+ ```
54
+ [
55
+ {
56
+ "post"=><Post: /2015/01/12/posts-are-cool>,
57
+ "forloop"=>{
58
+ { "name"=>"post-site.posts", "length"=>3, "index"=>1, … }
59
+ },
60
+ {
61
+ test=>'awesome'
62
+ }
63
+ ]
64
+ ```
65
+
66
+ You can see the value of post and interact with the post instance with `scopes.first['post']` and even see all the available data on
67
+ the for loop.
68
+
69
+ Then you can enter `continue` or `c` to step through the loop.
70
+
33
71
  ## Contributing
34
72
 
35
73
  1. Fork it ( https://github.com/octopress/debugger/fork )
@@ -14,11 +14,9 @@ module Octopress
14
14
  site = context.registers[:site]
15
15
  page_hash = context.registers[:page]
16
16
  page = site.pages.find{|p| p.url == page_hash['url'] }
17
+ scopes = context.scopes
17
18
 
18
19
  binding.pry
19
- # site: site instance
20
- # page_hash: page instance in hash form
21
- # page: page instance
22
20
 
23
21
  return ''
24
22
  end
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  module Debugger
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-debugger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '10.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: octopress
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  description:
70
84
  email:
71
85
  - brandon@imathis.com
@@ -73,6 +87,7 @@ executables: []
73
87
  extensions: []
74
88
  extra_rdoc_files: []
75
89
  files:
90
+ - CHANGELOG.md
76
91
  - LICENSE.txt
77
92
  - README.md
78
93
  - lib/octopress-debugger.rb