2 | Codeburner failed burning <%= @burn.repo.full_name %> - <%= @burn.revision %>.
3 |
4 | Failure Reason: <%= @burn.status_reason %>
5 |
--------------------------------------------------------------------------------
/app/workers/burn_worker.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | class BurnWorker
25 | include Sidekiq::Worker
26 |
27 | sidekiq_options queue: :codeburner, retry: 5, backtrace: true
28 |
29 | def perform(burn_id)
30 | burn = Burn.find(burn_id)
31 | burn.ignite
32 | end
33 |
34 | end
35 |
--------------------------------------------------------------------------------
/bin/bundle:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3 | load Gem.bin_path('bundler', 'bundle')
4 |
--------------------------------------------------------------------------------
/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | begin
3 | load File.expand_path("../spring", __FILE__)
4 | rescue LoadError
5 | end
6 | APP_PATH = File.expand_path('../../config/application', __FILE__)
7 | require_relative '../config/boot'
8 | require 'rails/commands'
9 |
--------------------------------------------------------------------------------
/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | begin
3 | load File.expand_path("../spring", __FILE__)
4 | rescue LoadError
5 | end
6 | require_relative '../config/boot'
7 | require 'rake'
8 | Rake.application.run
9 |
--------------------------------------------------------------------------------
/bin/setup:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require 'pathname'
3 |
4 | # path to your application root.
5 | APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6 |
7 | Dir.chdir APP_ROOT do
8 | # This script is a starting point to setup your application.
9 | # Add necessary setup steps to this file:
10 |
11 | puts "== Installing dependencies =="
12 | system "gem install bundler --conservative"
13 | system "bundle check || bundle install"
14 |
15 | # puts "\n== Copying sample files =="
16 | # unless File.exist?("config/database.yml")
17 | # system "cp config/database.yml.sample config/database.yml"
18 | # end
19 |
20 | puts "\n== Preparing database =="
21 | system "bin/rake db:setup"
22 |
23 | puts "\n== Removing old logs and tempfiles =="
24 | system "rm -f log/*"
25 | system "rm -rf tmp/cache"
26 |
27 | puts "\n== Restarting application server =="
28 | system "touch tmp/restart.txt"
29 | end
30 |
--------------------------------------------------------------------------------
/bin/spring:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 |
3 | # This file loads spring without using Bundler, in order to be fast.
4 | # It gets overwritten when you run the `spring binstub` command.
5 |
6 | unless defined?(Spring)
7 | require "rubygems"
8 | require "bundler"
9 |
10 | if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
11 | Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
12 | gem "spring", match[1]
13 | require "spring/binstub"
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/client/.bowerrc:
--------------------------------------------------------------------------------
1 | {
2 | "directory": "app/bower_components"
3 | }
4 |
--------------------------------------------------------------------------------
/client/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent
2 | # coding styles between different editors and IDEs
3 | # editorconfig.org
4 |
5 | root = true
6 |
7 |
8 | [*]
9 |
10 | # Change these settings to your own preference
11 | indent_style = space
12 | indent_size = 2
13 |
14 | # We recommend you to keep these unchanged
15 | end_of_line = lf
16 | charset = utf-8
17 | trim_trailing_whitespace = true
18 | insert_final_newline = true
19 |
20 | [*.md]
21 | trim_trailing_whitespace = false
22 |
--------------------------------------------------------------------------------
/client/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
--------------------------------------------------------------------------------
/client/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist
3 | test/temp
4 | .sass-cache
5 | app/bower_components
6 | .tmp
7 | test/bower_components/
8 | tags
9 |
--------------------------------------------------------------------------------
/client/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "node": true,
3 | "browser": true,
4 | "esnext": true,
5 | "bitwise": true,
6 | "camelcase": true,
7 | "curly": true,
8 | "eqeqeq": true,
9 | "immed": true,
10 | "indent": 4,
11 | "latedef": true,
12 | "newcap": true,
13 | "noarg": true,
14 | "quotmark": "single",
15 | "undef": true,
16 | "unused": true,
17 | "strict": true,
18 | "jquery": true,
19 | "globals": {
20 | "Codeburner": true,
21 | "codeburner": true,
22 | "_": false,
23 | "Backbone": false,
24 | "JST": false,
25 | "beforeEach": false,
26 | "describe": false,
27 | "it": false,
28 | "assert": true,
29 | "expect": true,
30 | "should": true,
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/client/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-backbone": {
3 | "appPath": "app",
4 | "appName": "Codeburner",
5 | "testFramework": "mocha",
6 | "templateFramework": "lodash",
7 | "sassBootstrap": true,
8 | "coffee": true,
9 | "includeRequireJS": false
10 | },
11 | "generator-mocha": {}
12 | }
--------------------------------------------------------------------------------
/client/README.md:
--------------------------------------------------------------------------------
1 | Codeburner Client
2 | ===================
3 |
4 | ### Frontend development:
5 | As a pre-requisite, you'll need node.js installed and the 'npm' command should work properly.
6 |
7 | ```
8 | npm install -g bower
9 | npm install -g grunt-cli
10 | npm install
11 | bower install
12 | ```
13 |
14 | Then you can run
15 | ```
16 | grunt serve
17 | ```
18 |
19 | And open http://localhost:9000
20 |
--------------------------------------------------------------------------------
/client/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/client/app/favicon.ico
--------------------------------------------------------------------------------
/client/app/images/fire.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/client/app/images/fire.png
--------------------------------------------------------------------------------
/client/app/images/github_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/client/app/images/github_logo.png
--------------------------------------------------------------------------------
/client/app/images/jira_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/client/app/images/jira_logo.png
--------------------------------------------------------------------------------
/client/app/images/loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/client/app/images/loader.gif
--------------------------------------------------------------------------------
/client/app/scripts/collections/burn.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | 'use strict'
25 |
26 | class Codeburner.Collections.Burn extends Backbone.PageableCollection
27 | model: Codeburner.Models.Burn
28 | url: '/api/burn'
29 | mode: 'server'
30 | state:
31 | pageSize: 25
32 | sortKey: 'count'
33 | order: 1
34 | queryParams:
35 | id: null
36 | filters:
37 | id: null
38 |
39 |
40 | parseState: (data) ->
41 | totalRecords: data.count
42 |
43 | parseRecords: (data) ->
44 | data.results
45 |
46 | resetFilter: ->
47 | @filters =
48 | id: null
49 | do @changeFilter
50 |
51 | changeFilter: ->
52 | query = []
53 | for key, value of @filters
54 | if $.isArray value
55 | data = value.join ','
56 | else
57 | data = value
58 |
59 | if data
60 | query.push "#{key}=#{data}"
61 | @queryParams[key] = data
62 | else
63 | @queryParams[key] = null
64 | Backbone.history.navigate "burns?#{query.join '&'}"
65 |
--------------------------------------------------------------------------------
/client/app/scripts/collections/filter.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | 'use strict'
25 |
26 | class Codeburner.Collections.Filter extends Backbone.PageableCollection
27 | model: Codeburner.Models.Filter
28 | url: '/api/filter'
29 | mode: 'server'
30 | state:
31 | pageSize: 10
32 | sortKey: 'finding_count'
33 | order: 1
34 |
35 | parseState: (data) ->
36 | totalRecords: data.count
37 |
38 | parseRecords: (data) ->
39 | data.results
40 |
--------------------------------------------------------------------------------
/client/app/scripts/collections/finding.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | 'use strict'
25 |
26 | class Codeburner.Collections.Finding extends Backbone.PageableCollection
27 | model: Codeburner.Models.Finding
28 | url: '/api/finding'
29 | mode: 'server'
30 | state:
31 | pageSize: 25
32 | sortKey: 'severity'
33 | order: 1
34 |
35 | queryParams:
36 | status: '0'
37 |
38 | filters:
39 | status: ['0']
40 |
41 | parseState: (data) ->
42 | totalRecords: data.count
43 |
44 | parseRecords: (data) ->
45 | data.results
46 |
47 | resetFilter: ->
48 | @filters =
49 | status: ['0']
50 | burn_id: null
51 | repo_id: null
52 | filtered_by: null
53 | branch: 'master'
54 | only_current: true
55 |
56 | changeFilter: ->
57 | query = []
58 | for key, value of @filters
59 | if $.isArray value
60 | data = value.join ','
61 | else
62 | data = value
63 |
64 | if data
65 | query.push "#{key}=#{data}"
66 | @queryParams[key] = data
67 | else
68 | @queryParams[key] = null
69 | Backbone.history.navigate "findings?#{query.join '&'}"
70 |
--------------------------------------------------------------------------------
/client/app/scripts/collections/repo.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | 'use strict'
25 |
26 | class Codeburner.Collections.Repo extends Backbone.Collection
27 | model: Codeburner.Models.Repo
28 | url: '/api/repo'
29 | mode: 'client'
30 |
31 | parse: (data) ->
32 | data.results
33 |
--------------------------------------------------------------------------------
/client/app/scripts/main.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | window.Codeburner =
25 | Models: {}
26 | Collections: {}
27 | Views: {}
28 | Routers: {}
29 | Utilities: {}
30 |
31 | window.constants =
32 | refresh_interval: 10 * 1000
33 | display_severity:
34 | 0: 'Unknown'
35 | 1: 'Low'
36 | 2: 'Medium'
37 | 3: 'High'
38 | display_status:
39 | 0: 'Open'
40 | 1: 'Hidden'
41 | 2: 'Published'
42 | 3: 'Filtered'
43 |
--------------------------------------------------------------------------------
/client/app/scripts/models/burn.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | 'use strict'
25 |
26 | Codeburner.Models.Burn = Backbone.Model.extend
27 | idAttribute: 'id'
28 |
--------------------------------------------------------------------------------
/client/app/scripts/models/filter.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | 'use strict'
25 |
26 | Codeburner.Models.Filter = Backbone.Model.extend
27 | idAttribute: 'id'
28 |
--------------------------------------------------------------------------------
/client/app/scripts/models/finding.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | 'use strict'
25 |
26 | Codeburner.Models.Finding = Backbone.Model.extend
27 | idAttribute: 'id'
28 |
--------------------------------------------------------------------------------
/client/app/scripts/models/repo.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | 'use strict'
25 |
26 | Codeburner.Models.Repo = Backbone.Model.extend
27 | idAttribute: 'id'
28 |
--------------------------------------------------------------------------------
/client/app/scripts/templates/burn_stats.ejs:
--------------------------------------------------------------------------------
1 |
24 |
25 |
26 |
27 |
<%= stats['burns'].toLocaleString('en') %> burns of <%= stats['repos'].toLocaleString('en') %> repositories run
28 |
29 |
30 |
31 |
32 |
33 |
<%= stats['lines'].toLocaleString('en') %> lines scanned in <%= stats['files'].toLocaleString('en') %> files
34 |
35 |
36 |
37 |
38 |
39 |
<%= stats['total_findings'].toLocaleString('en') %> possible vulnerabilities found
43 |
--------------------------------------------------------------------------------
/client/app/scripts/views/default.coffee:
--------------------------------------------------------------------------------
1 |
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | 'use strict'
25 |
26 | Codeburner.Views.Default = Backbone.View.extend
27 | el: $('#content')
28 |
29 | renderStats: ->
30 | url = '/api/stats'
31 | Codeburner.Utilities.getRequest url, (data) ->
32 | $('#burn_stats').html JST['app/scripts/templates/burn_stats.ejs']
33 | stats: data
34 |
35 | render: ->
36 | do @delegateEvents
37 | @$el.html JST['app/scripts/templates/default.ejs']
38 | do @renderStats
39 |
--------------------------------------------------------------------------------
/client/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "codeburner-frontend",
3 | "version": "1.0.0",
4 | "authors": [
5 | "Alex Lock ",
6 | "Michael Chang "
7 | ],
8 | "description": "dashboard to monitor codeburner",
9 | "ignore": [
10 | "**/.*",
11 | "node_modules",
12 | "bower_components",
13 | "test",
14 | "tests"
15 | ],
16 | "dependencies": {
17 | "Autolinker.js": "~0.22.0",
18 | "backbone": "~1.2.3",
19 | "backbone.paginator": "~2.0.2",
20 | "bootstrap-sass-official": "~3.3.6",
21 | "highlightjs": "~9.0.0",
22 | "jquery": "~2.2.0",
23 | "moment": "~2.11.0",
24 | "moment-timezone": "~0.5.0",
25 | "lodash": "~3.10.1",
26 | "arrive": "~2.3.0",
27 | "bootstrap-material-design": "~0.5.9",
28 | "bootstrap-material-datetimepicker": "~2.5.3",
29 | "nouislider": "~8.2.1",
30 | "selectize": "~0.12.1",
31 | "octicons": "*"
32 | },
33 | "resolutions": {
34 | "jquery": "~2.1.4",
35 | "bootstrap-material-design": "~0.5.8"
36 | },
37 | "devDependencies": {
38 | "chai": "~3.4.2",
39 | "mocha": "~2.3.4"
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/client/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "codeburner-frontend",
3 | "description": "The frontend of codeburner",
4 | "version": "1.0.0",
5 | "author": {
6 | "name": "Michael Chang",
7 | "email": "github@micbase.com"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "https://github.com/groupon/codeburner"
12 | },
13 | "scripts": {
14 | "start": "grunt serve",
15 | "test": "grunt test"
16 | },
17 | "devDependencies": {
18 | "apache-server-configs": "^2.14.0",
19 | "connect-livereload": "^0.5.4",
20 | "grunt": "^0.4.5",
21 | "grunt-connect-proxy": "^0.2.0",
22 | "grunt-contrib-clean": "^0.7.0",
23 | "grunt-contrib-coffee": "^0.13.0",
24 | "grunt-contrib-concat": "^0.5.1",
25 | "grunt-contrib-connect": "^0.11.2",
26 | "grunt-contrib-copy": "^0.8.2",
27 | "grunt-contrib-cssmin": "^0.14.0",
28 | "grunt-contrib-htmlmin": "^0.6.0",
29 | "grunt-contrib-imagemin": "^1.0.0",
30 | "grunt-contrib-jshint": "^0.11.3",
31 | "grunt-contrib-jst": "^0.6.0",
32 | "grunt-contrib-uglify": "^0.11.0",
33 | "grunt-contrib-watch": "^0.6.1",
34 | "grunt-mocha": "^0.4.15",
35 | "grunt-open": "^0.2.3",
36 | "grunt-rev": "^0.1.0",
37 | "grunt-sass": "^1.1.0",
38 | "grunt-usemin": "^3.1.1",
39 | "jit-grunt": "^0.9.1",
40 | "jshint-stylish": "^2.1.0",
41 | "serve-static": "^1.10.0",
42 | "time-grunt": "^1.3.0"
43 | },
44 | "engines": {
45 | "node": ">=0.10.0"
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/client/test/collections/burn.spec.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # global beforeEach, describe, it, assert, expect
25 | "use strict"
26 |
27 | describe 'Burn Collection', ->
28 | beforeEach ->
29 | @BurnCollection = new Codeburner.Collections.Burn()
30 |
--------------------------------------------------------------------------------
/client/test/collections/filter.spec.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # global beforeEach, describe, it, assert, expect
25 | "use strict"
26 |
27 | describe 'Filter Collection', ->
28 | beforeEach ->
29 | @FilterCollection = new Codeburner.Collections.Filter()
30 |
--------------------------------------------------------------------------------
/client/test/collections/finding.spec.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # global beforeEach, describe, it, assert, expect
25 | "use strict"
26 |
27 | describe 'Finding Collection', ->
28 | beforeEach ->
29 | @FindingCollection = new Codeburner.Collections.Finding()
30 |
--------------------------------------------------------------------------------
/client/test/collections/service.spec.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # global beforeEach, describe, it, assert, expect
25 | "use strict"
26 |
27 | describe 'Service Collection', ->
28 | beforeEach ->
29 | @ServiceCollection = new Codeburner.Collections.Repo()
30 |
--------------------------------------------------------------------------------
/client/test/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Mocha Spec Runner
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/client/test/models/burn.spec.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # global beforeEach, describe, it, assert, expect
25 | "use strict"
26 |
27 | describe 'Burn Model', ->
28 | beforeEach ->
29 | @BurnModel = new Codeburner.Models.Burn();
30 |
--------------------------------------------------------------------------------
/client/test/models/filter.spec.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # global beforeEach, describe, it, assert, expect
25 | "use strict"
26 |
27 | describe 'Filter Model', ->
28 | beforeEach ->
29 | @FilterModel = new Codeburner.Models.Filter();
30 |
--------------------------------------------------------------------------------
/client/test/models/finding.spec.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # global beforeEach, describe, it, assert, expect
25 | "use strict"
26 |
27 | describe 'Finding Model', ->
28 | beforeEach ->
29 | @FindingModel = new Codeburner.Models.Finding();
30 |
--------------------------------------------------------------------------------
/client/test/models/service.spec.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # global beforeEach, describe, it, assert, expect
25 | "use strict"
26 |
27 | describe 'Service Model', ->
28 | beforeEach ->
29 | @ServiceModel = new Codeburner.Models.Repo();
30 |
--------------------------------------------------------------------------------
/client/test/spec/test.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | 'use strict';
3 |
4 | describe('Give it some context', function () {
5 | describe('maybe a bit more context here', function () {
6 | it('should run here few assertions', function () {
7 |
8 | });
9 | });
10 | });
11 | })();
12 |
--------------------------------------------------------------------------------
/client/test/views/burn.spec.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # global beforeEach, describe, it, assert, expect
25 | "use strict"
26 |
27 | describe 'Burn View', ->
28 | beforeEach ->
29 | @BurnView = new Codeburner.Views.Burn();
30 |
--------------------------------------------------------------------------------
/client/test/views/filter.spec.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # global beforeEach, describe, it, assert, expect
25 | "use strict"
26 |
27 | describe 'Filter View', ->
28 | beforeEach ->
29 | @FilterView = new Codeburner.Views.Filter();
30 |
--------------------------------------------------------------------------------
/client/test/views/finding.spec.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # global beforeEach, describe, it, assert, expect
25 | "use strict"
26 |
27 | describe 'Finding View', ->
28 | beforeEach ->
29 | @FindingView = new Codeburner.Views.Finding();
30 |
--------------------------------------------------------------------------------
/client/test/views/stats.spec.coffee:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # global beforeEach, describe, it, assert, expect
25 | "use strict"
26 |
27 | describe 'Stats View', ->
28 | beforeEach ->
29 | @StatsView = new Codeburner.Views.Stats();
30 |
--------------------------------------------------------------------------------
/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require ::File.expand_path('../config/environment', __FILE__)
4 | run Rails.application
5 |
--------------------------------------------------------------------------------
/config/app.yml:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2014, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | defaults: &defaults
25 | email:
26 | from: '"Codeburner"'
27 | link_host: http://localhost:9000
28 | github:
29 | api_endpoint: https://api.github.com/
30 | api_access_token:
31 | link_host: https://github.com
32 | webhook_url: http://localhost:3000/api/github/webhook
33 | oauth:
34 | client_id:
35 | client_secret:
36 | scope: user,repo,read:org,admin:repo_hook
37 | pipeline:
38 | npm_registry: https://registry.npmjs.org/
39 | tasks_for:
40 | Ruby: BundleAudit,Brakeman,Dawnscanner
41 | JavaScript: NPM,RetireJS,NodeSecurityProject,Snyk
42 | CoffeeScript: NPM,RetireJS,NodeSecurityProject,Snyk
43 | Java: PMD,FindSecurityBugs
44 | pmd_path: /pmd/pmd-bin-5.4.1
45 | findsecbugs_path: /findsecbugs
46 | checkmarx_server:
47 | checkmarx_user:
48 | checkmarx_password:
49 | checkmarx_log:
50 | jira:
51 | username:
52 | password:
53 | host:
54 | context_path:
55 | use_ssl: false
56 | link_host: https://my_jira_host
57 |
58 | development:
59 | <<: *defaults
60 |
61 | test:
62 | <<: *defaults
63 |
64 | production:
65 | <<: *defaults
66 |
--------------------------------------------------------------------------------
/config/boot.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
25 |
26 | require 'bundler/setup' # Set up gems listed in the Gemfile.
27 |
28 | # require 'rails/commands/server'
29 |
30 | # module DefaultOptions
31 | # def default_options
32 | # super.merge!(Port: 10000)
33 | # end
34 | # end
35 |
36 | # Rails::Server.send(:prepend, DefaultOptions)
37 |
--------------------------------------------------------------------------------
/config/database.yml:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | common: &common
25 | adapter: mysql2
26 | pool: 5
27 | wait_timeout: 1000
28 | connect_timeout: 500
29 | read_timeout: 2000
30 | write_timeout: 2000
31 | reconnect: true
32 |
33 | local: &local
34 | <<: *common
35 | host: 127.0.0.1
36 | password:
37 | username: root
38 | wait_timeout: 5000
39 |
40 | development:
41 | <<: *local
42 | database: codeburner_development
43 |
44 | test:
45 | <<: *local
46 | database: codeburner_test
47 |
48 | staging:
49 | <<: *common
50 | database: codeburner_staging
51 | host: my_staging_db_host
52 | password: my_staging_db_password
53 | username: my_staging_db_username
54 |
55 | production:
56 | <<: *common
57 | database: codeburner_production
58 | host: <%= ENV['DB_PORT_3306_TCP_ADDR'] %>
59 | port: <%= ENV['DB_PORT_3306_TCP_PORT'] %>
60 | password:
61 | username: root
62 |
--------------------------------------------------------------------------------
/config/deploy.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | #!/bin/env ruby
25 | require 'rubygems'
26 | require 'bundler/capistrano'
27 | require 'capistrano/sidekiq'
28 | require 'whenever/capistrano'
29 |
30 | # set sidekiq timeout to 1hr and do NOT restart workers by default
31 | # NOTE: this means you need to do 'cap sidekiq:restart' if anything significant changes in the backend
32 | set :sidekiq_default_hooks, -> { false }
33 |
34 | set :whenever_roles, ->{ [:web, :app] }
35 |
--------------------------------------------------------------------------------
/config/deploy/production.rb:
--------------------------------------------------------------------------------
1 | # server-based syntax
2 | # ======================
3 | # Defines a single server with a list of roles and multiple properties.
4 | # You can define all roles on a single server, or split them:
5 |
6 | # server 'example.com', user: 'deploy', roles: %w{app db web}, my_property: :my_value
7 | # server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value
8 | # server 'db.example.com', user: 'deploy', roles: %w{db}
9 |
10 |
11 |
12 | # role-based syntax
13 | # ==================
14 |
15 | # Defines a role with one or multiple servers. The primary server in each
16 | # group is considered to be the first unless any hosts have the primary
17 | # property set. Specify the username and a domain or IP for the server.
18 | # Don't use `:all`, it's a meta role.
19 |
20 | # role :app, %w{deploy@example.com}, my_property: :my_value
21 | # role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value
22 | # role :db, %w{deploy@example.com}
23 |
24 |
25 |
26 | # Configuration
27 | # =============
28 | # You can set any configuration variable like in config/deploy.rb
29 | # These variables are then only loaded and set in this stage.
30 | # For available Capistrano configuration variables see the documentation page.
31 | # http://capistranorb.com/documentation/getting-started/configuration/
32 | # Feel free to add new variables to customise your setup.
33 |
34 |
35 |
36 | # Custom SSH Options
37 | # ==================
38 | # You may pass any option but keep in mind that net/ssh understands a
39 | # limited set of options, consult the Net::SSH documentation.
40 | # http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start
41 | #
42 | # Global options
43 | # --------------
44 | # set :ssh_options, {
45 | # keys: %w(/home/rlisowski/.ssh/id_rsa),
46 | # forward_agent: false,
47 | # auth_methods: %w(password)
48 | # }
49 | #
50 | # The server-based syntax can be used to override options:
51 | # ------------------------------------
52 | # server 'example.com',
53 | # user: 'user_name',
54 | # roles: %w{web app},
55 | # ssh_options: {
56 | # user: 'user_name', # overrides user setting above
57 | # keys: %w(/home/user_name/.ssh/id_rsa),
58 | # forward_agent: false,
59 | # auth_methods: %w(publickey password)
60 | # # password: 'please use keys'
61 | # }
62 |
--------------------------------------------------------------------------------
/config/deploy/staging.rb:
--------------------------------------------------------------------------------
1 | # server-based syntax
2 | # ======================
3 | # Defines a single server with a list of roles and multiple properties.
4 | # You can define all roles on a single server, or split them:
5 |
6 | # server 'example.com', user: 'deploy', roles: %w{app db web}, my_property: :my_value
7 | # server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value
8 | # server 'db.example.com', user: 'deploy', roles: %w{db}
9 |
10 |
11 |
12 | # role-based syntax
13 | # ==================
14 |
15 | # Defines a role with one or multiple servers. The primary server in each
16 | # group is considered to be the first unless any hosts have the primary
17 | # property set. Specify the username and a domain or IP for the server.
18 | # Don't use `:all`, it's a meta role.
19 |
20 | # role :app, %w{deploy@example.com}, my_property: :my_value
21 | # role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value
22 | # role :db, %w{deploy@example.com}
23 |
24 |
25 |
26 | # Configuration
27 | # =============
28 | # You can set any configuration variable like in config/deploy.rb
29 | # These variables are then only loaded and set in this stage.
30 | # For available Capistrano configuration variables see the documentation page.
31 | # http://capistranorb.com/documentation/getting-started/configuration/
32 | # Feel free to add new variables to customise your setup.
33 |
34 |
35 |
36 | # Custom SSH Options
37 | # ==================
38 | # You may pass any option but keep in mind that net/ssh understands a
39 | # limited set of options, consult the Net::SSH documentation.
40 | # http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start
41 | #
42 | # Global options
43 | # --------------
44 | # set :ssh_options, {
45 | # keys: %w(/home/rlisowski/.ssh/id_rsa),
46 | # forward_agent: false,
47 | # auth_methods: %w(password)
48 | # }
49 | #
50 | # The server-based syntax can be used to override options:
51 | # ------------------------------------
52 | # server 'example.com',
53 | # user: 'user_name',
54 | # roles: %w{web app},
55 | # ssh_options: {
56 | # user: 'user_name', # overrides user setting above
57 | # keys: %w(/home/user_name/.ssh/id_rsa),
58 | # forward_agent: false,
59 | # auth_methods: %w(publickey password)
60 | # # password: 'please use keys'
61 | # }
62 |
--------------------------------------------------------------------------------
/config/environment.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # Load the Rails application.
25 | require File.expand_path('../application', __FILE__)
26 |
27 | # Initialize the Rails application.
28 | Rails.application.initialize!
29 |
--------------------------------------------------------------------------------
/config/initializers/assets.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # Be sure to restart your server when you modify this file.
25 |
26 | # Version of your assets, change this if you want to expire all your assets.
27 | Rails.application.config.assets.version = '1.0'
28 |
29 | # Add additional assets to the asset load path
30 | # Rails.application.config.assets.paths << Emoji.images_path
31 |
32 | # Precompile additional assets.
33 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
34 | # Rails.application.config.assets.precompile += %w( search.js )
35 |
--------------------------------------------------------------------------------
/config/initializers/backtrace_silencers.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # Be sure to restart your server when you modify this file.
25 |
26 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
27 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
28 |
29 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
30 | # Rails.backtrace_cleaner.remove_silencers!
31 |
--------------------------------------------------------------------------------
/config/initializers/cookies_serializer.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # Be sure to restart your server when you modify this file.
25 |
26 | Rails.application.config.action_dispatch.cookies_serializer = :json
27 |
--------------------------------------------------------------------------------
/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # Be sure to restart your server when you modify this file.
25 |
26 | # Configure sensitive parameters which will be filtered from the log file.
27 | Rails.application.config.filter_parameters += [:password]
28 |
--------------------------------------------------------------------------------
/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # Be sure to restart your server when you modify this file.
25 |
26 | # Add new inflection rules using the following format. Inflections
27 | # are locale specific, and you may define rules for as many different
28 | # locales as you wish. All of these examples are active by default:
29 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
30 | # inflect.plural /^(ox)$/i, '\1en'
31 | # inflect.singular /^(ox)en/i, '\1'
32 | # inflect.irregular 'person', 'people'
33 | # inflect.uncountable %w( fish sheep )
34 | # end
35 |
36 | # These inflection rules are supported but not enabled by default:
37 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
38 | # inflect.acronym 'RESTful'
39 | # end
40 |
--------------------------------------------------------------------------------
/config/initializers/kaminari_config.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | Kaminari.configure do |config|
25 | config.default_per_page = 100
26 | # config.max_per_page = nil
27 | # config.window = 4
28 | # config.outer_window = 0
29 | # config.left = 0
30 | # config.right = 0
31 | # config.page_method_name = :page
32 | # config.param_name = :page
33 | end
34 |
--------------------------------------------------------------------------------
/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # Be sure to restart your server when you modify this file.
25 |
26 | # Add new mime types for use in respond_to blocks:
27 | # Mime::Type.register "text/richtext", :rtf
28 |
--------------------------------------------------------------------------------
/config/initializers/notifications.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # ActiveSupport::Notifications.subscribe do |name, start, finish, id, payload|
25 | # Rails.logger.debug(["notification:", name, start, finish, id, payload].join(" "))
26 | # end
27 |
28 |
--------------------------------------------------------------------------------
/config/initializers/paper_trail.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 |
24 | PaperTrail.config.track_associations = false
25 |
--------------------------------------------------------------------------------
/config/initializers/session_store.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # Be sure to restart your server when you modify this file.
25 |
26 | Rails.application.config.session_store :cookie_store, key: '_codeburner_session'
27 |
--------------------------------------------------------------------------------
/config/initializers/sidekiq.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | Sidekiq.configure_server do |config|
25 | config.redis = $redis_options
26 | Rails.logger = Sidekiq::Logging.logger
27 | end
28 |
29 | Sidekiq.configure_client do |config|
30 | config.redis = $redis_options
31 | end
32 |
--------------------------------------------------------------------------------
/config/initializers/wrap_parameters.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # Be sure to restart your server when you modify this file.
25 |
26 | # This file contains settings for ActionController::ParamsWrapper which
27 | # is enabled by default.
28 |
29 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
30 | ActiveSupport.on_load(:action_controller) do
31 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
32 | end
33 |
34 | # To enable root element in JSON for ActiveRecord objects.
35 | # ActiveSupport.on_load(:active_record) do
36 | # self.include_root_in_json = true
37 | # end
38 |
--------------------------------------------------------------------------------
/config/locales/en.yml:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # Files in the config/locales directory are used for internationalization
25 | # and are automatically loaded by Rails. If you want to use locales other
26 | # than English, add the necessary files in this directory.
27 | #
28 | # To use the locales, use `I18n.t`:
29 | #
30 | # I18n.t 'hello'
31 | #
32 | # In views, this is aliased to just `t`:
33 | #
34 | # <%= t('hello') %>
35 | #
36 | # To use a different locale, set it with `I18n.locale`:
37 | #
38 | # I18n.locale = :es
39 | #
40 | # This would use the information in config/locales/es.yml.
41 | #
42 | # To learn more, please read the Rails Internationalization guide
43 | # available at http://guides.rubyonrails.org/i18n.html.
44 |
45 | en:
46 | hello: "Hello world"
47 |
--------------------------------------------------------------------------------
/config/secrets.yml:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # Be sure to restart your server when you modify this file.
25 |
26 | # Your secret key is used for verifying the integrity of signed cookies.
27 | # If you change this key, all old signed cookies will become invalid!
28 |
29 | # Make sure the secret is at least 30 characters and all random,
30 | # no regular words or you'll be exposed to dictionary attacks.
31 | # You can use `rake secret` to generate a secure secret key.
32 |
33 | # Make sure the secrets in this file are kept private
34 | # if you're sharing your code publicly.
35 |
36 | development:
37 | secret_key_base: 858c47445d3f507d7b23879d5c5d816364e515f2f793e64944ec6d121e834180f89337d5953f12438ba3fa2587237dbe7852f1211d1fd89105ffb785088fc463
38 |
39 | test:
40 | secret_key_base: e16e6d631b35b73cde468b4659f4b9df0e8c4137e7356fc617555b3d126f5b82309d33bc5e87889a9a8171ad877f586a1c690a54b2ff30a8bef4fc55475e34ca
41 |
42 | production:
43 | secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
44 | staging:
45 | secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
46 |
--------------------------------------------------------------------------------
/config/sidekiq.yml:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | ---
25 |
26 | :concurrency: 10
27 | :pidfile: tmp/pids/sidekiq.pid
28 | :logfile: ./log/sidekiq.log
29 | :timeout: 3600
30 | :queues:
31 | - codeburner
32 |
--------------------------------------------------------------------------------
/db/migrate/20160311195126_change_finding_file_type.rb:
--------------------------------------------------------------------------------
1 | class ChangeFindingFileType < ActiveRecord::Migration
2 | def change
3 | change_column :findings, :file, :text
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20160322144611_add_user_to_services.rb:
--------------------------------------------------------------------------------
1 | class AddUserToServices < ActiveRecord::Migration
2 | def change
3 | create_table :repos_users, :id => false do |t|
4 | t.references :service, :user
5 | end
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/db/migrate/20160322161458_create_users.rb:
--------------------------------------------------------------------------------
1 | class CreateUsers < ActiveRecord::Migration
2 | def change
3 | create_table :users do |t|
4 | t.integer :github_uid
5 | t.string :name
6 | t.string :profile_url
7 | t.string :avatar_url
8 | t.string :access_token
9 |
10 | t.timestamps null: false
11 | end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/db/migrate/20160413184815_add_role_to_users.rb:
--------------------------------------------------------------------------------
1 | class AddRoleToUsers < ActiveRecord::Migration
2 | def change
3 | add_column :users, :role, :integer
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20160413190203_create_settings.rb:
--------------------------------------------------------------------------------
1 | class CreateSettings < ActiveRecord::Migration
2 | def self.up
3 | create_table :settings do |t|
4 | t.string :var, null: false
5 | t.text :value, null: true
6 | t.integer :thing_id, null: true
7 | t.string :thing_type, null: true, limit: 30
8 | t.timestamps
9 | end
10 |
11 | add_index :settings, %i(thing_type thing_id var), unique: true
12 | end
13 |
14 | def self.down
15 | drop_table :settings
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/db/migrate/20160415142013_add_fullname_to_users.rb:
--------------------------------------------------------------------------------
1 | class AddFullnameToUsers < ActiveRecord::Migration
2 | def change
3 | add_column :users, :fullname, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20160428185129_create_tokens.rb:
--------------------------------------------------------------------------------
1 | class CreateTokens < ActiveRecord::Migration
2 | def change
3 | create_table :tokens do |t|
4 | t.references :user, index: true, foreign_key: true
5 | t.string :name
6 | t.string :token
7 |
8 | t.timestamps null: false
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/db/migrate/20160428191000_create_branches.rb:
--------------------------------------------------------------------------------
1 | class CreateBranches < ActiveRecord::Migration
2 | def change
3 | create_table :branches do |t|
4 | t.references :service, index: true, foreign_key: true
5 | t.string :name
6 | t.timestamps null: false
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/db/migrate/20160428201000_rename_services_to_repositories.rb:
--------------------------------------------------------------------------------
1 | class RenameServicesToRepositories < ActiveRecord::Migration
2 | def change
3 | rename_table :services, :repos
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20160428201001_rename_columns_for_service_to_repo_change.rb:
--------------------------------------------------------------------------------
1 | class RenameColumnsForServiceToRepoChange < ActiveRecord::Migration
2 | def change
3 | rename_column :branches, :service_id, :repo_id
4 | rename_column :burns, :service_id, :repo_id
5 | rename_column :filters, :service_id, :repo_id
6 | rename_column :findings, :service_id, :repo_id
7 | rename_column :repos, :short_name, :name
8 | rename_column :repos, :pretty_name, :full_name
9 | rename_column :repos_users, :service_id, :repo_id
10 | rename_column :system_stats, :services, :repos
11 | rename_column :service_stats, :service_id, :repo_id
12 |
13 | SystemStat.first.versions.each do | version |
14 | o = YAML.load(version.object)
15 | o['repos'] = o.delete 'services'
16 | version.update(:object => o.to_yaml)
17 | end
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/db/migrate/20160429165357_add_html_url_to_services.rb:
--------------------------------------------------------------------------------
1 | class AddHtmlUrlToServices < ActiveRecord::Migration
2 | def change
3 | add_column :repos, :html_url, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20160429170301_add_languages_to_services.rb:
--------------------------------------------------------------------------------
1 | class AddLanguagesToServices < ActiveRecord::Migration
2 | def change
3 | add_column :repos, :languages, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20160502162513_add_webhook_user_to_services.rb:
--------------------------------------------------------------------------------
1 | class AddWebhookUserToServices < ActiveRecord::Migration
2 | def change
3 | add_reference :repos, :webhook_user, references: :users, index: true
4 | add_foreign_key :repos, :users, column: :webhook_user_id
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20160502185108_add_user_to_burn.rb:
--------------------------------------------------------------------------------
1 | class AddUserToBurn < ActiveRecord::Migration
2 | def change
3 | add_reference :burns, :user, index: true, foreign_key: true
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20160502185332_add_report_status_to_burn.rb:
--------------------------------------------------------------------------------
1 | class AddReportStatusToBurn < ActiveRecord::Migration
2 | def change
3 | add_column :burns, :report_status, :boolean
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20160504140816_add_first_appeared_and_latest_to_findings.rb:
--------------------------------------------------------------------------------
1 | class AddFirstAppearedAndLatestToFindings < ActiveRecord::Migration
2 | def change
3 | add_column :findings, :first_appeared, :string
4 | add_column :findings, :current, :boolean
5 |
6 | Finding.update_all(:current => true)
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/db/migrate/20160504182038_remove_burn_from_findings.rb:
--------------------------------------------------------------------------------
1 | class RemoveBurnFromFindings < ActiveRecord::Migration
2 | def change
3 | remove_reference :findings, :burn, index: true, foreign_key: true
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20160504182039_create_join_table_burn_finding.rb:
--------------------------------------------------------------------------------
1 | class CreateJoinTableBurnFinding < ActiveRecord::Migration
2 | def change
3 | create_join_table :burns, :findings do |t|
4 | t.index [:burn_id, :finding_id]
5 | t.index [:finding_id, :burn_id]
6 | end
7 |
8 | Finding.all.each do |finding|
9 | finding.burns << Burn.where(:repo_id => finding.repo_id, :status => 'done').order('created_at').last
10 | end
11 |
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/db/migrate/20160504192037_fix_service_names.rb:
--------------------------------------------------------------------------------
1 | class FixServiceNames < ActiveRecord::Migration
2 | def change
3 | Repo.all.each do |repo|
4 | burn = Burn.where(:repo_id => repo.id).last
5 |
6 | if burn and burn[:repo_url]
7 | new_name = URI.parse(burn.repo_url).path[1..-1]
8 | repo.name = new_name
9 | repo.full_name = new_name
10 | repo.save
11 | else
12 | Burn.where(:repo_id => repo.id).destroy_all
13 | stat = ServiceStat.where(:repo_id => repo.id).first
14 | ServiceStat.destroy(stat.id) if stat
15 | Repo.destroy(repo.id) if repo
16 | end
17 | end
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/db/migrate/20160506135435_add_branch_and_pull_request_to_burns.rb:
--------------------------------------------------------------------------------
1 | class AddBranchAndPullRequestToBurns < ActiveRecord::Migration
2 | def change
3 | add_column :burns, :branch, :string
4 | add_column :burns, :pull_request, :string
5 |
6 | Burn.update_all(:branch => "master")
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/db/migrate/20160508191001_change_branch_on_services.rb:
--------------------------------------------------------------------------------
1 | class ChangeBranchOnServices < ActiveRecord::Migration
2 | def change
3 | remove_column :burns, :branch
4 | add_column :burns, :branch_id, :integer, references: :branches
5 |
6 | Repo.all.each do |repo|
7 | branch = Branch.create(:repo => repo, :name => 'master')
8 | repo.burns.update_all(:branch_id => branch.id)
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/db/migrate/20160512171856_add_branch_to_findings.rb:
--------------------------------------------------------------------------------
1 | class AddBranchToFindings < ActiveRecord::Migration
2 | def change
3 | add_reference :findings, :branch, index: true, foreign_key: true
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20160517162809_add_log_to_burns.rb:
--------------------------------------------------------------------------------
1 | class AddLogToBurns < ActiveRecord::Migration
2 | def change
3 | add_column :burns, :log, :text
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20160518213345_change_log_to_medium_text.rb:
--------------------------------------------------------------------------------
1 | class ChangeLogToMediumText < ActiveRecord::Migration
2 | def change
3 | change_column :burns, :log, :text, limit: 16.megabytes - 1
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20160520185107_add_forked_to_services.rb:
--------------------------------------------------------------------------------
1 | class AddForkedToServices < ActiveRecord::Migration
2 | def change
3 | add_column :repos, :forked, :boolean
4 |
5 | Repo.all.update_all(:forked => false)
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/db/migrate/20160601190842_add_html_url_to_repos.rb:
--------------------------------------------------------------------------------
1 | class AddHtmlUrlToRepos < ActiveRecord::Migration
2 | def change
3 | Repo.all.each do |repo|
4 | repo.update(:html_url => "https://github.groupondev.com/#{repo.name}")
5 | end
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/db/migrate/20160603165144_add_default_burn_user.rb:
--------------------------------------------------------------------------------
1 | class AddDefaultBurnUser < ActiveRecord::Migration
2 | def change
3 | Burn.all.each do |burn|
4 | burn.update(:user => User.first) unless burn.user
5 | end
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/db/migrate/20160607153518_add_default_branch_to_findings.rb:
--------------------------------------------------------------------------------
1 | class AddDefaultBranchToFindings < ActiveRecord::Migration
2 | def change
3 | Finding.all.each do |finding|
4 | finding.update(:branch => finding.repo.branches.first) unless finding.branch
5 | end
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/db/migrate/20160922204536_encrypt_tokens.rb:
--------------------------------------------------------------------------------
1 | class EncryptTokens < ActiveRecord::Migration
2 | def up
3 | rename_column :users, :access_token, :old_token
4 | add_column :users, :encrypted_access_token, :string
5 | add_column :users, :encrypted_access_token_iv, :string
6 |
7 | User.find_each do |u|
8 | u.access_token = u.old_token
9 | u.save
10 | end
11 |
12 | remove_column :users, :old_token
13 | end
14 |
15 | def down
16 | raise ActiveRecord::IrreversibleMigration
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/db/seeds.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # This file should contain all the record creation needed to seed the database with its default values.
25 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
26 | #
27 | # Examples:
28 | #
29 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
30 | # Mayor.create(name: 'Emanuel', city: cities.first)
31 |
--------------------------------------------------------------------------------
/docker-build.sh:
--------------------------------------------------------------------------------
1 | docker-compose build
2 | docker-compose run web bash -c "while ! mysqladmin ping -h db --silent; do echo waiting for mysql; sleep 3; done; mysqladmin -u root -h db create codeburner_production"
3 | docker-compose run web rake db:setup
4 |
5 | if [ $? == 0 ]; then
6 | echo -e "\nDocker containers initialized, run 'docker-compose up' to start Codeburner."
7 | fi
8 |
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | db:
2 | image: mysql:5.7
3 | ports:
4 | - "13306:3306"
5 | environment:
6 | MYSQL_ALLOW_EMPTY_PASSWORD: 'true'
7 | redis:
8 | image: redis
9 | ports:
10 | - "6379:6379"
11 | web: &app_base
12 | build: .
13 | environment:
14 | - RAILS_ENV=production
15 | - RAILS_SERVE_STATIC_FILES=true
16 | - SECRET_KEY_BASE=d21e2a84a06dc6b1fe95e30a18df6ec559dd623e0a1cd6439796533693167c3b2086a2e143564b1a11d41089c7d22651a4c993a3b30efd93af1e0143ffb57d4c
17 | volumes:
18 | - .:/codeburner
19 | ports:
20 | - "3000:3000"
21 | links:
22 | - db
23 | - redis
24 | command: bash -c "rm -f /codeburner/tmp/pids/server.pid && rake db:migrate && bundle exec rails server -b 0.0.0.0"
25 | worker:
26 | <<: *app_base
27 | ports: []
28 | command: bash -c "bundle exec sidekiq"
29 |
--------------------------------------------------------------------------------
/docs/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/favicon.ico
--------------------------------------------------------------------------------
/docs/images/fire.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/images/fire.png
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | ## What is Codeburner?
2 | Codeburner is a tool to help security (and dev!) teams manage the chaos of static code analysis. Sure, you can fire off a bunch of scripts at the end of every CI build... but what do you actually DO with all those results?
3 |
4 | Codeburner uses the OWASP pipeline project to run multiple open source and commercial static analysis tools against your code, and provides a unified (and we think rather attractive) interface to sort and act on the issues it finds.
5 |
6 | ## Key Features
7 | * Asynchronous scanning (via sidekiq) that scales
8 | * Advanced false positive filtering
9 | * Publish issues via GitHub or JIRA
10 | * Track statistics and graph security trends in your applications
11 | * Integrates with a variety of open source and commercial scanning tools
12 | * Full REST API for extension and integration with other tools, CI processes, etc.
13 |
14 | ## Supported Tools
15 | * Brakeman
16 | * Bundler-Audit
17 | * Checkmarx**
18 | * Dawnscanner
19 | * FindSecurityBugs
20 | * NodeSecurityProject
21 | * PMD
22 | * Retire.js
23 | * Snyk
24 |
25 | ** commercial license required
26 |
27 | ***
28 |
--------------------------------------------------------------------------------
/docs/setup/installation.md:
--------------------------------------------------------------------------------
1 | ## Download
2 | You can download the latest release of Codeburner here: https://github.com/groupon/codeburner/releases
3 |
4 | The rest of this guide assumes you're inside the directory created by unpacking a release tarball or cloning the repository:
5 |
6 |
git clone https://github.com/groupon/codeburner
7 |
8 | ## Ruby
9 | Codeburner was developed on Ruby 2.2, and is tested with/works fine on 2.3. If you're using [RVM](http://rvm.io) or [rbenv](http://rbenv.org) we've provided a .ruby-version so you should be all set. If you aren't using one of those, just make sure your local ruby version is at least 2.0+ before proceeding.
10 |
11 | ***
12 |
13 | ## Bundler
14 | ### Gem
15 | First you'll need to install the bundler gem if you don't already have it:
16 |
17 |
gem install bundler
18 |
19 | ### Bundle Install
20 | Once you have bundler, you can use it to install the local gems for Codeburner:
21 |
22 |
bundle install
23 |
24 |
25 | ***
26 |
--------------------------------------------------------------------------------
/docs/setup/startup.md:
--------------------------------------------------------------------------------
1 | ## Start Codeburner
2 | Codeburner should work fine with most standard rack servers. Internally it's been tested to work quite well with both unicorn and puma.
3 |
4 | For local development, we recommend the standard WEBrick rails server and the spring gem for fast iteration. You can start the main app server like so:
5 |
6 |
bundle exec rails s -p 8080
7 |
8 | That will start Codeburner on port 8080, and at this point you should be able to open Codeburner by pointing a web browser at http://localhost:8080/.
9 |
10 | !!! Developers
11 | If you change the port here, just note that you'll also need to change it in the [client proxy config](/developer/client/#api-proxy) for the web client to pass API calls correctly.
12 |
13 | In a production environment, we recommend serving the root static content (public/) with something like httpd or nginx.
14 |
15 | ***
16 |
17 | ## Start Sidekiq
18 | Codeburner uses Sidekiq for asynchronous work (scanning code, sending notifications, etc.). You'll need to explicitly start sidekiq as a separate process for Codeburner to actually "do" anything useful. The default configuration options should work fine in most environments.
19 |
20 | ### Configuration
21 | If you do need to customize sidekiq, it is configured in config/sidekiq.yml.
22 |
23 | ### Startup
24 | For local development/testing you can start sidekiq with bundle exec:
25 |
26 |
bundle exec sidekiq
27 |
28 | If you've deployed to a remote host (and configured Capistrano correctly) you should be able to start sidekiq using cap:
29 |
30 |
32 | {% endif %}
--------------------------------------------------------------------------------
/docs/user/burns.md:
--------------------------------------------------------------------------------
1 | The home page for Codeburner is the 'burns' page. It can be accessed via the URL http://localhost:8080/, or by clicking the 'Codeburner' title/logo in the navigation bar.
2 |
3 | To submit a new burn, click on the "Submit Burn" button:
4 |
5 | 
6 |
7 | Fill out the form that pops up:
8 |
9 | 
10 |
11 | The only required fields are 'Service Name' and 'Repository URL'. You can optionally specify a specific commit/tag to scan and an e-mail address to notify when the burn is complete.
12 |
13 | The list of 'Recent Burns' will refresh automatically, and the status should change to 'done' when it's complete.
14 |
15 | If you highlight/click on a specific burn from the list, you'll be taken to the findings page and shown the findings for **just that one burn**:
16 |
17 | 
18 |
19 | You can also submit a burn through the REST API (useful for scripting or as part of a CI process):
20 |
21 | ```bash
22 | curl -X POST -d '{"repo_name":"codeburner","repo_url":"https://github.com/groupon/codeburner"}' http://localhost:8080/api/burn
23 | ```
24 |
25 |
26 | ***
27 |
--------------------------------------------------------------------------------
/docs/user/images/burn_list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/burn_list.png
--------------------------------------------------------------------------------
/docs/user/images/burn_submit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/burn_submit.png
--------------------------------------------------------------------------------
/docs/user/images/burn_submit_form.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/burn_submit_form.png
--------------------------------------------------------------------------------
/docs/user/images/details_pane.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/details_pane.png
--------------------------------------------------------------------------------
/docs/user/images/filter_click.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/filter_click.png
--------------------------------------------------------------------------------
/docs/user/images/filter_collapse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/filter_collapse.png
--------------------------------------------------------------------------------
/docs/user/images/filter_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/filter_default.png
--------------------------------------------------------------------------------
/docs/user/images/filter_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/filter_delete.png
--------------------------------------------------------------------------------
/docs/user/images/filter_expand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/filter_expand.png
--------------------------------------------------------------------------------
/docs/user/images/filter_finding.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/filter_finding.png
--------------------------------------------------------------------------------
/docs/user/images/filter_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/filter_more.png
--------------------------------------------------------------------------------
/docs/user/images/findings_list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/findings_list.png
--------------------------------------------------------------------------------
/docs/user/images/findings_page.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/findings_page.png
--------------------------------------------------------------------------------
/docs/user/images/github_commit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/github_commit.png
--------------------------------------------------------------------------------
/docs/user/images/github_commit_click.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/github_commit_click.png
--------------------------------------------------------------------------------
/docs/user/images/github_file_click.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/github_file_click.png
--------------------------------------------------------------------------------
/docs/user/images/github_line.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/github_line.png
--------------------------------------------------------------------------------
/docs/user/images/hide_finding.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/hide_finding.png
--------------------------------------------------------------------------------
/docs/user/images/publish_finding.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/publish_finding.png
--------------------------------------------------------------------------------
/docs/user/images/publish_github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/publish_github.png
--------------------------------------------------------------------------------
/docs/user/images/publish_jira.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/publish_jira.png
--------------------------------------------------------------------------------
/docs/user/images/service_list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/service_list.png
--------------------------------------------------------------------------------
/docs/user/images/stats_date.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/stats_date.png
--------------------------------------------------------------------------------
/docs/user/images/stats_datepicker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/stats_datepicker.png
--------------------------------------------------------------------------------
/docs/user/images/stats_page.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/stats_page.png
--------------------------------------------------------------------------------
/docs/user/images/stats_redraw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/stats_redraw.png
--------------------------------------------------------------------------------
/docs/user/images/stats_resolution.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/stats_resolution.png
--------------------------------------------------------------------------------
/docs/user/images/stats_service_list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/docs/user/images/stats_service_list.png
--------------------------------------------------------------------------------
/docs/user/stats.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | ## Google Charts
4 | The statistics page uses the Google Charts API to generate graphs. If you prefer a different look for your reports, see the [API documentation](/developer/api/#apistats) for more details on using the REST API to feed the graphing solution of your choice.
5 |
6 | ***
7 |
8 | ## Select a repo
9 | On the left you can select a specific repo (the default is **All Services**) with substring matching:
10 |
11 | 
12 |
13 | If you select a new repo, the charts will redraw automatically using default values.
14 |
15 | ***
16 |
17 | ## Choose a date range
18 | If you click on either the "Start Date" or "End Date" fields a date picker will appear letting you narrow down the date range of the stats generated:
19 |
20 | 
21 |
22 | 
23 |
24 | ***
25 |
26 | ## Tweak history resolution
27 | Codeburner does a fairly good job of choosing a resolution for your statistics based on the length of time between start date and end date to generate nice trend lines. If you want more control over the graphs produced and want to change the level of detail, you can slide the resolution slider left or right to adjust the resolution:
28 |
29 | 
30 |
31 | !!! Warning
32 | Be careful with the resolution setting. If you set this too low (say, every 5 minutes on multiple months of history) you can generate a **very** large number of database queries and cause considerable slowdown.
33 |
34 | ***
35 |
36 | ## Redraw
37 | After setting a new combination of start date, end date, and resolution you need to click the newly-revealed "Redraw" button to redraw the charts:
38 |
39 | 
40 |
--------------------------------------------------------------------------------
/lib/assets/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/lib/assets/.keep
--------------------------------------------------------------------------------
/lib/tasks/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/lib/tasks/.keep
--------------------------------------------------------------------------------
/lib/tasks/burn.rake:
--------------------------------------------------------------------------------
1 | require './config/boot'
2 | require './config/environment'
3 | require 'pp'
4 |
5 | namespace :burn do
6 | task :list do
7 | Burn.order('id DESC').page(1).per(10).each do |burn|
8 | pp burn
9 | end
10 | end
11 |
12 | task :delete do
13 | ARGV.each { |a| task a.to_sym do ; end }
14 |
15 | id = ARGV[1]
16 | burn = Burn.find(id)
17 |
18 | puts "This will delete burn ##{id} and all #{Finding.burn_id(id).count} findings associated with it. Are you sure? [y/N]"
19 | input = STDIN.getch
20 | raise RuntimeError unless input.downcase == 'y'
21 |
22 | count = Finding.burn_id(id).count
23 | Finding.burn_id(id).destroy_all
24 | burn.destroy
25 | puts "Successfully deleted burn ##{id} and #{count} findings"
26 |
27 | $redis.del ["burn_list", "burn_stats", "stats", "history", "history_range"]
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/lib/tasks/frontend.rake:
--------------------------------------------------------------------------------
1 | require './config/boot'
2 | require './config/environment'
3 |
4 | namespace :frontend do
5 | task :build do
6 | puts `cd client && grunt build && cp -r dist/* #{Dir.pwd}/public/`
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/mkdocs.yml:
--------------------------------------------------------------------------------
1 | site_name: Codeburner
2 | site_url: http://groupon.github.io/codeburner
3 | site_description: One static analysis tool to rule them all...
4 | site_author: Groupon, Inc.
5 | site_favicon: favicon.ico
6 | repo_url: https://github.com/groupon/codeburner
7 | extra_css:
8 | - css/prism.css
9 | extra_javascript:
10 | - js/prism.js
11 | pages:
12 | - Home: index.md
13 | - Setup Guide:
14 | - Quick Start: setup/quickstart.md
15 | - Installation: setup/installation.md
16 | - Configuration: setup/configuration.md
17 | - Scanning Tools: setup/scanning_tools.md
18 | - Start Burning!: setup/startup.md
19 | - User Guide:
20 | - Submit a Burn: user/burns.md
21 | - Interact with Findings: user/findings.md
22 | - Filtering: user/filters.md
23 | - Statistics/Charts: user/stats.md
24 | - Developer Guide:
25 | - Rails Backend: developer/backend.md
26 | - Web Client: developer/client.md
27 | - Pipeline: developer/pipeline.md
28 | - API Reference: developer/api.md
29 | markdown_extensions:
30 | - toc:
31 | permalink: '#'
32 | - admonition
33 | - codehilite(css_class=code)
34 | theme_dir: ./docs/theme
35 | extra:
36 | logo: images/fire.png
37 | author:
38 | github: groupon
39 | twitter: GrouponEng
40 |
--------------------------------------------------------------------------------
/public/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | The page you were looking for doesn't exist (404)
5 |
6 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
The page you were looking for doesn't exist.
62 |
You may have mistyped the address or the page may have moved.
63 |
64 |
If you are the application owner check the logs for more information.
If you are the application owner check the logs for more information.
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/public/favicon.ico
--------------------------------------------------------------------------------
/public/images/fire.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/public/images/fire.png
--------------------------------------------------------------------------------
/public/images/github_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/public/images/github_logo.png
--------------------------------------------------------------------------------
/public/images/jira_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/public/images/jira_logo.png
--------------------------------------------------------------------------------
/public/images/loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/public/images/loader.gif
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2 | #
3 | # To ban all spiders from the entire site uncomment the next two lines:
4 | # User-agent: *
5 | # Disallow: /
6 |
--------------------------------------------------------------------------------
/public/styles/octicons-local.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/public/styles/octicons-local.ttf
--------------------------------------------------------------------------------
/public/styles/octicons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/public/styles/octicons.ttf
--------------------------------------------------------------------------------
/public/styles/octicons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/public/styles/octicons.woff
--------------------------------------------------------------------------------
/test/controllers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/test/controllers/.keep
--------------------------------------------------------------------------------
/test/fixtures/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/test/fixtures/.keep
--------------------------------------------------------------------------------
/test/fixtures/branches.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | repo_id:
5 | ref: MyString
6 |
7 | two:
8 | repo_id:
9 | ref: MyString
10 |
--------------------------------------------------------------------------------
/test/fixtures/burn.json:
--------------------------------------------------------------------------------
1 | {"id":271267788,"repo_name":"Test Service","revision":"abcdefg123456789","code_lang":"JavaScript, CSS, Shell","repo_url":"http://fake.server/a/path","status":"created"}
2 |
--------------------------------------------------------------------------------
/test/fixtures/burns.yml:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
25 |
26 | one:
27 | repo: one
28 | revision: abcdefg123456789
29 | code_lang: JavaScript, CSS, Shell
30 | repo_url: http://github.com/a/path
31 | num_files: 100
32 | num_lines: 5000
33 | repo_portal: true
34 | status: created
35 |
36 | two:
37 | repo: two
38 | revision: 123456789abcdefg
39 | code_lang: Ruby, JavaScript, CoffeScript
40 | repo_url: http://fake.server/a/path
41 | num_files: 200
42 | num_lines: 10000
43 | repo_portal: false
44 | status: created
45 |
46 | three:
47 | repo: two
48 | revision: 123456789qwerty
49 | code_lang: Ruby, Java, Python
50 | repo_url: http://fake.server/a/path
51 | num_files: 200
52 | num_lines: 10000
53 | repo_portal: true
54 | status: created
55 |
56 | four:
57 | repo: two
58 | revision: 123456789zxcv
59 | code_lang: Invalid_Language
60 | repo_url: http://fake.server/a/path
61 | num_files: 200
62 | num_lines: 10000
63 | repo_portal: false
64 | status: created
65 |
--------------------------------------------------------------------------------
/test/fixtures/filters.yml:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
25 |
26 | one:
27 | repo: one
28 | severity: 3
29 | fingerprint: abcdefg123456789
30 | scanner: test_scanner
31 | description: test_description
32 | detail: test_detail
33 | file: app/test.rb
34 | line: '1'
35 | code: some_test_code()
36 |
37 | two:
38 | repo: two
39 | severity: 3
40 | fingerprint: gfedcba0987654321
41 | scanner: test_scanner
42 | description: test_description
43 | detail: test_detail_2
44 | file: app/test2.rb
45 | line: '1'
46 | code: some_test_code2()
47 |
--------------------------------------------------------------------------------
/test/fixtures/findings.yml:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
25 |
26 | one:
27 | repo: one
28 | burn: one
29 | filter: one
30 | description: test_description
31 | severity: 3
32 | fingerprint: abcdefg123456789
33 | detail: test_detail
34 | status: 1
35 | scanner: test_scanner
36 | file: app/test.rb
37 | line: 1
38 | code: some_test_code()
39 |
40 | two:
41 | repo: two
42 | burn: two
43 | filter:
44 | description: Finding Two
45 | severity: 2
46 | fingerprint: 123456789abcdefg
47 | detail: Details about finding two
48 | status: 1
49 | scanner: Checkmarx
50 | file: app/test2.rb
51 | line: 50
52 | code: test_code_2(stopped).code
53 |
--------------------------------------------------------------------------------
/test/fixtures/notification_mailer/notification_email:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Codeburner Report
4 |
Codeburner has finished burning Test Service - abcdefg123456789.
5 |
You can view the full results and sort/create jira issues here:
6 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/test/fixtures/notifications.yml:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
25 |
26 | one:
27 | burn: all
28 | method: email
29 | destination: test@test.com
30 |
--------------------------------------------------------------------------------
/test/fixtures/service_stats.yml:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
25 |
26 | one:
27 | repo: one
28 | burns: 1
29 | total_findings: 1
30 | open_findings: 1
31 | filtered_findings: 1
32 | hidden_findings: 1
33 | published_findings: 1
34 |
35 | two:
36 | repo: two
37 | burns: 1
38 | total_findings: 1
39 | open_findings: 1
40 | filtered_findings: 1
41 | hidden_findings: 1
42 | published_findings: 1
43 |
--------------------------------------------------------------------------------
/test/fixtures/services.yml:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
25 |
26 | one:
27 | name: test_repo
28 | full_name: Test Service
29 | repo_portal: true
30 |
31 | two:
32 | name: test_repo_2
33 | full_name: Test Service 2
34 | repo_portal: false
35 |
--------------------------------------------------------------------------------
/test/fixtures/system_stats.yml:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
25 |
26 | one:
27 | repos: 1
28 | burns: 1
29 | total_findings: 1
30 | open_findings: 1
31 | hidden_findings: 1
32 | published_findings: 1
33 | filtered_findings: 1
34 | files: 1
35 | lines: 1
36 |
37 | two:
38 | repos: 1
39 | burns: 1
40 | total_findings: 1
41 | open_findings: 1
42 | hidden_findings: 1
43 | published_findings: 1
44 | filtered_findings: 1
45 | files: 1
46 | lines: 1
47 |
--------------------------------------------------------------------------------
/test/fixtures/tokens.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | user_id:
5 | name: MyString
6 | token: MyString
7 |
8 | two:
9 | user_id:
10 | name: MyString
11 | token: MyString
12 |
--------------------------------------------------------------------------------
/test/fixtures/users.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | github_uid: 1
5 | name: MyString
6 | profile_url: MyString
7 | avatar_url: MyString
8 | access_token: MyString
9 |
10 | two:
11 | github_uid: 1
12 | name: MyString
13 | profile_url: MyString
14 | avatar_url: MyString
15 | access_token: MyString
16 |
--------------------------------------------------------------------------------
/test/helpers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/test/helpers/.keep
--------------------------------------------------------------------------------
/test/integration/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/test/integration/.keep
--------------------------------------------------------------------------------
/test/mailers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/test/mailers/.keep
--------------------------------------------------------------------------------
/test/mailers/notification_mailer_test.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | require 'test_helper'
25 |
26 | class NotificationMailerTest < ActionMailer::TestCase
27 | # previous_stats = {
28 | # :open_findings => 0,
29 | # :filtered_findings => 0,
30 | # :published_findings => 0,
31 | # :hidden_findings => 0,
32 | # :total_findings => 0
33 | # }
34 |
35 | # def burn_ids
36 | # burn_ids = []
37 | # burns.each { |burn| burn_ids << burn.id }
38 | # return burn_ids
39 | # end
40 |
41 | # test "notification_email" do
42 | # email = NotificationMailer.notification_email(notifications(:one).destination, burns(:one).id, @previous_stats)
43 |
44 | # assert_emails 1 do
45 | # email.deliver_now
46 | # end
47 |
48 | # assert_equal read_fixture('notification_email').join, email.body.to_s
49 | # end
50 |
51 | # test "fails on invalid burn id" do
52 | # assert_raises(ActiveRecord::RecordNotFound) do
53 | # NotificationMailer.notification_email(notifications(:one).destination, ([1...1000] - burn_ids).sample, @previous_stats).deliver_now
54 | # end
55 | # end
56 | end
57 |
--------------------------------------------------------------------------------
/test/mailers/previews/notification_mailer_preview.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | # Preview all emails at http://localhost:3000/rails/mailers/notification_mailer
25 | class NotificationMailerPreview < ActionMailer::Preview
26 |
27 | end
28 |
--------------------------------------------------------------------------------
/test/models/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/test/models/.keep
--------------------------------------------------------------------------------
/test/models/branch_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class BranchTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/filter_test.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | require 'test_helper'
25 |
26 | class FilterTest < ActiveSupport::TestCase
27 | # test "the truth" do
28 | # assert true
29 | # end
30 | end
31 |
--------------------------------------------------------------------------------
/test/models/notification_test.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | require 'test_helper'
25 |
26 | class NotificationTest < ActiveSupport::TestCase
27 | test "notifies and destroys itself" do
28 | assert_difference('Notification.count', -1) do
29 | notification_email = mock('notification_email')
30 | notification_email.expects(:deliver_now).returns(true).once
31 | NotificationMailer.expects(:notification_email).returns(notification_email).once
32 |
33 | notifications(:one).burn = burns(:one).id
34 | notifications(:one).notify(burns(:one).id, {})
35 | end
36 | end
37 |
38 | test "fails and destroys itself" do
39 | assert_difference('Notification.count', -1) do
40 | failure_email = mock('failure_email')
41 | failure_email.expects(:deliver_now).returns(true).once
42 | NotificationMailer.expects(:failure_email).returns(failure_email).once
43 |
44 | notifications(:one).burn = burns(:one).id
45 | notifications(:one).fail(burns(:one).id)
46 | end
47 | end
48 | end
49 |
--------------------------------------------------------------------------------
/test/models/service_stat_test.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | require 'test_helper'
25 |
26 | class ServiceStatTest < ActiveSupport::TestCase
27 | # test "the truth" do
28 | # assert true
29 | # end
30 | end
31 |
--------------------------------------------------------------------------------
/test/models/system_stat_test.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | require 'test_helper'
25 |
26 | class SystemStatTest < ActiveSupport::TestCase
27 | # test "the truth" do
28 | # assert true
29 | # end
30 | end
31 |
--------------------------------------------------------------------------------
/test/models/token_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class TokenTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/user_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class UserTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/test_helper.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | require "codeclimate-test-reporter"
25 | CodeClimate::TestReporter.start
26 |
27 | require 'simplecov'
28 | SimpleCov.start 'rails'
29 |
30 | ENV["RAILS_ENV"] ||= "test"
31 | require File.expand_path("../../config/environment", __FILE__)
32 |
33 | require "rails/test_help"
34 | require "mocha/mini_test"
35 |
36 | # Improved Minitest output (color and progress bar)
37 | require "minitest/reporters"
38 | Minitest::Reporters.use!(Minitest::Reporters::ProgressReporter.new,ENV,Minitest.backtrace_filter)
39 |
40 | class ActiveSupport::TestCase
41 | fixtures :all
42 | end
43 |
44 | class ActiveRecord::Base
45 | mattr_accessor :shared_connection
46 | @@shared_connection = nil
47 |
48 | def self.connection
49 | @@shared_connection || ConnectionPool::Wrapper.new(:size => 1) { retrieve_connection }
50 | end
51 | end
52 | ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection
53 |
54 | class Minitest::Test
55 | def setup
56 | Rails.cache.clear
57 | end
58 | end
59 |
60 | Minitest.after_run { Rails.cache.clear }
61 |
--------------------------------------------------------------------------------
/test/validators/filter_validator_test.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | require 'test_helper'
25 |
26 | class FilterValidatorTest < ActiveSupport::TestCase
27 | test "drops duplicate filters" do
28 | filter = Filter.new({
29 | :repo => filters(:one).repo,
30 | :severity => filters(:one).severity,
31 | :fingerprint => filters(:one).fingerprint,
32 | :scanner => filters(:one).scanner,
33 | :description => filters(:one).description,
34 | :detail => filters(:one).detail,
35 | :file => filters(:one).file,
36 | :line => filters(:one).line,
37 | :code => filters(:one).code
38 | })
39 | refute filter.valid?, "duplicate filter should be invalid"
40 | end
41 | end
42 |
--------------------------------------------------------------------------------
/test/workers/burn_worker_test.rb:
--------------------------------------------------------------------------------
1 | #
2 | #The MIT License (MIT)
3 | #
4 | #Copyright (c) 2016, Groupon, Inc.
5 | #
6 | #Permission is hereby granted, free of charge, to any person obtaining a copy
7 | #of this software and associated documentation files (the "Software"), to deal
8 | #in the Software without restriction, including without limitation the rights
9 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | #copies of the Software, and to permit persons to whom the Software is
11 | #furnished to do so, subject to the following conditions:
12 | #
13 | #The above copyright notice and this permission notice shall be included in
14 | #all copies or substantial portions of the Software.
15 | #
16 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | #THE SOFTWARE.
23 | #
24 | require 'test_helper'
25 |
26 | class BurnWorkerTest < ActiveSupport::TestCase
27 | test "kicks off ignition" do
28 | burns(:one).expects(:ignite).returns(true).once
29 | Burn.expects(:find).returns(burns(:one))
30 |
31 | BurnWorker.new.perform(burns(:one).id)
32 | end
33 | end
34 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/vendor/assets/javascripts/.keep
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/groupon/codeburner/4686f5316664ba2851803f20cdcf4466da7401ce/vendor/assets/stylesheets/.keep
--------------------------------------------------------------------------------