houston-core 0.8.0.pre2 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/Gemfile.lock +1 -1
- data/ROADMAP.md +13 -0
- data/app/controllers/api/v1/measurements_controller.rb +1 -0
- data/app/controllers/api/v1/projects_controller.rb +1 -0
- data/app/controllers/application_controller.rb +7 -8
- data/app/presenters/measurements_presenter.rb +7 -12
- data/lib/houston/boot.rb +1 -0
- data/{config/initializers/houston_try.rb → lib/houston/try.rb} +3 -1
- data/lib/houston/version.rb +1 -1
- data/{app/mailers/.gitkeep → test/unit/.keep} +0 -0
- metadata +9 -17
- data/app/models/.gitkeep +0 -0
- data/lib/tasks/.gitkeep +0 -0
- data/test/fixtures/.gitkeep +0 -0
- data/test/integration/.gitkeep +0 -0
- data/test/unit/.gitkeep +0 -0
- data/vendor/assets/javascripts/.gitkeep +0 -0
- data/vendor/assets/stylesheets/.gitkeep +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 136fe47feb3a17073f374d80810c1e7a1bd0b2d5
|
4
|
+
data.tar.gz: 64aab343cacf47e7ae861b3270762f491c7d80b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 773e6c3c82396549d2a2cf9021a4fbc1bbc4b860cb89efdcb6e373d0218cf7e8ceab2bc5ea5a31f1f822b0060b39b1e28c808ea14ab65d3510f992299e59e4e7
|
7
|
+
data.tar.gz: a558b53a66526fd6f3919b973ee6d037ab7b27b81c96d0ddeb5c27b2f8b7ba8712b25aeaee8f8c92596cacc16a8d74ddf20f3d07ad080166bf44fca8aa7d5bc7
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# Houston::Core History/Changelog
|
2
|
+
|
3
|
+
|
4
|
+
## 0.8.0 - 2017-01-29
|
5
|
+
|
6
|
+
- Introduced Teams
|
7
|
+
- Used ActionCable to respond to events on the client
|
8
|
+
- Extracted non-Core features to new modules:
|
9
|
+
- [houston-ci](https://github.com/houston/houston-ci)
|
10
|
+
- [houston-commits](https://github.com/houston/houston-commits)
|
11
|
+
- [houston-exceptions](https://github.com/houston/houston-exceptions)
|
12
|
+
- [houston-releases](https://github.com/houston/houston-releases)
|
13
|
+
- [houston-sprints](https://github.com/cph/houston-sprints)
|
14
|
+
- [houston-testing_report](https://github.com/houston/houston-testing_report)
|
15
|
+
- [houston-tickets](https://github.com/houston/houston-tickets)
|
16
|
+
- Removed:
|
17
|
+
- Pretickets
|
18
|
+
- Activity Feed
|
19
|
+
- Deploy via EngineYard
|
20
|
+
|
21
|
+
## 0.7.0 - 2016-08-13
|
22
|
+
|
23
|
+
- Added API for Measurements
|
24
|
+
- Introduced the Actions and Events APIs and Persistent Triggers
|
data/Gemfile.lock
CHANGED
data/ROADMAP.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Houston::Core Roadmap
|
2
|
+
|
3
|
+
## 0.9.0
|
4
|
+
|
5
|
+
- Implement Persistent Triggers UI
|
6
|
+
- Refactor extension points
|
7
|
+
|
8
|
+
## 1.0.0
|
9
|
+
|
10
|
+
- Improve Getting Started experience
|
11
|
+
- `houston add` and module generators
|
12
|
+
- Launch houston.github.io
|
13
|
+
- Document extension points
|
@@ -5,8 +5,7 @@ class ApplicationController < ActionController::Base
|
|
5
5
|
# For APIs, you may want to use :null_session instead.
|
6
6
|
protect_from_forgery with: :exception
|
7
7
|
|
8
|
-
|
9
|
-
after_action :save_current_project
|
8
|
+
around_action :with_current_project
|
10
9
|
|
11
10
|
|
12
11
|
delegate :mobile?, to: "browser.device"
|
@@ -127,15 +126,15 @@ class ApplicationController < ActionController::Base
|
|
127
126
|
@current_project ||= @project || (@default_project_slug ? Project[@default_project_slug] : (current_user && current_user.current_project))
|
128
127
|
end
|
129
128
|
|
130
|
-
def
|
129
|
+
def with_current_project
|
131
130
|
@default_project_slug = params[:project] if params[:project].is_a?(String)
|
132
|
-
end
|
133
131
|
|
134
|
-
|
135
|
-
return unless current_user && current_project
|
132
|
+
yield
|
136
133
|
|
137
|
-
current_user
|
138
|
-
|
134
|
+
if current_user && current_project
|
135
|
+
current_user.current_project_id = current_project.id
|
136
|
+
current_user.save if current_user.current_project_id_changed?
|
137
|
+
end
|
139
138
|
end
|
140
139
|
|
141
140
|
|
@@ -7,19 +7,14 @@ class MeasurementsPresenter
|
|
7
7
|
|
8
8
|
def to_json(*args)
|
9
9
|
Houston.benchmark "[#{self.class.name.underscore}] Render JSON" do
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
query = measurements.select(<<-SQL)
|
11
|
+
taken_at "timestamp",
|
12
|
+
name,
|
13
|
+
value,
|
14
|
+
json_build_object('type', subject_type, 'id', subject_id) "subject"
|
15
|
+
SQL
|
13
16
|
|
14
|
-
|
15
|
-
Houston.benchmark "[#{self.class.name.underscore}] Prepare JSON" do
|
16
|
-
measurements.pluck(:name, :taken_at, :value, :subject_type, :subject_id)
|
17
|
-
.map do |name, timestamp, value, subject_type, subject_id|
|
18
|
-
{ timestamp: timestamp,
|
19
|
-
name: name,
|
20
|
-
value: value,
|
21
|
-
subject: { type: subject_type, id: subject_id } }
|
22
|
-
end
|
17
|
+
ActiveRecord::Base.connection.select_value("select array_to_json(array_agg(row_to_json(t))) from (#{query.to_sql}) t")
|
23
18
|
end
|
24
19
|
end
|
25
20
|
|
data/lib/houston/boot.rb
CHANGED
@@ -6,17 +6,19 @@ module Houston
|
|
6
6
|
max_tries = options.fetch :max_tries, 3
|
7
7
|
base = options.fetch :base, 2
|
8
8
|
ignore = options.fetch :ignore, false
|
9
|
+
rescue_from = [StandardError] if rescue_from.empty?
|
9
10
|
|
10
11
|
tries = 1
|
11
12
|
begin
|
12
13
|
yield tries
|
13
14
|
rescue *rescue_from
|
14
|
-
|
15
|
+
if tries > max_tries
|
15
16
|
return if ignore
|
16
17
|
raise
|
17
18
|
end
|
18
19
|
Rails.logger.warn "\e[31m[try] \e[1m#{$!.class}\e[0;31m: #{$!.message}\e[0m"
|
19
20
|
sleep base ** tries
|
21
|
+
tries += 1
|
20
22
|
retry
|
21
23
|
end
|
22
24
|
end
|
data/lib/houston/version.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: houston-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.0
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Lail
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -512,9 +512,11 @@ files:
|
|
512
512
|
- ".gitignore"
|
513
513
|
- ".gitmodules"
|
514
514
|
- ".travis.yml"
|
515
|
+
- CHANGELOG.md
|
515
516
|
- Gemfile
|
516
517
|
- Gemfile.lock
|
517
518
|
- README.md
|
519
|
+
- ROADMAP.md
|
518
520
|
- Rakefile
|
519
521
|
- app/assets/font/octicons.eot
|
520
522
|
- app/assets/font/octicons.svg
|
@@ -691,10 +693,8 @@ files:
|
|
691
693
|
- app/helpers/project_helper.rb
|
692
694
|
- app/helpers/score_card_helper.rb
|
693
695
|
- app/helpers/url_helper.rb
|
694
|
-
- app/mailers/.gitkeep
|
695
696
|
- app/mailers/.keep
|
696
697
|
- app/mailers/view_mailer.rb
|
697
|
-
- app/models/.gitkeep
|
698
698
|
- app/models/.keep
|
699
699
|
- app/models/ability.rb
|
700
700
|
- app/models/action.rb
|
@@ -800,7 +800,6 @@ files:
|
|
800
800
|
- config/initializers/houston_observer_subscriber.rb
|
801
801
|
- config/initializers/houston_report_exception.rb
|
802
802
|
- config/initializers/houston_scheduler_daemon.rb
|
803
|
-
- config/initializers/houston_try.rb
|
804
803
|
- config/initializers/inflections.rb
|
805
804
|
- config/initializers/load_persistent_triggers.rb
|
806
805
|
- config/initializers/mime_types.rb
|
@@ -937,17 +936,16 @@ files:
|
|
937
936
|
- lib/houston/cli.rb
|
938
937
|
- lib/houston/params_serializer.rb
|
939
938
|
- lib/houston/test_helpers.rb
|
939
|
+
- lib/houston/try.rb
|
940
940
|
- lib/houston/version.rb
|
941
941
|
- lib/parallel_enumerable.rb
|
942
942
|
- lib/rack/oembed.rb
|
943
|
-
- lib/tasks/.gitkeep
|
944
943
|
- lib/tasks/.keep
|
945
944
|
- lib/tasks/actions.rake
|
946
945
|
- lib/tasks/events.rake
|
947
946
|
- lib/tasks/keypair.rake
|
948
947
|
- lib/tasks/specific_tests.rake
|
949
948
|
- lib/unexpected_response.rb
|
950
|
-
- log/.gitkeep
|
951
949
|
- log/.keep
|
952
950
|
- script/bootstrap
|
953
951
|
- script/cibuild
|
@@ -1034,13 +1032,11 @@ files:
|
|
1034
1032
|
- test/factories/project_factory.rb
|
1035
1033
|
- test/factories/ticket_factory.rb
|
1036
1034
|
- test/factories/user_factory.rb
|
1037
|
-
- test/fixtures/.gitkeep
|
1038
1035
|
- test/fixtures/.keep
|
1039
1036
|
- test/fixtures/simplecov_sample.rb
|
1040
1037
|
- test/fixtures/teams.yml
|
1041
1038
|
- test/fixtures/teams_users.yml
|
1042
1039
|
- test/fixtures/users.yml
|
1043
|
-
- test/integration/.gitkeep
|
1044
1040
|
- test/integration/.keep
|
1045
1041
|
- test/integration/web_hook_test.rb
|
1046
1042
|
- test/support/config.rb
|
@@ -1048,7 +1044,7 @@ files:
|
|
1048
1044
|
- test/support/houston/module1.rb
|
1049
1045
|
- test/support/houston/module2.rb
|
1050
1046
|
- test/test_helper.rb
|
1051
|
-
- test/unit/.
|
1047
|
+
- test/unit/.keep
|
1052
1048
|
- test/unit/concerns/project_adapter_test.rb
|
1053
1049
|
- test/unit/controllers/project_options_controller_test.rb
|
1054
1050
|
- test/unit/controllers/user_options_controller_test.rb
|
@@ -1062,7 +1058,6 @@ files:
|
|
1062
1058
|
- test/unit/models/triggers_test.rb
|
1063
1059
|
- test/unit/models/user_test.rb
|
1064
1060
|
- tmp/.keep
|
1065
|
-
- vendor/assets/javascripts/.gitkeep
|
1066
1061
|
- vendor/assets/javascripts/.keep
|
1067
1062
|
- vendor/assets/javascripts/alertify.js
|
1068
1063
|
- vendor/assets/javascripts/backbone.js
|
@@ -1114,7 +1109,6 @@ files:
|
|
1114
1109
|
- vendor/assets/javascripts/showdown.js
|
1115
1110
|
- vendor/assets/javascripts/slideout.js
|
1116
1111
|
- vendor/assets/javascripts/underscore.js
|
1117
|
-
- vendor/assets/stylesheets/.gitkeep
|
1118
1112
|
- vendor/assets/stylesheets/.keep
|
1119
1113
|
- vendor/assets/stylesheets/alertify.css
|
1120
1114
|
- vendor/assets/stylesheets/bootstrap-responsive.css
|
@@ -1149,9 +1143,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1149
1143
|
version: '0'
|
1150
1144
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1151
1145
|
requirements:
|
1152
|
-
- - "
|
1146
|
+
- - ">="
|
1153
1147
|
- !ruby/object:Gem::Version
|
1154
|
-
version:
|
1148
|
+
version: '0'
|
1155
1149
|
requirements: []
|
1156
1150
|
rubyforge_project:
|
1157
1151
|
rubygems_version: 2.5.1
|
@@ -1164,13 +1158,11 @@ test_files:
|
|
1164
1158
|
- test/factories/project_factory.rb
|
1165
1159
|
- test/factories/ticket_factory.rb
|
1166
1160
|
- test/factories/user_factory.rb
|
1167
|
-
- test/fixtures/.gitkeep
|
1168
1161
|
- test/fixtures/.keep
|
1169
1162
|
- test/fixtures/simplecov_sample.rb
|
1170
1163
|
- test/fixtures/teams.yml
|
1171
1164
|
- test/fixtures/teams_users.yml
|
1172
1165
|
- test/fixtures/users.yml
|
1173
|
-
- test/integration/.gitkeep
|
1174
1166
|
- test/integration/.keep
|
1175
1167
|
- test/integration/web_hook_test.rb
|
1176
1168
|
- test/support/config.rb
|
@@ -1178,7 +1170,7 @@ test_files:
|
|
1178
1170
|
- test/support/houston/module1.rb
|
1179
1171
|
- test/support/houston/module2.rb
|
1180
1172
|
- test/test_helper.rb
|
1181
|
-
- test/unit/.
|
1173
|
+
- test/unit/.keep
|
1182
1174
|
- test/unit/concerns/project_adapter_test.rb
|
1183
1175
|
- test/unit/controllers/project_options_controller_test.rb
|
1184
1176
|
- test/unit/controllers/user_options_controller_test.rb
|
data/app/models/.gitkeep
DELETED
File without changes
|
data/lib/tasks/.gitkeep
DELETED
File without changes
|
data/test/fixtures/.gitkeep
DELETED
File without changes
|
data/test/integration/.gitkeep
DELETED
File without changes
|
data/test/unit/.gitkeep
DELETED
File without changes
|
File without changes
|
File without changes
|