github_cli 0.5.9 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. data/.travis.yml +1 -0
  2. data/CHANGELOG.md +12 -1
  3. data/Gemfile.lock +12 -10
  4. data/README.md +18 -0
  5. data/features/authorization.feature +53 -0
  6. data/features/blob.feature +1 -1
  7. data/features/download.feature +13 -11
  8. data/features/gist.feature +9 -1
  9. data/features/label.feature +11 -12
  10. data/features/member.feature +5 -4
  11. data/features/merging.feature +5 -4
  12. data/features/organization.feature +5 -4
  13. data/features/repository.feature +9 -1
  14. data/features/search.feature +5 -4
  15. data/github_cli.gemspec +1 -1
  16. data/lib/github_cli/api.rb +56 -49
  17. data/lib/github_cli/apis/assignee.rb +6 -6
  18. data/lib/github_cli/apis/authorization.rb +5 -5
  19. data/lib/github_cli/apis/blob.rb +6 -6
  20. data/lib/github_cli/apis/collaborator.rb +12 -12
  21. data/lib/github_cli/apis/commit.rb +6 -6
  22. data/lib/github_cli/apis/content.rb +9 -9
  23. data/lib/github_cli/apis/download.rb +15 -15
  24. data/lib/github_cli/apis/email.rb +9 -9
  25. data/lib/github_cli/apis/event.rb +24 -24
  26. data/lib/github_cli/apis/follower.rb +16 -15
  27. data/lib/github_cli/apis/fork.rb +6 -6
  28. data/lib/github_cli/apis/gist.rb +31 -30
  29. data/lib/github_cli/apis/hook.rb +6 -6
  30. data/lib/github_cli/apis/issue.rb +12 -12
  31. data/lib/github_cli/apis/key.rb +15 -15
  32. data/lib/github_cli/apis/label.rb +24 -26
  33. data/lib/github_cli/apis/member.rb +15 -27
  34. data/lib/github_cli/apis/merging.rb +3 -3
  35. data/lib/github_cli/apis/milestone.rb +15 -15
  36. data/lib/github_cli/apis/notification.rb +18 -18
  37. data/lib/github_cli/apis/organization.rb +9 -9
  38. data/lib/github_cli/apis/pull_request.rb +24 -24
  39. data/lib/github_cli/apis/reference.rb +15 -15
  40. data/lib/github_cli/apis/repository.rb +13 -12
  41. data/lib/github_cli/apis/search.rb +12 -12
  42. data/lib/github_cli/apis/starring.rb +15 -15
  43. data/lib/github_cli/apis/status.rb +6 -6
  44. data/lib/github_cli/apis/tag.rb +6 -6
  45. data/lib/github_cli/apis/team.rb +39 -39
  46. data/lib/github_cli/apis/tree.rb +6 -6
  47. data/lib/github_cli/apis/user.rb +9 -9
  48. data/lib/github_cli/apis/watching.rb +15 -15
  49. data/lib/github_cli/cli.rb +24 -16
  50. data/lib/github_cli/commands/assignees.rb +8 -2
  51. data/lib/github_cli/commands/authorizations.rb +10 -13
  52. data/lib/github_cli/commands/blobs.rb +9 -3
  53. data/lib/github_cli/commands/collaborators.rb +16 -4
  54. data/lib/github_cli/commands/commits.rb +11 -6
  55. data/lib/github_cli/commands/contents.rb +9 -6
  56. data/lib/github_cli/commands/downloads.rb +30 -6
  57. data/lib/github_cli/commands/emails.rb +12 -3
  58. data/lib/github_cli/commands/events.rb +30 -8
  59. data/lib/github_cli/commands/followers.rb +20 -5
  60. data/lib/github_cli/commands/forks.rb +6 -4
  61. data/lib/github_cli/commands/gists.rb +39 -12
  62. data/lib/github_cli/commands/hooks.rb +1 -1
  63. data/lib/github_cli/commands/issues.rb +15 -4
  64. data/lib/github_cli/commands/keys.rb +20 -5
  65. data/lib/github_cli/commands/labels.rb +53 -14
  66. data/lib/github_cli/commands/members.rb +28 -9
  67. data/lib/github_cli/commands/merging.rb +3 -2
  68. data/lib/github_cli/commands/milestones.rb +27 -15
  69. data/lib/github_cli/commands/notifications.rb +19 -11
  70. data/lib/github_cli/commands/organizations.rb +24 -5
  71. data/lib/github_cli/commands/pull_requests.rb +30 -8
  72. data/lib/github_cli/commands/references.rb +17 -5
  73. data/lib/github_cli/commands/repositories.rb +6 -4
  74. data/lib/github_cli/commands/search.rb +24 -6
  75. data/lib/github_cli/commands/starring.rb +19 -5
  76. data/lib/github_cli/commands/statuses.rb +7 -3
  77. data/lib/github_cli/commands/tags.rb +7 -3
  78. data/lib/github_cli/commands/teams.rb +52 -17
  79. data/lib/github_cli/commands/trees.rb +6 -2
  80. data/lib/github_cli/commands/users.rb +9 -3
  81. data/lib/github_cli/commands/watching.rb +19 -5
  82. data/lib/github_cli/vendor/thor/actions/directory.rb +2 -0
  83. data/lib/github_cli/vendor/thor/actions/empty_directory.rb +3 -19
  84. data/lib/github_cli/vendor/thor/actions/file_manipulation.rb +4 -1
  85. data/lib/github_cli/vendor/thor/actions.rb +1 -1
  86. data/lib/github_cli/vendor/thor/base.rb +20 -18
  87. data/lib/github_cli/vendor/thor/command.rb +1 -1
  88. data/lib/github_cli/vendor/thor/error.rb +0 -4
  89. data/lib/github_cli/vendor/thor/group.rb +4 -9
  90. data/lib/github_cli/vendor/thor/runner.rb +1 -1
  91. data/lib/github_cli/vendor/thor/shell/basic.rb +25 -7
  92. data/lib/github_cli/vendor/thor/version.rb +1 -1
  93. data/lib/github_cli/vendor/thor.rb +17 -2
  94. data/lib/github_cli/version.rb +1 -1
  95. data/spec/github_cli/api/configure_spec.rb +50 -0
  96. data/spec/github_cli/api/github_api_spec.rb +19 -0
  97. data/spec/github_cli/commands/assignees_spec.rb +1 -1
  98. data/spec/github_cli/commands/blobs_spec.rb +1 -1
  99. data/spec/github_cli/commands/collaborators_spec.rb +1 -1
  100. data/spec/github_cli/commands/commits_spec.rb +1 -1
  101. data/spec/github_cli/commands/contents_spec.rb +1 -1
  102. data/spec/github_cli/commands/downloads_spec.rb +35 -0
  103. data/spec/github_cli/commands/emails_spec.rb +1 -1
  104. data/spec/github_cli/commands/events_spec.rb +1 -1
  105. data/spec/github_cli/commands/followers_spec.rb +1 -1
  106. data/spec/github_cli/commands/forks_spec.rb +1 -1
  107. data/spec/github_cli/commands/gists_spec.rb +6 -1
  108. data/spec/github_cli/commands/issues_spec.rb +1 -1
  109. data/spec/github_cli/commands/keys_spec.rb +1 -1
  110. data/spec/github_cli/commands/labels_spec.rb +13 -3
  111. data/spec/github_cli/commands/members_spec.rb +46 -0
  112. data/spec/github_cli/commands/merging_spec.rb +1 -1
  113. data/spec/github_cli/commands/milestones_spec.rb +1 -1
  114. data/spec/github_cli/commands/notifications_spec.rb +1 -1
  115. data/spec/github_cli/commands/organizations_spec.rb +30 -0
  116. data/spec/github_cli/commands/pull_requests_spec.rb +1 -1
  117. data/spec/github_cli/commands/references_spec.rb +1 -1
  118. data/spec/github_cli/commands/repositories_spec.rb +5 -0
  119. data/spec/github_cli/commands/starring_spec.rb +1 -1
  120. data/spec/github_cli/commands/statuses_spec.rb +1 -1
  121. data/spec/github_cli/commands/tags_spec.rb +1 -1
  122. data/spec/github_cli/commands/teams_spec.rb +1 -1
  123. data/spec/github_cli/commands/trees_spec.rb +1 -1
  124. data/spec/github_cli/commands/users_spec.rb +1 -1
  125. data/spec/github_cli/commands/watching_spec.rb +1 -1
  126. metadata +27 -17
  127. data/spec/github_cli/api_spec.rb +0 -19
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Collaborators do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:owner) { 'peter-murach' }
8
8
  let(:repo) { 'github_cli' }
9
9
  let(:user) { 'github' }
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Commits do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:repo) { 'github_cli' }
9
9
  let(:sha) { '3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15' }
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Contents do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:repo) { 'github_cli' }
9
9
  let(:path) { 'README.md' }
@@ -0,0 +1,35 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ describe GithubCLI::Commands::Downloads do
6
+ let(:format) { {'format' => 'table'} }
7
+ let(:user) { 'peter-murach' }
8
+ let(:repo) { 'github_cli' }
9
+ let(:api_class) { GithubCLI::Download }
10
+
11
+ it "invokes download:list" do
12
+ api_class.should_receive(:all).with(user, repo, {}, format)
13
+ subject.invoke "download:list", [user, repo]
14
+ end
15
+
16
+ it "invokes download:get" do
17
+ api_class.should_receive(:get).with(user, repo, 1, {}, format)
18
+ subject.invoke "download:get", [user, repo, 1]
19
+ end
20
+
21
+ it "invokes download:create --name --size" do
22
+ api_class.should_receive(:create).with(user, repo, {"name" => 'file.png', "size" => 12345}, format)
23
+ subject.invoke "download:create", [user, repo], :name => 'file.png', :size => 12345
24
+ end
25
+
26
+ it "invokes download:upload" do
27
+ api_class.should_receive(:upload).with(user, repo, format)
28
+ subject.invoke "download:upload", [user, repo]
29
+ end
30
+
31
+ it "invokes download:delete" do
32
+ api_class.should_receive(:delete).with(user, repo, 1, {}, format)
33
+ subject.invoke "download:delete", [user, repo, 1]
34
+ end
35
+ end
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Emails do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:api_class) { GithubCLI::Email }
9
9
 
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Events do
6
- let(:format) { 'table' }
6
+ let(:format) { { 'format' => 'table' } }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:repo) { 'github_cli' }
9
9
  let(:org) { 'github' }
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Followers do
6
- let(:format) { 'table' }
6
+ let(:format) { { 'format' => 'table' } }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:api_class) { GithubCLI::Follower }
9
9
 
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Forks do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:repo) { 'github_cli' }
9
9
  let(:api_class) { GithubCLI::Fork }
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Gists do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:id) { 1 }
9
9
  let(:api_class) { GithubCLI::Gist }
@@ -13,6 +13,11 @@ describe GithubCLI::Commands::Gists do
13
13
  subject.invoke "gist:list", []
14
14
  end
15
15
 
16
+ it "invokes gist:list --public" do
17
+ api_class.should_receive(:all).with({}, format.merge("public" => true))
18
+ subject.invoke "gist:list", [], {:public => true}
19
+ end
20
+
16
21
  it "invokes gist:list --user" do
17
22
  api_class.should_receive(:all).with({"user" => user}, format)
18
23
  subject.invoke "gist:list", [], :user => user
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Issues do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:repo) { 'github_cli' }
9
9
  let(:org) { 'github' }
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Keys do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:id) { 1 }
8
8
  let(:user) { 'peter-murach' }
9
9
  let(:repo) { 'github' }
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Labels do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:repo) { 'github_cli' }
9
9
  let(:name) { 'bug' }
@@ -15,7 +15,7 @@ describe GithubCLI::Commands::Labels do
15
15
  end
16
16
 
17
17
  it "invokes label:list --milestone 1" do
18
- api_class.should_receive(:all).with(user, repo, {'milestone_id' => 1}, 'csv')
18
+ api_class.should_receive(:all).with(user, repo, {'milestone_id' => 1}, {'format' => 'csv'})
19
19
  subject.invoke "label:list", [user, repo], :milestone => 1, :format => 'csv'
20
20
  end
21
21
 
@@ -34,11 +34,21 @@ describe GithubCLI::Commands::Labels do
34
34
  subject.invoke "label:create", [user, repo]
35
35
  end
36
36
 
37
+ it "invokes label:create" do
38
+ api_class.should_receive(:create).with(user, repo, {'color' => 'FFFFFF'}, format)
39
+ subject.invoke "label:create", [user, repo], {'color' => 'FFFFFF'}
40
+ end
41
+
37
42
  it "invokes label:update" do
38
43
  api_class.should_receive(:update).with(user, repo, name, {}, format)
39
44
  subject.invoke "label:update", [user, repo, name]
40
45
  end
41
46
 
47
+ it "invokes label:update" do
48
+ api_class.should_receive(:update).with(user, repo, name, {'color' => 'FFFFFF'}, format)
49
+ subject.invoke "label:update", [user, repo, name], {'color' => 'FFFFFF'}
50
+ end
51
+
42
52
  it "invokes label:delete" do
43
53
  api_class.should_receive(:delete).with(user, repo, name, {}, format)
44
54
  subject.invoke "label:delete", [user, repo, name]
@@ -50,7 +60,7 @@ describe GithubCLI::Commands::Labels do
50
60
  end
51
61
 
52
62
  it "invokes lable:remove" do
53
- api_class.should_receive(:remove).with(user, repo, '1', nil, {}, format)
63
+ api_class.should_receive(:remove).with(user, repo, '1', {}, format)
54
64
  subject.invoke "label:remove", [user, repo, '1']
55
65
  end
56
66
 
@@ -0,0 +1,46 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ describe GithubCLI::Commands::Members do
6
+ let(:format) { {'format' => 'table'} }
7
+ let(:user) { 'peter-murach' }
8
+ let(:repo) { 'github_cli' }
9
+ let(:org) { 'github' }
10
+ let(:api_class) { GithubCLI::Member }
11
+
12
+ it "invokes member:list" do
13
+ api_class.should_receive(:all).with(org, {}, format)
14
+ subject.invoke "member:list", [org]
15
+ end
16
+
17
+ it "invokes member:list --public" do
18
+ api_class.should_receive(:all).with(org, {'public' => true}, format)
19
+ subject.invoke "member:list", [org], {:public => true}
20
+ end
21
+
22
+ it "invokes member:member" do
23
+ api_class.should_receive(:member?).with(org, user, {}, format)
24
+ subject.invoke "member:member", [org, user]
25
+ end
26
+
27
+ it "invokes member:member --public" do
28
+ api_class.should_receive(:member?).with(org, user, {}, format)
29
+ subject.invoke "member:member", [org, user]
30
+ end
31
+
32
+ it "invokes member:delete" do
33
+ api_class.should_receive(:delete).with(org, user, {}, format)
34
+ subject.invoke "member:delete", [org, user]
35
+ end
36
+
37
+ it "invokes member:publicize" do
38
+ api_class.should_receive(:publicize).with(org, user, {}, format)
39
+ subject.invoke "member:publicize", [org, user]
40
+ end
41
+
42
+ it "invokes member:conceal" do
43
+ api_class.should_receive(:conceal).with(org, user, {}, format)
44
+ subject.invoke "member:conceal", [org, user]
45
+ end
46
+ end
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Merging do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:repo) { 'github_cli' }
9
9
  let(:id) { 1 }
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Milestones do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:repo) { 'github_cli' }
9
9
  let(:api_class) { GithubCLI::Milestone }
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Notifications do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:repo) { 'github_cli' }
9
9
  let(:id) { 1 }
@@ -0,0 +1,30 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ describe GithubCLI::Commands::Organizations do
6
+ let(:format) { {'format' => 'table'} }
7
+ let(:user) { 'peter-murach' }
8
+ let(:org) { 'github' }
9
+ let(:api_class) { GithubCLI::Organization }
10
+
11
+ it "invokes org:list" do
12
+ api_class.should_receive(:list).with({}, format)
13
+ subject.invoke "org:list", []
14
+ end
15
+
16
+ it "invokes org:list --user" do
17
+ api_class.should_receive(:list).with({'user' => user}, format)
18
+ subject.invoke "org:list", [], {:user => user}
19
+ end
20
+
21
+ it "invokes org:get" do
22
+ api_class.should_receive(:get).with(org, {}, format)
23
+ subject.invoke "org:get", [org]
24
+ end
25
+
26
+ it "invokes org:edit" do
27
+ api_class.should_receive(:edit).with(org, {'name' => 'new'}, format)
28
+ subject.invoke "org:edit", [org], {'name' => 'new'}
29
+ end
30
+ end
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::PullRequests do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:repo) { 'github_cli' }
9
9
  let(:number) { 1 }
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::References do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:repo) { 'github_cli' }
9
9
  let(:ref) { 'refs/master' }
@@ -14,6 +14,11 @@ describe GithubCLI::Commands::Repositories do
14
14
  subject.invoke "repo:list", []
15
15
  end
16
16
 
17
+ it "invokes repo:list --every" do
18
+ api_class.should_receive(:all).with({}, format.merge('every' => true))
19
+ subject.invoke "repo:list", [], {:every => true}
20
+ end
21
+
17
22
  it "invokes repo:list --org" do
18
23
  api_class.should_receive(:all).with({"org" => org}, format)
19
24
  subject.invoke "repo:list", [], :org => org
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Starring do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:repo) { 'github_cli' }
9
9
  let(:api_class) { GithubCLI::Starring }
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Statuses do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:repo) { 'github_cli' }
9
9
  let(:sha) { '7f86c1b73255d4409348d68eb75f7cbbc2aa5c74' }
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Tags do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:repo) { 'github_cli' }
9
9
  let(:sha) { '3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15' }
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Teams do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:repo) { 'github_cli' }
9
9
  let(:org) { 'rails' }
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Trees do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:repo) { 'github_cli' }
9
9
  let(:sha) { '3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15' }
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Users do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:name) { 'github_cli' }
9
9
  let(:api_class) { GithubCLI::User }
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe GithubCLI::Commands::Watching do
6
- let(:format) { 'table' }
6
+ let(:format) { {'format' => 'table'} }
7
7
  let(:user) { 'peter-murach' }
8
8
  let(:repo) { 'github_cli' }
9
9
  let(:api_class) { GithubCLI::Watching }
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.5.9
4
+ version: 0.6.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-17 00:00:00.000000000Z
12
+ date: 2013-06-01 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: github_api
16
- requirement: &2160827640 !ruby/object:Gem::Requirement
16
+ requirement: &2153441100 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: '0.9'
21
+ version: '0.10'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2160827640
24
+ version_requirements: *2153441100
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &2160826680 !ruby/object:Gem::Requirement
27
+ requirement: &2153440620 !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: :development
34
34
  prerelease: false
35
- version_requirements: *2160826680
35
+ version_requirements: *2153440620
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: aruba
38
- requirement: &2160823300 !ruby/object:Gem::Requirement
38
+ requirement: &2153440100 !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: *2160823300
46
+ version_requirements: *2153440100
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
- requirement: &2160822640 !ruby/object:Gem::Requirement
49
+ requirement: &2153439280 !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: *2160822640
57
+ version_requirements: *2153439280
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: communist
60
- requirement: &2160822040 !ruby/object:Gem::Requirement
60
+ requirement: &2153438820 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *2160822040
68
+ version_requirements: *2153438820
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: ronn
71
- requirement: &2160821340 !ruby/object:Gem::Requirement
71
+ requirement: &2153438080 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *2160821340
79
+ version_requirements: *2153438080
80
80
  description: CLI-based access to GitHub API v3
81
81
  email:
82
82
  - ''
@@ -97,6 +97,7 @@ files:
97
97
  - Rakefile
98
98
  - bin/gcli
99
99
  - features/assignee.feature
100
+ - features/authorization.feature
100
101
  - features/blob.feature
101
102
  - features/collaborator.feature
102
103
  - features/commit.feature
@@ -266,7 +267,8 @@ files:
266
267
  - man/gcli.1.ronn
267
268
  - screenshots/command.png
268
269
  - screenshots/interface.png
269
- - spec/github_cli/api_spec.rb
270
+ - spec/github_cli/api/configure_spec.rb
271
+ - spec/github_cli/api/github_api_spec.rb
270
272
  - spec/github_cli/cli_spec.rb
271
273
  - spec/github_cli/command_spec.rb
272
274
  - spec/github_cli/commands/assignees_spec.rb
@@ -275,6 +277,7 @@ files:
275
277
  - spec/github_cli/commands/collaborators_spec.rb
276
278
  - spec/github_cli/commands/commits_spec.rb
277
279
  - spec/github_cli/commands/contents_spec.rb
280
+ - spec/github_cli/commands/downloads_spec.rb
278
281
  - spec/github_cli/commands/emails_spec.rb
279
282
  - spec/github_cli/commands/events_spec.rb
280
283
  - spec/github_cli/commands/followers_spec.rb
@@ -284,9 +287,11 @@ files:
284
287
  - spec/github_cli/commands/issues_spec.rb
285
288
  - spec/github_cli/commands/keys_spec.rb
286
289
  - spec/github_cli/commands/labels_spec.rb
290
+ - spec/github_cli/commands/members_spec.rb
287
291
  - spec/github_cli/commands/merging_spec.rb
288
292
  - spec/github_cli/commands/milestones_spec.rb
289
293
  - spec/github_cli/commands/notifications_spec.rb
294
+ - spec/github_cli/commands/organizations_spec.rb
290
295
  - spec/github_cli/commands/pull_requests_spec.rb
291
296
  - spec/github_cli/commands/references_spec.rb
292
297
  - spec/github_cli/commands/repositories_spec.rb
@@ -343,6 +348,7 @@ summary: github_cli is a set of tools that provide full command line access to G
343
348
  API v3
344
349
  test_files:
345
350
  - features/assignee.feature
351
+ - features/authorization.feature
346
352
  - features/blob.feature
347
353
  - features/collaborator.feature
348
354
  - features/commit.feature
@@ -382,7 +388,8 @@ test_files:
382
388
  - features/usage.feature
383
389
  - features/user.feature
384
390
  - features/watching.feature
385
- - spec/github_cli/api_spec.rb
391
+ - spec/github_cli/api/configure_spec.rb
392
+ - spec/github_cli/api/github_api_spec.rb
386
393
  - spec/github_cli/cli_spec.rb
387
394
  - spec/github_cli/command_spec.rb
388
395
  - spec/github_cli/commands/assignees_spec.rb
@@ -391,6 +398,7 @@ test_files:
391
398
  - spec/github_cli/commands/collaborators_spec.rb
392
399
  - spec/github_cli/commands/commits_spec.rb
393
400
  - spec/github_cli/commands/contents_spec.rb
401
+ - spec/github_cli/commands/downloads_spec.rb
394
402
  - spec/github_cli/commands/emails_spec.rb
395
403
  - spec/github_cli/commands/events_spec.rb
396
404
  - spec/github_cli/commands/followers_spec.rb
@@ -400,9 +408,11 @@ test_files:
400
408
  - spec/github_cli/commands/issues_spec.rb
401
409
  - spec/github_cli/commands/keys_spec.rb
402
410
  - spec/github_cli/commands/labels_spec.rb
411
+ - spec/github_cli/commands/members_spec.rb
403
412
  - spec/github_cli/commands/merging_spec.rb
404
413
  - spec/github_cli/commands/milestones_spec.rb
405
414
  - spec/github_cli/commands/notifications_spec.rb
415
+ - spec/github_cli/commands/organizations_spec.rb
406
416
  - spec/github_cli/commands/pull_requests_spec.rb
407
417
  - spec/github_cli/commands/references_spec.rb
408
418
  - spec/github_cli/commands/repositories_spec.rb
@@ -1,19 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe GithubCLI::API do
4
- context '#github_api' do
5
- before(:each) { described_class.send(:class_variable_set, :@@api, nil) }
6
-
7
- it 'sets up github api connection' do
8
- github_instance = stub.as_null_object
9
- Github.should_receive(:new).and_return github_instance
10
- described_class.github_api.should == github_instance
11
- end
12
-
13
- it 'does not instantiate on subsequent calls' do
14
- described_class.github_api
15
- Github.should_receive(:new).exactly(0).times
16
- described_class.github_api
17
- end
18
- end
19
- end # GithubCLI::API