octokitty 1.0.1 → 1.1.0

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.org +28 -5
  3. data/bin/octokitty +4 -0
  4. data/octokitty.gemspec +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2235a1d441812ee48c8db821a9882f0e0193b628
4
- data.tar.gz: f082151ea5d7366c4fca2bf7bb257ed1c15c3ca5
3
+ metadata.gz: 6c46dae84417725fe4566c4d00781c6ae7fe7bde
4
+ data.tar.gz: 9ee41febf5836ca2534bce9d2b88960c3f8877da
5
5
  SHA512:
6
- metadata.gz: f7ba721d1cdb8c3facca3bff880bcbf12dd5401cb907359c9a42d24bcf2e472d5a316ab5efd87609233a6e72be6ed71fe52be3d45f95fef55be1387038903889
7
- data.tar.gz: 2bee644db67fab320b12811ec6b23996a0c6f0c8beefd888b5232b7dab90947b5514e3ef38758e4bde57cdfc6ed938757c63a327c0ee55b2e57da7f0e0f2e409
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
- usage: create_status <repo> <sha> <state> [options]
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
- usage: pull_requests <repo> [options]
55
+ usage: pull_requests <repo> [options]
33
56
  #+END_SRC
34
57
 
35
58
  ** Environment
@@ -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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'octokitty'
3
- gem.version = '1.0.1'
3
+ gem.version = '1.1.0'
4
4
  gem.licenses = 'MIT'
5
5
  gem.authors = ['Chris Olstrom']
6
6
  gem.email = 'chris@olstrom.com'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octokitty
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Olstrom