github_cli 0.2.0 → 0.2.1
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.
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +1 -1
- data/README.md +0 -2
- data/features/executable.feature +1 -0
- data/lib/github_cli/apis/authorization.rb +30 -0
- data/lib/github_cli/apis.rb +1 -0
- data/lib/github_cli/commands/authorizations.rb +58 -0
- data/lib/github_cli/commands.rb +15 -14
- data/lib/github_cli/subcommands.rb +3 -0
- data/lib/github_cli/version.rb +1 -1
- metadata +15 -12
data/CHANGELOG.md
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
0.2.1 (April 30, 2012)
|
2
|
+
|
3
|
+
* Add authorizations api commands.
|
4
|
+
|
5
|
+
0.2.0 (April 29, 2012)
|
6
|
+
|
7
|
+
* Add repository forks, hooks, watching api commands.
|
8
|
+
* Fix repository commands bugs.
|
9
|
+
* Update gem dependency to 'github_api' version 0.5.0 and rewrote method calls to match new dsl conventions.
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/features/executable.feature
CHANGED
@@ -0,0 +1,30 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module GithubCLI
|
4
|
+
class Authorization < API
|
5
|
+
|
6
|
+
class << self
|
7
|
+
|
8
|
+
def all(params)
|
9
|
+
github_api.oauth.list params
|
10
|
+
end
|
11
|
+
|
12
|
+
def get(id, params)
|
13
|
+
github_api.oauth.get id, params
|
14
|
+
end
|
15
|
+
|
16
|
+
def create(params)
|
17
|
+
github_api.oauth.create params
|
18
|
+
end
|
19
|
+
|
20
|
+
def update(id, params)
|
21
|
+
github_api.oauth.update id, params
|
22
|
+
end
|
23
|
+
|
24
|
+
def delete(id, params)
|
25
|
+
github_api.oauth.delete id, params
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
end # Authorization
|
30
|
+
end # GithubCLI
|
data/lib/github_cli/apis.rb
CHANGED
@@ -0,0 +1,58 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module GithubCLI
|
4
|
+
class Commands::Authorizations < Command
|
5
|
+
|
6
|
+
namespace :auth
|
7
|
+
|
8
|
+
desc 'list', 'Lists your authorizations'
|
9
|
+
method_option :params, :type => :hash, :default => {},
|
10
|
+
:desc => 'Additional request parameters e.i per_page:100'
|
11
|
+
def list
|
12
|
+
Authorization.all options[:params]
|
13
|
+
end
|
14
|
+
|
15
|
+
desc 'get <id>', 'Get a single authorization'
|
16
|
+
method_option :params, :type => :hash, :default => {},
|
17
|
+
:desc => 'Additional request parameters e.i per_page:100'
|
18
|
+
def get(id)
|
19
|
+
Authorization.get id, options[:params]
|
20
|
+
end
|
21
|
+
|
22
|
+
desc 'create <user> <repo>', 'Create a new authorization'
|
23
|
+
long_desc <<-DESC
|
24
|
+
Inputs
|
25
|
+
|
26
|
+
scopes - Optional array - A list of scopes that this authorization is in.\n
|
27
|
+
note - Optional string - A note to remind you what the OAuth token is for.\n
|
28
|
+
note_url - Optional string - A URL to remind you what the OAuth token is for.
|
29
|
+
DESC
|
30
|
+
method_option :params, :type => :hash, :default => {},
|
31
|
+
:desc => 'Additonal request parameters e.i per_page:100'
|
32
|
+
def create
|
33
|
+
Authorization.create options[:params]
|
34
|
+
end
|
35
|
+
|
36
|
+
desc 'update <id>', 'Update an existing authorization'
|
37
|
+
long_desc <<-DESC
|
38
|
+
Inputs
|
39
|
+
|
40
|
+
scopes - Optional array - A list of scopes that this authorization is in.\n
|
41
|
+
add_scopes - Optional array - A list of scopes to add to this authorization.\n
|
42
|
+
remove_scopes - Optional array - A list of scopes to remove from this authorization.\n
|
43
|
+
note - Optional string - A note to remind you what the OAuth token is for.\n
|
44
|
+
note_url - Optional string - A URL to remind you what the OAuth token is for.
|
45
|
+
DESC
|
46
|
+
def update(id)
|
47
|
+
Authorization.update id, options[:params]
|
48
|
+
end
|
49
|
+
|
50
|
+
desc 'delete <id>', 'Delete an authorization'
|
51
|
+
method_option :params, :type => :hash, :default => {},
|
52
|
+
:desc => 'Additonal request parameters e.i per_page:100'
|
53
|
+
def delete(id)
|
54
|
+
Authorization.delete id, options[:params]
|
55
|
+
end
|
56
|
+
|
57
|
+
end # Authorizations
|
58
|
+
end # GithubCLI
|
data/lib/github_cli/commands.rb
CHANGED
@@ -2,19 +2,20 @@
|
|
2
2
|
|
3
3
|
module GithubCLI
|
4
4
|
module Commands
|
5
|
-
autoload :
|
6
|
-
autoload :
|
7
|
-
autoload :
|
8
|
-
autoload :
|
9
|
-
autoload :
|
10
|
-
autoload :
|
11
|
-
autoload :
|
12
|
-
autoload :
|
13
|
-
autoload :
|
14
|
-
autoload :
|
15
|
-
autoload :
|
16
|
-
autoload :
|
17
|
-
autoload :
|
18
|
-
autoload :
|
5
|
+
autoload :Authorizations, 'github_cli/commands/authorizations'
|
6
|
+
autoload :Blobs, 'github_cli/commands/blobs'
|
7
|
+
autoload :Commits, 'github_cli/commands/commits'
|
8
|
+
autoload :Downloads, 'github_cli/commands/downloads'
|
9
|
+
autoload :Forks, 'github_cli/commands/forks'
|
10
|
+
autoload :Hooks, 'github_cli/commands/hooks'
|
11
|
+
autoload :Issues, 'github_cli/commands/issues'
|
12
|
+
autoload :Keys, 'github_cli/commands/keys'
|
13
|
+
autoload :Labels, 'github_cli/commands/labels'
|
14
|
+
autoload :PullRequests, 'github_cli/commands/pull_requests'
|
15
|
+
autoload :References, 'github_cli/commands/references'
|
16
|
+
autoload :Repositories, 'github_cli/commands/repositories'
|
17
|
+
autoload :Tags, 'github_cli/commands/tags'
|
18
|
+
autoload :Trees, 'github_cli/commands/trees'
|
19
|
+
autoload :Watching, 'github_cli/commands/watching'
|
19
20
|
end # Commands
|
20
21
|
end # GithubCLI
|
data/lib/github_cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-30 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: github_api
|
16
|
-
requirement: &
|
16
|
+
requirement: &2153209580 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.5.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2153209580
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: thor
|
27
|
-
requirement: &
|
27
|
+
requirement: &2153208980 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2153208980
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &2153208340 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2153208340
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: aruba
|
49
|
-
requirement: &
|
49
|
+
requirement: &2153207420 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2153207420
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rake
|
60
|
-
requirement: &
|
60
|
+
requirement: &2153207000 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2153207000
|
69
69
|
description: CLI-based access to GitHub API v3
|
70
70
|
email:
|
71
71
|
- pmurach@gmail.com
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- .rspec
|
79
79
|
- .rvmrc
|
80
80
|
- .travis.yml
|
81
|
+
- CHANGELOG.md
|
81
82
|
- Gemfile
|
82
83
|
- Gemfile.lock
|
83
84
|
- LICENSE
|
@@ -95,6 +96,7 @@ files:
|
|
95
96
|
- lib/github_cli.rb
|
96
97
|
- lib/github_cli/api.rb
|
97
98
|
- lib/github_cli/apis.rb
|
99
|
+
- lib/github_cli/apis/authorization.rb
|
98
100
|
- lib/github_cli/apis/blob.rb
|
99
101
|
- lib/github_cli/apis/commit.rb
|
100
102
|
- lib/github_cli/apis/download.rb
|
@@ -111,6 +113,7 @@ files:
|
|
111
113
|
- lib/github_cli/cli.rb
|
112
114
|
- lib/github_cli/command.rb
|
113
115
|
- lib/github_cli/commands.rb
|
116
|
+
- lib/github_cli/commands/authorizations.rb
|
114
117
|
- lib/github_cli/commands/blobs.rb
|
115
118
|
- lib/github_cli/commands/commits.rb
|
116
119
|
- lib/github_cli/commands/downloads.rb
|