Skip to content
This repository was archived by the owner on Aug 13, 2020. It is now read-only.

Commit 9b00247

Browse files
authored
todos cleanup (#1158)
* remove property keywords * remove campaign dashboards controller * update solargraph config * remove coupons * ci tweak * update codecov config and system test setup * update codecov
1 parent 2f5e464 commit 9b00247

24 files changed

+44
-266
lines changed

.circleci/config.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,14 @@ jobs:
2323
working_directory: ~/repo
2424
steps:
2525
- checkout
26+
- run:
27+
name: Set up assets cache key
28+
command: find app/javascript -type f | xargs -d'\n' -P0 -n1 md5sum | sort -k 2 | md5sum > dependency_checksum
2629
- run: |
2730
sudo curl -sL https://deb.nodesource.com/setup_13.x | sudo bash -
2831
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
2932
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
30-
sudo apt-get update && sudo apt-get install -y postgresql-client nodejs yarn
33+
sudo apt-get update && sudo apt-get install -y libpq-dev postgresql-client nodejs yarn
3134
- restore_cache:
3235
name: Restore gem cache
3336
keys:
@@ -42,9 +45,6 @@ jobs:
4245
- yarn-cache-v5-{{ arch }}-{{ .Branch }}
4346
- yarn-cache-v5-{{ arch }}
4447
- yarn-cache-v5
45-
- run:
46-
name: Set up assets cache key
47-
command: find app/javascript -type f -exec md5sum {} \; > dependency_checksum
4848
- restore_cache:
4949
name: Restore assets cache
5050
keys:

.solargraph.yml

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ exclude:
99
require: []
1010
domains: []
1111
reporters:
12-
- rubocop
1312
- require_not_found
1413
require_paths: []
1514
max_files: 10000

app/controllers/campaign_dashboards_controller.rb

-30
This file was deleted.

app/controllers/coupons_controller.rb

-58
This file was deleted.

app/controllers/property_keywords_controller.rb

-16
This file was deleted.

app/helpers/campaign_dashboards_helper.rb

-2
This file was deleted.

app/helpers/coupons_helper.rb

-2
This file was deleted.

app/helpers/property_keywords_helper.rb

-2
This file was deleted.

app/models/user.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,7 @@ class User < ApplicationRecord
166166
# rescue required for initial migration due to devise
167167
ActiveRecord::NoDatabaseError
168168
end
169-
# TODO: do we want to remove timeoutable?
170-
# https://github.com/gitcoinco/code_fund_ads/blob/8750ecdf213dc8ef01fbfb210c809f9bcff52e6f/app/models/user.rb
169+
171170
devise(
172171
:confirmable,
173172
:database_authenticatable,

app/views/campaign_dashboards/show.html.erb

-21
This file was deleted.

app/views/coupons/_form.html.erb

-39
This file was deleted.

app/views/coupons/_table.html.erb

-16
This file was deleted.

app/views/coupons/_tr.html.erb

-9
This file was deleted.

app/views/coupons/edit.html.erb

-8
This file was deleted.

app/views/coupons/index.html.erb

-6
This file was deleted.

app/views/coupons/new.html.erb

-8
This file was deleted.

app/views/property_keywords/show.html.erb

-13
This file was deleted.

codecov.yml

+25-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,29 @@
11
codecov:
2-
bot: "codecov-T-800"
32
require_ci_to_pass: yes
43
notify:
5-
after_n_builds: 2
64
wait_for_ci: yes
7-
parsers:
8-
v1:
9-
include_full_missed_files: true
5+
6+
coverage:
7+
precision: 2
8+
round: down
9+
range: "70...100"
10+
11+
parsers:
12+
gcov:
13+
branch_detection:
14+
conditional: yes
15+
loop: yes
16+
method: no
17+
macro: no
18+
19+
comment:
20+
layout: "reach,diff,flags,tree"
21+
behavior: default
22+
require_changes: yes
23+
24+
ignore:
25+
- "bin/"
26+
- "config/"
27+
- "db/"
28+
- "docs/"
29+
- "public/"

config/webpack/loaders/erb.js

+9-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@ module.exports = {
22
test: /\.erb$/,
33
enforce: 'pre',
44
exclude: /node_modules/,
5-
use: [{
6-
loader: 'rails-erb-loader',
7-
options: {
8-
runner: (/^win/.test(process.platform) ? 'ruby ' : '') + 'bin/rails runner'
5+
use: [
6+
{
7+
loader: 'rails-erb-loader',
8+
options: {
9+
runner:
10+
(/^win/.test(process.platform) ? 'ruby ' : '') + 'bin/rails runner',
11+
env: { ...process.env }
12+
}
913
}
10-
}]
14+
]
1115
}

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"contributors:add": "all-contributors add",
1111
"contributors:generate": "all-contributors generate",
1212
"webpack:analyze": "mkdir -p public/packs && node_modules/.bin/webpack --config config/webpack/production.js --profile --json > public/packs/stats.json && node_modules/.bin/webpack-bundle-analyzer public/packs/stats.json",
13-
"prettier:format": "prettier-standard -- \"app/**/*.js\" \"app/**/*.scss\"",
14-
"prettier:check": "prettier-standard -- --check \"app/**/*.js\" \"app/**/*.scss\"",
15-
"prettier:lint": "prettier-standard -- --lint \"app/**/*.js\" \"app/**/*.scss\""
13+
"prettier:format": "prettier-standard -- \"app/**/*.js\" \"config/**/*.js\" \"app/**/*.scss\"",
14+
"prettier:check": "prettier-standard -- --check \"app/**/*.js\" \"config/**/*.js\" \"app/**/*.scss\"",
15+
"prettier:lint": "prettier-standard -- --lint \"app/**/*.js\" \"config/**/*.js\" \"app/**/*.scss\""
1616
},
1717
"dependencies": {
1818
"@fnando/sparkline": "^0.3.10",

test/application_system_test_case.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
Capybara::Cuprite::Driver.new(
77
app,
88
window_size: [1400, 1400],
9-
js_errors: true,
9+
js_errors: false,
1010
headless: !(ENV["WATCH"] == "true"),
11+
process_timeout: 5
1112
)
1213
end
1314

test/controllers/campaign_dashboards_controller_test.rb

-5
This file was deleted.

test/controllers/coupons_controller_test.rb

-5
This file was deleted.

test/controllers/property_keywords_controller_test.rb

-5
This file was deleted.

0 commit comments

Comments
 (0)