octokitty 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.org +28 -5
- data/bin/octokitty +4 -0
- data/octokitty.gemspec +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: 6c46dae84417725fe4566c4d00781c6ae7fe7bde
|
4
|
+
data.tar.gz: 9ee41febf5836ca2534bce9d2b88960c3f8877da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be7a81660d7ddd8a123eb958843bea76516ada0ad3b899723ab2573451882fe26c06fddc581783bbb92f2cc3657728bbfe65a1464e2b407422ed341bba6be2f3
|
7
|
+
data.tar.gz: cea1b4b57efed998672ba2f13d693488e50d648bc0bdee2108814b0017919b07ff238c897f0be93cdd75a22aca06e21a8bf4a4398a40bcad78b83e90dc9ba027
|
data/README.org
CHANGED
@@ -10,7 +10,7 @@ OctoKiTTY is a GitHub API Client written in Ruby.
|
|
10
10
|
* Installation
|
11
11
|
|
12
12
|
#+BEGIN_SRC shell
|
13
|
-
gem install octokitty
|
13
|
+
$ gem install octokitty
|
14
14
|
#+END_SRC
|
15
15
|
|
16
16
|
* Usage
|
@@ -20,16 +20,39 @@ no parameters will give you proper usage for the interface you invoked.
|
|
20
20
|
|
21
21
|
** Examples
|
22
22
|
|
23
|
+
*** To list all available functions
|
24
|
+
|
25
|
+
For this example, we'll filter this down to the first 3 functions matching ~list~
|
26
|
+
#+BEGIN_SRC shell
|
27
|
+
$ octokitty --list | grep list | head -n 3
|
28
|
+
|
29
|
+
list_statuses
|
30
|
+
list_repositories
|
31
|
+
list_repos
|
32
|
+
#+END_SRC
|
33
|
+
|
34
|
+
*** To call a function with an argument
|
35
|
+
|
36
|
+
If invoked as ~octokitty~, the first argument is treated as the function to call.
|
37
|
+
|
23
38
|
#+BEGIN_SRC shell
|
24
|
-
$ create_status
|
39
|
+
$ octokitty create_status
|
25
40
|
|
26
|
-
|
41
|
+
usage: create_status <repo> <sha> <state> [options]
|
27
42
|
#+END_SRC
|
28
43
|
|
44
|
+
*** To call a function implicitly
|
45
|
+
|
46
|
+
As a convenience for scripting with OctoKiTTY, invoking it with any other name
|
47
|
+
will treat that name as the function to call, similar to how ~busybox~ works.
|
48
|
+
You can rename it, or create symbolic links.
|
49
|
+
|
29
50
|
#+BEGIN_SRC shell
|
30
|
-
$ pull_requests
|
51
|
+
$ ln -s $(which octokitty) /usr/local/bin/pull_requests
|
52
|
+
|
53
|
+
$ pull_requests
|
31
54
|
|
32
|
-
|
55
|
+
usage: pull_requests <repo> [options]
|
33
56
|
#+END_SRC
|
34
57
|
|
35
58
|
** Environment
|
data/bin/octokitty
CHANGED
@@ -11,6 +11,10 @@ if command == 'octokitty'
|
|
11
11
|
puts 'usage: octokitty <function>'
|
12
12
|
exit false
|
13
13
|
else
|
14
|
+
if ARGV.first == '--list'
|
15
|
+
puts github.class.ancestors.select { |a| a.to_s.start_with? github.class.to_s }.reject { |a| a == github.class }.flat_map { |a| a.instance_methods }
|
16
|
+
exit true
|
17
|
+
end
|
14
18
|
command = ARGV.shift.gsub('-', '_')
|
15
19
|
end
|
16
20
|
end
|
data/octokitty.gemspec
CHANGED