perkins 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/Gemfile +1 -0
  4. data/README.md +11 -8
  5. data/Rakefile +1 -18
  6. data/config/database.yml +19 -0
  7. data/db/migrate/20150130143050_create_builds.rb +1 -1
  8. data/db/migrate/20150220143051_add_build_status_to_build_reports.rb +10 -0
  9. data/db/migrate/20150220143053_add_commit_to_build_reports.rb +10 -0
  10. data/db/migrate/20150220143054_add_hook_id_to_repo.rb +10 -0
  11. data/db/schema.rb +4 -2
  12. data/examples/Capfile +17 -0
  13. data/examples/Gemfile +14 -1
  14. data/examples/Gemfile.lock +45 -19
  15. data/examples/Procfile +8 -3
  16. data/examples/README.md +12 -0
  17. data/examples/boot.rb +5 -4
  18. data/examples/config.ru +2 -11
  19. data/examples/{database.yml → config/database.example.yml} +0 -0
  20. data/examples/config/database.yml +27 -0
  21. data/examples/config/deploy.rb +78 -0
  22. data/examples/config/deploy/staging.rb +61 -0
  23. data/examples/{rainbows.rb → config/rainbows/development.rb} +1 -1
  24. data/examples/config/rainbows/production.rb +56 -0
  25. data/examples/{sidekiq.yml → config/sidekiq.yml} +0 -0
  26. data/examples/db/schema.rb +43 -0
  27. data/examples/rakefile +8 -0
  28. data/lib/perkins/application.rb +1 -1
  29. data/lib/perkins/assets.rb +3 -3
  30. data/lib/perkins/assets/javascripts/app.js +1 -0
  31. data/lib/perkins/assets/javascripts/perkings.js.coffee +14 -9
  32. data/lib/perkins/assets/javascripts/perkins/helpers.js.coffee +2 -2
  33. data/lib/perkins/assets/javascripts/perkins/m/models.js.coffee +15 -9
  34. data/lib/perkins/assets/javascripts/perkins/router.js.coffee +1 -0
  35. data/lib/perkins/assets/javascripts/perkins/v/my_repos.js.coffee +1 -1
  36. data/lib/perkins/assets/javascripts/perkins/v/orgs.js.coffee +1 -1
  37. data/lib/perkins/assets/javascripts/perkins/v/repo.js.coffee +38 -5
  38. data/lib/perkins/assets/javascripts/templates/repo.hamlc +5 -14
  39. data/lib/perkins/assets/javascripts/templates/repos/build_row.hamlc +10 -5
  40. data/lib/perkins/assets/javascripts/templates/repos/config.hamlc +23 -13
  41. data/lib/perkins/assets/javascripts/templates/repos/report_detail.hamlc +6 -6
  42. data/lib/perkins/assets/javascripts/vendor/eventsource.polyfill.js +512 -0
  43. data/lib/perkins/build/script.rb +2 -1
  44. data/lib/perkins/build/script/go.rb +1 -1
  45. data/lib/perkins/build/script/ruby.rb +1 -1
  46. data/lib/perkins/build/script/stages.rb +0 -1
  47. data/lib/perkins/build_report.rb +27 -7
  48. data/lib/perkins/build_worker.rb +10 -15
  49. data/lib/perkins/git_loader_worker.rb +1 -14
  50. data/lib/perkins/repo.rb +106 -21
  51. data/lib/perkins/runner.rb +57 -12
  52. data/lib/perkins/server.rb +42 -46
  53. data/lib/perkins/socket_server.rb +38 -0
  54. data/lib/perkins/version.rb +1 -1
  55. data/lib/tasks/db_tasks.rake +35 -0
  56. data/perkins.gemspec +16 -19
  57. data/spec/README.md +3 -0
  58. data/spec/lib/build/build_spec.rb +7 -3
  59. data/spec/lib/repo_spec.rb +23 -32
  60. data/spec/lib/runner_spec.rb +52 -2
  61. data/spec/lib/server_spec.rb +15 -6
  62. data/spec/spec_helper.rb +6 -5
  63. metadata +21 -57
  64. data/.DS_Store +0 -0
  65. data/lib/perkins/views/builds.haml +0 -43
  66. data/lib/perkins/views/menu.haml +0 -18
  67. data/lib/perkins/views/orgs.haml +0 -101
  68. data/lib/perkins/views/profile.haml +0 -31
  69. data/lib/perkins/views/repos/config.haml +0 -72
  70. data/lib/perkins/views/repos/github.haml +0 -45
  71. data/lib/perkins/views/repos/menu.haml +0 -17
  72. data/lib/perkins/views/repos/repo.haml +0 -64
  73. data/lib/perkins/views/repos/spinner.haml +0 -3
@@ -1,45 +0,0 @@
1
-
2
-
3
- .pull-right
4
- %br
5
- %a.btn.btn.btn-success{href: "/repos/sync"}
6
- %span.glyphicon.glyphicon-refresh
7
- SYNC
8
-
9
- - if repos.any?
10
- %h2 Repositories:
11
-
12
- .panel.panel-default
13
- .panel-heading
14
- Github Repos
15
-
16
-
17
- - repos.each do |repo|
18
- %ul.list-group
19
- %li.list-group-item
20
-
21
- .pull-right
22
- %a.btn{href: "/repos/add/#{repo['id']}"}
23
- ADD REPO
24
- %span.btn.glyphicon.glyphicon-plus-sign
25
-
26
- .row
27
- %span.col-sm-2
28
- %a{src: repo["owner"]["url"] }
29
- %img{ src: repo["owner"]["avatar_url"], width: 120 }
30
- %span.col-sm-7
31
- .pull-right
32
-
33
- - if repo["fork"]
34
- %i.fa.fa-code-fork{title: "is a fork"}
35
-
36
- - if repo["private"]
37
- %i.fa.fa-lock{title: "is private"}
38
-
39
- %h4= repo.name
40
- %a{href: repo['html_url'], target: :blank}
41
- View on github
42
- %i.fa.fa-external-link
43
- %p.small= repo["description"]
44
-
45
-
@@ -1,17 +0,0 @@
1
- #repo-menu.pull-right
2
- %ul.nav.nav-pills{:role => "tablist"}
3
-
4
- - unless build.blank?
5
- %li
6
- %a.btn.refresh{href:"/repos/#{repo.name}/builds/#{build['_id']}/restart", title: "Restart Build"}
7
- %i.fa.fa-refresh{class: "#{'fa-refresh'}"}
8
-
9
- %li{class: "#{'active' if active == 'current'}"}
10
- %a{:href => "/repos/#{repo.name}"} Current
11
- %li{class: "#{'active' if active == 'builds'}"}
12
- %a{:href => "/repos/#{repo.name}/builds"} Build history
13
- %li{class: "#{'active' if active == 'config'}"}
14
- %a{:href => "/repos/#{repo.name}/config"} Config Hook
15
-
16
-
17
-
@@ -1,64 +0,0 @@
1
-
2
- %div{id: "repo-#{repo.id}" }
3
-
4
- = haml :"repos/menu" , locals:{ repo: repo, active: "current", build: build}
5
-
6
- .title
7
- %h2
8
- %span#repo-name= repo.name
9
- = haml :"repos/spinner", locals: {repo: repo}
10
-
11
- %h5
12
- %strong= repo.url
13
-
14
- - if build.present?
15
- .panel.panel-default
16
- .panel-heading
17
- Current Build
18
-
19
- .panel-body
20
-
21
- .col-sm-8
22
- %strong= build.commit.branch
23
- \-
24
- = build.commit.message
25
-
26
- .pull-right
27
- = status_label(build.status)
28
- %p
29
- %abbr.timeago{title:build.build_time}
30
- %br
31
- duration:
32
- %strong= Perkins.Helpers.round(build.duration.to_i)
33
-
34
-
35
- .col-sm-12
36
- %img.avatar{ src: avatar_url(build.commit.email, 35) }
37
- %strong= build.commit.author
38
- = build.commit.email
39
-
40
- .pull-right
41
- %a{href: commit_url(repo, build.sha), target: :blank}
42
- %img{src: "/assets/github.svg", width:"20px"}
43
- = "commit ... #{build["sha"][0..6]}"
44
- %strong
45
- %abbr.timeago{title:build.commit.created_at}
46
-
47
-
48
-
49
- %ul.list-group
50
- %li.list-group-item.build-item
51
-
52
- .build-response
53
- %p
54
- %pre#log.ansi= build.response
55
- - else
56
- .alert.alert-warning
57
- No builds yet.
58
-
59
- %a{:href => "/repos/#{repo.name}/run_commit"}
60
- Run last commit in master branch
61
-
62
-
63
-
64
-
@@ -1,3 +0,0 @@
1
- - unless repo.runner.blank?
2
- %span.build-status{class: "repo-#{repo.id}-spinner #{'hidden' unless repo.runner.running?}"}
3
- %img{src: "/assets/spinner.svg", width:"20px"}