houston-core 0.8.4 → 0.9.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/Gemfile.lock +72 -78
- data/app/assets/javascripts/houston/app/models/role.coffee +4 -0
- data/app/assets/javascripts/houston/app/views/nested_resources.coffee +44 -0
- data/app/assets/javascripts/houston/app/views/team_roles_view.coffee +10 -0
- data/app/assets/javascripts/houston/application.js +3 -1
- data/app/assets/javascripts/houston/core/ajax_helpers.coffee +26 -0
- data/app/assets/javascripts/houston/core/app.coffee +0 -45
- data/app/assets/javascripts/houston/core/errors.coffee +1 -12
- data/app/assets/javascripts/houston/core/handlebars_helpers.coffee +8 -70
- data/app/assets/javascripts/houston/core/jquery_extensions.coffee +0 -138
- data/app/assets/javascripts/houston/core/timeline_helpers.coffee +44 -0
- data/app/assets/javascripts/houston/core/uploader_helpers.coffee +99 -0
- data/app/assets/javascripts/houston/vendor.js +26 -9
- data/app/assets/stylesheets/houston/application/actions.scss +22 -0
- data/app/assets/stylesheets/houston/application/navigation.scss +2 -2
- data/app/assets/stylesheets/houston/application/{freight_train.css.scss → nested_resources.scss} +1 -0
- data/app/assets/stylesheets/houston/core/alerts.scss +0 -4
- data/app/assets/stylesheets/houston/core/timeline.scss +204 -0
- data/app/assets/templates/houston/teams/roles/index.hbs +1 -0
- data/app/assets/templates/houston/teams/roles/show.hbs +19 -0
- data/app/channels/events_channel.rb +1 -1
- data/app/concerns/houston/props.rb +3 -2
- data/app/controllers/actions_controller.rb +8 -3
- data/app/controllers/application_controller.rb +9 -12
- data/app/controllers/authorizations_controller.rb +41 -14
- data/app/controllers/errors_controller.rb +3 -3
- data/app/controllers/project_follows_controller.rb +23 -0
- data/app/controllers/project_options_controller.rb +1 -1
- data/app/controllers/user_options_controller.rb +1 -1
- data/app/helpers/actions_helper.rb +12 -0
- data/app/helpers/application_helper.rb +0 -10
- data/app/helpers/layout_helper.rb +20 -0
- data/app/helpers/markdown_helper.rb +2 -10
- data/app/helpers/navigation_helper.rb +5 -5
- data/app/helpers/project_helper.rb +6 -0
- data/app/helpers/url_helper.rb +4 -4
- data/app/helpers/view_extensions_helper.rb +20 -0
- data/app/models/action.rb +61 -44
- data/app/models/authorization.rb +55 -10
- data/app/models/follow.rb +6 -0
- data/app/models/persistent_trigger.rb +11 -1
- data/app/models/project.rb +5 -27
- data/app/models/user.rb +15 -59
- data/app/presenters/project_presenter.rb +2 -2
- data/app/views/actions/_actions.html.erb +8 -5
- data/app/views/actions/index.html.erb +1 -1
- data/app/views/actions/running.html.erb +9 -15
- data/app/views/actions/show.html.erb +6 -3
- data/app/views/actions/unqueued.html.erb +41 -0
- data/app/views/authorizations/_form.html.erb +28 -16
- data/app/views/authorizations/index.html.erb +9 -4
- data/app/views/{oauth/providers/edit.html.erb → authorizations/oauth2_callback.html.erb} +3 -2
- data/app/views/devise/sessions/new.html.erb +0 -8
- data/app/views/errors/index.html.erb +9 -5
- data/app/views/layouts/_navigation.html.erb +9 -0
- data/app/views/layouts/application.html.erb +11 -6
- data/app/views/layouts/dashboard.html.erb +9 -0
- data/app/views/projects/_form.html.erb +7 -18
- data/app/views/projects/_header.html.erb +2 -6
- data/app/views/projects/index.html.erb +4 -4
- data/app/views/teams/_form.html.erb +7 -17
- data/app/views/teams/index.html.erb +1 -1
- data/app/views/users/_form.html.erb +1 -38
- data/config/application.rb +8 -5
- data/config/initializers/devise.rb +0 -14
- data/config/initializers/secret_token.rb +8 -13
- data/config/routes.rb +12 -28
- data/db/migrate/20130706141443_drop_deprecated_project_roles.rb +5 -1
- data/db/migrate/20170118005958_remove_antecedents_from_versions_of_tickets.rb +1 -1
- data/db/migrate/20170130011016_drop_users_environments_subscribed_to.rb +9 -0
- data/db/migrate/20170205004452_drop_settings.rb +12 -0
- data/db/migrate/20170206002030_drop_extension_hstore.rb +9 -0
- data/db/migrate/20170206002732_drop_legacy_columns_from_users.rb +10 -0
- data/db/migrate/20170209022159_rename_projects_color_to_color_name.rb +5 -0
- data/db/migrate/20170213001453_change_providers_from_models_to_extensions.rb +27 -0
- data/db/migrate/20170215012012_add_props_to_authorizations.rb +5 -0
- data/db/migrate/20170216041034_add_user_to_persistent_triggers.rb +5 -0
- data/db/migrate/20170226201504_create_follows.rb +20 -0
- data/db/migrate/20170301014051_drop_name_from_authorizations.rb +9 -0
- data/db/migrate/20170307032041_add_created_at_to_actions.rb +11 -0
- data/db/migrate/20170307035755_allow_actions_started_at_to_be_null.rb +5 -0
- data/db/migrate/20170310024505_replace_authorizations_provider_name_with_type.rb +12 -0
- data/db/migrate/20170329030329_drop_consumer_tokens.rb +9 -0
- data/db/structure.sql +187 -212
- data/houston-core.gemspec +10 -13
- data/lib/houston/boot.rb +1 -4
- data/lib/houston/boot/actions.rb +24 -21
- data/lib/houston/boot/configuration.rb +46 -113
- data/lib/houston/boot/extensions.rb +54 -341
- data/lib/houston/boot/extensions/deprecated.rb +194 -0
- data/lib/houston/boot/extensions/dsl.rb +99 -0
- data/lib/houston/boot/extensions/events.rb +81 -0
- data/lib/houston/boot/extensions/features.rb +42 -0
- data/lib/houston/boot/extensions/layout.rb +70 -0
- data/lib/houston/boot/extensions/navigation.rb +42 -0
- data/lib/houston/boot/extensions/oauth.rb +62 -0
- data/lib/houston/boot/extensions/serializers.rb +29 -0
- data/lib/houston/boot/extensions/view.rb +34 -0
- data/lib/houston/boot/observer.rb +10 -5
- data/{app/models/oauth → lib/houston/boot}/provider.rb +7 -5
- data/lib/houston/boot/running_as.rb +0 -5
- data/lib/houston/boot/serializer.rb +12 -6
- data/lib/houston/boot/{active_record_serializer.rb → serializers/active_record_serializer.rb} +0 -2
- data/lib/houston/boot/{readonly_hash_serializer.rb → serializers/readonly_hash_serializer.rb} +0 -2
- data/lib/houston/boot/timer.rb +10 -0
- data/lib/houston/boot/triggers.rb +27 -8
- data/lib/houston/version.rb +1 -1
- data/templates/new-instance/.gitignore +0 -4
- data/templates/new-instance/config/main.rb +8 -10
- data/templates/new-module/test/dummy/houston.rb +1 -0
- data/test/acceptance/layout_test.rb +58 -0
- data/test/acceptance/updating_props_test.rb +72 -0
- data/test/support/config.rb +1 -0
- data/test/unit/extensions/events_extension_test.rb +33 -0
- data/test/unit/extensions/layout_extension_test.rb +74 -0
- data/test/unit/extensions/navigation_extension_test.rb +62 -0
- data/test/unit/extensions/oauth_extension_test.rb +91 -0
- data/test/unit/extensions/project_features_extension_test.rb +79 -0
- data/test/unit/extensions/serializers_extension_test.rb +47 -0
- data/test/unit/extensions/view_extension_test.rb +98 -0
- data/test/unit/models/actions_test.rb +11 -5
- data/test/unit/models/configuration_test.rb +0 -8
- data/test/unit/models/observer_test.rb +16 -0
- data/test/unit/models/persistent_trigger_test.rb +29 -2
- data/test/unit/models/serializer_test.rb +6 -0
- data/test/unit/models/timer_test.rb +88 -0
- metadata +87 -168
- data/app/assets/font/octicons.eot +0 -0
- data/app/assets/font/octicons.svg +0 -198
- data/app/assets/font/octicons.ttf +0 -0
- data/app/assets/font/octicons.woff +0 -0
- data/app/assets/font/roboto-black-webfont.eot +0 -0
- data/app/assets/font/roboto-black-webfont.svg +0 -675
- data/app/assets/font/roboto-black-webfont.ttf +0 -0
- data/app/assets/font/roboto-black-webfont.woff +0 -0
- data/app/assets/font/roboto-blackitalic-webfont.eot +0 -0
- data/app/assets/font/roboto-blackitalic-webfont.svg +0 -677
- data/app/assets/font/roboto-blackitalic-webfont.ttf +0 -0
- data/app/assets/font/roboto-blackitalic-webfont.woff +0 -0
- data/app/assets/font/roboto-bold-webfont.eot +0 -0
- data/app/assets/font/roboto-bold-webfont.svg +0 -675
- data/app/assets/font/roboto-bold-webfont.ttf +0 -0
- data/app/assets/font/roboto-bold-webfont.woff +0 -0
- data/app/assets/font/roboto-bolditalic-webfont.eot +0 -0
- data/app/assets/font/roboto-bolditalic-webfont.svg +0 -677
- data/app/assets/font/roboto-bolditalic-webfont.ttf +0 -0
- data/app/assets/font/roboto-bolditalic-webfont.woff +0 -0
- data/app/assets/font/roboto-italic-webfont.eot +0 -0
- data/app/assets/font/roboto-italic-webfont.svg +0 -668
- data/app/assets/font/roboto-italic-webfont.ttf +0 -0
- data/app/assets/font/roboto-italic-webfont.woff +0 -0
- data/app/assets/font/roboto-light-webfont.eot +0 -0
- data/app/assets/font/roboto-light-webfont.svg +0 -666
- data/app/assets/font/roboto-light-webfont.ttf +0 -0
- data/app/assets/font/roboto-light-webfont.woff +0 -0
- data/app/assets/font/roboto-lightitalic-webfont.eot +0 -0
- data/app/assets/font/roboto-lightitalic-webfont.svg +0 -668
- data/app/assets/font/roboto-lightitalic-webfont.ttf +0 -0
- data/app/assets/font/roboto-lightitalic-webfont.woff +0 -0
- data/app/assets/font/roboto-medium-webfont.eot +0 -0
- data/app/assets/font/roboto-medium-webfont.svg +0 -675
- data/app/assets/font/roboto-medium-webfont.ttf +0 -0
- data/app/assets/font/roboto-medium-webfont.woff +0 -0
- data/app/assets/font/roboto-mediumitalic-webfont.eot +0 -0
- data/app/assets/font/roboto-mediumitalic-webfont.svg +0 -677
- data/app/assets/font/roboto-mediumitalic-webfont.ttf +0 -0
- data/app/assets/font/roboto-mediumitalic-webfont.woff +0 -0
- data/app/assets/font/roboto-regular-webfont.eot +0 -0
- data/app/assets/font/roboto-regular-webfont.svg +0 -666
- data/app/assets/font/roboto-regular-webfont.ttf +0 -0
- data/app/assets/font/roboto-regular-webfont.woff +0 -0
- data/app/assets/font/roboto-thin-webfont.eot +0 -0
- data/app/assets/font/roboto-thin-webfont.svg +0 -666
- data/app/assets/font/roboto-thin-webfont.ttf +0 -0
- data/app/assets/font/roboto-thin-webfont.woff +0 -0
- data/app/assets/font/roboto-thinitalic-webfont.eot +0 -0
- data/app/assets/font/roboto-thinitalic-webfont.svg +0 -668
- data/app/assets/font/roboto-thinitalic-webfont.ttf +0 -0
- data/app/assets/font/roboto-thinitalic-webfont.woff +0 -0
- data/app/assets/images/bug-fixed-128.png +0 -0
- data/app/assets/images/bug-fixed-32.png +0 -0
- data/app/assets/images/bug-fixed-48.png +0 -0
- data/app/assets/images/bug-new-128.png +0 -0
- data/app/assets/images/bug-new-32.png +0 -0
- data/app/assets/images/bug-new-48.png +0 -0
- data/app/assets/images/bug-open-32.png +0 -0
- data/app/assets/images/bug-zero-128.png +0 -0
- data/app/assets/images/bug-zero-48.png +0 -0
- data/app/assets/images/drag-grip.png +0 -0
- data/app/assets/javascripts/houston/core/burndown_chart.coffee +0 -111
- data/app/assets/javascripts/houston/core/stacked_area_graph.coffee +0 -113
- data/app/assets/javascripts/houston/core/stacked_bar_graph.coffee +0 -108
- data/app/assets/stylesheets/houston/application/project_tiles.scss +0 -26
- data/app/assets/stylesheets/houston/application/tips.scss +0 -5
- data/app/assets/stylesheets/houston/core/octicons-icons.scss +0 -221
- data/app/assets/stylesheets/houston/core/octicons.scss.erb +0 -9
- data/app/assets/stylesheets/houston/core/roboto.scss.erb +0 -131
- data/app/concerns/historical_weekly_stats.rb +0 -15
- data/app/concerns/nosync.rb +0 -21
- data/app/controllers/oauth/providers_controller.rb +0 -45
- data/app/controllers/project_roles_controller.rb +0 -22
- data/app/controllers/settings_controller.rb +0 -14
- data/app/controllers/tester_bar_controller.rb +0 -12
- data/app/controllers/user_credentials_controller.rb +0 -24
- data/app/models/role.rb +0 -33
- data/app/models/setting.rb +0 -10
- data/app/models/settings.rb +0 -38
- data/app/models/slackdown.rb +0 -23
- data/app/models/user_credentials.rb +0 -27
- data/app/views/errors/_actions.html.erb +0 -17
- data/app/views/layouts/_tester_bar.html.erb +0 -6
- data/app/views/layouts/minimal.html.erb +0 -50
- data/app/views/layouts/naked.html.erb +0 -47
- data/app/views/layouts/naked_dashboard.html.erb +0 -50
- data/app/views/oauth/providers/_form.html.erb +0 -54
- data/app/views/oauth/providers/index.html.erb +0 -41
- data/app/views/oauth/providers/new.html.erb +0 -7
- data/config/initializers/add_navigation_renderers.rb +0 -5
- data/config/initializers/vestal_versions.rb +0 -9
- data/db/migrate/20130519163615_create_user_credentials.rb +0 -18
- data/lib/houston/boot/events.rb +0 -10
- data/lib/tasks/keypair.rake +0 -17
- data/vendor/assets/javascripts/jquery.pjax.js +0 -817
@@ -1,9 +0,0 @@
|
|
1
|
-
@font-face {
|
2
|
-
font-family: 'octicons';
|
3
|
-
src: url('<%= font_path("octicons.eot") %>?#iefix') format('embedded-opentype'),
|
4
|
-
url('<%= font_path("octicons.woff") %>') format('woff'),
|
5
|
-
url('<%= font_path("octicons.ttf") %>') format('truetype'),
|
6
|
-
url('<%= font_path("octicons.svg") %>#octicons') format('svg');
|
7
|
-
font-weight: normal;
|
8
|
-
font-style: normal;
|
9
|
-
}
|
@@ -1,131 +0,0 @@
|
|
1
|
-
@font-face {
|
2
|
-
font-family: 'roboto';
|
3
|
-
src: url('<%= font_path("roboto-black-webfont.eot") %>');
|
4
|
-
src: url('<%= font_path("roboto-black-webfont.eot") %>?#iefix') format('embedded-opentype'),
|
5
|
-
url('<%= font_path("roboto-black-webfont.woff") %>') format('woff'),
|
6
|
-
url('<%= font_path("roboto-black-webfont.ttf") %>') format('truetype'),
|
7
|
-
url('<%= font_path("roboto-black-webfont.svg") %>#robotoblack') format('svg');
|
8
|
-
font-weight: 900;
|
9
|
-
font-style: normal;
|
10
|
-
}
|
11
|
-
|
12
|
-
@font-face {
|
13
|
-
font-family: 'roboto';
|
14
|
-
src: url('<%= font_path("roboto-light-webfont.eot") %>');
|
15
|
-
src: url('<%= font_path("roboto-light-webfont.eot") %>?#iefix') format('embedded-opentype'),
|
16
|
-
url('<%= font_path("roboto-light-webfont.woff") %>') format('woff'),
|
17
|
-
url('<%= font_path("roboto-light-webfont.ttf") %>') format('truetype'),
|
18
|
-
url('<%= font_path("roboto-light-webfont.svg") %>#robotolight') format('svg');
|
19
|
-
font-weight: 200;
|
20
|
-
font-style: normal;
|
21
|
-
}
|
22
|
-
|
23
|
-
@font-face {
|
24
|
-
font-family: 'roboto';
|
25
|
-
src: url('<%= font_path("roboto-bold-webfont.eot") %>');
|
26
|
-
src: url('<%= font_path("roboto-bold-webfont.eot") %>?#iefix') format('embedded-opentype'),
|
27
|
-
url('<%= font_path("roboto-bold-webfont.woff") %>') format('woff'),
|
28
|
-
url('<%= font_path("roboto-bold-webfont.ttf") %>') format('truetype'),
|
29
|
-
url('<%= font_path("roboto-bold-webfont.svg") %>#robotobold') format('svg');
|
30
|
-
font-weight: 700;
|
31
|
-
font-style: normal;
|
32
|
-
}
|
33
|
-
|
34
|
-
@font-face {
|
35
|
-
font-family: 'roboto';
|
36
|
-
src: url('<%= font_path("roboto-italic-webfont.eot") %>');
|
37
|
-
src: url('<%= font_path("roboto-italic-webfont.eot") %>?#iefix') format('embedded-opentype'),
|
38
|
-
url('<%= font_path("roboto-italic-webfont.woff") %>') format('woff'),
|
39
|
-
url('<%= font_path("roboto-italic-webfont.ttf") %>') format('truetype'),
|
40
|
-
url('<%= font_path("roboto-italic-webfont.svg") %>#robotoitalic') format('svg');
|
41
|
-
font-weight: normal;
|
42
|
-
font-style: italic;
|
43
|
-
}
|
44
|
-
|
45
|
-
@font-face {
|
46
|
-
font-family: 'roboto';
|
47
|
-
src: url('<%= font_path("roboto-blackitalic-webfont.eot") %>');
|
48
|
-
src: url('<%= font_path("roboto-blackitalic-webfont.eot") %>?#iefix') format('embedded-opentype'),
|
49
|
-
url('<%= font_path("roboto-blackitalic-webfont.woff") %>') format('woff'),
|
50
|
-
url('<%= font_path("roboto-blackitalic-webfont.ttf") %>') format('truetype'),
|
51
|
-
url('<%= font_path("roboto-blackitalic-webfont.svg") %>#robotoblack_italic') format('svg');
|
52
|
-
font-weight: 900;
|
53
|
-
font-style: italic;
|
54
|
-
}
|
55
|
-
|
56
|
-
@font-face {
|
57
|
-
font-family: 'roboto';
|
58
|
-
src: url('<%= font_path("roboto-regular-webfont.eot") %>');
|
59
|
-
src: url('<%= font_path("roboto-regular-webfont.eot") %>?#iefix') format('embedded-opentype'),
|
60
|
-
url('<%= font_path("roboto-regular-webfont.woff") %>') format('woff'),
|
61
|
-
url('<%= font_path("roboto-regular-webfont.ttf") %>') format('truetype'),
|
62
|
-
url('<%= font_path("roboto-regular-webfont.svg") %>#robotoregular') format('svg');
|
63
|
-
font-weight: 400;
|
64
|
-
font-style: normal;
|
65
|
-
}
|
66
|
-
|
67
|
-
@font-face {
|
68
|
-
font-family: 'roboto';
|
69
|
-
src: url('<%= font_path("roboto-bolditalic-webfont.eot") %>');
|
70
|
-
src: url('<%= font_path("roboto-bolditalic-webfont.eot") %>?#iefix') format('embedded-opentype'),
|
71
|
-
url('<%= font_path("roboto-bolditalic-webfont.woff") %>') format('woff'),
|
72
|
-
url('<%= font_path("roboto-bolditalic-webfont.ttf") %>') format('truetype'),
|
73
|
-
url('<%= font_path("roboto-bolditalic-webfont.svg") %>#robotobold_italic') format('svg');
|
74
|
-
font-weight: 700;
|
75
|
-
font-style: italic;
|
76
|
-
}
|
77
|
-
|
78
|
-
@font-face {
|
79
|
-
font-family: 'roboto';
|
80
|
-
src: url('<%= font_path("roboto-thin-webfont.eot") %>');
|
81
|
-
src: url('<%= font_path("roboto-thin-webfont.eot") %>?#iefix') format('embedded-opentype'),
|
82
|
-
url('<%= font_path("roboto-thin-webfont.woff") %>') format('woff'),
|
83
|
-
url('<%= font_path("roboto-thin-webfont.ttf") %>') format('truetype'),
|
84
|
-
url('<%= font_path("roboto-thin-webfont.svg") %>#robotothin') format('svg');
|
85
|
-
font-weight: 100;
|
86
|
-
font-style: normal;
|
87
|
-
}
|
88
|
-
|
89
|
-
@font-face {
|
90
|
-
font-family: 'roboto';
|
91
|
-
src: url('<%= font_path("roboto-mediumitalic-webfont.eot") %>');
|
92
|
-
src: url('<%= font_path("roboto-mediumitalic-webfont.eot") %>?#iefix') format('embedded-opentype'),
|
93
|
-
url('<%= font_path("roboto-mediumitalic-webfont.woff") %>') format('woff'),
|
94
|
-
url('<%= font_path("roboto-mediumitalic-webfont.ttf") %>') format('truetype'),
|
95
|
-
url('<%= font_path("roboto-mediumitalic-webfont.svg") %>#robotomedium_italic') format('svg');
|
96
|
-
font-weight: 500;
|
97
|
-
font-style: italic;
|
98
|
-
}
|
99
|
-
|
100
|
-
@font-face {
|
101
|
-
font-family: 'roboto';
|
102
|
-
src: url('<%= font_path("roboto-medium-webfont.eot") %>');
|
103
|
-
src: url('<%= font_path("roboto-medium-webfont.eot") %>?#iefix') format('embedded-opentype'),
|
104
|
-
url('<%= font_path("roboto-medium-webfont.woff") %>') format('woff'),
|
105
|
-
url('<%= font_path("roboto-medium-webfont.ttf") %>') format('truetype'),
|
106
|
-
url('<%= font_path("roboto-medium-webfont.svg") %>#robotomedium') format('svg');
|
107
|
-
font-weight: 500;
|
108
|
-
font-style: normal;
|
109
|
-
}
|
110
|
-
|
111
|
-
@font-face {
|
112
|
-
font-family: 'roboto';
|
113
|
-
src: url('<%= font_path("roboto-thinitalic-webfont.eot") %>');
|
114
|
-
src: url('<%= font_path("roboto-thinitalic-webfont.eot") %>?#iefix') format('embedded-opentype'),
|
115
|
-
url('<%= font_path("roboto-thinitalic-webfont.woff") %>') format('woff'),
|
116
|
-
url('<%= font_path("roboto-thinitalic-webfont.ttf") %>') format('truetype'),
|
117
|
-
url('<%= font_path("roboto-thinitalic-webfont.svg") %>#robotothin_italic') format('svg');
|
118
|
-
font-weight: 100;
|
119
|
-
font-style: italic;
|
120
|
-
}
|
121
|
-
|
122
|
-
@font-face {
|
123
|
-
font-family: 'roboto';
|
124
|
-
src: url('<%= font_path("roboto-lightitalic-webfont.eot") %>');
|
125
|
-
src: url('<%= font_path("roboto-lightitalic-webfont.eot") %>?#iefix') format('embedded-opentype'),
|
126
|
-
url('<%= font_path("roboto-lightitalic-webfont.woff") %>') format('woff'),
|
127
|
-
url('<%= font_path("roboto-lightitalic-webfont.ttf") %>') format('truetype'),
|
128
|
-
url('<%= font_path("roboto-lightitalic-webfont.svg") %>#robotolight_italic') format('svg');
|
129
|
-
font-weight: 200;
|
130
|
-
font-style: italic;
|
131
|
-
}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
module HistoricalWeeklyStats
|
2
|
-
|
3
|
-
def history_range
|
4
|
-
@history_range ||= ((weeks_of_history - 1).weeks.before(this_week.begin))..this_week.end
|
5
|
-
end
|
6
|
-
|
7
|
-
def history_weeks
|
8
|
-
@history_weeks ||= history_range.step(7)
|
9
|
-
end
|
10
|
-
|
11
|
-
def new_history_vector
|
12
|
-
Hash[history_weeks.zip([0] * weeks_of_history)]
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
data/app/concerns/nosync.rb
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
module Oauth
|
2
|
-
class ProvidersController < ApplicationController
|
3
|
-
|
4
|
-
def index
|
5
|
-
@title = "Providers"
|
6
|
-
authorize! :read, Oauth::Provider
|
7
|
-
@providers = Oauth::Provider.all
|
8
|
-
end
|
9
|
-
|
10
|
-
def new
|
11
|
-
@title = "New Provider"
|
12
|
-
authorize! :create, Oauth::Provider
|
13
|
-
@provider = Oauth::Provider.new
|
14
|
-
end
|
15
|
-
|
16
|
-
def create
|
17
|
-
@provider = Oauth::Provider.new(params[:oauth_provider])
|
18
|
-
authorize! :create, @provider
|
19
|
-
|
20
|
-
if @provider.save
|
21
|
-
redirect_to oauth_providers_path
|
22
|
-
else
|
23
|
-
render action: :new
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
def edit
|
28
|
-
@title = "Edit Provider"
|
29
|
-
@provider = Oauth::Provider.find(params[:id])
|
30
|
-
authorize! :update, @provider
|
31
|
-
end
|
32
|
-
|
33
|
-
def update
|
34
|
-
@provider = Oauth::Provider.find(params[:id])
|
35
|
-
authorize! :update, @provider
|
36
|
-
|
37
|
-
if @provider.update_attributes(params[:oauth_provider])
|
38
|
-
redirect_to oauth_providers_path
|
39
|
-
else
|
40
|
-
render action: :edit
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
end
|
45
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
class ProjectRolesController < ApplicationController
|
2
|
-
before_action :find_project
|
3
|
-
|
4
|
-
|
5
|
-
def create
|
6
|
-
Role.where(project_id: @project.id, user_id: current_user.id).first_or_create(name: "Follower")
|
7
|
-
redirect_to :back, notice: "You are now following #{@project.name}"
|
8
|
-
end
|
9
|
-
|
10
|
-
def destroy
|
11
|
-
Role.where(project_id: @project.id, user_id: current_user.id).delete_all
|
12
|
-
redirect_to :back, notice: "You are no longer following #{@project.name}"
|
13
|
-
end
|
14
|
-
|
15
|
-
|
16
|
-
private
|
17
|
-
|
18
|
-
def find_project
|
19
|
-
@project = Project.find_by_slug!(params[:project_id])
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
class SettingsController < ApplicationController
|
2
|
-
load_and_authorize_resource
|
3
|
-
|
4
|
-
def show
|
5
|
-
@settings = Settings.new
|
6
|
-
end
|
7
|
-
|
8
|
-
def update
|
9
|
-
@settings = Settings.new(params[:settings])
|
10
|
-
@settings.save!
|
11
|
-
redirect_to settings_path, :notice => "Changes saved"
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
class TesterBarController < ApplicationController
|
2
|
-
|
3
|
-
def login_as
|
4
|
-
user = User.find_by_email(params[:email])
|
5
|
-
if user
|
6
|
-
flash[:notice] = "You have signed in as #{user.name}"
|
7
|
-
sign_in(user)
|
8
|
-
end
|
9
|
-
redirect_to request.referrer || root_url
|
10
|
-
end
|
11
|
-
|
12
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
class UserCredentialsController < ApplicationController
|
2
|
-
|
3
|
-
def upsert
|
4
|
-
credentials = current_user.credentials.where(service: params[:service]).first_or_initialize
|
5
|
-
credentials.login = params[:login]
|
6
|
-
credentials.password = params[:password]
|
7
|
-
|
8
|
-
if credentials.save
|
9
|
-
head :ok
|
10
|
-
else
|
11
|
-
render json: credentials.errors, status: :unprocessable_entity
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
def destroy
|
16
|
-
credentials = current_user.credentials.find_by_id(params[:id])
|
17
|
-
if credentials && credentials.delete
|
18
|
-
redirect_to :back, notice: "Houston has deleted your credentials for #{credentials.service}"
|
19
|
-
else
|
20
|
-
redirect_to :back
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
data/app/models/role.rb
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
class Role < ActiveRecord::Base
|
2
|
-
|
3
|
-
belongs_to :user
|
4
|
-
belongs_to :project
|
5
|
-
|
6
|
-
validates :user_id, presence: true
|
7
|
-
validates :project, presence: true
|
8
|
-
|
9
|
-
class << self
|
10
|
-
def to_users
|
11
|
-
User.where(id: all.select(:user_id))
|
12
|
-
end
|
13
|
-
|
14
|
-
def to_projects
|
15
|
-
Project.where(id: all.select(:project_id))
|
16
|
-
end
|
17
|
-
|
18
|
-
def for_user(user_or_id)
|
19
|
-
user_id = user_or_id.is_a?(User) ? user_or_id.id : user_or_id
|
20
|
-
where user_id: user_id
|
21
|
-
end
|
22
|
-
|
23
|
-
def for_project(project_or_id)
|
24
|
-
project_id = project_or_id.is_a?(Project) ? project_or_id.id : project_or_id
|
25
|
-
where project_id: project_id
|
26
|
-
end
|
27
|
-
|
28
|
-
def any?
|
29
|
-
count > 0
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|
data/app/models/setting.rb
DELETED
data/app/models/settings.rb
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
class Settings
|
2
|
-
|
3
|
-
def initialize(attributes={})
|
4
|
-
attributes.each do |key, value|
|
5
|
-
self[key] = value
|
6
|
-
end
|
7
|
-
end
|
8
|
-
|
9
|
-
def [](name)
|
10
|
-
fetch(name, nil)
|
11
|
-
end
|
12
|
-
|
13
|
-
def fetch(name, *args)
|
14
|
-
setting = settings.find { |setting| setting.name == name }
|
15
|
-
return setting.value if setting
|
16
|
-
raise KeyError, "key not found: #{name.inspect}" if args.empty?
|
17
|
-
args.first
|
18
|
-
end
|
19
|
-
|
20
|
-
def []=(name, value)
|
21
|
-
setting = settings.find { |setting| setting.name == name }
|
22
|
-
settings << (setting = Setting.new(name: name)) unless setting
|
23
|
-
setting.value = value
|
24
|
-
end
|
25
|
-
|
26
|
-
def save!
|
27
|
-
settings.each do |setting|
|
28
|
-
setting.save if setting.changed?
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
private
|
33
|
-
|
34
|
-
def settings
|
35
|
-
@settings ||= Setting.all
|
36
|
-
end
|
37
|
-
|
38
|
-
end
|
data/app/models/slackdown.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
# Converts GitHub-flavored Markdown to Slack-flavored Markdown
|
2
|
-
class Slackdown
|
3
|
-
attr_reader :markdown
|
4
|
-
|
5
|
-
def initialize(markdown)
|
6
|
-
@markdown = markdown.to_s
|
7
|
-
end
|
8
|
-
|
9
|
-
def convert
|
10
|
-
# Remove the source name from fenced code blocks
|
11
|
-
slackdown = markdown.gsub(/^```(ruby|diff|css|json|sql|html|xml|coffee(?:script)?|javascript|js|bash)/, "```")
|
12
|
-
|
13
|
-
# Convert `__` and `**` to `*`
|
14
|
-
slackdown = slackdown.gsub(/(?<!_)__(?!_)/, "*")
|
15
|
-
.gsub(/(?<!\*)\*\*(?!\*)/, "*")
|
16
|
-
|
17
|
-
# Replace images with their URLs: Slack will unfurl them
|
18
|
-
slackdown = slackdown.gsub(/<img[^>]*src="([^"]+)"[^>]*>/, "\\1")
|
19
|
-
slackdown
|
20
|
-
end
|
21
|
-
alias :to_s :convert
|
22
|
-
|
23
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
class UserCredentials < ActiveRecord::Base
|
2
|
-
|
3
|
-
class MissingCredentials < RuntimeError; end
|
4
|
-
class InsufficientPermissions < RuntimeError; end
|
5
|
-
class InvalidCredentials < RuntimeError; end
|
6
|
-
class AccountLocked < RuntimeError; end
|
7
|
-
|
8
|
-
encrypt_with_public_key :password, key_pair: Houston.config.keypair
|
9
|
-
|
10
|
-
validate :test_connection
|
11
|
-
validates :service, inclusion: { in: Houston.user_credentials_support_services }
|
12
|
-
|
13
|
-
belongs_to :user
|
14
|
-
|
15
|
-
def self.for(service)
|
16
|
-
credentials = where(service: service).first || (raise MissingCredentials)
|
17
|
-
[credentials.login, credentials.password.decrypt(Houston.config.passphrase)]
|
18
|
-
rescue OpenSSL::PKey::RSAError
|
19
|
-
credentials.delete
|
20
|
-
raise MissingCredentials
|
21
|
-
end
|
22
|
-
|
23
|
-
def test_connection
|
24
|
-
Houston.test_connection_to(self)
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|