houston-core 0.6.3 → 0.7.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +53 -63
- data/app/adapters/houston/adapters/error_tracker/errbit_adapter.rb +2 -2
- data/app/adapters/houston/adapters/ticket_tracker/github_adapter.rb +1 -1
- data/app/adapters/houston/adapters/ticket_tracker/unfuddle_adapter.rb +5 -5
- data/app/adapters/houston/adapters/version_control/git_adapter.rb +4 -4
- data/app/assets/javascripts/{app → houston/app}/boot.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/emoji.coffee.erb +0 -0
- data/app/assets/javascripts/{app → houston/app}/infinite_scroll.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/models/commit.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/models/release.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/models/task.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/models/tester.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/models/testing_note.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/models/ticket.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/models/user.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/mousetrap-bind-scoped.js +0 -0
- data/app/assets/javascripts/{app → houston/app}/releases.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/table_row_expander.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/ticket_tracker_refresh.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/views/_show_sprint_view.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/views/_tickets_view.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/views/all_tickets_view.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/views/commit_view.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/views/edit_sprint_view.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/views/edit_ticket_view.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/views/find_or_create_ticket_view.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/views/keyboard_shortcuts_modal.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/views/new_ticket_modal.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/views/new_ticket_view.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/views/problems_view.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/views/testing_note_view.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/views/testing_report_view.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/views/testing_ticket_view.coffee +0 -0
- data/app/assets/javascripts/{app → houston/app}/views/ticket_modal_view.coffee +0 -0
- data/app/assets/javascripts/{application.js → houston/application.js} +1 -1
- data/app/assets/javascripts/{core → houston/core}/app.coffee +0 -0
- data/app/assets/javascripts/{core → houston/core}/burndown_chart.coffee +0 -0
- data/app/assets/javascripts/{core → houston/core}/core_ext/array.coffee +0 -0
- data/app/assets/javascripts/{core → houston/core}/core_ext/date.coffee +0 -0
- data/app/assets/javascripts/{core → houston/core}/core_ext/number.coffee +0 -0
- data/app/assets/javascripts/{core → houston/core}/errors.coffee +1 -1
- data/app/assets/javascripts/{core → houston/core}/handlebars_helpers.coffee +0 -0
- data/app/assets/javascripts/{core → houston/core}/helpers.coffee +0 -0
- data/app/assets/javascripts/{core → houston/core}/jquery_extensions.coffee +5 -3
- data/app/assets/javascripts/{core → houston/core}/stacked_area_graph.coffee +0 -0
- data/app/assets/javascripts/{core → houston/core}/stacked_bar_graph.coffee +0 -0
- data/app/assets/javascripts/{dashboard.js → houston/dashboard.js} +1 -1
- data/app/assets/javascripts/{dashboard → houston/dashboard}/refresher.coffee +0 -0
- data/app/assets/javascripts/{vendor.js → houston/vendor.js} +0 -0
- data/app/assets/stylesheets/{application.css → houston/application.css} +0 -0
- data/app/assets/stylesheets/{application → houston/application}/ansi.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/commit.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/emoji.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/exceptions.scss +1 -1
- data/app/assets/stylesheets/{application → houston/application}/find_or_create_ticket.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/follow_up.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/forms.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/freight_train.css.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/full_screen.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/github_repos.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/infinite_scroll.scss +0 -0
- data/app/assets/stylesheets/houston/application/jobs.scss +5 -0
- data/app/assets/stylesheets/{application → houston/application}/keyboard_shortcuts.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/markdown.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/mobile.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/modals.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/navigation.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/new_ticket_view.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/omnibar.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/project_banner_buttons.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/project_tiles.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/projects.css.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/pull_requests.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/queue.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/release_form.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/releases.scss +1 -1
- data/app/assets/stylesheets/{application → houston/application}/sortable_table.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/sprint.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/tables.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/test.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/test_run.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/testing_report.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/ticket.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/ticket_modal.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/tickets.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/timeline.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/tips.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/typeahead.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/uploading.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/user_wall.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/users.scss +0 -0
- data/app/assets/stylesheets/{application → houston/application}/welcome.scss +0 -0
- data/app/assets/stylesheets/{core → houston/core}/alerts.scss +0 -0
- data/app/assets/stylesheets/{core → houston/core}/avatars.scss +0 -0
- data/app/assets/stylesheets/{core → houston/core}/burndown_chart.scss +0 -0
- data/app/assets/stylesheets/{core → houston/core}/colors.scss.erb +0 -0
- data/app/assets/stylesheets/{core → houston/core}/misc.scss +3 -0
- data/app/assets/stylesheets/{core → houston/core}/octicons-icons.scss +0 -0
- data/app/assets/stylesheets/{core → houston/core}/octicons.scss.erb +0 -0
- data/app/assets/stylesheets/{core → houston/core}/overrides.scss +0 -0
- data/app/assets/stylesheets/{core → houston/core}/roboto.scss.erb +0 -0
- data/app/assets/stylesheets/{core → houston/core}/scores.scss +0 -0
- data/app/assets/stylesheets/{dashboard.css → houston/dashboard.css} +0 -0
- data/app/assets/stylesheets/{dashboard → houston/dashboard}/dashboard.scss +0 -0
- data/app/assets/stylesheets/{print.css.scss → houston/print.css.scss} +0 -0
- data/app/assets/stylesheets/{variables.scss → houston/variables.scss} +0 -0
- data/app/assets/stylesheets/{vendor.css → houston/vendor.css} +0 -0
- data/app/concerns/houston/props.rb +96 -0
- data/app/concerns/project_adapter.rb +1 -1
- data/app/controllers/api/v1/measurements_controller.rb +32 -0
- data/app/controllers/application_controller.rb +1 -1
- data/app/controllers/authorizations_controller.rb +61 -0
- data/app/controllers/github/pulls_controller.rb +1 -1
- data/app/controllers/jobs_controller.rb +30 -1
- data/app/controllers/oauth/providers_controller.rb +45 -0
- data/app/controllers/project_options_controller.rb +2 -2
- data/app/controllers/projects_controller.rb +3 -3
- data/app/controllers/releases_controller.rb +3 -3
- data/app/controllers/user_options_controller.rb +2 -2
- data/app/controllers/users_controller.rb +1 -2
- data/app/helpers/application_helper.rb +49 -3
- data/app/helpers/email_helper.rb +19 -1
- data/app/helpers/release_helper.rb +1 -1
- data/app/helpers/ticket_helper.rb +0 -32
- data/app/interactors/cache_key_dependencies.rb +3 -8
- data/app/mailers/view_mailer.rb +8 -8
- data/app/models/authorization.rb +54 -0
- data/app/models/commit.rb +1 -1
- data/app/models/error.rb +14 -0
- data/app/models/github/comment_event.rb +4 -4
- data/app/models/github/pull_request.rb +39 -17
- data/app/models/github/pull_request_event.rb +1 -7
- data/app/models/job.rb +81 -0
- data/app/models/measurement.rb +2 -1
- data/app/models/oauth/provider.rb +35 -0
- data/app/models/project.rb +12 -3
- data/app/models/slackdown.rb +1 -1
- data/app/models/user.rb +28 -35
- data/app/presenters/measurements_presenter.rb +26 -0
- data/app/presenters/project_presenter.rb +1 -1
- data/app/views/authorizations/_form.html.erb +33 -0
- data/app/views/authorizations/edit.html.erb +7 -0
- data/app/views/authorizations/granted.html.erb +7 -0
- data/app/views/authorizations/index.html.erb +47 -0
- data/app/views/authorizations/new.html.erb +7 -0
- data/app/views/configuration_error/_no_ticket_tracker.html.erb +1 -1
- data/app/views/github/pulls/index.html.erb +5 -1
- data/app/views/jobs/index.html.erb +72 -0
- data/app/views/jobs/show.html.erb +25 -32
- data/app/views/layouts/_navigation.html.erb +1 -1
- data/app/views/layouts/application.html.erb +14 -15
- data/app/views/layouts/dashboard.html.erb +9 -10
- data/app/views/layouts/minimal.html.erb +14 -15
- data/app/views/layouts/naked.html.erb +52 -0
- data/app/views/layouts/naked_dashboard.html.erb +9 -10
- data/app/views/oauth/providers/_form.html.erb +54 -0
- data/app/views/oauth/providers/edit.html.erb +7 -0
- data/app/views/oauth/providers/index.html.erb +41 -0
- data/app/views/oauth/providers/new.html.erb +7 -0
- data/app/views/projects/_form.html.erb +8 -9
- data/app/views/projects/index.html.erb +1 -1
- data/app/views/users/_form.html.erb +20 -19
- data/bin/rails +1 -1
- data/config/application.rb +11 -10
- data/config/boot.rb +1 -2
- data/config/environments/development.rb +8 -6
- data/config/environments/production.rb +11 -16
- data/config/environments/test.rb +5 -5
- data/config/initializers/assets.rb +17 -7
- data/config/initializers/cookies_serializer.rb +1 -1
- data/config/initializers/houston_async.rb +22 -4
- data/config/initializers/houston_report_exception.rb +16 -11
- data/config/initializers/houston_scheduler.rb +1 -1
- data/config/initializers/houston_try.rb +12 -0
- data/config/routes.rb +29 -19
- data/db/fixtures/projects.yml +2 -2
- data/db/migrate/20160317140151_remove_limit_from_users_invitation_token.rb +9 -0
- data/db/migrate/20160419230411_create_oauth_providers.rb +14 -0
- data/db/migrate/20160420000616_create_authorizations.rb +16 -0
- data/db/migrate/20160507135209_create_jobs.rb +14 -0
- data/db/migrate/20160507135846_create_errors_2.rb +12 -0
- data/db/migrate/20160510233329_add_closed_at_and_merged_at_to_pull_requests.rb +7 -0
- data/db/migrate/20160625203412_convert_user_view_options_to_props.rb +21 -0
- data/db/migrate/20160625221840_convert_project_extended_attributes_to_props.rb +32 -0
- data/db/migrate/20160625230420_move_users_unfuddle_id_to_props.rb +14 -0
- data/db/structure.sql +247 -4
- data/{houston.gemspec → houston-core.gemspec} +8 -9
- data/lib/configuration.rb +15 -43
- data/lib/houston/version.rb +1 -1
- data/lib/houston_observer.rb +2 -7
- data/lib/parallel_enumerable.rb +2 -8
- data/templates/new-instance/app/assets/javascripts/.keep +0 -0
- data/templates/new-instance/app/assets/javascripts/application.js +13 -0
- data/templates/new-instance/app/assets/stylesheets/.keep +0 -0
- data/templates/new-instance/app/assets/stylesheets/application.css +13 -0
- data/templates/new-instance/app/controllers/.keep +0 -0
- data/templates/new-instance/app/models/.keep +0 -0
- data/templates/new-instance/app/views/.keep +0 -0
- data/templates/new-instance/config/alerts/errs.rb +1 -1
- data/templates/new-instance/config/jobs/purge_jobs.rb +3 -0
- data/templates/new-instance/config/main.rb +1 -0
- data/templates/new-instance/config/routes.rb +5 -0
- data/templates/new-instance/config/triggers/github/publish_comments_on_slack.rb +3 -3
- data/templates/new-instance/lib/houston/engine.rb +25 -0
- data/test/acceptance/creating_a_release_test.rb +1 -1
- data/test/integration/ci_integration_test.rb +2 -2
- data/test/integration/commits_api_test.rb +1 -1
- data/test/unit/controllers/hooks_controller_test.rb +1 -6
- data/test/unit/controllers/project_options_controller_test.rb +11 -11
- data/test/unit/controllers/user_options_controller_test.rb +13 -13
- data/test/unit/models/code_climate_coverage_report_test.rb +1 -1
- data/test/unit/models/commit_test.rb +4 -2
- data/test/unit/models/project_test.rb +5 -5
- data/test/unit/models/props_test.rb +57 -0
- data/test/unit/models/pull_request_test.rb +2 -2
- data/test/unit/models/test_run_test.rb +1 -1
- metadata +166 -151
- data/app/assets/javascripts/app/views/reports_view.coffee +0 -51
- data/app/controllers/oauth_consumers_controller.rb +0 -68
- data/app/controllers/reports_controller.rb +0 -215
- data/app/models/consumer_token.rb +0 -13
- data/app/models/github_token.rb +0 -8
- data/app/views/oauth_consumers/error.html.erb +0 -5
- data/app/views/oauth_consumers/index.html.erb +0 -29
- data/app/views/oauth_consumers/show.html.erb +0 -7
- data/app/views/reports/index.html.erb +0 -9
- data/app/views/reports/sprint.html.erb +0 -21
- data/app/views/reports/velocity.html.erb +0 -104
- data/config/initializers/oauth_consumers.rb +0 -18
- data/lib/patches/sprockets_output_path_for_assets.rb +0 -29
@@ -0,0 +1,52 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title><%= title %></title>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
<meta name="relative_url_root" content="<%= main_app.root_url %>" />
|
9
|
+
<meta name="revision" content="<%= revision %>" />
|
10
|
+
<meta name="env" content="<%= Rails.env %>" />
|
11
|
+
<%= yield :meta %>
|
12
|
+
|
13
|
+
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
|
14
|
+
<!--[if lt IE 9]>
|
15
|
+
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
16
|
+
<![endif]-->
|
17
|
+
|
18
|
+
<!-- Le styles -->
|
19
|
+
<%= stylesheet_link_tag "houston/vendor", media: "all" %>
|
20
|
+
<%= stylesheet_link_tag "houston/application", media: "all" %>
|
21
|
+
<%= stylesheet_link_tag "houston/print", media: "print" %>
|
22
|
+
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
|
23
|
+
<%= stylesheet_link_tag "houston/reports/application", :media => "all" %>
|
24
|
+
<%= yield :stylesheets %><%# so that Engines can hook in and add styles %>
|
25
|
+
|
26
|
+
<!-- Le fav and touch icons -->
|
27
|
+
<% unless unfurling? %>
|
28
|
+
<link rel="icon" type="image/x-icon" href="<%= ENV['RAILS_RELATIVE_URL_ROOT'] %>/favicon.png" />
|
29
|
+
<% end %>
|
30
|
+
</head>
|
31
|
+
<body>
|
32
|
+
<div class="container">
|
33
|
+
<%= yield -%>
|
34
|
+
|
35
|
+
<%= render partial: "layouts/tester_bar" if Rails.env.development? -%>
|
36
|
+
</div> <!-- /container -->
|
37
|
+
|
38
|
+
<!-- Le javascript
|
39
|
+
================================================== -->
|
40
|
+
<!-- Placed at the end of the document so the pages load faster -->
|
41
|
+
<%= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" %>
|
42
|
+
<%# javascript_include_tag "https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/js/bootstrap.min.js" %>
|
43
|
+
<%= javascript_include_tag "https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.1/underscore-min.js" %>
|
44
|
+
<%= javascript_include_tag "https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.0.0/backbone-min.js" %>
|
45
|
+
<%= javascript_include_tag "https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.2/handlebars.min.js" %>
|
46
|
+
<%= javascript_include_tag "https://cdnjs.cloudflare.com/ajax/libs/d3/3.4.1/d3.min.js" %>
|
47
|
+
<%# javascript_include_tag "https://cdnjs.cloudflare.com/ajax/libs/dropzone/4.0.1/min/dropzone.min.js" %>
|
48
|
+
<%= javascript_include_tag "houston/vendor" %>
|
49
|
+
<%= javascript_include_tag "houston/application" %>
|
50
|
+
<%= yield :javascripts %><%# so that Engines can hook in and add scripts %>
|
51
|
+
</body>
|
52
|
+
</html>
|
@@ -15,32 +15,31 @@
|
|
15
15
|
|
16
16
|
<!-- Le styles -->
|
17
17
|
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
|
18
|
-
<%= stylesheet_link_tag
|
19
|
-
<%= stylesheet_link_tag
|
18
|
+
<%= stylesheet_link_tag "houston/vendor", media: "all" %>
|
19
|
+
<%= stylesheet_link_tag "houston/dashboard", media: "all" %>
|
20
20
|
<%= yield :stylesheets %><%# so that Engines can hook in and add styles %>
|
21
21
|
|
22
22
|
<!-- Le fav and touch icons -->
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
<link href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon" sizes="114x114">
|
23
|
+
<% unless unfurling? %>
|
24
|
+
<link rel="icon" type="image/x-icon" href="<%= ENV['RAILS_RELATIVE_URL_ROOT'] %>/favicon.png" />
|
25
|
+
<% end %>
|
27
26
|
</head>
|
28
27
|
<body class="dashboard">
|
29
28
|
<div id="container" <% if params[:zoom].to_f > 0 %> style="transform: scale(<%= params[:zoom].to_f %>); transform-origin: 50% 0; -webkit-transform: scale(<%= params[:zoom].to_f %>); -webkit-transform-origin: 50% 0; -moz-transform: scale(<%= params[:zoom].to_f %>); -moz-transform-origin: 50% 0;" <% end %>>
|
30
29
|
<%= yield -%>
|
31
30
|
</div>
|
32
|
-
|
31
|
+
|
33
32
|
<!-- Le javascript
|
34
33
|
================================================== -->
|
35
34
|
<!-- Placed at the end of the document so the pages load faster -->
|
36
|
-
<%= javascript_include_tag "https://
|
35
|
+
<%= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" %>
|
37
36
|
<%# javascript_include_tag "https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/js/bootstrap.min.js" %>
|
38
37
|
<%= javascript_include_tag "https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.1/underscore-min.js" %>
|
39
38
|
<%= javascript_include_tag "https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.0.0/backbone-min.js" %>
|
40
39
|
<%= javascript_include_tag "https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.2/handlebars.min.js" %>
|
41
40
|
<%= javascript_include_tag "https://cdnjs.cloudflare.com/ajax/libs/d3/3.4.1/d3.min.js" %>
|
42
41
|
<%# javascript_include_tag "https://cdnjs.cloudflare.com/ajax/libs/dropzone/4.0.1/min/dropzone.min.js" %>
|
43
|
-
<%= javascript_include_tag
|
44
|
-
<%= yield :javascripts %>
|
42
|
+
<%= javascript_include_tag "houston/dashboard" %>
|
43
|
+
<%= yield :javascripts %><%# so that Engines can hook in and add scripts %>
|
45
44
|
</body>
|
46
45
|
</html>
|
@@ -0,0 +1,54 @@
|
|
1
|
+
<%= form_for @provider, html: {class: "form-horizontal"} do |f| %>
|
2
|
+
<fieldset>
|
3
|
+
<div class="control-group">
|
4
|
+
<%= f.label :name, class: "control-label" %>
|
5
|
+
<div class="controls">
|
6
|
+
<%= f.text_field :name, class: "text_field" %>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<div class="control-group">
|
11
|
+
<%= f.label :site, class: "control-label" %>
|
12
|
+
<div class="controls">
|
13
|
+
<%= f.text_field :site, class: "text_field" %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<div class="control-group">
|
18
|
+
<%= f.label :authorize_path, class: "control-label" %>
|
19
|
+
<div class="controls">
|
20
|
+
<%= f.text_field :authorize_path, class: "text_field" %>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div class="control-group">
|
25
|
+
<%= f.label :token_path, class: "control-label" %>
|
26
|
+
<div class="controls">
|
27
|
+
<%= f.text_field :token_path, class: "text_field" %>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</fieldset>
|
31
|
+
|
32
|
+
<hr />
|
33
|
+
|
34
|
+
<fieldset>
|
35
|
+
<div class="control-group">
|
36
|
+
<%= f.label :client_id, class: "control-label" %>
|
37
|
+
<div class="controls">
|
38
|
+
<%= f.text_field :client_id, class: "text_field" %>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<div class="control-group">
|
43
|
+
<%= f.label :client_secret, class: "control-label" %>
|
44
|
+
<div class="controls">
|
45
|
+
<%= f.text_field :client_secret, class: "text_field" %>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
</fieldset>
|
49
|
+
|
50
|
+
<div class="form-actions">
|
51
|
+
<%= f.submit nil, class: "btn btn-primary" %>
|
52
|
+
<%= link_to "Cancel", oauth_providers_path, class: "btn" %>
|
53
|
+
</div>
|
54
|
+
<% end %>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<% content_for :title do %>
|
2
|
+
<h1 class="project-banner space-below">
|
3
|
+
Providers
|
4
|
+
|
5
|
+
<%= link_to "New Provider", new_oauth_provider_path, class: "btn btn-primary" if can?(:create, Oauth::Provider) %>
|
6
|
+
</h1>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<div class="nomargin">
|
10
|
+
<table id="providers" class="table table-sortable table-striped">
|
11
|
+
<thead>
|
12
|
+
<tr>
|
13
|
+
<td class="table-margin"></td>
|
14
|
+
<th class="provider-name">Name</th>
|
15
|
+
<th class="provider-site">Site</th>
|
16
|
+
<th class="provider-client-id">Client ID</th>
|
17
|
+
<td class="table-margin"></td>
|
18
|
+
</tr>
|
19
|
+
</thead>
|
20
|
+
<tbody>
|
21
|
+
<% @providers.each do |provider| %>
|
22
|
+
<tr class="provider">
|
23
|
+
<td class="table-margin"></td>
|
24
|
+
<td class="provider-name"><%= link_to provider.name, edit_oauth_provider_path(provider) %></td>
|
25
|
+
<td class="provider-site"><%= provider.site %></td>
|
26
|
+
<td class="provider-client-id"><%= provider.client_id %></td>
|
27
|
+
<td class="table-margin"></td>
|
28
|
+
</tr>
|
29
|
+
<% end %>
|
30
|
+
</tbody>
|
31
|
+
</table>
|
32
|
+
</div>
|
33
|
+
|
34
|
+
|
35
|
+
<% content_for :javascripts do %>
|
36
|
+
<script type="text/javascript">
|
37
|
+
$(function() {
|
38
|
+
$('#providers').tablesorter();
|
39
|
+
});
|
40
|
+
</script>
|
41
|
+
<% end %>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<%= f.text_field :slug, :class => "text_field" %>
|
14
14
|
</div>
|
15
15
|
</div>
|
16
|
-
|
16
|
+
|
17
17
|
<div class="control-group">
|
18
18
|
<%= f.label :color, :class => "control-label" %>
|
19
19
|
<div class="controls">
|
@@ -23,11 +23,11 @@
|
|
23
23
|
<% end %>
|
24
24
|
</div>
|
25
25
|
</div>
|
26
|
-
|
26
|
+
|
27
27
|
<% Project.adapters.each do |_, adapter| %>
|
28
|
-
|
28
|
+
|
29
29
|
<hr />
|
30
|
-
|
30
|
+
|
31
31
|
<div class="control-group project-adapter" id="<%= adapter.attribute_name %>">
|
32
32
|
<label class="control-label"><%= adapter.title %></label>
|
33
33
|
<div class="controls">
|
@@ -42,8 +42,8 @@
|
|
42
42
|
<div class="project-adapter-fields" data-adapter="<%= name %>">
|
43
43
|
<% adapter.namespace.adapter(name).parameters.each do |parameter| %>
|
44
44
|
<% errors = @project.errors[parameter].flatten %>
|
45
|
-
<%= label_tag "project[
|
46
|
-
<%= text_field_tag "project[
|
45
|
+
<%= label_tag "project[props][#{parameter}]", parameter.to_s.gsub("_", " ").gsub(/\b('?[a-z])/) { $1.capitalize } %>
|
46
|
+
<%= text_field_tag "project[props][#{parameter}]", @project.props[parameter.to_s], :class => "text_field #{"error" if errors.any?}" %>
|
47
47
|
<% if errors.any? %>
|
48
48
|
<span class="help-inline"> <%= errors.to_sentence %></span>
|
49
49
|
<% end %>
|
@@ -52,7 +52,7 @@
|
|
52
52
|
<% end %>
|
53
53
|
</div>
|
54
54
|
</div>
|
55
|
-
|
55
|
+
|
56
56
|
<% end %>
|
57
57
|
|
58
58
|
<hr />
|
@@ -78,8 +78,7 @@
|
|
78
78
|
|
79
79
|
<% if feature.fields.any? %>
|
80
80
|
<div class="project-feature-fields" data-feature="<%= feature_slug %>">
|
81
|
-
<%= f.fields_for :
|
82
|
-
<% f.object = OpenStruct.new(@project.extended_attributes) # WTF %>
|
81
|
+
<%= f.fields_for :props do |f| %>
|
83
82
|
<% feature.fields.each do |form| %>
|
84
83
|
<div class="project-feature-field">
|
85
84
|
<%= form.render(self, f) %>
|
@@ -28,14 +28,14 @@
|
|
28
28
|
<%= f.text_field :email, :class => "text_field" %>
|
29
29
|
</div>
|
30
30
|
</div>
|
31
|
-
|
31
|
+
|
32
32
|
<div class="control-group">
|
33
33
|
<%= f.label :alias_emails, "Other Email Addresses", :class => "control-label" %>
|
34
34
|
<div class="controls">
|
35
35
|
<%= f.text_area :alias_emails, :class => "text_field", rows: 3, value: @user.alias_emails.join("\n") %>
|
36
36
|
</div>
|
37
37
|
</div>
|
38
|
-
|
38
|
+
|
39
39
|
<% if can?(:manage, @user) %>
|
40
40
|
<div class="control-group">
|
41
41
|
<%= f.label :role, :class => "control-label" %>
|
@@ -44,7 +44,7 @@
|
|
44
44
|
</div>
|
45
45
|
</div>
|
46
46
|
<% end %>
|
47
|
-
|
47
|
+
|
48
48
|
<% if can?(:manage, @user) %>
|
49
49
|
<div class="control-group">
|
50
50
|
<%= f.label :administrator, :class => "control-label" %>
|
@@ -53,14 +53,13 @@
|
|
53
53
|
</div>
|
54
54
|
</div>
|
55
55
|
<% end %>
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
<%= f.fields_for :
|
60
|
-
<% f.object = OpenStruct.new(@user.view_options) # WTF %>
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
<%= f.fields_for :props do |f| %>
|
61
60
|
<% Houston.config.user_options.each do |form| %>
|
62
61
|
<hr />
|
63
|
-
|
62
|
+
|
64
63
|
<div class="control-group">
|
65
64
|
<label class="control-label"><%= form.name %></label>
|
66
65
|
<div class="controls">
|
@@ -69,18 +68,18 @@
|
|
69
68
|
</div>
|
70
69
|
<% end %>
|
71
70
|
<% end %>
|
72
|
-
|
73
|
-
|
74
|
-
|
71
|
+
|
72
|
+
|
73
|
+
|
75
74
|
<% if @user.credentials.any? %>
|
76
75
|
<hr />
|
77
|
-
|
76
|
+
|
78
77
|
<div class="control-group">
|
79
78
|
<label class="control-label">Credentials</label>
|
80
79
|
<div class="controls">
|
81
|
-
|
80
|
+
|
82
81
|
<p>Houston has remembered your credentials for:</p>
|
83
|
-
|
82
|
+
|
84
83
|
<ul class="user-credentials">
|
85
84
|
<%= content_tag_for :li, @user.credentials do |user_credentials| %>
|
86
85
|
<span class="user-credentials-service"><%= user_credentials.service %></span>
|
@@ -92,8 +91,8 @@
|
|
92
91
|
</div>
|
93
92
|
</div>
|
94
93
|
<% end %>
|
95
|
-
|
96
|
-
|
94
|
+
|
95
|
+
|
97
96
|
<% if @user.new_record? %>
|
98
97
|
<div class="control-group">
|
99
98
|
<div class="controls">
|
@@ -103,7 +102,7 @@
|
|
103
102
|
</div>
|
104
103
|
</div>
|
105
104
|
<% end %>
|
106
|
-
|
105
|
+
|
107
106
|
<div class="form-actions">
|
108
107
|
<%= f.submit nil, :class => "btn btn-primary" %>
|
109
108
|
<%= link_to "Invite", invite_user_path(@user), :method => "post", :class => "btn btn-primary" if @user.persisted? && @user.encrypted_password.blank? && !@user.invited? && can?(:create, User) %>
|
@@ -113,19 +112,21 @@
|
|
113
112
|
<button class="btn btn-delete btn-danger" id="retire_user_button">Retire</button>
|
114
113
|
<% end %>
|
115
114
|
</div>
|
116
|
-
|
115
|
+
|
117
116
|
</fieldset>
|
118
117
|
<% end %>
|
119
118
|
|
120
119
|
<% content_for :javascripts do %>
|
121
120
|
<script type="text/javascript">
|
122
121
|
$(function() {
|
122
|
+
<% if @user.persisted? && can?(:destroy, @user) %>
|
123
123
|
$('#retire_user_button').click(function(e) {
|
124
124
|
e.preventDefault();
|
125
125
|
$.destroy('<%= user_path(@user) %>')
|
126
126
|
.success(function() { window.location = '/users'; })
|
127
127
|
.error(function() { console.log(arguments); });
|
128
128
|
});
|
129
|
+
<% end %>
|
129
130
|
});
|
130
131
|
</script>
|
131
132
|
<% end %>
|
data/bin/rails
CHANGED
data/config/application.rb
CHANGED
@@ -27,7 +27,7 @@ require "hpricot"
|
|
27
27
|
require "nested_editor_for"
|
28
28
|
require "neat-rails"
|
29
29
|
require "nokogiri"
|
30
|
-
require "
|
30
|
+
require "oauth2"
|
31
31
|
require "octokit"
|
32
32
|
require "oj"
|
33
33
|
require "openxml/xlsx"
|
@@ -49,10 +49,16 @@ Bundler.require(*Rails.groups)
|
|
49
49
|
require "coffee_script"
|
50
50
|
require "uglifier"
|
51
51
|
|
52
|
-
# Apply patches
|
53
|
-
require "patches/sprockets_output_path_for_assets"
|
54
|
-
|
55
52
|
module Houston
|
53
|
+
def self.host=(value)
|
54
|
+
@host = value
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.host
|
58
|
+
return @host if defined?(@host)
|
59
|
+
Houston.config.host
|
60
|
+
end
|
61
|
+
|
56
62
|
class Application < Rails::Application
|
57
63
|
# This Rails application gets initialized different ways: many times it is
|
58
64
|
# intialized from within a Houston instance project. This line ensures that
|
@@ -90,12 +96,7 @@ module Houston
|
|
90
96
|
# http://stackoverflow.com/a/24727310/731300
|
91
97
|
config.middleware.insert 0, Rack::UTF8Sanitizer
|
92
98
|
|
93
|
-
#
|
94
|
-
# `after_rollback`/`after_commit` callbacks and only print them to the logs.
|
95
|
-
# In the next version, these errors will no longer be suppressed. Instead, the
|
96
|
-
# errors will propagate normally just like in other Active Record callbacks.
|
97
|
-
#
|
98
|
-
# You can opt into the new behavior and remove this warning by setting:
|
99
|
+
# Do not swallow errors in after_commit/after_rollback callbacks.
|
99
100
|
config.active_record.raise_in_transactional_callbacks = true
|
100
101
|
end
|
101
102
|
end
|
data/config/boot.rb
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
port = Rack::Server::Options.new.parse!(ARGV.dup).fetch(:Port, "3000")
|
2
|
+
Houston.host = "localhost:#{port}"
|
3
|
+
|
1
4
|
Rails.application.configure do
|
2
5
|
# Settings specified here will take precedence over those in config/application.rb.
|
3
6
|
|
@@ -31,12 +34,11 @@ Rails.application.configure do
|
|
31
34
|
config.assets.prefix = "/dev-assets"
|
32
35
|
|
33
36
|
# So Devise mailers can make links
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
puts "[config] default host: localhost:#{config.action_mailer.default_url_options[:port]}"
|
37
|
+
config.action_mailer.default_url_options = {host: "localhost", port: port}
|
38
|
+
|
39
|
+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
40
|
+
# yet still be able to expire them through the digest params.
|
41
|
+
config.assets.digest = true
|
40
42
|
|
41
43
|
# Adds additional error checking when serving assets at runtime.
|
42
44
|
# Checks for improperly declared sprockets dependencies.
|