gist_directory 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 +1 -0
- data/README.md +3 -3
- data/bin/gist_directory +8 -5
- data/lib/gist_directory.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcc8a86291cbd612480beb4d2e3924db5ef7e901
|
4
|
+
data.tar.gz: 96ff47c6bac9340cfe43bab4bd501c27207727b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efdafd6a2f7cbca9547c4730edbb841f1fff751969d0bbfc17a2353fe62e6fbbaf2bce6fe70c715208134611cfbec27536d9f65c1ccc5e89a26fc37784f35526
|
7
|
+
data.tar.gz: 144b13f5cf3b4cca68082800745628b4c324d3a74e1ee4f52282d012c779f907d364457dc9a518a2ba505f21ba095890f7872ec78e16ac519738a9a73e40e026
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# gist_directory
|
2
2
|
|
3
|
-
Create collections of gists in a local directory
|
3
|
+
Create collections of public gists in a local directory
|
4
4
|
|
5
5
|
# Usage
|
6
6
|
|
@@ -8,11 +8,11 @@ Create a gist called `food.md` in a directory called `food`
|
|
8
8
|
under your home directory:
|
9
9
|
|
10
10
|
```shell
|
11
|
-
gist_directory ~/food
|
11
|
+
gist_directory create ~/food
|
12
12
|
```
|
13
13
|
|
14
14
|
Create a gist called `bacon.txt`:
|
15
15
|
|
16
16
|
```shell
|
17
|
-
gist_directory ~/food bacon.txt
|
17
|
+
gist_directory create ~/food bacon.txt
|
18
18
|
```
|
data/bin/gist_directory
CHANGED
@@ -6,9 +6,9 @@ require "gist_directory"
|
|
6
6
|
|
7
7
|
def usage
|
8
8
|
puts <<-EOT
|
9
|
-
#{$0} DIRECTORY [FILE]"
|
9
|
+
#{$0} create DIRECTORY [FILE]"
|
10
10
|
|
11
|
-
|
11
|
+
DIRECTORY:
|
12
12
|
Creates a Gist with a single file.
|
13
13
|
|
14
14
|
FILE:
|
@@ -18,13 +18,16 @@ Supply an optional filename to use instead of this default.
|
|
18
18
|
EOT
|
19
19
|
end
|
20
20
|
|
21
|
-
if ARGV.size
|
21
|
+
if ARGV.size < 2
|
22
22
|
usage
|
23
23
|
exit 0
|
24
24
|
end
|
25
25
|
|
26
|
-
|
26
|
+
command = ARGV[0]
|
27
|
+
path = ARGV[1]
|
27
28
|
directory = File.basename(path)
|
28
|
-
file = ARGV[
|
29
|
+
file = ARGV[2] || directory + ".md"
|
30
|
+
|
31
|
+
raise "Unknown command '#{command}'" nless command == "create"
|
29
32
|
|
30
33
|
GistDirectory.new(path: path).create(filename: file)
|
data/lib/gist_directory.rb
CHANGED