percy-client 2.0.7 → 2.0.8

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: df1de7117526c1e91532a516b451c85e129c4a325c44c22c5ae4a0e9cb3e720f
4
- data.tar.gz: e62ba6b8ce3687503d5655910b19e3732d7d0eca9cc7c5acff40e1d59ed041ac
3
+ metadata.gz: 67e169f3a76e0b95cf9a89ba3626f27fe4bfa51cfca689be70be5bbcdd7b0467
4
+ data.tar.gz: 2f0c2b2ea7b32c5037dbe07ccfeecfb49ae2620e2a62319f666a172fb9bdf806
5
5
  SHA512:
6
- metadata.gz: 100757bb0d4750693bd6758330e1a1431f3723498806100b2b610dce83e4608e2130415fa0e34cb436393c7924c191331a929f80d51db141ed1ea30f33d484eb
7
- data.tar.gz: 8534365015e3808d17df6a16fb6437e7cec8cad627efd346bec115b9607a65ee4edf892584f6fe1891d54bfda585a57b7913dedc829918eba24d2247cf6f96b4
6
+ metadata.gz: d52a2fc7d595c153205499958d5b69bd907dc3f1134f2f471e352d3c7c4bb64237f91ac28028364025441ae25da9dda884346fffa68b277bd2325b8b7b1cf14e
7
+ data.tar.gz: a7501fe654ced36b6b35ce62203e2a101e6ea1332b1b588e4ad2a048dc741b70fdd34b49b868186046a6d2249da4a79779f747d938510d6303b5b38510759708
@@ -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],
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
@@ -1,5 +1,5 @@
1
1
  module Percy
2
2
  class Client
3
- VERSION = '2.0.7'.freeze
3
+ VERSION = '2.0.8'.freeze
4
4
  end
5
5
  end
@@ -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.7
4
+ version: 2.0.8
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-01-23 00:00:00.000000000 Z
11
+ date: 2023-08-29 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