jekyll-staging 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +17 -0
- data/README.markdown +4 -4
- data/bin/stage +16 -5
- data/jekyll-staging.gemspec +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c23f76237ed79c27e54b62139f2f165952b65ba3
|
4
|
+
data.tar.gz: 7f6c1370ae57a449e2784d67a100abf515ecce88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1234f61161c72ee84cd600b78f83bd1122e991f41aa00c30d63f0344ddf1cd67eda3d62dcae166c8ce38e47bfa730b965e902d4f9e839fc453394e6fa0a289d3
|
7
|
+
data.tar.gz: 32a38912fe54a5925a36c7e4e5637d1d33660b546435260226da0bef9598a6980d8bac926644d1fdb6c5a6ed20a1f406f5782497370e75a9318523b55188a96a
|
data/Gemfile.lock
ADDED
data/README.markdown
CHANGED
@@ -15,7 +15,7 @@ All you need is Ruby. Grab it by running `gem install jekyll-staging` in your te
|
|
15
15
|
|
16
16
|
## What does it do?
|
17
17
|
|
18
|
-
This
|
18
|
+
This gem is for people who:
|
19
19
|
|
20
20
|
1. Use [Jekyll](http://jekyllrb.com) to build their static sites.
|
21
21
|
|
@@ -23,7 +23,7 @@ This script is for people who:
|
|
23
23
|
|
24
24
|
3. Like to work on posts using Jekyll's built-in web server.
|
25
25
|
|
26
|
-
If you have a lot of posts, Jekyll's rebuild process can take a while, so it can be handy to temporarily move all of your existing posts aside while you work on a draft. That's what this
|
26
|
+
If you have a lot of posts, Jekyll's rebuild process can take a while, so it can be handy to temporarily move all of your existing posts aside while you work on a draft. That's what this gem does.
|
27
27
|
|
28
28
|
It lets you specify a given draft post, and it'll move it into Jekyll's folder structure (appropriately prefixing its filename with today's date). Then, it moves all other posts aside temporarily. That way, Jekyll's build and regeneration process will be super-fast while you're working on the draft.
|
29
29
|
|
@@ -34,9 +34,9 @@ Note: It's assumed that your drafts' filenames _don't_ already have date-prefixe
|
|
34
34
|
|
35
35
|
## How do I use it?
|
36
36
|
|
37
|
-
|
37
|
+
Run the gem without any arguments to see usage instructions. Be sure to run the gem from your Jekyll site's root directory.
|
38
38
|
|
39
|
-
|
39
|
+
On the first run (per site), you'll be asked three configuration questions. The appropriate options will be stored in a `.jekyll-stagingrc` file in your site's root.
|
40
40
|
|
41
41
|
Basically:
|
42
42
|
|
data/bin/stage
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
# Staging/unstaging
|
3
|
+
# Staging/unstaging gem for Jekyll blog posts.
|
4
4
|
#
|
5
5
|
# by Matt Gemmell
|
6
6
|
#
|
@@ -8,7 +8,7 @@
|
|
8
8
|
# Twitter: http://twitter.com/mattgemmell
|
9
9
|
|
10
10
|
|
11
|
-
# This
|
11
|
+
# This gem moves a specified draft post into Jekyll's folder structure,
|
12
12
|
# and temporarily stashes all other posts so the site will build quickly.
|
13
13
|
#
|
14
14
|
# This is for people who keep their drafts outside of Jekyll's folder structure.
|
@@ -21,7 +21,9 @@
|
|
21
21
|
# Requirements: just Ruby itself.
|
22
22
|
|
23
23
|
|
24
|
-
# Usage: Run the
|
24
|
+
# Usage: Run the stage command with no arguments to see usage instructions.
|
25
|
+
# Note: Run the command from your Jekyll site's root directory.
|
26
|
+
# You'll be asked three configuration questions (for each site) on the first run.
|
25
27
|
|
26
28
|
|
27
29
|
# License: CC Attribution-ShareAlike
|
@@ -35,7 +37,16 @@
|
|
35
37
|
# Load in configuration file, or ask and populate.
|
36
38
|
def read_or_ask_for_configuration
|
37
39
|
require 'yaml'
|
38
|
-
|
40
|
+
|
41
|
+
# Check we're in a Jekyll root directory.
|
42
|
+
jekyll_conf_file = File.join(Dir.pwd, '_config.yml')
|
43
|
+
if !File.exist?(jekyll_conf_file)
|
44
|
+
puts "Please run the stage command from your Jekyll site's root directory."
|
45
|
+
exit
|
46
|
+
end
|
47
|
+
|
48
|
+
# Look for config file in the current working directory.
|
49
|
+
conf_file = File.join(Dir.pwd, '.jekyll-stagingrc')
|
39
50
|
if File.exist?(conf_file)
|
40
51
|
YAML.load_file(conf_file)
|
41
52
|
else
|
@@ -239,7 +250,7 @@ end
|
|
239
250
|
|
240
251
|
|
241
252
|
# Handle input
|
242
|
-
$unstage_flag = "-u" # flag passed to the
|
253
|
+
$unstage_flag = "-u" # flag passed to the command to request unstaging
|
243
254
|
filename_glob = nil
|
244
255
|
unstage = false
|
245
256
|
|
data/jekyll-staging.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-staging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Gemmell
|
@@ -48,6 +48,7 @@ extra_rdoc_files: []
|
|
48
48
|
files:
|
49
49
|
- .gitignore
|
50
50
|
- Gemfile
|
51
|
+
- Gemfile.lock
|
51
52
|
- LICENSE.markdown
|
52
53
|
- README.markdown
|
53
54
|
- Rakefile
|