octopi 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. data/.gitignore +5 -0
  2. data/Rakefile +2 -84
  3. data/examples/authenticated.rb +20 -0
  4. data/examples/github.yml.example +14 -0
  5. data/examples/issues.rb +18 -0
  6. data/examples/overall.rb +50 -0
  7. data/lib/octopi/version.rb +3 -0
  8. data/octopi.gemspec +20 -93
  9. data/real_world_test/commit_test.rb +20 -0
  10. data/real_world_test/repository_test.rb +19 -0
  11. data/real_world_test/test_helper.rb +11 -0
  12. data/test/.gitconfig +3 -0
  13. data/test/api_test.rb +58 -0
  14. data/test/authenticated_test.rb +39 -0
  15. data/test/base_test.rb +20 -0
  16. data/test/blob_test.rb +23 -0
  17. data/test/branch_test.rb +20 -0
  18. data/test/commit_test.rb +89 -0
  19. data/test/file_object_test.rb +39 -0
  20. data/test/gist_test.rb +16 -0
  21. data/test/issue_comment.rb +19 -0
  22. data/test/issue_set_test.rb +33 -0
  23. data/test/issue_test.rb +136 -0
  24. data/test/key_set_test.rb +29 -0
  25. data/test/key_test.rb +35 -0
  26. data/test/repository_set_test.rb +23 -0
  27. data/test/repository_test.rb +164 -0
  28. data/test/stubs/account +691 -0
  29. data/test/stubs/blob/fcoury/octopi/plain/f6609209c3ac0badd004512d318bfaa508ea10ae +20 -0
  30. data/test/stubs/comments/fcoury/octopi/comments +30 -0
  31. data/test/stubs/comments/fcoury/octopi/comments.atom +48 -0
  32. data/test/stubs/commits/fcoury/octopi/f6609209c3ac0badd004512d318bfaa508ea10ae +94 -0
  33. data/test/stubs/commits/fcoury/octopi/lazy +491 -0
  34. data/test/stubs/commits/fcoury/octopi/master +477 -0
  35. data/test/stubs/commits/fcoury/octopi/octopi.rb +818 -0
  36. data/test/stubs/commits/fcoury/rboard/master +437 -0
  37. data/test/stubs/dashboard +231 -0
  38. data/test/stubs/errors/repository/not_found +16 -0
  39. data/test/stubs/gists/159579 +18 -0
  40. data/test/stubs/issues/fcoury/octopi/27 +42 -0
  41. data/test/stubs/issues/fcoury/octopi/27-reopened +27 -0
  42. data/test/stubs/issues/fcoury/octopi/28 +27 -0
  43. data/test/stubs/issues/fcoury/octopi/28-closed +27 -0
  44. data/test/stubs/issues/fcoury/octopi/28-edited +27 -0
  45. data/test/stubs/issues/fcoury/octopi/closed +175 -0
  46. data/test/stubs/issues/fcoury/octopi/comment/28-comment +15 -0
  47. data/test/stubs/issues/fcoury/octopi/labels/28-maybe-two-point-oh +16 -0
  48. data/test/stubs/issues/fcoury/octopi/labels/28-one-point-oh +16 -0
  49. data/test/stubs/issues/fcoury/octopi/labels/28-remove-maybe-two-point-oh +14 -0
  50. data/test/stubs/issues/fcoury/octopi/labels/28-remove-one-point-oh +15 -0
  51. data/test/stubs/issues/fcoury/octopi/new +27 -0
  52. data/test/stubs/issues/fcoury/octopi/open +329 -0
  53. data/test/stubs/issues/fcoury/octopi/search +139 -0
  54. data/test/stubs/login +157 -0
  55. data/test/stubs/repos/fcoury/octopi/branches +18 -0
  56. data/test/stubs/repos/fcoury/octopi/collaborators +16 -0
  57. data/test/stubs/repos/fcoury/octopi/delete-token +13 -0
  58. data/test/stubs/repos/fcoury/octopi/languages +16 -0
  59. data/test/stubs/repos/fcoury/octopi/main +12 -0
  60. data/test/stubs/repos/fcoury/octopi/master +24 -0
  61. data/test/stubs/repos/fcoury/octopi/tags +23 -0
  62. data/test/stubs/repos/fcoury/octopus/main +24 -0
  63. data/test/stubs/repos/fcoury/rboard/main +12 -0
  64. data/test/stubs/repos/fcoury/rboard/master +24 -0
  65. data/test/stubs/repos/search +238 -0
  66. data/test/stubs/repos/show/fcoury +463 -0
  67. data/test/stubs/repos/show/fcoury-private +454 -0
  68. data/test/stubs/tree/fcoury/octopi/f6609209c3ac0badd004512d318bfaa508ea10ae +54 -0
  69. data/test/stubs/users/Caged +26 -0
  70. data/test/stubs/users/FooBarWidget +26 -0
  71. data/test/stubs/users/aslakhellesoy +26 -0
  72. data/test/stubs/users/augustl +26 -0
  73. data/test/stubs/users/bcalloway +26 -0
  74. data/test/stubs/users/benaskins +26 -0
  75. data/test/stubs/users/benhoskings +26 -0
  76. data/test/stubs/users/bjeanes +27 -0
  77. data/test/stubs/users/cldwalker +26 -0
  78. data/test/stubs/users/danlucraft +26 -0
  79. data/test/stubs/users/dchelimsky +26 -0
  80. data/test/stubs/users/dcrec1 +26 -0
  81. data/test/stubs/users/defunkt +26 -0
  82. data/test/stubs/users/derencius +26 -0
  83. data/test/stubs/users/diy +21 -0
  84. data/test/stubs/users/documentcloud +26 -0
  85. data/test/stubs/users/drnic +26 -0
  86. data/test/stubs/users/dustin +26 -0
  87. data/test/stubs/users/eladmeidar +26 -0
  88. data/test/stubs/users/elliottcable +26 -0
  89. data/test/stubs/users/entp +26 -0
  90. data/test/stubs/users/fcoury +26 -0
  91. data/test/stubs/users/fcoury-private +36 -0
  92. data/test/stubs/users/follow +15 -0
  93. data/test/stubs/users/follow-rails +15 -0
  94. data/test/stubs/users/followers +24 -0
  95. data/test/stubs/users/following +28 -0
  96. data/test/stubs/users/giraffesoft +26 -0
  97. data/test/stubs/users/gwoliveira +26 -0
  98. data/test/stubs/users/hashrocket +26 -0
  99. data/test/stubs/users/hcatlin +26 -0
  100. data/test/stubs/users/jamis +26 -0
  101. data/test/stubs/users/jnicklas +26 -0
  102. data/test/stubs/users/jnunemaker +26 -0
  103. data/test/stubs/users/jruby +21 -0
  104. data/test/stubs/users/kballard +26 -0
  105. data/test/stubs/users/kchris +26 -0
  106. data/test/stubs/users/key-added +20 -0
  107. data/test/stubs/users/key-removed +17 -0
  108. data/test/stubs/users/keys +21 -0
  109. data/test/stubs/users/knewter +26 -0
  110. data/test/stubs/users/lachie +26 -0
  111. data/test/stubs/users/lachlanhardy +26 -0
  112. data/test/stubs/users/lenary +26 -0
  113. data/test/stubs/users/lifo +26 -0
  114. data/test/stubs/users/maccman +26 -0
  115. data/test/stubs/users/markgandolfo +26 -0
  116. data/test/stubs/users/mbleigh +26 -0
  117. data/test/stubs/users/mhodgson +26 -0
  118. data/test/stubs/users/mocra +26 -0
  119. data/test/stubs/users/mojombo +26 -0
  120. data/test/stubs/users/newbamboo +26 -0
  121. data/test/stubs/users/notahat +26 -0
  122. data/test/stubs/users/opscode +26 -0
  123. data/test/stubs/users/paulorv +26 -0
  124. data/test/stubs/users/pvande +21 -0
  125. data/test/stubs/users/rack +26 -0
  126. data/test/stubs/users/radar +26 -0
  127. data/test/stubs/users/rails +26 -0
  128. data/test/stubs/users/railscampau +21 -0
  129. data/test/stubs/users/redinger +26 -0
  130. data/test/stubs/users/remi +26 -0
  131. data/test/stubs/users/search-radar +27 -0
  132. data/test/stubs/users/shanesveller +26 -0
  133. data/test/stubs/users/shuber +26 -0
  134. data/test/stubs/users/softprops +26 -0
  135. data/test/stubs/users/superfeedr +26 -0
  136. data/test/stubs/users/svenfuchs +26 -0
  137. data/test/stubs/users/taylorrf +26 -0
  138. data/test/stubs/users/technoweenie +26 -0
  139. data/test/stubs/users/tgraham +26 -0
  140. data/test/stubs/users/thoughtbot +26 -0
  141. data/test/stubs/users/tmm1 +26 -0
  142. data/test/stubs/users/tobi +26 -0
  143. data/test/stubs/users/tpope +26 -0
  144. data/test/stubs/users/unfollow-rails +14 -0
  145. data/test/stubs/users/watched-repos +1668 -0
  146. data/test/stubs/users/webbynode +26 -0
  147. data/test/stubs/users/wvanbergen +26 -0
  148. data/test/stubs/users/wycats +26 -0
  149. data/test/tag_test.rb +20 -0
  150. data/test/test_helper.rb +251 -0
  151. data/test/user_test.rb +97 -0
  152. data/test_auth.rb +5 -0
  153. metadata +359 -73
@@ -0,0 +1,29 @@
1
+ require File.join(File.dirname(__FILE__), 'test_helper')
2
+
3
+ class KeySetTest < Test::Unit::TestCase
4
+ include Octopi
5
+
6
+ def setup
7
+ fake_everything
8
+ @user = User.find("fcoury")
9
+ end
10
+
11
+
12
+ context KeySet do
13
+ should "be able to find a key" do
14
+ auth do
15
+ assert_not_nil Api.me.keys.find("macbook")
16
+ end
17
+ end
18
+
19
+ should "not be able to find a key without a valid title" do
20
+ exception = assert_raise NotFound do
21
+ auth do
22
+ assert_not_nil Api.me.keys.find("windows-box")
23
+ end
24
+ end
25
+
26
+ assert_equal "The Key you were looking for could not be found, or is private.", exception.message
27
+ end
28
+ end
29
+ end
data/test/key_test.rb ADDED
@@ -0,0 +1,35 @@
1
+ require File.join(File.dirname(__FILE__), 'test_helper')
2
+
3
+ class KeyTest < Test::Unit::TestCase
4
+ include Octopi
5
+
6
+ def setup
7
+ fake_everything
8
+ @user = User.find("fcoury")
9
+ auth do
10
+ @key = Api.me.keys.first
11
+ end
12
+ end
13
+
14
+ context Key do
15
+
16
+ should "be able to add a key" do
17
+ auth do
18
+ Key.add(:title => "other-computer", :key => "AAAAB3NzaC1yc2EAAAABIwAAAQEA0dyfPrSHHSVD0u3JQlJfLyUrEVeNDW+9imbMHwiuT/IStf8SOroRjWT+/S5cL9m6qmKQBIU4v3LUnMKLTHfiWlqICnTDVRHuSayrHGp193I9kTSGBdM7wFZ2E8hDv5OqXHvAKGmOJvl5RqK0d42mhoK/x3bLRMQXHxwSDmYIFLy9rXLMvbVbdFJbbcqXP6QjnP4fAeebvTnUs6bVzInL9nh8Tqb3qjB5qji2i0MiCz3IouuZonOlef/VEac3Zpm6NcI5rVthPsMY55G8BMu4rVEStbIUlAJPoSBzqOgEKEXQbmWLh3CZnOoqQlLwIIvrKlwnXx26M1b+oOFm8s712Q==")
19
+ end
20
+ end
21
+
22
+ should "be able to remove a key" do
23
+ auth do
24
+ assert_equal 2, Api.me.keys.size
25
+ @key.remove
26
+ # Just trust me on this one
27
+ FakeWeb.register_uri(:get, "https://#{yaml_api}/user/keys" + auth_query, :response => stub_file(File.join("users", "key-removed")))
28
+ assert_equal 1, Api.me.keys.size
29
+ end
30
+ end
31
+
32
+
33
+
34
+ end
35
+ end
@@ -0,0 +1,23 @@
1
+ require File.join(File.dirname(__FILE__), 'test_helper')
2
+
3
+ class RepositorySetTest < Test::Unit::TestCase
4
+ include Octopi
5
+
6
+ def setup
7
+ fake_everything
8
+ @user = User.find("fcoury")
9
+ end
10
+
11
+
12
+ context RepositorySet do
13
+
14
+ should "return a repository set" do
15
+ assert @user.repositories.is_a?(RepositorySet)
16
+ end
17
+
18
+ should "be able to find a repository" do
19
+ assert_not_nil @user.repositories.find("octopi")
20
+ end
21
+
22
+ end
23
+ end
@@ -0,0 +1,164 @@
1
+ require File.join(File.dirname(__FILE__), 'test_helper')
2
+
3
+ class RepositoryTest < Test::Unit::TestCase
4
+ include Octopi
5
+
6
+ def setup
7
+ fake_everything
8
+ @user = User.find("fcoury")
9
+ @private_repos = auth do
10
+ @private = @user.repositories.find("rboard")
11
+ @user.repositories
12
+ end
13
+ @repository = @user.repositories.find("octopi")
14
+ end
15
+
16
+
17
+ context Repository do
18
+
19
+ should "not retry for a repository you don't have access to" do
20
+ FakeWeb.register_uri(:get, "https://#{yaml_api}/repos/show/github/github", :status => 403)
21
+
22
+ exception = assert_raise APIError do
23
+ Repository.find(:user => "github", :name => "github")
24
+ end
25
+
26
+ assert_equal exception.message, "Github returned status 403, you may not have access to this resource."
27
+ end
28
+
29
+ should "return a repository for a user" do
30
+ assert_not_nil @user.repository(:name => "octopi")
31
+ assert @user.repository(:name => "octopi").is_a?(Repository)
32
+ end
33
+
34
+ should "return a repository for a login" do
35
+ assert_not_nil Repository.find(:user => "fcoury", :name => "octopi")
36
+ end
37
+
38
+ should "be able to look up the repository based on the user and name" do
39
+ assert_not_nil Repository.find(:user => @user, :name => "octopi")
40
+ end
41
+
42
+ should "have a User as the owner" do
43
+ assert @repository.owner.is_a?(User)
44
+ end
45
+
46
+ should "return repositories" do
47
+ assert_equal 45, @user.repositories.size
48
+ end
49
+
50
+ should "return more repositories if authed" do
51
+ assert_equal 44, @private_repos.size
52
+ end
53
+
54
+ should "not return a repository when asked for a private one" do
55
+ exception = assert_raise NotFound do
56
+ @user.repository(:name => "rboard")
57
+ end
58
+
59
+ assert_equal "The Repository you were looking for could not be found, or is private.", exception.message
60
+ end
61
+
62
+ should "return a private repository when authed" do
63
+ auth do
64
+ assert_not_nil @user.repository(:name => "rboard")
65
+ end
66
+ end
67
+
68
+ should "be able to search for similar repositories" do
69
+ repos = Repository.search("ruby", "testing")
70
+ assert_not_nil repos
71
+ assert repos.first.is_a?(Repository)
72
+ end
73
+
74
+ should "be able to find the latest 30 commits" do
75
+ commits = @repository.commits
76
+ assert_not_nil commits
77
+ assert_equal 30, commits.size
78
+ end
79
+
80
+
81
+ should "be able to find all open issues" do
82
+ issues = @repository.issues
83
+ assert_not_nil issues
84
+ assert_equal 21, issues.size
85
+ end
86
+
87
+ should "be able to find all issues, regardless of state" do
88
+ issues = @repository.all_issues
89
+ assert_not_nil issues
90
+ assert_equal 30, issues.size
91
+ end
92
+
93
+ should "be able to find an issue" do
94
+ assert_not_nil @repository.issue(28)
95
+ end
96
+
97
+ should "be able to find all collaborators" do
98
+ @collaborators = @repository.collaborators
99
+ assert_not_nil @collaborators
100
+ assert_equal 2, @collaborators.size
101
+ assert @collaborators.first.is_a?(User)
102
+ assert @collaborators.last.is_a?(User)
103
+ end
104
+
105
+ should "be able to find all languages" do
106
+ @languages = @repository.languages
107
+ assert_equal 2, @languages.size
108
+ assert_equal 111555, @languages["Ruby"]
109
+ end
110
+
111
+ should "be able to create a repository" do
112
+ auth do
113
+ Repository.create(:name => "octopus")
114
+ end
115
+ end
116
+
117
+ should "be able to create a repository under another user (or organization)" do
118
+ auth do
119
+ Repository.create(:name => "octopus", :user => "other-user")
120
+ end
121
+ end
122
+
123
+ should "be able to delete a repository" do
124
+ auth do
125
+ @repository.delete!
126
+ end
127
+ end
128
+
129
+ should "not be able to create a repository when not authed" do
130
+ assert_raise Octopi::AuthenticationRequired do
131
+ Repository.create(:name => "octopus")
132
+ end
133
+ end
134
+
135
+ should "be able to retrieve the branches" do
136
+ branches = @repository.branches
137
+ assert_not_nil branches
138
+ assert_equal 4, branches.size
139
+ end
140
+
141
+ should "be able to retrieve the tags" do
142
+ tags = @repository.tags
143
+ assert_not_nil tags
144
+ assert_equal 9, tags.size
145
+ end
146
+
147
+ should "be able to retrieve the comments" do
148
+ assert_not_nil @repository.comments
149
+ comment = @repository.comments.first
150
+ [:content, :author, :title, :updated, :link, :published, :id, :repository, :commit].each do |f|
151
+ assert_not_nil comment.send(f)
152
+ end
153
+ end
154
+
155
+ should "return the correct clone URL" do
156
+ assert_equal "git://github.com/fcoury/octopi.git", @repository.clone_url
157
+ auth do
158
+ assert_equal "git@github.com:fcoury/rboard.git", @private.clone_url
159
+ end
160
+ end
161
+
162
+
163
+ end
164
+ end
@@ -0,0 +1,691 @@
1
+ HTTP/1.1 200 OK
2
+ Server: nginx/0.6.26
3
+ Date: Fri, 31 Jul 2009 06:37:01 GMT
4
+ Content-Type: text/html; charset=utf-8
5
+ Connection: keep-alive
6
+ Set-Cookie: _github_ses=BAh7BzoJdXNlcmkDDasBIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--32c5c9290a7da6a327e19411312ab5fd1ae91773; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
7
+ Status: 200 OK
8
+ X-Runtime: 193ms
9
+ ETag: "2aa1cbbe7bb9a0c6c3276478f24abcaa"
10
+ Cache-Control: private, max-age=0, must-revalidate
11
+ Content-Length: 22518
12
+
13
+
14
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
15
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
16
+
17
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
18
+ <head>
19
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
20
+ <title>Your Account - GitHub</title>
21
+ <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub" />
22
+ <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub" />
23
+
24
+
25
+ <link href="https://assets1.github.com/stylesheets/bundle.css?6f31b78746b7d07b4a33b1593ffd193d896784bd" media="screen" rel="stylesheet" type="text/css" />
26
+
27
+
28
+
29
+
30
+ <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
31
+ <script src="https://assets3.github.com/javascripts/bundle.js?6f31b78746b7d07b4a33b1593ffd193d896784bd" type="text/javascript"></script>
32
+
33
+
34
+
35
+
36
+
37
+ <style type="text/css">
38
+ #repo_menu { border-bottom: 5px solid #ccc; margin-bottom: 1.5em; }
39
+ </style>
40
+
41
+
42
+
43
+
44
+ <script type="text/javascript">
45
+ github_user = 'fcoury'
46
+ </script>
47
+ </head>
48
+
49
+
50
+
51
+ <body>
52
+
53
+
54
+ <div id="main">
55
+ <div id="header" class="">
56
+ <div class="site">
57
+ <div class="logo">
58
+ <a href="https://github.com"><img src="/images/modules/header/logov3.png" alt="github" /></a>
59
+ </div>
60
+
61
+ <div class="topsearch">
62
+ <form action="/search" id="top_search_form" method="get">
63
+ <input type="search" class="search" name="q" /> <input type="submit" value="Search" />
64
+ <input type="hidden" name="type" value="Everything" />
65
+ <input type="hidden" name="repo" value="" />
66
+ <input type="hidden" name="langOverride" value="" />
67
+ <input type="hidden" name="start_value" value="1" />
68
+ </form>
69
+ <div class="links">
70
+ <a href="/repositories">Browse</a> | <a href="/guides">Guides</a> | <a href="/search">Advanced</a>
71
+ </div>
72
+ </div>
73
+
74
+
75
+
76
+ <div class="corner userbox">
77
+ <div class="box">
78
+ <div class="gravatar">
79
+ <a href="/"><img alt="" height="40" src="https://secure.gravatar.com/avatar/31f88863cf86286f0f6f863c53bfa697?s=40&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-40.png" width="40" /></a>
80
+ </div>
81
+
82
+ <div class="top">
83
+ <div class="name">
84
+ <a href="/">fcoury</a>
85
+ </div>
86
+ <div class="links">
87
+ <a href="/account">account</a> |
88
+ <a href="/fcoury">profile</a> |
89
+ <a href="/logout">log out</a>
90
+ </div>
91
+ </div>
92
+
93
+ <div class="bottom">
94
+ <div class="select">
95
+ <div class="site_links">
96
+ <a href="/">dashboard</a> | <a href="http://gist.github.com/mine">gists</a>
97
+ </div>
98
+
99
+ <form action="/search" class="search_repos" method="get" style="display:none;">
100
+ <input id="q" name="q" size="18" type="search" />
101
+ <input type="submit" value="Search" />
102
+ <a href="#" class="cancel_search_link">x</a>
103
+ </form>
104
+ </div>
105
+
106
+ <div class="inbox"> <span><a href="/inbox">0</a></span> </div>
107
+ </div>
108
+ </div>
109
+ </div>
110
+
111
+
112
+ </div>
113
+ </div>
114
+
115
+
116
+
117
+ <div id="repo_menu">
118
+ <div class="site">
119
+ <ul>
120
+ <li class="active"><a href="/account">Account Overview</a></li>
121
+
122
+
123
+ <li class=""><a href="/account/repositories">Repositories</a></li>
124
+ </ul>
125
+ </div>
126
+ </div>
127
+
128
+
129
+
130
+ <div class="site">
131
+
132
+
133
+
134
+
135
+ <div id="edit_user">
136
+ <div class="user">
137
+
138
+ <!-- Your User Information -->
139
+
140
+ <div class="info editbox">
141
+ <h1>Your User Information</h1>
142
+ <div class="body">
143
+ <p class="username">Username: <strong>fcoury</strong> <a class="rename" href="#">(rename)</a></p>
144
+ <form action="/users/fcoury/rename" id="user_rename" method="post" style="display: none;">
145
+ <label for='login'>Username: </label>
146
+ <input id="login" name="login" style="width:200px" type="text" value="fcoury" />
147
+ <input name="commit" type="submit" value="Update Username" /> or <a class="rename" href="#">cancel</a>
148
+ </form>
149
+
150
+ <p>API Token: <strong>8f700e0d7747826f3e56ee13651414bd</strong></p>
151
+ <p><a href="#git_config" rel="facebox">Global Git Config</a></p>
152
+ <div id="git_config" style="display:none">
153
+ <p>Want to tell GitHub aware apps like <a href="http://github.com/Caged/gitnub">GitNub</a> or <a href="http://github.com/defunkt/gist">Command Line Gist</a> who you are?</p>
154
+ <p>Copy and paste this into your terminal:</p><br />
155
+ <pre class="console">
156
+ git config --global github.user fcoury
157
+ git config --global github.token 6417354635233fbddf66de798c030f9f
158
+ </pre>
159
+ </div>
160
+ </div>
161
+ </div>
162
+
163
+ <!-- Email Addresses -->
164
+
165
+ <div class="emails editbox">
166
+ <h1>Email Addresses</h1>
167
+ <div class="body">
168
+ <ul>
169
+
170
+ <li class="email">
171
+ <img alt="" height="30" src="https://secure.gravatar.com/avatar/31f88863cf86286f0f6f863c53bfa697?s=30&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-30.png" width="30" />
172
+ <span class="address">test@mocra.com</span> <a href="/users/fcoury/remove_email" class="delete_email action">(delete)</a>
173
+ </li>
174
+
175
+
176
+ </ul>
177
+ <div class="add">
178
+ <p id="add_email_action"><a href="#">add another email address</a></p>
179
+ <form action="/users/fcoury/add_email" id="add_email_form" method="post" style="display:none">
180
+ <input name="email" type="text" /> <input type="submit" value="add" /> or <a href="#" class="action" id="cancel_add_email">cancel</a>
181
+ </form>
182
+ <!-- cancel hides form and shows link; add insert email and keep form available for rapid fire additions -->
183
+ </div>
184
+ <form>
185
+ <input id="user_toggle" class="user_toggle" name="user[notifications]" type="checkbox" checked="checked" />
186
+ <label for="user_toggle">Receive email notifications </label>
187
+ <span id="notify_save" class="succeed" style="display:none">Settings Updated</span>
188
+ </form>
189
+ <p class="hint">
190
+ If you see <img src="/images/gravatars/gravatar-16.png"/>
191
+ above it means you either don't have a Gravatar for that<br />
192
+ email address or it is not rated G. <a href="http://gravatar.com/" target="_blank">Get one for free at gravatar.com</a>.
193
+ </p>
194
+ </div>
195
+ </div>
196
+
197
+ <div id="keys" class="editbox">
198
+ <h1>
199
+ <strong>SSH Public Keys</strong>
200
+ <a target="_blank" href="http://github.com/guides/providing-your-ssh-key">Need help with public keys?</a>
201
+ </h1>
202
+ <div class="body">
203
+ <p class="danger">
204
+ You must have at least one SSH public key to push your git repo to GitHub.
205
+ </p>
206
+ <ul>
207
+
208
+ </ul>
209
+ <div class="add">
210
+ <p id="add_key_action"><a href="#">add another public key</a></p>
211
+ <form action="/account/public_keys" class="key_editing" id="new_key" method="post">
212
+ <label for="public_key_title">Title</label>
213
+ <input id="public_key_title" name="public_key[title]" size="30" type="text" />
214
+ <label for="public_key_key">Key</label>
215
+ <textarea cols="40" id="public_key_key" name="public_key[key]" rows="20"></textarea>
216
+
217
+ <input name="commit" type="submit" value="Add Key" /> or <a href="#" class="action" id="cancel_add_key">cancel</a>
218
+ </form>
219
+ </div>
220
+ <p class="hint">Our RSA fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48</p>
221
+ </div>
222
+ </div>
223
+
224
+ <!-- Admin -->
225
+
226
+ <div class="admin editbox">
227
+ <h1>Administrative</h1>
228
+ <div class="body">
229
+ <!-- password -->
230
+
231
+ <form action="/account#change_password" class="edit_user" id="change_password" method="post"><div style="margin:0;padding:0"><input name="_method" type="hidden" value="put" /></div>
232
+ <div class="field">
233
+ <label for="user_password">Password</label>
234
+ <input id="user_password" name="user[password]" style="width:15em;" type="password" />
235
+ </div>
236
+ <div class="field">
237
+ <label for="user_password_confirmation">Password confirmation</label>
238
+ <input id="user_password_confirmation" name="user[password_confirmation]" style="width:15em;" type="password" />
239
+ </div>
240
+ <div class="submit">
241
+ <input id="form_type" name="form_type" type="hidden" value="password" />
242
+ <input id="user_submit" name="commit" type="submit" value="Change Password" />
243
+ </div>
244
+ </form>
245
+ </div>
246
+ <div class="body">
247
+ <!-- cancel -->
248
+ <a href="#" id="reveal_cancel_info">Cancel My Account&hellip;</a>
249
+ <div id="cancel_info" style="display:none;">
250
+ <div class="warning">
251
+ Please note that deleting your account will delete any and all repositories you have created.
252
+ It will also delete any content you created.
253
+ <br/><br/>
254
+ Before proceeding, please be sure to review the <a href="/site/refund">Refund Policy</a> and <a href="/site/terms">Terms of Service</a> regarding account deletion.
255
+ </div>
256
+ <form action="/users/109325" id="cancel_plan" method="post"><div style="margin:0;padding:0"><input name="_method" type="hidden" value="delete" /></div>
257
+ <p><input name="commit" type="submit" value="Cancel my plan and delete my account" /></p>
258
+ </form>
259
+ </div>
260
+ </div>
261
+ </div>
262
+ </div>
263
+
264
+ <!------------------------------------------------------------------------------------>
265
+
266
+ <div class="plan">
267
+
268
+
269
+
270
+
271
+
272
+
273
+ <div id="current_plan" class="current plan_box">
274
+ <h1 style="margin:0 0 10px 0">Your Plan</h1>
275
+ <h3>
276
+ Free
277
+ <small>(<a href="#" id="change_plan_toggle" onclick="; return false;">change plan</a>)</small>
278
+ </h3>
279
+ <table>
280
+ <tr><th>Space</th><td>0KB / 300MB</td></tr>
281
+ <tr><th>Private Repos</th><td>0 / 0</td></tr>
282
+ <tr><th>Private Collaborators</th><td>0 / 0</td></tr>
283
+ <tr><th>SSL</th><td>No</td></tr>
284
+ </table>
285
+ </div>
286
+
287
+ <div id="coupon_box" class="plan_box" style="display:none;">
288
+ <h1 style="margin:0 0 10px 0">Enter Coupon</h1>
289
+ <form action="/account/cc_update" id="coupon_form" method="post">
290
+ <input type="text" name="coupon" id="coupon" size="45" />
291
+ <p style="margin-top:7px"><input name="commit" type="submit" value="Change" /> <input class="plan_cancel" onclick=";" type="button" value="Cancel" /></p>
292
+ </form>
293
+ </div>
294
+
295
+ <div id="update_plan_status" class="plan_box" style="display:none;"></div>
296
+
297
+ <div id="can_update_cc" class="plan_box dont_show" style="display:none; margin-bottom:10px; background:green; color:#fff">
298
+ <p>Before updating your plan, we'd like to give you the opportunity to update your credit card.</p>
299
+ <p style="margin-top:7px;"><input id="plan_update_button" onclick=";" type="button" value="Just update the plan" /></p>
300
+ </div>
301
+
302
+ <div id="update_cc" class="plan_box" style="display:none">
303
+
304
+ <form action="/account/cc_update" id="update_cc_form" method="post">
305
+ <input id="plan" name="plan" type="hidden" value="free" />
306
+ <h1 style="margin:0 0 10px 0">Process Credit Card</h1>
307
+ <table>
308
+ <tr>
309
+ <th valign="top">Card Type</th>
310
+ <td>
311
+ <select id="billing_type" name="billing[type]"><option value="" selected="selected"></option>
312
+ <option value="visa">Visa</option>
313
+ <option value="master">Mastercard</option>
314
+ <option value="american_express">American Express</option>
315
+ <option value="discover">Discover</option>
316
+ <option value="jcb">JCB</option>
317
+ <option value="diners">Diners Club</option></select>
318
+
319
+ </td>
320
+ </tr>
321
+ <tr>
322
+ <th valign="top">Card Number</th>
323
+ <td>
324
+ <input autocomplete="off" id="billing_number" name="billing[number]" type="text" />
325
+
326
+ </td>
327
+ </tr>
328
+ <tr>
329
+ <th valign="top">Expiration</th>
330
+ <td>
331
+ <select id="billing_month" name="billing[month]"><option value="01">01</option>
332
+ <option value="02">02</option>
333
+ <option value="03">03</option>
334
+ <option value="04">04</option>
335
+ <option value="05">05</option>
336
+ <option value="06">06</option>
337
+ <option value="07">07</option>
338
+ <option value="08">08</option>
339
+ <option value="09">09</option>
340
+ <option value="10">10</option>
341
+ <option value="11">11</option>
342
+ <option value="12">12</option></select>
343
+ <select id="billing_year" name="billing[year]"><option value="2009">2009</option>
344
+ <option value="2010">2010</option>
345
+ <option value="2011">2011</option>
346
+ <option value="2012">2012</option>
347
+ <option value="2013">2013</option>
348
+ <option value="2014">2014</option>
349
+ <option value="2015">2015</option>
350
+ <option value="2016">2016</option>
351
+ <option value="2017">2017</option>
352
+ <option value="2018">2018</option>
353
+ <option value="2019">2019</option>
354
+ <option value="2020">2020</option>
355
+ <option value="2021">2021</option>
356
+ <option value="2022">2022</option>
357
+ <option value="2023">2023</option>
358
+ <option value="2024">2024</option></select>
359
+
360
+ </td>
361
+ </tr>
362
+ </table>
363
+
364
+ <p>
365
+
366
+ </p>
367
+
368
+ <p class="legal">
369
+ Please also review our
370
+ <a href="/site/terms">Terms of Service</a>,
371
+ <a href="/site/privacy">Privacy Policy</a>, and
372
+ <a href="/site/refund">Refund Policy</a> before proceeding.
373
+ </p>
374
+ <p class="legal">
375
+ This card will be charged
376
+
377
+ <strong class="plan_pricing" id="free_cost">$0</strong>
378
+
379
+ <strong class="plan_pricing" id="micro_cost" style="display:none">$7</strong>
380
+
381
+ <strong class="plan_pricing" id="small_cost" style="display:none">$12</strong>
382
+
383
+ <strong class="plan_pricing" id="medium_cost" style="display:none">$22</strong>
384
+
385
+ <strong class="plan_pricing" id="large_cost" style="display:none">$50</strong>
386
+
387
+ <strong class="plan_pricing" id="mega_cost" style="display:none">$100</strong>
388
+
389
+ <strong class="plan_pricing" id="giga_cost" style="display:none">$200</strong>
390
+
391
+ <strong class="plan_pricing" id="ey_cost" style="display:none">$0</strong>
392
+
393
+ <strong class="plan_pricing" id="admin_cost" style="display:none">$0</strong>
394
+
395
+ <strong class="plan_pricing" id="rumble_cost" style="display:none">$0</strong>
396
+
397
+ once a month.
398
+ </p>
399
+
400
+ <input name="commit" type="submit" value="Process Credit Card" />
401
+
402
+ <input class="plan_cancel" onclick=";" type="button" value="Cancel" />
403
+
404
+ </form>
405
+ </div>
406
+
407
+ </div> <!-- /plan -->
408
+
409
+ <div id="change_plan" style="display: none">
410
+ <h2>GitHub Plans</h2>
411
+
412
+ <form action="/account/plan_change" method="post">
413
+
414
+
415
+ <table cellpadding="0" cellspacing="0">
416
+ <tr>
417
+ <th></th>
418
+
419
+
420
+
421
+
422
+ <th >
423
+ <h3>Giga</h3>
424
+ <span class="plan_cost">$200/month</span><br />
425
+
426
+ <a class="change_plan_link" href="#giga">Upgrade</a>
427
+
428
+ </th>
429
+
430
+ <th >
431
+ <h3>Mega</h3>
432
+ <span class="plan_cost">$100/month</span><br />
433
+
434
+ <a class="change_plan_link" href="#mega">Upgrade</a>
435
+
436
+ </th>
437
+
438
+ <th >
439
+ <h3>Large</h3>
440
+ <span class="plan_cost">$50/month</span><br />
441
+
442
+ <a class="change_plan_link" href="#large">Upgrade</a>
443
+
444
+ </th>
445
+
446
+ <th >
447
+ <h3>Medium</h3>
448
+ <span class="plan_cost">$22/month</span><br />
449
+
450
+ <a class="change_plan_link" href="#medium">Upgrade</a>
451
+
452
+ </th>
453
+
454
+ <th >
455
+ <h3>Small</h3>
456
+ <span class="plan_cost">$12/month</span><br />
457
+
458
+ <a class="change_plan_link" href="#small">Upgrade</a>
459
+
460
+ </th>
461
+
462
+ <th >
463
+ <h3>Micro</h3>
464
+ <span class="plan_cost">$7/month</span><br />
465
+
466
+ <a class="change_plan_link" href="#micro">Upgrade</a>
467
+
468
+ </th>
469
+
470
+ <th style="background:#ffffcc">
471
+ <h3>Free</h3>
472
+ <span class="plan_cost">$0/month</span><br />
473
+
474
+ <span style="color:#aaa">Your Plan</span>
475
+
476
+ </th>
477
+
478
+ </tr>
479
+
480
+ <tr>
481
+ <td style="font-weight: bold">
482
+ Number of Private Repositories
483
+ </td>
484
+
485
+
486
+
487
+
488
+ <td >
489
+ 300
490
+ </td>
491
+
492
+ <td >
493
+ 125
494
+ </td>
495
+
496
+ <td >
497
+ 50
498
+ </td>
499
+
500
+ <td >
501
+ 20
502
+ </td>
503
+
504
+ <td >
505
+ 10
506
+ </td>
507
+
508
+ <td >
509
+ 5
510
+ </td>
511
+
512
+ <td style="background:#ffffcc">
513
+ 0
514
+ </td>
515
+
516
+ </tr>
517
+
518
+ <tr>
519
+ <td style="font-weight: bold">
520
+ Number of Private Collaborators
521
+ </td>
522
+
523
+
524
+
525
+
526
+ <td >
527
+ 100
528
+ </td>
529
+
530
+ <td >
531
+ 60
532
+ </td>
533
+
534
+ <td >
535
+ 25
536
+ </td>
537
+
538
+ <td >
539
+ 10
540
+ </td>
541
+
542
+ <td >
543
+ 5
544
+ </td>
545
+
546
+ <td >
547
+ 1
548
+ </td>
549
+
550
+ <td style="background:#ffffcc">
551
+ 0
552
+ </td>
553
+
554
+ </tr>
555
+
556
+ <tr>
557
+ <td style="font-weight: bold">
558
+ File Storage
559
+ </td>
560
+
561
+
562
+
563
+
564
+ <td >
565
+ 60.00 GB
566
+ </td>
567
+
568
+ <td >
569
+ 20.00 GB
570
+ </td>
571
+
572
+ <td >
573
+ 6.00 GB
574
+ </td>
575
+
576
+ <td >
577
+ 2.40 GB
578
+ </td>
579
+
580
+ <td >
581
+ 1.17 GB
582
+ </td>
583
+
584
+ <td >
585
+ 0.59 GB
586
+ </td>
587
+
588
+ <td style="background:#ffffcc">
589
+ 0.29 GB
590
+ </td>
591
+
592
+ </tr>
593
+
594
+ <tr>
595
+ <td style="font-weight: bold">
596
+ SSL secure transmission
597
+ </td>
598
+
599
+
600
+
601
+
602
+ <td >
603
+ &#10003;
604
+ </td>
605
+
606
+ <td >
607
+ &#10003;
608
+ </td>
609
+
610
+ <td >
611
+ &#10003;
612
+ </td>
613
+
614
+ <td >
615
+ &#10003;
616
+ </td>
617
+
618
+ <td >
619
+ &#10003;
620
+ </td>
621
+
622
+ <td >
623
+ &#10003;
624
+ </td>
625
+
626
+ <td style="background:#ffffcc">
627
+ &mdash;
628
+ </td>
629
+
630
+ </tr>
631
+
632
+ </table>
633
+ </form>
634
+
635
+ <p style="float:right"><a href="#coupon" style="margin-top:1em" class="change_plan_link">Have a Coupon?</a></p>
636
+ <p class="plan_cancel"><a href="#">Nevermind, take me back</a></p>
637
+ </div> <!-- /change_plan -->
638
+
639
+ </div>
640
+
641
+ </div>
642
+
643
+
644
+
645
+ <div class="push"></div>
646
+ </div>
647
+
648
+ <div id="footer">
649
+ <div class="site">
650
+ <div class="info">
651
+ <div class="links">
652
+ <a href="http://github.com/blog"><b>Blog</b></a> |
653
+ <a href="http://support.github.com/">Support</a> |
654
+ <a href="http://github.com/training">Training</a> |
655
+ <a href="http://github.com/contact">Contact</a> |
656
+ <a href="http://develop.github.com">API</a> |
657
+ <a href="http://twitter.com/github">Status</a> |
658
+ <a href="http://twitter.com/github">GitHub on Twitter</a> |
659
+ <a href="http://github.com/guides/home">Help</a>
660
+
661
+ </div>
662
+ <div class="company">
663
+ <span id="_rrt" title="0.12483s from xc88-s00039">GitHub</span>&trade;
664
+ is <a href="http://logicalawesome.com/">Logical Awesome</a> &copy;2009 | <a href="/site/terms">Terms of Service</a> | <a href="/site/privacy">Privacy Policy</a>
665
+ </div>
666
+ </div>
667
+ <div class="sponsor">
668
+ <a href="http://engineyard.com"><img src="/images/modules/footer/ey-rubyhosting.png" alt="Engine Yard" /></a>
669
+ </div>
670
+ </div>
671
+ </div>
672
+
673
+ <div id="coming_soon" style="display:none;">
674
+ This feature is coming soon. Sit tight!
675
+ </div>
676
+
677
+
678
+ <script type="text/javascript">
679
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
680
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
681
+ </script>
682
+ <script type="text/javascript">
683
+ var pageTracker = _gat._getTracker("UA-3769691-2");
684
+ pageTracker._initData();
685
+ pageTracker._trackPageview();
686
+ </script>
687
+
688
+
689
+ </body>
690
+ </html>
691
+