github_cli 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. data/CHANGELOG.md +21 -0
  2. data/Gemfile.lock +20 -22
  3. data/README.md +29 -4
  4. data/bin/ghc +1 -1
  5. data/features/download.feature +11 -0
  6. data/features/email.feature +9 -0
  7. data/features/errors.feature +10 -0
  8. data/features/event.feature +14 -0
  9. data/features/executable.feature +44 -17
  10. data/features/follower.feature +11 -0
  11. data/features/fork.feature +13 -0
  12. data/features/hook.feature +12 -0
  13. data/features/label.feature +16 -0
  14. data/features/member.feature +18 -0
  15. data/features/milestone.feature +11 -0
  16. data/features/organization.feature +9 -0
  17. data/features/reference.feature +11 -0
  18. data/features/repositories.feature +16 -7
  19. data/features/tag.feature +8 -0
  20. data/features/team.feature +18 -0
  21. data/features/tree.feature +8 -0
  22. data/features/user.feature +8 -0
  23. data/ghc_logo.png +0 -0
  24. data/github_cli.gemspec +2 -2
  25. data/lib/github_cli/api.rb +14 -11
  26. data/lib/github_cli/apis/follower.rb +40 -0
  27. data/lib/github_cli/apis/member.rb +52 -0
  28. data/lib/github_cli/apis/organization.rb +28 -0
  29. data/lib/github_cli/apis/team.rb +89 -0
  30. data/lib/github_cli/apis/user.rb +22 -0
  31. data/lib/github_cli/apis.rb +5 -0
  32. data/lib/github_cli/cli.rb +11 -4
  33. data/lib/github_cli/command.rb +40 -28
  34. data/lib/github_cli/commands/followers.rb +50 -0
  35. data/lib/github_cli/commands/members.rb +70 -0
  36. data/lib/github_cli/commands/organizations.rb +42 -0
  37. data/lib/github_cli/commands/teams.rb +148 -0
  38. data/lib/github_cli/commands/users.rb +26 -0
  39. data/lib/github_cli/commands.rb +5 -0
  40. data/lib/github_cli/editor.rb +27 -0
  41. data/lib/github_cli/errors.rb +6 -1
  42. data/lib/github_cli/formatter.rb +47 -0
  43. data/lib/github_cli/formatters/csv.rb +8 -8
  44. data/lib/github_cli/formatters/table.rb +237 -11
  45. data/lib/github_cli/pager.rb +66 -0
  46. data/lib/github_cli/subcommands.rb +15 -0
  47. data/lib/github_cli/system.rb +33 -0
  48. data/lib/github_cli/terminal.rb +60 -30
  49. data/lib/github_cli/thor_ext.rb +15 -0
  50. data/lib/github_cli/ui.rb +8 -0
  51. data/lib/github_cli/util.rb +55 -12
  52. data/lib/github_cli/version.rb +1 -1
  53. data/lib/github_cli.rb +3 -0
  54. data/spec/github_cli/pager_spec.rb +69 -0
  55. data/spec/github_cli/util_spec.rb +14 -4
  56. metadata +64 -14
data/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ 0.4.0 (June 15, 2012)
2
+
3
+ * Add user api commands.
4
+ * Add user followers api commands.
5
+ * Add organizations api commands.
6
+ * Add organization members api commands.
7
+ * Add organization teams api commands.
8
+ * Add gem logo.
9
+ * Add system configuration utilities.
10
+ * Add response pager to automatically paginate long output with ability to switch
11
+ it off as well as specify custom pager command.
12
+ * Fix issue with output formatting when simple string response is returned.
13
+ * Add interface feature tests.
14
+ * Add printing of command usage information.
15
+ * Refactor utility methods.
16
+ * Add new formatter for the output rendering.
17
+ * Refactor table & csv output, add vertical & horizontal table rendering.
18
+ * Add utility methods for string truncation and padding.
19
+ * Add ability to output to editor.
20
+ * Update gem dependecies and gem summary.
21
+
1
22
  0.3.1 (May 30, 2012)
2
23
 
3
24
  * Add milestone api commands.
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- github_cli (0.3.1)
5
- github_api (~> 0.5)
4
+ github_cli (0.4.0)
5
+ github_api (~> 0.6)
6
6
  thor
7
7
 
8
8
  GEM
@@ -14,21 +14,20 @@ GEM
14
14
  ffi (>= 1.0.11)
15
15
  rspec (>= 2.7.0)
16
16
  builder (3.0.0)
17
- childprocess (0.3.1)
17
+ childprocess (0.3.2)
18
18
  ffi (~> 1.0.6)
19
- cucumber (1.1.9)
19
+ cucumber (1.2.1)
20
20
  builder (>= 2.1.2)
21
- diff-lcs (>= 1.1.2)
22
- gherkin (~> 2.9.0)
21
+ diff-lcs (>= 1.1.3)
22
+ gherkin (~> 2.11.0)
23
23
  json (>= 1.4.6)
24
- term-ansicolor (>= 1.0.6)
25
24
  diff-lcs (1.1.3)
26
- faraday (0.8.0)
25
+ faraday (0.8.1)
27
26
  multipart-post (~> 1.1)
28
27
  ffi (1.0.11)
29
- gherkin (2.9.0)
28
+ gherkin (2.11.0)
30
29
  json (>= 1.4.6)
31
- github_api (0.5.2)
30
+ github_api (0.6.0)
32
31
  faraday (~> 0.8.0)
33
32
  hashie (~> 1.2.0)
34
33
  multi_json (~> 1.3)
@@ -36,10 +35,10 @@ GEM
36
35
  oauth2 (~> 0.7)
37
36
  hashie (1.2.0)
38
37
  httpauth (0.1)
39
- json (1.6.5)
40
- multi_json (1.3.2)
38
+ json (1.7.3)
39
+ multi_json (1.3.6)
41
40
  multipart-post (1.1.5)
42
- nokogiri (1.5.2)
41
+ nokogiri (1.5.3)
43
42
  oauth2 (0.7.1)
44
43
  faraday (~> 0.8)
45
44
  httpauth (~> 0.1)
@@ -47,15 +46,14 @@ GEM
47
46
  rack (~> 1.4)
48
47
  rack (1.4.1)
49
48
  rake (0.9.2.2)
50
- rspec (2.8.0)
51
- rspec-core (~> 2.8.0)
52
- rspec-expectations (~> 2.8.0)
53
- rspec-mocks (~> 2.8.0)
54
- rspec-core (2.8.0)
55
- rspec-expectations (2.8.0)
56
- diff-lcs (~> 1.1.2)
57
- rspec-mocks (2.8.0)
58
- term-ansicolor (1.0.7)
49
+ rspec (2.10.0)
50
+ rspec-core (~> 2.10.0)
51
+ rspec-expectations (~> 2.10.0)
52
+ rspec-mocks (~> 2.10.0)
53
+ rspec-core (2.10.1)
54
+ rspec-expectations (2.10.0)
55
+ diff-lcs (~> 1.1.3)
56
+ rspec-mocks (2.10.1)
59
57
  thor (0.15.2)
60
58
 
61
59
  PLATFORMS
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # GithubCLI
1
+ # GithubCLI<img src="https://github.com/peter-murach/github_cli/raw/master/ghc_logo.png" align="right" />
2
2
  [![Build Status](https://secure.travis-ci.org/peter-murach/github_cli.png?branch=master)][travis] [![Dependency Status](https://gemnasium.com/peter-murach/github_cli.png?travis)][gemnasium]
3
3
 
4
4
  [travis]: http://travis-ci.org/peter-murach/github_cli
@@ -95,10 +95,19 @@ $ ghc gist
95
95
  Interact with users:
96
96
 
97
97
  ```shell
98
+ $ ghc user
98
99
  $ ghc email
99
100
  $ ghc follower
100
101
  ```
101
102
 
103
+ Interact with organizations:
104
+
105
+ ```shell
106
+ $ ghc org
107
+ $ ghc member
108
+ $ ghc team
109
+ ```
110
+
102
111
  Interact with authorizations:
103
112
 
104
113
  ```shell
@@ -107,12 +116,18 @@ $ ghc auth
107
116
 
108
117
  ### Output Format
109
118
 
110
- The API responses can be formattaed as `csv`, `json`, `pretty`, `table`.
119
+ The API responses can be formatted as `csv`, `json`, `pretty`, `table`.
111
120
 
112
- By default responses are in tabular format. Run the following
121
+ By default responses are in tabular format. Tables are available in `horizontal` and `vertical` mode. To enforce table display pass `:h` and `:v` respectively. Otherwise a default orientation will be picked depending on the request made and terminal size.
113
122
 
114
123
  ```shell
115
- ghc repo get peter-murach github_cli
124
+ ghc user get -u peter-murach --format=table:h
125
+
126
+ ┏━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳
127
+ ┃ type ┃ login ┃ public_… ┃ blog ┃ hireable ┃ followe… ┃ followi… ┃ location ┃ html_url ┃ name ┃
128
+ ┣━━━━━━━━━━╋━━━━━━━━━━╋━━━━━━━━━━╋━━━━━━━━━━╋━━━━━━━━━━╋━━━━━━━━━━╋━━━━━━━━━━╋━━━━━━━━━━╋━━━━━━━━━━╋━━━━━━━━━━╋
129
+ ┃ User ┃ peter-m… ┃ 14 ┃ peter-m… ┃ false ┃ 18 ┃ 52 ┃ Sheffie… ┃ https:/… ┃ Piotr M… ┃
130
+ ┗━━━━━━━━━━┻━━━━━━━━━━┻━━━━━━━━━━┻━━━━━━━━━━┻━━━━━━━━━━┻━━━━━━━━━━┻━━━━━━━━━━┻━━━━━━━━━━┻━━━━━━━━━━┻━━━━━━━━━━┻
116
131
  ```
117
132
 
118
133
  To get `csv` formatting for easy command piping do
@@ -121,6 +136,16 @@ To get `csv` formatting for easy command piping do
121
136
  ghc repo ls -u wycats --format=csv
122
137
  ```
123
138
 
139
+ ### Output Paging
140
+
141
+ By default all responses are paged. You can switch off paging by supplying `no-pager` flag.
142
+
143
+ ```shell
144
+ ghc --no-pager user ls -u wycats
145
+ ```
146
+
147
+ Also you can supply you preferred `pager`, otherwise the paging program is taken from environment variable PAGER if defined or defaults to "less".
148
+
124
149
  ### Examples
125
150
 
126
151
  You can create repository by supplying required parameters
data/bin/ghc CHANGED
@@ -12,7 +12,7 @@ rescue Interrupt => e
12
12
  rescue SystemExit => e
13
13
  exit e.status
14
14
  rescue Exception => e
15
- GithubCLI.ui.error "Fatal error has occurred." + e.message
15
+ GithubCLI.ui.error "Fatal error has occurred. " + e.message
16
16
  GithubCLI.ui.debug e.backtrace.join("\n")
17
17
  exit 1
18
18
  end
@@ -0,0 +1,11 @@
1
+ Feature: ghc download
2
+
3
+ Scenario: Available commands
4
+
5
+ When I run `ghc download`
6
+ Then the exit status should be 0
7
+ And the output should contain "ghc download create"
8
+ And the output should contain "ghc download delete"
9
+ And the output should contain "ghc download get"
10
+ And the output should contain "ghc download list"
11
+ And the output should contain "ghc download upload"
@@ -0,0 +1,9 @@
1
+ Feature: ghc email
2
+
3
+ Scenario: Available commands
4
+
5
+ When I run `ghc email`
6
+ Then the exit status should be 0
7
+ And the output should contain "ghc email delete"
8
+ And the output should contain "ghc email list"
9
+ And the output should contain "ghc email add"
@@ -0,0 +1,10 @@
1
+ Feature: ghc errors notification
2
+
3
+ Scenario: Unknown formatting option
4
+
5
+ When I run `ghc repo list -u wycats --format=unknown`
6
+ Then the exit status should be 1
7
+ And the output should contain:
8
+ """
9
+ Fatal error has occurred. Unrecognized formatting options: unknown
10
+ """
@@ -0,0 +1,14 @@
1
+ Feature: ghc event
2
+
3
+ Scenario: Available commands
4
+
5
+ When I run `ghc event`
6
+ Then the exit status should be 0
7
+ And the output should contain "ghc event issue"
8
+ And the output should contain "ghc event network"
9
+ And the output should contain "ghc event org"
10
+ And the output should contain "ghc event performed"
11
+ And the output should contain "ghc event public"
12
+ And the output should contain "ghc event received"
13
+ And the output should contain "ghc event repo"
14
+ And the output should contain "ghc event user_org"
@@ -6,32 +6,59 @@ Feature: The GHC Executable
6
6
  I have access to command line interface
7
7
 
8
8
  Scenario Outline: Getting Help for Commands
9
- When I run `ghc <command>`
9
+
10
+ When I run `ghc <cmd>`
10
11
  Then the exit status should be 0
11
12
  And the output should contain:
12
13
  """
13
- ghc help [TASK]
14
+ ghc help <command>
14
15
  """
15
16
  Examples:
16
- | command |
17
- | |
18
- | help |
17
+ | cmd |
18
+ | |
19
+ | help |
20
+
21
+ Scenario: Getting Usage for Commands
22
+
23
+ When I run `ghc`
24
+ Then the exit status should be 0
25
+ And the output should contain "Usage: ghc"
26
+ And the output should contain "[--config]"
27
+ And the output should contain "[--no-color]"
28
+ And the output should contain "[--no-pager]"
29
+ And the output should contain "[--version]"
30
+ And the output should contain "[--verbose]"
19
31
 
20
32
  Scenario Outline: Getting Subcommands
33
+
21
34
  When I run `ghc <command>`
22
35
  Then the exit status should be 0
23
36
  And the output should contain "ghc <command>"
24
37
 
25
38
  Examples:
26
- | command |
27
- | auth |
28
- | repo |
29
- | issue |
30
- | blob |
31
- | tree |
32
- | ref |
33
- | pull |
34
- | fork |
35
- | commit |
36
- | download |
37
- | key |
39
+ | command |
40
+ | auth |
41
+ | blob |
42
+ | commit |
43
+ | download |
44
+ | email |
45
+ | event |
46
+ | follower |
47
+ | fork |
48
+ | gist |
49
+ | hook |
50
+ | issue |
51
+ | key |
52
+ | label |
53
+ | member |
54
+ | milestone |
55
+ | org |
56
+ | pull |
57
+ | ref |
58
+ | repo |
59
+ | tag |
60
+ | team |
61
+ | tree |
62
+ | user |
63
+ | watch |
64
+
@@ -0,0 +1,11 @@
1
+ Feature: ghc follower
2
+
3
+ Scenario: Available commands
4
+
5
+ When I run `ghc follower`
6
+ Then the exit status should be 0
7
+ And the output should contain "ghc follower follow"
8
+ And the output should contain "ghc follower follower"
9
+ And the output should contain "ghc follower following"
10
+ And the output should contain "ghc follower list"
11
+ And the output should contain "ghc follower unfollow"
@@ -0,0 +1,13 @@
1
+ Feature: ghc fork
2
+
3
+ Scenario: Available commands
4
+
5
+ When I run `ghc fork`
6
+ Then the exit status should be 0
7
+ And the output should contain "ghc fork create"
8
+ And the output should contain "ghc fork list"
9
+
10
+ # Scenario: List forks
11
+ # When I run `ghc fork ls wycats thor` interactively
12
+ # And I type "q"
13
+ # Then the exit status should be 0
@@ -0,0 +1,12 @@
1
+ Feature: ghc hook
2
+
3
+ Scenario: Available commands
4
+
5
+ When I run `ghc hook`
6
+ Then the exit status should be 0
7
+ And the output should contain "ghc hook create"
8
+ And the output should contain "ghc hook delete"
9
+ And the output should contain "ghc hook edit"
10
+ And the output should contain "ghc hook get"
11
+ And the output should contain "ghc hook list"
12
+ And the output should contain "ghc hook test"
@@ -0,0 +1,16 @@
1
+ Feature: ghc label
2
+
3
+ Scenario: Available commands
4
+
5
+ When I run `ghc label`
6
+ Then the exit status should be 0
7
+ And the output should contain "ghc label add"
8
+ And the output should contain "ghc label create"
9
+ And the output should contain "ghc label delete"
10
+ And the output should contain "ghc label get"
11
+ And the output should contain "ghc label issue"
12
+ And the output should contain "ghc label list"
13
+ And the output should contain "ghc label milestone"
14
+ And the output should contain "ghc label remove"
15
+ And the output should contain "ghc label replace"
16
+ And the output should contain "ghc label update"
@@ -0,0 +1,18 @@
1
+ Feature: ghc member
2
+
3
+ Scenario: Available commands
4
+
5
+ When I run `ghc member`
6
+ Then the exit status should be 0
7
+ And the output should contain "ghc member delete"
8
+ And the output should contain "ghc member list"
9
+ And the output should contain "ghc member member"
10
+ And the output should contain "ghc member publicize"
11
+
12
+ # Scenario: List an organization members
13
+ # When I run `ghc member ls rails`
14
+ # Then the exit status should be 0
15
+ #
16
+ # Scenario: List an organization public members
17
+ # When I run `ghc member ls rails --public`
18
+ # Then the exit status should be 0
@@ -0,0 +1,11 @@
1
+ Feature: ghc milestone
2
+
3
+ Scenario: Available commands
4
+
5
+ When I run `ghc milestone`
6
+ Then the exit status should be 0
7
+ And the output should contain "ghc milestone create"
8
+ And the output should contain "ghc milestone delete"
9
+ And the output should contain "ghc milestone get"
10
+ And the output should contain "ghc milestone list"
11
+ And the output should contain "ghc milestone update"
@@ -0,0 +1,9 @@
1
+ Feature: ghc org
2
+
3
+ Scenario: Available commands
4
+
5
+ When I run `ghc org`
6
+ Then the exit status should be 0
7
+ And the output should contain "ghc org edit"
8
+ And the output should contain "ghc org list"
9
+ And the output should contain "ghc org get"
@@ -0,0 +1,11 @@
1
+ Feature: ghc ref
2
+
3
+ Scenario: Available commands
4
+
5
+ When I run `ghc ref`
6
+ Then the exit status should be 0
7
+ And the output should contain "ghc ref create"
8
+ And the output should contain "ghc ref delete"
9
+ And the output should contain "ghc ref get"
10
+ And the output should contain "ghc ref list"
11
+ And the output should contain "ghc ref update"
@@ -1,9 +1,18 @@
1
- @repositories
2
- Feature: Repository Commands
1
+ Feature: gh repository
3
2
 
4
- As a developer who wants to interact with GitHub Repository API
5
- I have access to commands
6
-
7
- Scenario: List repositories
8
- When I run `ghc repo list --user=wycats`
3
+ Scenario: Available commands
4
+ When I run `ghc repo`
9
5
  Then the exit status should be 0
6
+ And the output should contain "ghc repo branches"
7
+ And the output should contain "ghc repo contribs"
8
+ And the output should contain "ghc repo create"
9
+ And the output should contain "ghc repo edit"
10
+ And the output should contain "ghc repo get"
11
+ And the output should contain "ghc repo list"
12
+ And the output should contain "ghc repo languages"
13
+ And the output should contain "ghc repo tags"
14
+ And the output should contain "ghc repo teams"
15
+
16
+ # Scenario: List repositories
17
+ # When I run `ghc repo ls --user=wycats`
18
+ # Then the exit status should be 0
@@ -0,0 +1,8 @@
1
+ Feature: ghc tag
2
+
3
+ Scenario: Available commands
4
+
5
+ When I run `ghc tag`
6
+ Then the exit status should be 0
7
+ And the output should contain "ghc tag create"
8
+ And the output should contain "ghc tag get"
@@ -0,0 +1,18 @@
1
+ Feature: ghc team
2
+
3
+ Scenario: Available commands
4
+ When I run `ghc team`
5
+ Then the exit status should be 0
6
+ And the output should contain "ghc team add_member"
7
+ And the output should contain "ghc team add_repo"
8
+ And the output should contain "ghc team create"
9
+ And the output should contain "ghc team delete"
10
+ And the output should contain "ghc team edit"
11
+ And the output should contain "ghc team get"
12
+ And the output should contain "ghc team list"
13
+ And the output should contain "ghc team list_member"
14
+ And the output should contain "ghc team list_repo"
15
+ And the output should contain "ghc team member"
16
+ And the output should contain "ghc team remove_member"
17
+ And the output should contain "ghc team remove_repo"
18
+ And the output should contain "ghc team repo"
@@ -0,0 +1,8 @@
1
+ Feature: ghc tree
2
+
3
+ Scenario: Available commands
4
+
5
+ When I run `ghc tree`
6
+ Then the exit status should be 0
7
+ And the output should contain "ghc tree create"
8
+ And the output should contain "ghc tree get"
@@ -0,0 +1,8 @@
1
+ Feature: ghc user
2
+
3
+ Scenario: Available commands
4
+
5
+ When I run `ghc user`
6
+ Then the exit status should be 0
7
+ And the output should contain "ghc user get"
8
+ And the output should contain "ghc user update"
data/ghc_logo.png ADDED
Binary file
data/github_cli.gemspec CHANGED
@@ -5,7 +5,7 @@ Gem::Specification.new do |gem|
5
5
  gem.authors = ["Piotr Murach"]
6
6
  gem.email = ["pmurach@gmail.com"]
7
7
  gem.description = %q{CLI-based access to GitHub API v3}
8
- gem.summary = %q{CLI-based access to GitHub API v3}
8
+ gem.summary = %q{github_cli is a set of tools that provide full command line access to GitHub API v3}
9
9
  gem.homepage = "http://github.com/peter-murach/github_cli"
10
10
 
11
11
  gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = GithubCLI::VERSION
17
17
 
18
- gem.add_dependency 'github_api', '~> 0.5'
18
+ gem.add_dependency 'github_api', '~> 0.6'
19
19
  gem.add_dependency 'thor'
20
20
 
21
21
  gem.add_development_dependency 'rspec'
@@ -3,27 +3,30 @@
3
3
  module GithubCLI
4
4
  # The API class is the main entry point for creating GithubCLI APIs.
5
5
  class API
6
- class ApiError < StandardError; end
7
6
 
8
7
  @@api = nil
9
8
 
10
- def self.github_api
11
- if @@api
12
- @@api
13
- else
9
+ class << self
10
+
11
+ def github_api
12
+ @@api ||= begin
13
+ @@api = configure_api
14
+ end
15
+ end
16
+
17
+ def configure_api
14
18
  @@api = Github.new
15
19
  @@api.oauth_token = GithubCLI.config['oauth_token']
16
20
  @@api.basic_auth = GithubCLI.config['basic_auth']
17
21
  @@api
18
22
  end
19
- end
20
23
 
21
- def self.configure_api
22
- end
24
+ def output(format=:table, &block)
25
+ response = block.call
26
+ formatter = Formatter.new response, :format => format
27
+ formatter.render_output
28
+ end
23
29
 
24
- def self.output(format=:table, &block)
25
- response = block.call
26
- GithubCLI::Terminal.render_output response, :format => format
27
30
  end
28
31
 
29
32
  class All
@@ -0,0 +1,40 @@
1
+ # encoding: utf-8
2
+
3
+ module GithubCLI
4
+ class Follower < API
5
+
6
+ class << self
7
+
8
+ def all(user, params, format)
9
+ output format do
10
+ github_api.users.followers.list user, params
11
+ end
12
+ end
13
+
14
+ def following(user, params, format)
15
+ output format do
16
+ github_api.users.followers.following user, params
17
+ end
18
+ end
19
+
20
+ def follower(user, params, format)
21
+ output format do
22
+ github_api.users.followers.following? user, params
23
+ end
24
+ end
25
+
26
+ def follow(user, params, format)
27
+ output format do
28
+ github_api.users.followers.follow user, params
29
+ end
30
+ end
31
+
32
+ def unfollow(user, params, format)
33
+ output format do
34
+ github_api.users.followers.unfollow user, params
35
+ end
36
+ end
37
+ end
38
+
39
+ end # Follower
40
+ end # GithubCLI
@@ -0,0 +1,52 @@
1
+ # encoding: utf-8
2
+
3
+ module GithubCLI
4
+ class Member < API
5
+
6
+ class << self
7
+
8
+ def all(org, params, format)
9
+ output format do
10
+ github_api.orgs.members.list org, params
11
+ end
12
+ end
13
+
14
+ def all_public(org, params, format)
15
+ output format do
16
+ github_api.orgs.members.list_public org, params
17
+ end
18
+ end
19
+
20
+ def member?(org, user, params, format)
21
+ output format do
22
+ github_api.orgs.members.member? org, user, params
23
+ end
24
+ end
25
+
26
+ def public_member?(org, user, params, format)
27
+ output format do
28
+ github_api.orgs.members.public_member? org, user, params
29
+ end
30
+ end
31
+
32
+ def delete(org, user, params, format)
33
+ output format do
34
+ github_api.orgs.members.delete org, user, params
35
+ end
36
+ end
37
+
38
+ def publicize(org, user, params, format)
39
+ output format do
40
+ github_api.orgs.members.publicize org, user, params
41
+ end
42
+ end
43
+
44
+ def conceal(org, user, params, format)
45
+ output format do
46
+ github_api.orgs.members.conceal org, user, params
47
+ end
48
+ end
49
+ end
50
+
51
+ end # Member
52
+ end # GithubCLI