guard-git-scribe 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
5
+ *.sw?
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in guard-git-scribe.gemspec
4
+ gemspec
@@ -0,0 +1,38 @@
1
+ = Guard support for git-scribe
2
+
3
+ * Step 1: Have a great ebook idea
4
+ * Step 2: ???
5
+ * Step 3: Profit!
6
+
7
+ Kept awake on those long and lonesome nights, searching your soul for that Step 2? Well search no more, guard-git-scribe is here!
8
+
9
+ Use Guard (which is awesome) with git-scribe (extremely awesome) to write ebooks, and hit like six fewer keys every time you want to see your content in a browser.
10
+
11
+ *git-scribe*: https://github.com/schacon/git-scribe
12
+
13
+ *Guard*: https://github.com/guard/guard
14
+
15
+ == Installation
16
+
17
+ Hanging out in your git-scribe ebook's directory? Great, you're good to go! Get your `Gemfile` dressed:
18
+
19
+ # Gemfile
20
+ source :rubygems
21
+ gem "git-scribe"
22
+ gem "guard"
23
+ gem "guard-git-scribe"
24
+
25
+ and your Guardfile gussied up:
26
+
27
+ # Guardfile
28
+ guard 'git-scribe' do
29
+ watch (%r{book/})
30
+ end
31
+
32
+ and hit the town!
33
+
34
+ $ guard
35
+ Guard is now watching at '/Users/jason/sweet_sweet_ebook'
36
+ git-scribe is waiting for book changes...
37
+
38
+ I like to just rebuild the `site` target, so catch your sweet sweet prose in `output/index.html`. Do you use something else? Pull req me.
@@ -0,0 +1 @@
1
+ require 'bundler/gem_tasks'
@@ -0,0 +1,20 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "guard-git-scribe/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "guard-git-scribe"
7
+ s.version = Guard::Git::Scribe::VERSION
8
+ s.authors = ["Jason Morrison"]
9
+ s.email = ["jmorrison@thoughtbot.com"]
10
+ s.homepage = ""
11
+ s.summary = %q{Guard::GitScribe automatically rebuilds your git-scribe ebooks}
12
+ s.description = %q{Guard::GitScribe automatically rebuilds your git-scribe ebooks}
13
+
14
+ s.rubyforge_project = "guard-git-scribe"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+ end
@@ -0,0 +1,31 @@
1
+ require 'guard/guard'
2
+
3
+ module ::Guard
4
+ class GitScribe < ::Guard::Guard
5
+ def start
6
+ UI.info "git-scribe is waiting for book changes..."
7
+ end
8
+
9
+ def run_all
10
+ true
11
+ end
12
+
13
+ def run_on_change(paths)
14
+ UI.info "git-scribe is generating a new SITE from the book..."
15
+ output = `git scribe gen site`
16
+
17
+ command_failure = ($?.to_i != 0)
18
+ asciidoc_warning = output =~ /asciidoc: WARNING/
19
+
20
+ if command_failure || asciidoc_warning
21
+ UI.error output
22
+
23
+ UI.error "*"*80
24
+ UI.error "Errors in generation listed above!"
25
+ UI.error "*"*80
26
+ else
27
+ UI.info "Done."
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,7 @@
1
+ module Guard
2
+ module Git
3
+ module Scribe
4
+ VERSION = "0.0.1"
5
+ end
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,63 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: guard-git-scribe
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.0.1
6
+ platform: ruby
7
+ authors:
8
+ - Jason Morrison
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2011-07-21 00:00:00 -04:00
14
+ default_executable:
15
+ dependencies: []
16
+
17
+ description: Guard::GitScribe automatically rebuilds your git-scribe ebooks
18
+ email:
19
+ - jmorrison@thoughtbot.com
20
+ executables: []
21
+
22
+ extensions: []
23
+
24
+ extra_rdoc_files: []
25
+
26
+ files:
27
+ - .gitignore
28
+ - Gemfile
29
+ - README.asciidoc
30
+ - Rakefile
31
+ - guard-git-scribe.gemspec
32
+ - lib/guard-git-scribe.rb
33
+ - lib/guard-git-scribe/version.rb
34
+ has_rdoc: true
35
+ homepage: ""
36
+ licenses: []
37
+
38
+ post_install_message:
39
+ rdoc_options: []
40
+
41
+ require_paths:
42
+ - lib
43
+ required_ruby_version: !ruby/object:Gem::Requirement
44
+ none: false
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: "0"
49
+ required_rubygems_version: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: "0"
55
+ requirements: []
56
+
57
+ rubyforge_project: guard-git-scribe
58
+ rubygems_version: 1.6.2
59
+ signing_key:
60
+ specification_version: 3
61
+ summary: Guard::GitScribe automatically rebuilds your git-scribe ebooks
62
+ test_files: []
63
+