percy-client 2.0.7 → 2.0.9
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2bcc36c89ce0d96276656d6c3c38a3d358b19f0137cf8dcc4a033dce771d9c16
|
4
|
+
data.tar.gz: 375f3e358b24b79b7e58f800f968b660972b7ed66cc9c0452645fea2351edab1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ac1f6cd819a63cfbf10a2231c540efc2f3173d12ef0d77a099d43444ba40f4c4f42d613abcdc9c6c674001197a2324beba3a604b277906c8455acf896ac7b44
|
7
|
+
data.tar.gz: cbf9d25f24c69f6ff2998071a461136d40bfe9d6d1677b3d9679ac97cd1b0d3c968ab57e5794ddd3335d4c957662d35095188b4d431f48563d4522cc44032818
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# Name of this GitHub Actions workflow.
|
2
|
+
name: Semgrep
|
3
|
+
|
4
|
+
on:
|
5
|
+
# Scan changed files in PRs (diff-aware scanning):
|
6
|
+
# The branches below must be a subset of the branches above
|
7
|
+
pull_request:
|
8
|
+
branches: ["master", "main"]
|
9
|
+
push:
|
10
|
+
branches: ["master", "main"]
|
11
|
+
schedule:
|
12
|
+
- cron: '0 6 * * *'
|
13
|
+
|
14
|
+
|
15
|
+
permissions:
|
16
|
+
contents: read
|
17
|
+
|
18
|
+
jobs:
|
19
|
+
semgrep:
|
20
|
+
# User definable name of this GitHub Actions job.
|
21
|
+
permissions:
|
22
|
+
contents: read # for actions/checkout to fetch code
|
23
|
+
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
24
|
+
name: semgrep/ci
|
25
|
+
# If you are self-hosting, change the following `runs-on` value:
|
26
|
+
runs-on: ubuntu-latest
|
27
|
+
|
28
|
+
container:
|
29
|
+
# A Docker image with Semgrep installed. Do not change this.
|
30
|
+
image: returntocorp/semgrep
|
31
|
+
|
32
|
+
# Skip any PR created by dependabot to avoid permission issues:
|
33
|
+
if: (github.actor != 'dependabot[bot]')
|
34
|
+
|
35
|
+
steps:
|
36
|
+
# Fetch project source with GitHub Actions Checkout.
|
37
|
+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
38
|
+
# Run the "semgrep ci" command on the command line of the docker image.
|
39
|
+
- run: semgrep ci --sarif --output=semgrep.sarif
|
40
|
+
env:
|
41
|
+
# Add the rules that Semgrep uses by setting the SEMGREP_RULES environment variable.
|
42
|
+
SEMGREP_RULES: p/default # more at semgrep.dev/explore
|
43
|
+
|
44
|
+
- name: Upload SARIF file for GitHub Advanced Security Dashboard
|
45
|
+
uses: github/codeql-action/upload-sarif@6c089f53dd51dc3fc7e599c3cb5356453a52ca9e # v2.20.0
|
46
|
+
with:
|
47
|
+
sarif_file: semgrep.sarif
|
48
|
+
if: always()
|
data/CODEOWNERS
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
* @percy/percy-product-reviewers
|
@@ -9,6 +9,7 @@ module Percy
|
|
9
9
|
attr_accessor :sha
|
10
10
|
attr_accessor :resource_url
|
11
11
|
attr_accessor :is_root
|
12
|
+
attr_accessor :root_for_width
|
12
13
|
attr_accessor :mimetype
|
13
14
|
attr_accessor :content
|
14
15
|
attr_accessor :path
|
@@ -23,6 +24,7 @@ module Percy
|
|
23
24
|
@content = options[:content]
|
24
25
|
|
25
26
|
@is_root = options[:is_root]
|
27
|
+
@root_for_width = options[:root_for_width]
|
26
28
|
@mimetype = options[:mimetype]
|
27
29
|
|
28
30
|
# For optional convenience of temporarily storing the local content and path with this
|
@@ -39,6 +41,7 @@ module Percy
|
|
39
41
|
'resource-url' => Addressable::URI.escape(resource_url),
|
40
42
|
'mimetype' => mimetype,
|
41
43
|
'is-root' => is_root,
|
44
|
+
'for-widths' => root_for_width ? [root_for_width] : nil,
|
42
45
|
},
|
43
46
|
}
|
44
47
|
end
|
@@ -60,7 +63,7 @@ module Percy
|
|
60
63
|
|
61
64
|
def inspect
|
62
65
|
content_msg = content.nil? ? '' : "content.length: #{content.length}"
|
63
|
-
"<Resource #{sha} #{resource_url} is_root:#{!!is_root} #{mimetype} #{content_msg}>"
|
66
|
+
"<Resource #{sha} #{resource_url} root_for_width:#{root_for_width} is_root:#{!!is_root} #{mimetype} #{content_msg}>"
|
64
67
|
end
|
65
68
|
alias to_s inspect
|
66
69
|
end
|
data/lib/percy/client/version.rb
CHANGED
@@ -31,6 +31,7 @@ RSpec.describe Percy::Client::Resource do
|
|
31
31
|
'resource-url' => '/foo.html',
|
32
32
|
'mimetype' => nil,
|
33
33
|
'is-root' => nil,
|
34
|
+
'for-widths' => nil,
|
34
35
|
},
|
35
36
|
)
|
36
37
|
end
|
@@ -49,6 +50,7 @@ RSpec.describe Percy::Client::Resource do
|
|
49
50
|
'resource-url' => '/foo%20new.html',
|
50
51
|
'mimetype' => 'text/html',
|
51
52
|
'is-root' => true,
|
53
|
+
'for-widths' => nil,
|
52
54
|
},
|
53
55
|
)
|
54
56
|
end
|
@@ -33,6 +33,7 @@ RSpec.describe Percy::Client::Snapshots, :vcr do
|
|
33
33
|
'resource-url' => '/foo/test.html',
|
34
34
|
'mimetype' => nil,
|
35
35
|
'is-root' => true,
|
36
|
+
'for-widths' => nil,
|
36
37
|
},
|
37
38
|
},
|
38
39
|
{
|
@@ -42,6 +43,7 @@ RSpec.describe Percy::Client::Snapshots, :vcr do
|
|
42
43
|
'resource-url' => '/css/test.css',
|
43
44
|
'mimetype' => nil,
|
44
45
|
'is-root' => nil,
|
46
|
+
'for-widths' => nil,
|
45
47
|
},
|
46
48
|
},
|
47
49
|
],
|
@@ -95,6 +97,7 @@ RSpec.describe Percy::Client::Snapshots, :vcr do
|
|
95
97
|
'resource-url' => '/foo/test.html',
|
96
98
|
'mimetype' => nil,
|
97
99
|
'is-root' => true,
|
100
|
+
'for-widths' => nil,
|
98
101
|
},
|
99
102
|
},
|
100
103
|
{
|
@@ -104,6 +107,7 @@ RSpec.describe Percy::Client::Snapshots, :vcr do
|
|
104
107
|
'resource-url' => '/css/test.css',
|
105
108
|
'mimetype' => nil,
|
106
109
|
'is-root' => nil,
|
110
|
+
'for-widths' => nil,
|
107
111
|
},
|
108
112
|
},
|
109
113
|
],
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: percy-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Perceptual Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -143,10 +143,12 @@ executables: []
|
|
143
143
|
extensions: []
|
144
144
|
extra_rdoc_files: []
|
145
145
|
files:
|
146
|
+
- ".github/workflows/Semgrep.yml"
|
146
147
|
- ".gitignore"
|
147
148
|
- ".rspec"
|
148
149
|
- ".rubocop.yml"
|
149
150
|
- ".travis.yml"
|
151
|
+
- CODEOWNERS
|
150
152
|
- Gemfile
|
151
153
|
- Guardfile
|
152
154
|
- LICENSE
|