git_wit 0.0.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.
Files changed (176) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.md +82 -0
  3. data/Rakefile +40 -0
  4. data/app/controllers/git_wit/application_controller.rb +6 -0
  5. data/app/controllers/git_wit/git_controller.rb +116 -0
  6. data/bin/gw-shell +4 -0
  7. data/config/initializers/git_wit.rb +2 -0
  8. data/config/routes.rb +5 -0
  9. data/lib/generators/git_wit/install/USAGE +8 -0
  10. data/lib/generators/git_wit/install/install_generator.rb +15 -0
  11. data/lib/generators/git_wit/templates/README +11 -0
  12. data/lib/generators/git_wit/templates/git_wit.rb +78 -0
  13. data/lib/git_wit/auth.rb +28 -0
  14. data/lib/git_wit/authorized_keys.rb +102 -0
  15. data/lib/git_wit/engine.rb +12 -0
  16. data/lib/git_wit/errors.rb +6 -0
  17. data/lib/git_wit/shell.rb +72 -0
  18. data/lib/git_wit/version.rb +3 -0
  19. data/lib/git_wit.rb +38 -0
  20. data/test/dummy/README.rdoc +261 -0
  21. data/test/dummy/Rakefile +7 -0
  22. data/test/dummy/app/assets/javascripts/application.js +16 -0
  23. data/test/dummy/app/assets/javascripts/bootstrap.js +5 -0
  24. data/test/dummy/app/assets/javascripts/public_keys.js +2 -0
  25. data/test/dummy/app/assets/javascripts/repositories.js +2 -0
  26. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  27. data/test/dummy/app/assets/stylesheets/bootstrap_and_overrides.css +12 -0
  28. data/test/dummy/app/assets/stylesheets/public_keys.css +4 -0
  29. data/test/dummy/app/assets/stylesheets/repositories.css +4 -0
  30. data/test/dummy/app/assets/stylesheets/scaffold.css +56 -0
  31. data/test/dummy/app/controllers/application_controller.rb +3 -0
  32. data/test/dummy/app/controllers/public_keys_controller.rb +61 -0
  33. data/test/dummy/app/controllers/repositories_controller.rb +76 -0
  34. data/test/dummy/app/helpers/application_helper.rb +2 -0
  35. data/test/dummy/app/helpers/public_keys_helper.rb +2 -0
  36. data/test/dummy/app/helpers/repositories_helper.rb +2 -0
  37. data/test/dummy/app/models/ability.rb +16 -0
  38. data/test/dummy/app/models/public_key.rb +46 -0
  39. data/test/dummy/app/models/repository.rb +27 -0
  40. data/test/dummy/app/models/role.rb +6 -0
  41. data/test/dummy/app/models/user.rb +14 -0
  42. data/test/dummy/app/views/devise/confirmations/new.html.erb +22 -0
  43. data/test/dummy/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  44. data/test/dummy/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  45. data/test/dummy/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  46. data/test/dummy/app/views/devise/passwords/edit.html.erb +30 -0
  47. data/test/dummy/app/views/devise/passwords/new.html.erb +22 -0
  48. data/test/dummy/app/views/devise/registrations/edit.html.erb +50 -0
  49. data/test/dummy/app/views/devise/registrations/new.html.erb +43 -0
  50. data/test/dummy/app/views/devise/sessions/new.html.erb +37 -0
  51. data/test/dummy/app/views/devise/shared/_links.erb +29 -0
  52. data/test/dummy/app/views/devise/unlocks/new.html.erb +12 -0
  53. data/test/dummy/app/views/layouts/application.html.erb +106 -0
  54. data/test/dummy/app/views/public_keys/_form.html.erb +16 -0
  55. data/test/dummy/app/views/public_keys/index.html.erb +36 -0
  56. data/test/dummy/app/views/public_keys/new.html.erb +5 -0
  57. data/test/dummy/app/views/public_keys/show.html.erb +25 -0
  58. data/test/dummy/app/views/repositories/_form.html.erb +29 -0
  59. data/test/dummy/app/views/repositories/edit.html.erb +5 -0
  60. data/test/dummy/app/views/repositories/index.html.erb +52 -0
  61. data/test/dummy/app/views/repositories/new.html.erb +5 -0
  62. data/test/dummy/app/views/repositories/show.html.erb +31 -0
  63. data/test/dummy/config/application.rb +59 -0
  64. data/test/dummy/config/boot.rb +10 -0
  65. data/test/dummy/config/database.yml +25 -0
  66. data/test/dummy/config/environment.rb +5 -0
  67. data/test/dummy/config/environments/development.rb +37 -0
  68. data/test/dummy/config/environments/production.rb +67 -0
  69. data/test/dummy/config/environments/test.rb +37 -0
  70. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  71. data/test/dummy/config/initializers/devise.rb +242 -0
  72. data/test/dummy/config/initializers/git_wit.rb +73 -0
  73. data/test/dummy/config/initializers/inflections.rb +15 -0
  74. data/test/dummy/config/initializers/mime_types.rb +5 -0
  75. data/test/dummy/config/initializers/rolify.rb +8 -0
  76. data/test/dummy/config/initializers/secret_token.rb +7 -0
  77. data/test/dummy/config/initializers/session_store.rb +8 -0
  78. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  79. data/test/dummy/config/locales/devise.en.yml +59 -0
  80. data/test/dummy/config/locales/en.bootstrap.yml +17 -0
  81. data/test/dummy/config/locales/en.yml +5 -0
  82. data/test/dummy/config/routes.rb +12 -0
  83. data/test/dummy/config.ru +4 -0
  84. data/test/dummy/db/development.sqlite3 +0 -0
  85. data/test/dummy/db/migrate/20130217110616_devise_create_users.rb +46 -0
  86. data/test/dummy/db/migrate/20130217111055_create_repositories.rb +14 -0
  87. data/test/dummy/db/migrate/20130217114405_rolify_create_roles.rb +19 -0
  88. data/test/dummy/db/migrate/20130217191808_add_username_to_users.rb +5 -0
  89. data/test/dummy/db/migrate/20130217221157_create_public_keys.rb +13 -0
  90. data/test/dummy/db/schema.rb +76 -0
  91. data/test/dummy/db/test.sqlite3 +0 -0
  92. data/test/dummy/public/404.html +26 -0
  93. data/test/dummy/public/422.html +26 -0
  94. data/test/dummy/public/500.html +25 -0
  95. data/test/dummy/public/favicon.ico +0 -0
  96. data/test/dummy/script/rails +6 -0
  97. data/test/dummy/test/fixtures/public_keys.yml +14 -0
  98. data/test/dummy/test/fixtures/repositories.yml +17 -0
  99. data/test/dummy/test/fixtures/users.yml +9 -0
  100. data/test/dummy/test/functional/public_keys_controller_test.rb +49 -0
  101. data/test/dummy/test/functional/repositories_controller_test.rb +49 -0
  102. data/test/dummy/test/unit/helpers/public_keys_helper_test.rb +4 -0
  103. data/test/dummy/test/unit/helpers/repositories_helper_test.rb +4 -0
  104. data/test/dummy/test/unit/public_key_test.rb +7 -0
  105. data/test/dummy/test/unit/repository_test.rb +7 -0
  106. data/test/dummy/test/unit/user_test.rb +7 -0
  107. data/test/dummy/tmp/cache/assets/C7E/BC0/sprockets%2Fb7118f368364962573a44054bcfb80d0 +0 -0
  108. data/test/dummy/tmp/cache/assets/C80/840/sprockets%2F562c2d168da585f80579347d10790a0a +0 -0
  109. data/test/dummy/tmp/cache/assets/C8C/B80/sprockets%2F371bf96e99717688ed7313a0c53f4212 +0 -0
  110. data/test/dummy/tmp/cache/assets/C9C/700/sprockets%2Fc7b1373dbf219a8722efc21160641340 +0 -0
  111. data/test/dummy/tmp/cache/assets/C9E/5F0/sprockets%2F2bca2b107bb6c26b720d135270688918 +0 -0
  112. data/test/dummy/tmp/cache/assets/CA9/9C0/sprockets%2F0c1b7ebd087418498ea6037225d33d25 +0 -0
  113. data/test/dummy/tmp/cache/assets/CC8/B00/sprockets%2F9815364bfd49ed907870e270d75a995a +0 -0
  114. data/test/dummy/tmp/cache/assets/CD1/800/sprockets%2Fc044b140dcef533c52712c7b51e21996 +0 -0
  115. data/test/dummy/tmp/cache/assets/CD5/2C0/sprockets%2F166c056119ebdfb8b7104c97b424b423 +0 -0
  116. data/test/dummy/tmp/cache/assets/CD7/380/sprockets%2F4079ce1dbbcf4a599527303670006b6b +0 -0
  117. data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  118. data/test/dummy/tmp/cache/assets/CE0/CC0/sprockets%2F2b38c3fb549036de5c4666637a0c80c6 +0 -0
  119. data/test/dummy/tmp/cache/assets/CEC/B70/sprockets%2F7f98753ca8c35e4249363a04389b3caf +0 -0
  120. data/test/dummy/tmp/cache/assets/CF0/1D0/sprockets%2F6fc757c2c8329244ca95d6909865bbc2 +0 -0
  121. data/test/dummy/tmp/cache/assets/CF9/980/sprockets%2Fbd55042e1acd32eb611041444d794d4d +0 -0
  122. data/test/dummy/tmp/cache/assets/CFD/560/sprockets%2Fe4e7fe4ee089382325686f806b939d3e +0 -0
  123. data/test/dummy/tmp/cache/assets/D00/B90/sprockets%2F07c00c80f1ea62d95a01f11f9c728b72 +0 -0
  124. data/test/dummy/tmp/cache/assets/D0D/9A0/sprockets%2F1fce44192cdb30f44b7545a37c9891b2 +0 -0
  125. data/test/dummy/tmp/cache/assets/D0F/390/sprockets%2F9df081609c3449ab40c93b1cf07de357 +0 -0
  126. data/test/dummy/tmp/cache/assets/D25/A60/sprockets%2F0e036061ad22b2e6dce1639b234cf15c +0 -0
  127. data/test/dummy/tmp/cache/assets/D27/DB0/sprockets%2Fa3a0a778855bce9fa47913d389ea9884 +0 -0
  128. data/test/dummy/tmp/cache/assets/D29/5A0/sprockets%2Fdad9e81b43ca12671246ee52a1900d0c +0 -0
  129. data/test/dummy/tmp/cache/assets/D2E/FF0/sprockets%2Fc06112642c994b6b7c2ba6632fad1fd0 +0 -0
  130. data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  131. data/test/dummy/tmp/cache/assets/D36/120/sprockets%2Feac54bd3c540af6b964d025e345227d6 +0 -0
  132. data/test/dummy/tmp/cache/assets/D3E/240/sprockets%2F84b96d6b2d2653cb4127b06d8acb990d +0 -0
  133. data/test/dummy/tmp/cache/assets/D3F/830/sprockets%2F18578d4ef3abd6e12d836841dd6b8a00 +0 -0
  134. data/test/dummy/tmp/cache/assets/D4B/E70/sprockets%2F0909bc70e589d40a6cd90dfe6f18257e +0 -0
  135. data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  136. data/test/dummy/tmp/cache/assets/D57/3D0/sprockets%2F7bbccc5129a5013b70831ec9ad62ab24 +0 -0
  137. data/test/dummy/tmp/cache/assets/D5A/000/sprockets%2F7d4f67f146b6d7904dfc4edd9135f588 +0 -0
  138. data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  139. data/test/dummy/tmp/cache/assets/D5B/BB0/sprockets%2Fba769276c4de14151bc4202cba7f3ad3 +0 -0
  140. data/test/dummy/tmp/cache/assets/D5E/BC0/sprockets%2F2d96fa667066778db858d7b7cb0fce69 +0 -0
  141. data/test/dummy/tmp/cache/assets/D6E/BA0/sprockets%2F5178d3788fe35a52acb5f3bd22ea078a +0 -0
  142. data/test/dummy/tmp/cache/assets/D6F/C20/sprockets%2F22e783a8f5f9224f01e8e62fab6afb40 +0 -0
  143. data/test/dummy/tmp/cache/assets/D76/5C0/sprockets%2Fd8a5669df31f129f355283e6dab4c5ad +0 -0
  144. data/test/dummy/tmp/cache/assets/D79/DE0/sprockets%2F7cfd335e68d881b03f6b7f1bd91f270f +0 -0
  145. data/test/dummy/tmp/cache/assets/D8A/CA0/sprockets%2F656af8b87ad378e8e4f2ec94b6b5c719 +0 -0
  146. data/test/dummy/tmp/cache/assets/D8C/620/sprockets%2Ff37f8e5b8cccd9880276a9f5157d4c7e +0 -0
  147. data/test/dummy/tmp/cache/assets/D92/200/sprockets%2Fb816d858281027bdd3fe2bfac43b4ca1 +0 -0
  148. data/test/dummy/tmp/cache/assets/D92/CE0/sprockets%2Ffca6a13676a2be09234905f9acae22cd +0 -0
  149. data/test/dummy/tmp/cache/assets/D96/9E0/sprockets%2F6fabecd33f7a5a087f4fb6a2d6312443 +0 -0
  150. data/test/dummy/tmp/cache/assets/DA2/D20/sprockets%2Ff5faf079fb660bde5bc9502bde442088 +0 -0
  151. data/test/dummy/tmp/cache/assets/DA5/570/sprockets%2F3517de599b6fd005bc5d5d69ba5ff1e2 +0 -0
  152. data/test/dummy/tmp/cache/assets/DA7/070/sprockets%2F69eadf8c3a94b04fe0b4992ee4a8c821 +0 -0
  153. data/test/dummy/tmp/cache/assets/DBA/BF0/sprockets%2Fe63ea1d7bfb0ee50380debe42360a3b5 +0 -0
  154. data/test/dummy/tmp/cache/assets/DBB/3B0/sprockets%2F6a0aaa6c5b0d10b936e237a7ecb4e4c9 +0 -0
  155. data/test/dummy/tmp/cache/assets/DBC/8E0/sprockets%2F908976cfbcdf6ad4c59737bf3c78e1e8 +0 -0
  156. data/test/dummy/tmp/cache/assets/DD3/FD0/sprockets%2Febf97c76a9ba2a889dd01be2caa75806 +0 -0
  157. data/test/dummy/tmp/cache/assets/DD8/410/sprockets%2Fc02eeb7ea977fd713cc19ca93d838af4 +0 -0
  158. data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  159. data/test/dummy/tmp/cache/assets/DEA/E40/sprockets%2F4166d7d00d1e72fed2004debed2bea3e +0 -0
  160. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  161. data/test/dummy/tmp/cache/assets/E05/C70/sprockets%2Fccd814ec859d582ada46e271edfe7ae1 +0 -0
  162. data/test/dummy/tmp/cache/assets/E0C/2A0/sprockets%2F37c59fadd9a21cab7d05d78a7dfe7e85 +0 -0
  163. data/test/dummy/tmp/cache/assets/E28/130/sprockets%2F6f332ca43b7ed658d90b8ba5daaa5ded +0 -0
  164. data/test/dummy/tmp/cache/assets/E3B/080/sprockets%2F09e2a090befacdae0db10cafb1893a0a +0 -0
  165. data/test/dummy/tmp/cache/assets/E65/CD0/sprockets%2F93cdf3fec0e3aa6deefa955c6828fbd0 +0 -0
  166. data/test/dummy/tmp/cache/assets/E9F/450/sprockets%2Fbbfdc5edaaf25dfdb5ee8f9db7895435 +0 -0
  167. data/test/dummy/tmp/restart.txt +0 -0
  168. data/test/functional/git_wit/git_controller_test.rb +10 -0
  169. data/test/git_wit_test.rb +7 -0
  170. data/test/integration/navigation_test.rb +10 -0
  171. data/test/test_helper.rb +18 -0
  172. data/test/unit/auth_test.rb +56 -0
  173. data/test/unit/authorized_keys_test.rb +57 -0
  174. data/test/unit/config_test.rb +42 -0
  175. data/test/unit/shell_test.rb +89 -0
  176. metadata +409 -0
@@ -0,0 +1,22 @@
1
+ <div class="page-header">
2
+ <h1>Resend confirmation instructions</h1>
3
+ </div>
4
+
5
+ <%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post, :class => 'form-horizontal' }) do |f| %>
6
+ <%= devise_error_messages! %>
7
+
8
+ <div class="control-group">
9
+ <%= f.label :email, :class => 'control-label' %>
10
+ <div class="controls">
11
+ <%= f.email_field :email, :autofocus => true %>
12
+ </div>
13
+ </div>
14
+
15
+ <div class="form-actions">
16
+ <%= f.submit "Resend confirmation instructions", :class => 'btn btn-primary' %>
17
+ <%= link_to t('.cancel', :default => t("helpers.links.cancel")),
18
+ :back, :class => 'btn' %>
19
+ </div>
20
+ <% end %>
21
+
22
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,5 @@
1
+ <p>Welcome <%= @email %>!</p>
2
+
3
+ <p>You can confirm your account email through the link below:</p>
4
+
5
+ <p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
@@ -0,0 +1,8 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Someone has requested a link to change your password. You can do this through the link below.</p>
4
+
5
+ <p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
6
+
7
+ <p>If you didn't request this, please ignore this email.</p>
8
+ <p>Your password won't change until you access the link above and create a new one.</p>
@@ -0,0 +1,7 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
4
+
5
+ <p>Click the link below to unlock your account:</p>
6
+
7
+ <p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
@@ -0,0 +1,30 @@
1
+ <div class="page-header">
2
+ <h1>Change your password</h1>
3
+ </div>
4
+
5
+ <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put, :class => 'form-horizontal' }) do |f| %>
6
+ <%= devise_error_messages! %>
7
+ <%= f.hidden_field :reset_password_token %>
8
+
9
+ <div class="control-group">
10
+ <%= f.label :password, "New password", :class => 'control-label' %>
11
+ <div class="controls">
12
+ <%= f.password_field :password, :autofocus => true%>
13
+ </div>
14
+ </div>
15
+
16
+ <div class="control-group">
17
+ <%= f.label :password_confirmation, "Confirm new password", :class => 'control-label' %>
18
+ <div class="controls">
19
+ <%= f.password_field :password_confirmation %>
20
+ </div>
21
+ </div>
22
+
23
+ <div class="form-actions">
24
+ <%= f.submit "Change my password", :class => 'btn btn-primary' %>
25
+ <%= link_to t('.cancel', :default => t("helpers.links.cancel")),
26
+ :back, :class => 'btn' %>
27
+ </div>
28
+ <% end %>
29
+
30
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,22 @@
1
+ <div class="page-header">
2
+ <h1>Forgot your password?</h1>
3
+ </div>
4
+
5
+ <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post, :class => 'form-horizontal' }) do |f| %>
6
+ <%= devise_error_messages! %>
7
+
8
+ <div class="control-group">
9
+ <%= f.label :email, :class => 'control-label' %>
10
+ <div class="controls">
11
+ <%= f.email_field :email, :autofocus => true %>
12
+ </div>
13
+ </div>
14
+
15
+ <div class="form-actions">
16
+ <%= f.submit "Send me reset password instructions", :class => 'btn btn-primary' %>
17
+ <%= link_to t('.cancel', :default => t("helpers.links.cancel")),
18
+ :back, :class => 'btn' %>
19
+ </div>
20
+ <% end %>
21
+
22
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,50 @@
1
+ <div class="page-header">
2
+ <h1>Edit User</h1>
3
+ </div>
4
+
5
+ <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => 'form-horizontal' }) do |f| %>
6
+ <%= devise_error_messages! %>
7
+
8
+ <div class="control-group">
9
+ <%= f.label :email, :class => 'control-label' %>
10
+ <div class="controls">
11
+ <%= f.email_field :email, :autofocus => true %>
12
+ </div>
13
+ </div>
14
+
15
+ <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
16
+ <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
17
+ <% end %>
18
+
19
+ <div class="control-group">
20
+ <%= f.label :password, :class => 'control-label' %>
21
+ <div class="controls">
22
+ <%= f.password_field :password, :autocomplete => "off" %>
23
+ <span class="help-inline"><i>(leave blank if you don't want to change it)</i></span>
24
+ </div>
25
+ </div>
26
+
27
+ <div class="control-group">
28
+ <%= f.label :password_confirmation, :class => 'control-label' %>
29
+ <div class="controls">
30
+ <%= f.password_field :password_confirmation %>
31
+ </div>
32
+ </div>
33
+
34
+ <div class="control-group">
35
+ <%= f.label :current_password, :class => 'control-label' %>
36
+ <div class="controls">
37
+ <%= f.password_field :current_password %>
38
+ <span class="help-inline"><i>(we need your current password to confirm your changes)</i></span>
39
+ </div>
40
+ </div>
41
+
42
+ <div class="form-actions">
43
+ <%= f.submit "Update", :class => 'btn btn-primary' %>
44
+ <%= link_to t('.cancel', :default => t("helpers.links.cancel")),
45
+ :back, :class => 'btn' %>
46
+ </div>
47
+ <% end %>
48
+
49
+ <h2>Unhappy?</h2>
50
+ <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete, :class => 'btn btn-danger' %>
@@ -0,0 +1,43 @@
1
+ <div class="page-header">
2
+ <h1>Sign up</h1>
3
+ </div>
4
+
5
+ <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => {:class => 'form-horizontal'}) do |f| %>
6
+ <%= devise_error_messages! %>
7
+
8
+ <div class="control-group">
9
+ <%= f.label :username, :class => 'control-label' %>
10
+ <div class="controls">
11
+ <%= f.text_field :username, :autofocus => true %>
12
+ </div>
13
+ </div>
14
+
15
+ <div class="control-group">
16
+ <%= f.label :email, :class => 'control-label' %>
17
+ <div class="controls">
18
+ <%= f.email_field :email %>
19
+ </div>
20
+ </div>
21
+
22
+ <div class="control-group">
23
+ <%= f.label :password, :class => 'control-label' %>
24
+ <div class="controls">
25
+ <%= f.password_field :password %>
26
+ </div>
27
+ </div>
28
+
29
+ <div class="control-group">
30
+ <%= f.label :password_confirmation, :class => 'control-label' %>
31
+ <div class="controls">
32
+ <%= f.password_field :password_confirmation %>
33
+ </div>
34
+ </div>
35
+
36
+ <div class="form-actions">
37
+ <%= f.submit "Sign up", :class => 'btn btn-primary' %>
38
+ <%= link_to t('.cancel', :default => t("helpers.links.cancel")),
39
+ :back, :class => 'btn' %>
40
+ </div>
41
+ <% end %>
42
+
43
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,37 @@
1
+ <div class="page-header">
2
+ <h1>Sign in</h1>
3
+ </div>
4
+
5
+ <%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => 'form-horizontal' }) do |f| %>
6
+
7
+ <div class="control-group">
8
+ <%= f.label :username, :class => 'control-label' %>
9
+ <div class="controls">
10
+ <%= f.text_field :username, :autofocus => true %>
11
+ </div>
12
+ </div>
13
+
14
+ <div class="control-group">
15
+ <%= f.label :password, :class => 'control-label' %>
16
+ <div class="controls">
17
+ <%= f.password_field :password %>
18
+ </div>
19
+ </div>
20
+
21
+ <% if devise_mapping.rememberable? -%>
22
+ <div class="control-group">
23
+ <%= f.label :remember_me, :class => 'control-label' %>
24
+ <div class="controls">
25
+ <%= f.check_box :remember_me %>
26
+ </div>
27
+ </div>
28
+ <% end -%>
29
+
30
+ <div class="form-actions">
31
+ <%= f.submit "Sign in", :class => 'btn btn-primary' %>
32
+ <%= link_to t('.cancel', :default => t("helpers.links.cancel")),
33
+ :back, :class => 'btn' %>
34
+ </div>
35
+ <% end %>
36
+
37
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,29 @@
1
+ <% content_for :sidebar do %>
2
+ <ul class="nav nav-list">
3
+ <%- if controller_name != 'sessions' %>
4
+ <li><%= link_to "Sign in", new_session_path(resource_name) %></li>
5
+ <% end -%>
6
+
7
+ <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
8
+ <li><%= link_to "Sign up", new_registration_path(resource_name) %></li>
9
+ <% end -%>
10
+
11
+ <%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
12
+ <li><%= link_to "Forgot your password?", new_password_path(resource_name) %></li>
13
+ <% end -%>
14
+
15
+ <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
16
+ <li><%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %></li>
17
+ <% end -%>
18
+
19
+ <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
20
+ <li><%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %></li>
21
+ <% end -%>
22
+
23
+ <%- if devise_mapping.omniauthable? %>
24
+ <%- resource_class.omniauth_providers.each do |provider| %>
25
+ <li><%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %></li>
26
+ <% end -%>
27
+ <% end -%>
28
+ </ul>
29
+ <% end %>
@@ -0,0 +1,12 @@
1
+ <h2>Resend unlock instructions</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
4
+ <%= devise_error_messages! %>
5
+
6
+ <div><%= f.label :email %><br />
7
+ <%= f.email_field :email, :autofocus => true %></div>
8
+
9
+ <div><%= f.submit "Resend unlock instructions" %></div>
10
+ <% end %>
11
+
12
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,106 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title><%= content_for?(:title) ? yield(:title) : "GitDummy" %></title>
8
+ <%= csrf_meta_tags %>
9
+
10
+ <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
11
+ <!--[if lt IE 9]>
12
+ <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js" type="text/javascript"></script>
13
+ <![endif]-->
14
+
15
+ <%= stylesheet_link_tag "application", :media => "all" %>
16
+
17
+ <!-- For third-generation iPad with high-resolution Retina display: -->
18
+ <!-- Size should be 144 x 144 pixels -->
19
+ <%= favicon_link_tag 'images/apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144' %>
20
+
21
+ <!-- For iPhone with high-resolution Retina display: -->
22
+ <!-- Size should be 114 x 114 pixels -->
23
+ <%= favicon_link_tag 'images/apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114' %>
24
+
25
+ <!-- For first- and second-generation iPad: -->
26
+ <!-- Size should be 72 x 72 pixels -->
27
+ <%= favicon_link_tag 'images/apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72' %>
28
+
29
+ <!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
30
+ <!-- Size should be 57 x 57 pixels -->
31
+ <%= favicon_link_tag 'images/apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png' %>
32
+
33
+ <!-- For all other devices -->
34
+ <!-- Size should be 32 x 32 pixels -->
35
+ <%= favicon_link_tag 'favicon.ico', :rel => 'shortcut icon' %>
36
+ </head>
37
+ <body>
38
+
39
+ <div class="navbar navbar-fluid-top navbar-inverse">
40
+ <div class="navbar-inner">
41
+ <div class="container-fluid">
42
+ <a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse">
43
+ <span class="icon-bar"></span>
44
+ <span class="icon-bar"></span>
45
+ <span class="icon-bar"></span>
46
+ </a>
47
+ <a class="brand" href="/">GitDummy</a>
48
+ <div class="container-fluid nav-collapse">
49
+ <ul class="nav">
50
+ <% if can? :read, Repository %><li><%= link_to "Repositories", repositories_path %></li><% end %>
51
+ <% if can? :read, PublicKey %><li><%= link_to "Public keys", public_keys_path %></li><% end %>
52
+ </ul>
53
+ <% if user_signed_in? %>
54
+ <ul class="nav pull-right">
55
+ <li><%= link_to "Edit profile", edit_user_registration_path %></li>
56
+ <li><%= link_to "Sign out", destroy_user_session_path, method: :delete %></li>
57
+ </ul>
58
+ <p class="navbar-text pull-right">
59
+ Logged in as <strong><%= current_user.username %></strong>
60
+ </p>
61
+ <% else %>
62
+ <ul class="nav pull-right">
63
+ <li><%= link_to "Sign up", new_user_registration_path %></li>
64
+ <li><%= link_to "Sign in", new_user_session_path %></li>
65
+ </ul>
66
+ <% end %>
67
+ </div><!--/.nav-collapse -->
68
+ </div>
69
+ </div>
70
+ </div>
71
+
72
+ <div class="container-fluid">
73
+ <% if content_for? :sidebar %>
74
+ <div class="row-fluid">
75
+ <div class="span3">
76
+ <div class="well sidebar-nav">
77
+ <%= yield :sidebar %>
78
+ </div><!--/.well -->
79
+ </div><!--/span-->
80
+ <div class="span9">
81
+ <%= bootstrap_flash %>
82
+ <%= yield %>
83
+ </div>
84
+ </div><!--/row-->
85
+ <% else %>
86
+ <div class="row-fluid">
87
+ <div class="span12">
88
+ <%= bootstrap_flash %>
89
+ <%= yield %>
90
+ </div>
91
+ </div><!--/row-->
92
+ <% end %>
93
+
94
+ <footer>
95
+ <p>&copy; Company 2013</p>
96
+ </footer>
97
+
98
+ </div> <!-- /container -->
99
+
100
+ <!-- Javascripts
101
+ ================================================== -->
102
+ <!-- Placed at the end of the document so the pages load faster -->
103
+ <%= javascript_include_tag "application" %>
104
+
105
+ </body>
106
+ </html>
@@ -0,0 +1,16 @@
1
+ <%= form_for @public_key, :html => { :class => 'form-horizontal' } do |f| %>
2
+ <% @public_key.errors.full_messages.each do |msg| %>
3
+ <p><%= msg %></p>
4
+ <% end %>
5
+ <div class="control-group">
6
+ <%= f.label :raw_content, :class => 'control-label' %>
7
+ <div class="controls">
8
+ <%= f.text_area :raw_content, :class => 'text_area' %>
9
+ </div>
10
+ </div>
11
+ <div class="form-actions">
12
+ <%= f.submit nil, :class => 'btn btn-primary' %>
13
+ <%= link_to t('.cancel', :default => t("helpers.links.cancel")),
14
+ public_keys_path, :class => 'btn' %>
15
+ </div>
16
+ <% end %>
@@ -0,0 +1,36 @@
1
+ <%- model_class = PublicKey -%>
2
+ <div class="page-header">
3
+ <h1><%=t '.title', :default => model_class.model_name.human.pluralize %></h1>
4
+ </div>
5
+ <table class="table table-striped">
6
+ <thead>
7
+ <tr>
8
+ <th><%= model_class.human_attribute_name(:comment) %></th>
9
+ <th><%= model_class.human_attribute_name(:created_at) %></th>
10
+ <th><%=t '.actions', :default => t("helpers.actions") %></th>
11
+ </tr>
12
+ </thead>
13
+ <tbody>
14
+ <% @public_keys.each do |public_key| %>
15
+ <tr>
16
+ <td><%= link_to public_key.comment, public_key_path(public_key) %></td>
17
+ <td><%=l public_key.created_at %></td>
18
+ <td>
19
+ <% if can? :destroy, public_key %>
20
+ <%= link_to t('.destroy', :default => t("helpers.links.destroy")),
21
+ public_key_path(public_key),
22
+ :method => :delete,
23
+ :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
24
+ :class => 'btn btn-mini btn-danger' %>
25
+ <% end %>
26
+ </td>
27
+ </tr>
28
+ <% end %>
29
+ </tbody>
30
+ </table>
31
+
32
+ <% if can? :create, PublicKey %>
33
+ <%= link_to t('.new', :default => t("helpers.links.new")),
34
+ new_public_key_path,
35
+ :class => 'btn btn-primary' %>
36
+ <% end %>
@@ -0,0 +1,5 @@
1
+ <%- model_class = PublicKey -%>
2
+ <div class="page-header">
3
+ <h1><%=t '.title', :default => [:'helpers.titles.new', 'New %{model}'], :model => model_class.model_name.human %></h1>
4
+ </div>
5
+ <%= render :partial => 'form' %>
@@ -0,0 +1,25 @@
1
+ <%- model_class = PublicKey -%>
2
+ <div class="page-header">
3
+ <h1><%=t '.title', :default => model_class.model_name.human %></h1>
4
+ </div>
5
+
6
+ <dl class="dl-horizontal">
7
+ <dt><strong><%= model_class.human_attribute_name(:user_id) %>:</strong></dt>
8
+ <dd><%= @public_key.user.username %></dd>
9
+ <dt><strong><%= model_class.human_attribute_name(:content) %>:</strong></dt>
10
+ <dd><pre><%= @public_key.content %></pre></dd>
11
+ <dt><strong><%= model_class.human_attribute_name(:comment) %>:</strong></dt>
12
+ <dd><%= @public_key.comment %></dd>
13
+ </dl>
14
+
15
+ <div class="form-actions">
16
+ <%= link_to t('.back', :default => t("helpers.links.back")),
17
+ public_keys_path, :class => 'btn' %>
18
+ <% if can? :destroy, @public_key %>
19
+ <%= link_to t('.destroy', :default => t("helpers.links.destroy")),
20
+ public_key_path(@public_key),
21
+ :method => 'delete',
22
+ :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
23
+ :class => 'btn btn-danger' %>
24
+ <% end %>
25
+ </div>
@@ -0,0 +1,29 @@
1
+ <%= form_for @repository, :html => { :class => 'form-horizontal' } do |f| %>
2
+ <% @repository.errors.full_messages.each do |msg| %>
3
+ <p><%= msg %></p>
4
+ <% end %>
5
+ <div class="control-group">
6
+ <%= f.label :name, :class => 'control-label' %>
7
+ <div class="controls">
8
+ <%= f.text_field :name, :class => 'text_field' %>
9
+ </div>
10
+ </div>
11
+ <div class="control-group">
12
+ <%= f.label :path, :class => 'control-label' %>
13
+ <div class="controls">
14
+ <%= f.text_field :path, :class => 'text_field' %>
15
+ </div>
16
+ </div>
17
+ <div class="control-group">
18
+ <%= f.label :public, :class => 'control-label' %>
19
+ <div class="controls">
20
+ <%= f.check_box :public, :class => 'check_box' %>
21
+ </div>
22
+ </div>
23
+
24
+ <div class="form-actions">
25
+ <%= f.submit nil, :class => 'btn btn-primary' %>
26
+ <%= link_to t('.cancel', :default => t("helpers.links.cancel")),
27
+ repositories_path, :class => 'btn' %>
28
+ </div>
29
+ <% end %>
@@ -0,0 +1,5 @@
1
+ <%- model_class = Repository -%>
2
+ <div class="page-header">
3
+ <h1><%=t '.title', :default => [:'helpers.titles.edit', 'Edit %{model}'], :model => model_class.model_name.human %></h1>
4
+ </div>
5
+ <%= render :partial => 'form' %>
@@ -0,0 +1,52 @@
1
+ <%- model_class = Repository -%>
2
+ <div class="page-header">
3
+ <h1><%=t '.title', :default => model_class.model_name.human.pluralize %></h1>
4
+ </div>
5
+ <table class="table table-striped">
6
+ <thead>
7
+ <tr>
8
+ <th><%= model_class.human_attribute_name(:name) %></th>
9
+ <th><%= model_class.human_attribute_name(:path) %></th>
10
+ <th><%= model_class.human_attribute_name(:user_id) %></th>
11
+ <th><%= model_class.human_attribute_name(:public) %></th>
12
+ <th><%= model_class.human_attribute_name(:created_at) %></th>
13
+ <th><%=t '.actions', :default => t("helpers.actions") %></th>
14
+ </tr>
15
+ </thead>
16
+ <tbody>
17
+ <% @repositories.each do |repository| %>
18
+ <tr>
19
+ <td>
20
+ <% if can? :read, repository %>
21
+ <%= link_to repository.name, repository_path(repository) %>
22
+ <% else %>
23
+ <%= repository.name %>
24
+ <% end %>
25
+ </td>
26
+ <td><%= repository.path %></td>
27
+ <td><%= repository.user.try :username %></td>
28
+ <td><%= repository.public %></td>
29
+ <td><%=l repository.created_at %></td>
30
+ <td>
31
+ <% if can? :update, repository %>
32
+ <%= link_to t('.edit', :default => t("helpers.links.edit")),
33
+ edit_repository_path(repository), :class => 'btn btn-mini' %>
34
+ <% end %>
35
+ <% if can? :destroy, repository %>
36
+ <%= link_to t('.destroy', :default => t("helpers.links.destroy")),
37
+ repository_path(repository),
38
+ :method => :delete,
39
+ :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
40
+ :class => 'btn btn-mini btn-danger' %>
41
+ <% end %>
42
+ </td>
43
+ </tr>
44
+ <% end %>
45
+ </tbody>
46
+ </table>
47
+
48
+ <% if can? :create, Repository %>
49
+ <%= link_to t('.new', :default => t("helpers.links.new")),
50
+ new_repository_path,
51
+ :class => 'btn btn-primary' %>
52
+ <% end %>
@@ -0,0 +1,5 @@
1
+ <%- model_class = Repository -%>
2
+ <div class="page-header">
3
+ <h1><%=t '.title', :default => [:'helpers.titles.new', 'New %{model}'], :model => model_class.model_name.human %></h1>
4
+ </div>
5
+ <%= render :partial => 'form' %>
@@ -0,0 +1,31 @@
1
+ <%- model_class = Repository -%>
2
+ <div class="page-header">
3
+ <h1><%=t '.title', :default => model_class.model_name.human %></h1>
4
+ </div>
5
+
6
+ <dl class="dl-horizontal">
7
+ <dt><strong><%= model_class.human_attribute_name(:name) %>:</strong></dt>
8
+ <dd><%= @repository.name %></dd>
9
+ <dt><strong><%= model_class.human_attribute_name(:path) %>:</strong></dt>
10
+ <dd><%= @repository.path %></dd>
11
+ <dt><strong><%= model_class.human_attribute_name(:user_id) %>:</strong></dt>
12
+ <dd><%= @repository.user.try :username %></dd>
13
+ <dt><strong><%= model_class.human_attribute_name(:public) %>:</strong></dt>
14
+ <dd><%= @repository.public %></dd>
15
+ </dl>
16
+
17
+ <div class="form-actions">
18
+ <%= link_to t('.back', :default => t("helpers.links.back")),
19
+ repositories_path, :class => 'btn' %>
20
+ <% if can? :update, @repository %>
21
+ <%= link_to t('.edit', :default => t("helpers.links.edit")),
22
+ edit_repository_path(@repository), :class => 'btn' %>
23
+ <% end %>
24
+ <% if can? :destroy, @repository %>
25
+ <%= link_to t('.destroy', :default => t("helpers.links.destroy")),
26
+ repository_path(@repository),
27
+ :method => 'delete',
28
+ :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
29
+ :class => 'btn btn-danger' %>
30
+ <% end %>
31
+ </div>