houston-core 0.7.0.beta4 → 0.7.0

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 (52) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +4 -2
  3. data/.travis.yml +50 -0
  4. data/Gemfile +1 -2
  5. data/Gemfile.lock +1 -7
  6. data/README.md +21 -9
  7. data/app/assets/stylesheets/houston/application/actions.scss +25 -4
  8. data/app/assets/stylesheets/houston/application/sprint.scss +1 -1
  9. data/app/assets/stylesheets/houston/application/test.scss +1 -1
  10. data/app/assets/stylesheets/houston/application/test_run.scss +2 -2
  11. data/app/assets/stylesheets/houston/application/timeline.scss +1 -1
  12. data/app/assets/stylesheets/houston/core/roboto.scss.erb +2 -2
  13. data/app/controllers/actions_controller.rb +13 -5
  14. data/app/controllers/errors_controller.rb +2 -2
  15. data/app/controllers/releases_controller.rb +1 -1
  16. data/app/controllers/triggers_controller.rb +1 -1
  17. data/app/helpers/actions_helper.rb +36 -1
  18. data/app/helpers/navigation_helper.rb +6 -1
  19. data/app/models/github/pull_request.rb +13 -4
  20. data/app/models/task.rb +1 -1
  21. data/app/presenters/task_presenter.rb +6 -6
  22. data/app/views/actions/_actions.html.erb +12 -0
  23. data/app/views/actions/index.html.erb +19 -12
  24. data/app/views/actions/running.html.erb +47 -0
  25. data/app/views/actions/show.html.erb +13 -14
  26. data/app/views/errors/_actions.html.erb +1 -1
  27. data/app/views/errors/index.html.erb +5 -1
  28. data/app/views/layouts/_navigation.html.erb +10 -5
  29. data/config/initializers/add_navigation_renderers.rb +8 -6
  30. data/config/initializers/houston_deliver.rb +16 -0
  31. data/config/routes.rb +1 -0
  32. data/db/structure.sql +1 -1
  33. data/houston-core.gemspec +1 -1
  34. data/lib/generators/module_generator.rb +5 -1
  35. data/lib/houston/boot/actions.rb +4 -1
  36. data/lib/houston/boot/configuration.rb +8 -1
  37. data/lib/houston/boot/extensions.rb +35 -9
  38. data/lib/houston/boot/serializer.rb +6 -1
  39. data/lib/houston/version.rb +1 -1
  40. data/script/cibuild +2 -2
  41. data/templates/new-module/lib/houston/%name%.rb +30 -7
  42. data/test/acceptance/creating_a_release_test.rb +14 -21
  43. data/test/data/bare_repo.git/FETCH_HEAD +1 -1
  44. data/test/data/bare_repo.git/objects/60/3a4970ec7ed5eb3f7a578850c21b7162424465 +1 -0
  45. data/test/data/bare_repo.git/objects/b9/1a4fe778398bc87b29842ca84a2727b4763c9d +1 -0
  46. data/test/data/bare_repo.git/objects/ba/b88c00ec62b5f30bf720ab1136401d1f9d2310 +2 -0
  47. data/test/data/bare_repo.git/refs/heads/master +1 -1
  48. data/test/integration/commits_api_test.rb +1 -0
  49. data/test/test_helper.rb +2 -2
  50. data/test/unit/models/sprint_test.rb +1 -1
  51. data/tmp/.keep +0 -0
  52. metadata +16 -5
@@ -8,7 +8,12 @@ module Houston
8
8
  class UnserializableError < ArgumentError; end
9
9
 
10
10
  def load(string)
11
- unpack Oj.load(string, nilnil: true, auto_define: false)
11
+ begin
12
+ object = Oj.load(string, nilnil: true, auto_define: false)
13
+ rescue ArgumentError
14
+ raise ArgumentError, "#{string.inspect} is the wrong type; it should be a String or NilClass"
15
+ end
16
+ unpack object
12
17
  end
13
18
 
14
19
  def dump(object)
@@ -1,3 +1,3 @@
1
1
  module Houston
2
- VERSION = "0.7.0.beta4"
2
+ VERSION = "0.7.0"
3
3
  end
data/script/cibuild CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/bin/bash
2
2
 
3
3
  export RAILS_ENV=test
4
- bundle
4
+ bundle check || bundle
5
5
 
6
6
  # Split these up into separate processes
7
7
  # or we get the error `Application has been already initialized.`
8
8
  bundle exec rake db:test:prepare
9
- bundle exec rake test:all COVERAGE=on CI=true
9
+ bundle exec rake test COVERAGE=on CI=true
@@ -14,15 +14,38 @@ module Houston
14
14
  end
15
15
 
16
16
 
17
+ # Extension Points
18
+ # ===========================================================================
19
+ #
20
+ # Read more about extending Houston at:
21
+ # https://github.com/houston/houston-core/wiki/Modules
22
+
23
+
17
24
  # Register events that will be raised by this module
18
- # register_events {{
19
- # "<%= name %>:create" => params("<%= name %>").desc("<%= camelized %> was created"),
20
- # "<%= name %>:update" => params("<%= name %>").desc("<%= camelized %> was updated")
21
- # }}
25
+ #
26
+ # register_events {{
27
+ # "<%= name %>:create" => params("<%= name %>").desc("<%= camelized %> was created"),
28
+ # "<%= name %>:update" => params("<%= name %>").desc("<%= camelized %> was updated")
29
+ # }}
22
30
 
23
31
 
24
32
  # Add a link to Houston's global navigation
25
- # add_navigation_renderer :<%= name %> do
26
- # render_nav_link "<%= camelized %>", Houston::<%= camelized %>::Engine.routes.url_helpers.<%= name %>_path, icon: "fa-thumbs-up"
27
- # end
33
+ #
34
+ # add_navigation_renderer :<%= name %> do
35
+ # name "<%= camelized %>"
36
+ # icon "fa-thumbs-up"
37
+ # path { Houston::<%= camelized %>::Engine.routes.url_helpers.<%= name %>_path }
38
+ # ability { |ability| ability.can? :read, Project }
39
+ # end
40
+
41
+
42
+ # Add a link to feature that can be turned on for projects
43
+ #
44
+ # add_project_feature :<%= name %> do
45
+ # name "<%= camelized %>"
46
+ # icon "fa-thumbs-up"
47
+ # path { |project| Houston::<%= camelized %>::Engine.routes.url_helpers.project_<%= name %>_path(project) }
48
+ # ability { |ability, project| ability.can? :read, project }
49
+ # end
50
+
28
51
  end
@@ -7,16 +7,16 @@ class CreatingAReleaseTest < ActionDispatch::IntegrationTest
7
7
 
8
8
 
9
9
  setup do
10
- @commit0 = "e558039"
11
- @commit1 = "07fc2de"
10
+ @commit0 = "bd3e9e2"
11
+ @commit1 = "b91a4fe"
12
12
 
13
13
  @user = User.first
14
14
  @project = Project.create!(
15
- name: "Houston",
16
- slug: "houston",
15
+ name: "Test",
16
+ slug: "test",
17
17
  ticket_tracker_name: "Houston",
18
18
  version_control_name: "Git",
19
- props: {"git.location" => Rails.root.join(".git").to_s})
19
+ props: {"git.location" => Rails.root.join("test", "data", "bare_repo.git").to_s})
20
20
  @project.roles.create!(name: "Maintainer", user: user)
21
21
  @ticket = @project.tickets.create!(
22
22
  number: 116,
@@ -35,36 +35,29 @@ class CreatingAReleaseTest < ActionDispatch::IntegrationTest
35
35
 
36
36
 
37
37
  context "Given a valid commit range" do
38
- should "show the release form" do
38
+ setup do
39
39
  visit new_release_path
40
+ end
40
41
 
42
+ should "show the release form" do
41
43
  assert page.has_content?("New Release to Production")
42
44
  end
43
45
 
44
46
  should "show all the commits" do
45
- visit new_release_path
46
-
47
47
  project.commits.between(commit0, commit1).each do |commit|
48
48
  assert page.has_content?(commit.summary), "Expected to find commit #{commit} on the page"
49
49
  end
50
50
  end
51
51
 
52
52
  should "show ticket #116, which was mentioned by one of the commits" do
53
- visit new_release_path
54
-
55
53
  assert page.has_content?(ticket.summary), "Expected to find ticket #{ticket.number} on the page"
56
54
  end
57
- end
58
-
59
-
60
- context "When creating the release" do
61
- setup do
62
- visit new_release_path
63
- end
64
55
 
65
- should "create the release" do
66
- assert_difference "Release.count", +1 do
67
- click_button "Create Release"
56
+ context "clicking 'Create Release'" do
57
+ should "create the release" do
58
+ assert_difference "Release.count", +1 do
59
+ click_button "Create Release"
60
+ end
68
61
  end
69
62
  end
70
63
  end
@@ -73,7 +66,7 @@ class CreatingAReleaseTest < ActionDispatch::IntegrationTest
73
66
  private
74
67
 
75
68
  def new_release_path
76
- "/projects/houston/environments/Production/releases/new?commit0=#{commit0}&commit1=#{commit1}"
69
+ "/projects/test/environments/Production/releases/new?commit0=#{commit0}&commit1=#{commit1}"
77
70
  end
78
71
 
79
72
  end
@@ -1,3 +1,3 @@
1
1
  baa3ef218a40f23fe542f98d8b8e60a2e8e0bff0 not-for-merge branch 'divergent-branch' of github.com:houston/fixture
2
2
  b62c3f32f72423b81a0282a1a4b97cad2cf129d4 not-for-merge branch 'for-testing' of github.com:houston/fixture
3
- e0e4580f44317a084dd5142fef6b4144a4394819 not-for-merge branch 'master' of github.com:houston/fixture
3
+ b91a4fe778398bc87b29842ca84a2727b4763c9d not-for-merge branch 'master' of github.com:houston/fixture
@@ -0,0 +1 @@
1
+ x��M�1`�9E�l������ � W�@\$��;Fz"���f���=�TK�
@@ -0,0 +1 @@
1
+ x���N1E��#ф�ȳ;㇄J��6Ja���b���A����莮t���j-&�w}�B�L��
@@ -0,0 +1,2 @@
1
+ x����1F��S\�Y��ܙ�?�����dr����1+��o
2
+ _�����8S-%7��h 3(�d�୚��H��HqHC�S�j���/|k��IY��F4^Z�Q!
@@ -1 +1 @@
1
- e0e4580f44317a084dd5142fef6b4144a4394819
1
+ b91a4fe778398bc87b29842ca84a2727b4763c9d
@@ -31,6 +31,7 @@ class CommitsApiTest < ActionDispatch::IntegrationTest
31
31
  assert_response :success
32
32
 
33
33
  expected_commits = [
34
+ "[fix] Resolved this ticket [#116] (1m)",
34
35
  "Added lib files for code coverage tests",
35
36
  "When you have eliminated the impossible, what remains,",
36
37
  "however improbable, must be true",
data/test/test_helper.rb CHANGED
@@ -14,13 +14,13 @@ Rails.application.initialize!
14
14
  require "rails/test_help"
15
15
  require "support/houston/adapters/version_control/mock_adapter"
16
16
  require "capybara/rails"
17
+ require "minitest/reporters/turn_reporter"
17
18
 
18
19
  if ENV["CI"] == "true"
19
20
  require "minitest/reporters"
20
- MiniTest::Reporters.use! [MiniTest::Reporters::DefaultReporter.new,
21
+ MiniTest::Reporters.use! [Minitest::Reporters::TurnReporter.new,
21
22
  MiniTest::Reporters::JUnitReporter.new]
22
23
  else
23
- require "minitest/reporters/turn_reporter"
24
24
  MiniTest::Reporters.use! Minitest::Reporters::TurnReporter.new
25
25
  end
26
26
 
@@ -35,7 +35,7 @@ class SprintTest < ActiveSupport::TestCase
35
35
  context "Sprint#current" do
36
36
  should "return the current sprint" do
37
37
  sprint = Sprint.create!(end_date: Date.new(2014, 9, 5))
38
- Timecop.freeze Time.new(2014, 9, 5, 23, 0, 0, "-05:00") do
38
+ Timecop.freeze Time.new(2014, 9, 5, 23, 0, 0) do
39
39
  assert_equal sprint.id, Sprint.current.try(:id), "Expected Sprint#current to find the sprint that ends this week"
40
40
  end
41
41
  end
data/tmp/.keep ADDED
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.7.0.beta4
4
+ version: 0.7.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: 2016-07-18 00:00:00.000000000 Z
11
+ date: 2016-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -651,6 +651,7 @@ files:
651
651
  - ".codeclimate.yml"
652
652
  - ".gitignore"
653
653
  - ".gitmodules"
654
+ - ".travis.yml"
654
655
  - Gemfile
655
656
  - Gemfile.lock
656
657
  - README.md
@@ -1046,7 +1047,9 @@ files:
1046
1047
  - app/presenters/tasks_excel_presenter.rb
1047
1048
  - app/presenters/tester_presenter.rb
1048
1049
  - app/presenters/ticket_presenter.rb
1050
+ - app/views/actions/_actions.html.erb
1049
1051
  - app/views/actions/index.html.erb
1052
+ - app/views/actions/running.html.erb
1050
1053
  - app/views/actions/show.html.erb
1051
1054
  - app/views/activity/_events.html.erb
1052
1055
  - app/views/authorizations/_form.html.erb
@@ -1165,6 +1168,7 @@ files:
1165
1168
  - config/initializers/hard_coded_knowledge.rb
1166
1169
  - config/initializers/houston_async.rb
1167
1170
  - config/initializers/houston_benchmark.rb
1171
+ - config/initializers/houston_deliver.rb
1168
1172
  - config/initializers/houston_report_exception.rb
1169
1173
  - config/initializers/houston_scheduler_daemon.rb
1170
1174
  - config/initializers/houston_try.rb
@@ -3286,10 +3290,13 @@ files:
3286
3290
  - test/data/bare_repo.git/objects/22/924bbf4378f83cab93bfd5fa7d7777cbc1f3b4
3287
3291
  - test/data/bare_repo.git/objects/59/e4862a85cf64d42a8b17db45ebf2ba39568679
3288
3292
  - test/data/bare_repo.git/objects/5f/8cb742401c71308f858bf537855bb07d2932d8
3293
+ - test/data/bare_repo.git/objects/60/3a4970ec7ed5eb3f7a578850c21b7162424465
3289
3294
  - test/data/bare_repo.git/objects/6e/eab9f9ee664c1acb08473921238ca95a8c17f5
3290
3295
  - test/data/bare_repo.git/objects/7f/ce91258d10807380f36192304883e916a48ec0
3291
3296
  - test/data/bare_repo.git/objects/b3/d156e4d4bb279e09cca0f31af8ea6e35d3df64
3297
+ - test/data/bare_repo.git/objects/b9/1a4fe778398bc87b29842ca84a2727b4763c9d
3292
3298
  - test/data/bare_repo.git/objects/ba/a3ef218a40f23fe542f98d8b8e60a2e8e0bff0
3299
+ - test/data/bare_repo.git/objects/ba/b88c00ec62b5f30bf720ab1136401d1f9d2310
3293
3300
  - test/data/bare_repo.git/objects/bd/3e9e2e4ddf89a640a4f880cbf55bb46cc7e88a
3294
3301
  - test/data/bare_repo.git/objects/be/63e6ebab6ce87922f97ca24b1338befdbe6915
3295
3302
  - test/data/bare_repo.git/objects/cc/f4bdedd71011176c0236e98268d71ed73eb80f
@@ -3364,6 +3371,7 @@ files:
3364
3371
  - test/unit/models/user_test.rb
3365
3372
  - test/unit/presenters/sprint_task_presenter_test.rb
3366
3373
  - test/unit/test_run_comparer_test.rb
3374
+ - tmp/.keep
3367
3375
  - vendor/assets/javascripts/.gitkeep
3368
3376
  - vendor/assets/javascripts/.keep
3369
3377
  - vendor/assets/javascripts/alertify.js
@@ -3464,7 +3472,7 @@ files:
3464
3472
  - vendor/images/fa-suitcase.svg
3465
3473
  - vendor/images/fa-user.svg
3466
3474
  - vendor/images/octokit-pull-request.svg
3467
- homepage: https://github.com/houston/houston
3475
+ homepage: https://github.com/houston/houston-core
3468
3476
  licenses: []
3469
3477
  metadata: {}
3470
3478
  post_install_message:
@@ -3478,9 +3486,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
3478
3486
  version: '0'
3479
3487
  required_rubygems_version: !ruby/object:Gem::Requirement
3480
3488
  requirements:
3481
- - - ">"
3489
+ - - ">="
3482
3490
  - !ruby/object:Gem::Version
3483
- version: 1.3.1
3491
+ version: '0'
3484
3492
  requirements: []
3485
3493
  rubyforge_project:
3486
3494
  rubygems_version: 2.5.1
@@ -3508,10 +3516,13 @@ test_files:
3508
3516
  - test/data/bare_repo.git/objects/22/924bbf4378f83cab93bfd5fa7d7777cbc1f3b4
3509
3517
  - test/data/bare_repo.git/objects/59/e4862a85cf64d42a8b17db45ebf2ba39568679
3510
3518
  - test/data/bare_repo.git/objects/5f/8cb742401c71308f858bf537855bb07d2932d8
3519
+ - test/data/bare_repo.git/objects/60/3a4970ec7ed5eb3f7a578850c21b7162424465
3511
3520
  - test/data/bare_repo.git/objects/6e/eab9f9ee664c1acb08473921238ca95a8c17f5
3512
3521
  - test/data/bare_repo.git/objects/7f/ce91258d10807380f36192304883e916a48ec0
3513
3522
  - test/data/bare_repo.git/objects/b3/d156e4d4bb279e09cca0f31af8ea6e35d3df64
3523
+ - test/data/bare_repo.git/objects/b9/1a4fe778398bc87b29842ca84a2727b4763c9d
3514
3524
  - test/data/bare_repo.git/objects/ba/a3ef218a40f23fe542f98d8b8e60a2e8e0bff0
3525
+ - test/data/bare_repo.git/objects/ba/b88c00ec62b5f30bf720ab1136401d1f9d2310
3515
3526
  - test/data/bare_repo.git/objects/bd/3e9e2e4ddf89a640a4f880cbf55bb46cc7e88a
3516
3527
  - test/data/bare_repo.git/objects/be/63e6ebab6ce87922f97ca24b1338befdbe6915
3517
3528
  - test/data/bare_repo.git/objects/cc/f4bdedd71011176c0236e98268d71ed73eb80f