bugsnag_sourcemap_uploader 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +36 -0
- data/Gemfile.lock +29 -24
- data/README.md +2 -0
- data/bin/rake +7 -7
- data/bugsnag_sourcemap_uploader.gemspec +6 -4
- data/examples/webpacker_asset_repository.rb +15 -21
- data/lib/bugsnag_sourcemap_uploader.rb +1 -1
- data/lib/bugsnag_sourcemap_uploader/version.rb +1 -1
- metadata +16 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78c4291bf8b4d2d27b6bd9a34821df8454ca14844142628c58148a053c4e3cbb
|
4
|
+
data.tar.gz: c9383658b90044f908a4b81ed48f41b1f34dc27980babd10c7de3dac20666f06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c48eb86749d5eb5aa341d0364e709ce79cee7c60ce8c96eb970a08d8579922404bbf616e626bcf76e93b9abd8a75b9a34b1965f1a31429dff5ac9b60684350b
|
7
|
+
data.tar.gz: c05244b0a2c3e135863791966ffe85eb6f16e01a6bbc64e1112c454555fcc6a47189493fd8b3c80a3b98acd9cffa7b7d58b1047351d0a846c95968a7a899bce4
|
@@ -0,0 +1,36 @@
|
|
1
|
+
name: continuous-integration
|
2
|
+
on: [push, pull_request]
|
3
|
+
|
4
|
+
jobs:
|
5
|
+
ci:
|
6
|
+
runs-on: ubuntu-latest
|
7
|
+
strategy:
|
8
|
+
matrix:
|
9
|
+
ruby: [ '2.6', '2.7' ]
|
10
|
+
name: Ruby ${{ matrix.ruby }}
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v2
|
13
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
14
|
+
uses: actions/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
ruby-version: ${{ matrix.ruby }}
|
17
|
+
- name: Cache gems
|
18
|
+
uses: actions/cache@v2
|
19
|
+
with:
|
20
|
+
path: vendor/bundle
|
21
|
+
key: ${{ runner.os }}-${{ matrix.ruby }}-gem-${{ hashFiles('**/Gemfile.lock') }}
|
22
|
+
restore-keys: |
|
23
|
+
${{ runner.os }}-${{ matrix.ruby }}-gem-
|
24
|
+
- name: Install gems
|
25
|
+
run: |
|
26
|
+
sed -i '/ruby ".*"/,+1 d' Gemfile
|
27
|
+
bundle_version=`awk '/BUNDLED WITH/{getline; gsub(/ /, "", $0); print}' Gemfile.lock`
|
28
|
+
gem install bundler --no-document -v ${bundle_version}
|
29
|
+
bundle config retry "3"
|
30
|
+
bundle config jobs "$(nproc)"
|
31
|
+
bundle config path vendor/bundle
|
32
|
+
bundle install
|
33
|
+
- name: Run RuboCop
|
34
|
+
run: bundle exec rubocop --parallel
|
35
|
+
- name: Run tests
|
36
|
+
run: bundle exec rake test
|
data/Gemfile.lock
CHANGED
@@ -1,52 +1,57 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bugsnag_sourcemap_uploader (0.1.
|
5
|
-
concurrent-ruby (
|
6
|
-
httparty (
|
4
|
+
bugsnag_sourcemap_uploader (0.1.2)
|
5
|
+
concurrent-ruby (>= 1.1.4)
|
6
|
+
httparty (>= 0.17.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
ast (2.4.
|
12
|
-
concurrent-ruby (1.1.
|
13
|
-
httparty (0.
|
11
|
+
ast (2.4.2)
|
12
|
+
concurrent-ruby (1.1.9)
|
13
|
+
httparty (0.18.1)
|
14
14
|
mime-types (~> 3.0)
|
15
15
|
multi_xml (>= 0.5.2)
|
16
|
-
jaro_winkler (1.5.4)
|
17
16
|
mime-types (3.3.1)
|
18
17
|
mime-types-data (~> 3.2015)
|
19
|
-
mime-types-data (3.
|
20
|
-
minitest (5.14.
|
21
|
-
mocha (1.
|
18
|
+
mime-types-data (3.2021.0704)
|
19
|
+
minitest (5.14.4)
|
20
|
+
mocha (1.13.0)
|
22
21
|
multi_xml (0.6.0)
|
23
|
-
parallel (1.
|
24
|
-
parser (
|
25
|
-
ast (~> 2.4.
|
22
|
+
parallel (1.20.1)
|
23
|
+
parser (3.0.2.0)
|
24
|
+
ast (~> 2.4.1)
|
26
25
|
rainbow (3.0.0)
|
27
|
-
rake (
|
28
|
-
|
29
|
-
|
26
|
+
rake (13.0.6)
|
27
|
+
regexp_parser (2.1.1)
|
28
|
+
rexml (3.2.5)
|
29
|
+
rubocop (1.18.4)
|
30
30
|
parallel (~> 1.10)
|
31
|
-
parser (>=
|
31
|
+
parser (>= 3.0.0.0)
|
32
32
|
rainbow (>= 2.2.2, < 4.0)
|
33
|
+
regexp_parser (>= 1.8, < 3.0)
|
34
|
+
rexml
|
35
|
+
rubocop-ast (>= 1.8.0, < 2.0)
|
33
36
|
ruby-progressbar (~> 1.7)
|
34
|
-
unicode-display_width (>= 1.4.0, <
|
35
|
-
|
36
|
-
|
37
|
-
|
37
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
38
|
+
rubocop-ast (1.8.0)
|
39
|
+
parser (>= 3.0.1.1)
|
40
|
+
ruby-progressbar (1.11.0)
|
41
|
+
unicode-display_width (2.0.0)
|
42
|
+
yard (0.9.26)
|
38
43
|
|
39
44
|
PLATFORMS
|
40
45
|
ruby
|
41
46
|
|
42
47
|
DEPENDENCIES
|
43
48
|
bugsnag_sourcemap_uploader!
|
44
|
-
bundler (
|
49
|
+
bundler (>= 2.2.10)
|
45
50
|
minitest (~> 5.0)
|
46
51
|
mocha
|
47
|
-
rake (
|
52
|
+
rake (>= 13.0)
|
48
53
|
rubocop
|
49
54
|
yard
|
50
55
|
|
51
56
|
BUNDLED WITH
|
52
|
-
|
57
|
+
2.2.25
|
data/README.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/bugsnag_sourcemap_uploader.svg)](https://badge.fury.io/rb/bugsnag_sourcemap_uploader) [![](https://github.com/bernardoamc/bugsnag_sourcemap_uploader/workflows/continuous-integration/badge.svg)](https://github.com/bernardoamc/bugsnag_sourcemap_uploader/actions?query=workflow%3Acontinuous-integration)
|
2
|
+
|
1
3
|
# BugsnagSourcemapUploader
|
2
4
|
|
3
5
|
Upload your sourcemaps to Bugsnag in parallel.
|
data/bin/rake
CHANGED
@@ -8,11 +8,11 @@
|
|
8
8
|
# this file is here to facilitate running it.
|
9
9
|
#
|
10
10
|
|
11
|
-
require
|
12
|
-
ENV[
|
13
|
-
|
11
|
+
require 'pathname'
|
12
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
14
|
|
15
|
-
bundle_binstub = File.expand_path(
|
15
|
+
bundle_binstub = File.expand_path('bundle', __dir__)
|
16
16
|
|
17
17
|
if File.file?(bundle_binstub)
|
18
18
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
@@ -23,7 +23,7 @@ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
require
|
27
|
-
require
|
26
|
+
require 'rubygems'
|
27
|
+
require 'bundler/setup'
|
28
28
|
|
29
|
-
load Gem.bin_path(
|
29
|
+
load Gem.bin_path('rake', 'rake')
|
@@ -23,10 +23,12 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ['lib']
|
25
25
|
|
26
|
-
spec.add_development_dependency 'bundler', '
|
26
|
+
spec.add_development_dependency 'bundler', '>= 2.2.10'
|
27
27
|
spec.add_development_dependency 'minitest', '~> 5.0'
|
28
|
-
spec.add_development_dependency 'rake', '
|
28
|
+
spec.add_development_dependency 'rake', '>= 13.0'
|
29
29
|
|
30
|
-
spec.add_dependency 'concurrent-ruby', '
|
31
|
-
spec.add_dependency 'httparty', '
|
30
|
+
spec.add_dependency 'concurrent-ruby', '>= 1.1.4'
|
31
|
+
spec.add_dependency 'httparty', '>= 0.17.0'
|
32
|
+
|
33
|
+
spec.required_ruby_version = '>= 2.6.0'
|
32
34
|
end
|
@@ -36,26 +36,22 @@ module BugsnagSourcemapUploader
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def scripts_by_prefix
|
39
|
-
@scripts_by_prefix ||=
|
40
|
-
|
41
|
-
|
42
|
-
next if match_data.nil?
|
39
|
+
@scripts_by_prefix ||= scripts.each_with_object({}) do |script, prefixes|
|
40
|
+
match_data = script.match(/\A(.*)-[a-f0-9]{64}\.js\z/)
|
41
|
+
next if match_data.nil?
|
43
42
|
|
44
|
-
|
45
|
-
|
46
|
-
end
|
43
|
+
prefix = match_data[1]
|
44
|
+
prefixes[prefix] = script
|
47
45
|
end
|
48
46
|
end
|
49
47
|
|
50
48
|
def source_maps_by_prefix
|
51
|
-
@source_maps_by_prefix ||=
|
52
|
-
|
53
|
-
|
54
|
-
next if match_data.nil?
|
49
|
+
@source_maps_by_prefix ||= source_maps.each_with_object({}) do |source_map, prefixes|
|
50
|
+
match_data = source_map.match(/\A(.*)-[a-f0-9]{64}\.js\.map\z/)
|
51
|
+
next if match_data.nil?
|
55
52
|
|
56
|
-
|
57
|
-
|
58
|
-
end
|
53
|
+
prefix = match_data[1]
|
54
|
+
prefixes[prefix] = source_map
|
59
55
|
end
|
60
56
|
end
|
61
57
|
|
@@ -76,13 +72,11 @@ module BugsnagSourcemapUploader
|
|
76
72
|
end
|
77
73
|
|
78
74
|
def cdn_url
|
79
|
-
@cdn_url ||=
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
.to_s
|
85
|
-
end
|
75
|
+
@cdn_url ||= Addressable::URI
|
76
|
+
.parse(CDN_HOST_URL)
|
77
|
+
.join("#{parent_dir}/")
|
78
|
+
.join(script_name)
|
79
|
+
.to_s
|
86
80
|
end
|
87
81
|
|
88
82
|
private
|
@@ -23,7 +23,7 @@ module BugsnagSourcemapUploader
|
|
23
23
|
# @return [BugsnagSourcemapUploader::Result] The object with the results of our operation.
|
24
24
|
def self.upload(assets_metadata:, bugsnag_api_key:, http_options: {})
|
25
25
|
pool = Concurrent::ThreadPoolExecutor.new(
|
26
|
-
min_threads: 4,
|
26
|
+
min_threads: [Concurrent.processor_count, 4].min,
|
27
27
|
max_threads: Concurrent.processor_count
|
28
28
|
)
|
29
29
|
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bugsnag_sourcemap_uploader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bernardo Chaves
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.2.10
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.2.10
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: minitest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -42,42 +42,42 @@ dependencies:
|
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '13.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '13.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: concurrent-ruby
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 1.1.4
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 1.1.4
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: httparty
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 0.17.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 0.17.0
|
83
83
|
description:
|
@@ -87,6 +87,7 @@ executables: []
|
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
|
+
- ".github/workflows/ci.yml"
|
90
91
|
- ".gitignore"
|
91
92
|
- ".rubocop.yml"
|
92
93
|
- ".travis.yml"
|
@@ -117,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
117
118
|
requirements:
|
118
119
|
- - ">="
|
119
120
|
- !ruby/object:Gem::Version
|
120
|
-
version:
|
121
|
+
version: 2.6.0
|
121
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
123
|
requirements:
|
123
124
|
- - ">="
|