paperweight 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/push.yml +46 -0
- data/.mergify.yml +12 -0
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +6 -1
- data/CODE_OF_CONDUCT.md +76 -0
- data/Gemfile.lock +95 -83
- data/LICENSE +1 -1
- data/README.md +1 -0
- data/lib/paperweight.rb +14 -1
- data/lib/paperweight/download.rb +1 -0
- data/lib/paperweight/version.rb +1 -1
- data/paperweight.gemspec +4 -4
- metadata +13 -11
- data/.github/main.workflow +0 -46
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8025ecc42ba57adc7a271c3521acba3bd43436b904eb05f05d8f625ba5f0a447
|
|
4
|
+
data.tar.gz: 464425c2b49a307e519cb5160dc63a70cfc33efdc9cf19b694f781167244bffb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9b2f6b7daed821d1b45c33f0583f7e97855d96ad73979c9f0fa49d1daeb1d513aa56ec25fe7202de399afc8ef025e279f465f87b05b478271280b4a7ae088c56
|
|
7
|
+
data.tar.gz: '08b9b991753941ab94659c8c8bebd96d46bf15aa8ad7233f01f6a7471f62698318a5879c2b063fc861f8273896b219b2df52345cb88869bd9c863267a17cadda'
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
on: push
|
|
2
|
+
name: Push
|
|
3
|
+
jobs:
|
|
4
|
+
test:
|
|
5
|
+
name: Test
|
|
6
|
+
runs-on: ubuntu-latest
|
|
7
|
+
steps:
|
|
8
|
+
- uses: actions/checkout@master
|
|
9
|
+
- name: Install
|
|
10
|
+
uses: docker://culturehq/actions-bundler:latest
|
|
11
|
+
with:
|
|
12
|
+
args: install
|
|
13
|
+
- name: Test
|
|
14
|
+
uses: docker://culturehq/actions-bundler:latest
|
|
15
|
+
with:
|
|
16
|
+
args: exec rake test
|
|
17
|
+
lint:
|
|
18
|
+
name: Lint
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@master
|
|
22
|
+
- name: Install
|
|
23
|
+
uses: docker://culturehq/actions-bundler:latest
|
|
24
|
+
with:
|
|
25
|
+
args: install
|
|
26
|
+
- name: Lint
|
|
27
|
+
uses: docker://culturehq/actions-bundler:latest
|
|
28
|
+
with:
|
|
29
|
+
args: exec rubocop --parallel
|
|
30
|
+
audit:
|
|
31
|
+
name: Audit
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@master
|
|
35
|
+
- name: Install
|
|
36
|
+
uses: docker://culturehq/actions-bundler:latest
|
|
37
|
+
with:
|
|
38
|
+
args: install
|
|
39
|
+
- name: Update
|
|
40
|
+
uses: docker://culturehq/actions-bundler:latest
|
|
41
|
+
with:
|
|
42
|
+
args: exec bundle audit --update
|
|
43
|
+
- name: Audit
|
|
44
|
+
uses: docker://culturehq/actions-bundler:latest
|
|
45
|
+
with:
|
|
46
|
+
args: exec bundle audit
|
data/.mergify.yml
ADDED
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.2.1] - 2019-12-31
|
|
10
|
+
### Changed
|
|
11
|
+
- Fix up Ruby 2.7 warnings.
|
|
12
|
+
|
|
9
13
|
## [1.2.0] - 2019-02-27
|
|
10
14
|
### Added
|
|
11
15
|
- Support a `download_attempts` configuration option for retrying the download. Currently defaults to 1 to maintain backwards compatability.
|
|
@@ -31,7 +35,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
|
31
35
|
### Added
|
|
32
36
|
- The ability to configure the `max_size` value (the maximum download size) using the `Paperweight.configure` method.
|
|
33
37
|
|
|
34
|
-
[
|
|
38
|
+
[unreleased]: https://github.com/CultureHQ/paperweight/compare/v1.2.1...HEAD
|
|
39
|
+
[1.2.1]: https://github.com/CultureHQ/paperweight/compare/v1.2.0...v1.2.1
|
|
35
40
|
[1.2.0]: https://github.com/CultureHQ/paperweight/compare/v1.1.0...v1.2.0
|
|
36
41
|
[1.1.0]: https://github.com/CultureHQ/paperweight/compare/v1.0.2...v1.1.0
|
|
37
42
|
[1.0.2]: https://github.com/CultureHQ/paperweight/compare/v1.0.1...v1.0.2
|
data/CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
|
9
|
+
level of experience, education, socio-economic status, nationality, personal
|
|
10
|
+
appearance, race, religion, or sexual identity and orientation.
|
|
11
|
+
|
|
12
|
+
## Our Standards
|
|
13
|
+
|
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
|
15
|
+
include:
|
|
16
|
+
|
|
17
|
+
- Using welcoming and inclusive language
|
|
18
|
+
- Being respectful of differing viewpoints and experiences
|
|
19
|
+
- Gracefully accepting constructive criticism
|
|
20
|
+
- Focusing on what is best for the community
|
|
21
|
+
- Showing empathy towards other community members
|
|
22
|
+
|
|
23
|
+
Examples of unacceptable behavior by participants include:
|
|
24
|
+
|
|
25
|
+
- The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
+
advances
|
|
27
|
+
- Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
+
- Public or private harassment
|
|
29
|
+
- Publishing others' private information, such as a physical or electronic
|
|
30
|
+
address, without explicit permission
|
|
31
|
+
- Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
+
professional setting
|
|
33
|
+
|
|
34
|
+
## Our Responsibilities
|
|
35
|
+
|
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
|
38
|
+
response to any instances of unacceptable behavior.
|
|
39
|
+
|
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
|
44
|
+
threatening, offensive, or harmful.
|
|
45
|
+
|
|
46
|
+
## Scope
|
|
47
|
+
|
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
|
49
|
+
when an individual is representing the project or its community. Examples of
|
|
50
|
+
representing a project or community include using an official project e-mail
|
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
|
53
|
+
further defined and clarified by project maintainers.
|
|
54
|
+
|
|
55
|
+
## Enforcement
|
|
56
|
+
|
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
+
reported by contacting the project team at support@culturehq.com. All
|
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
|
63
|
+
|
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
|
66
|
+
members of the project's leadership.
|
|
67
|
+
|
|
68
|
+
## Attribution
|
|
69
|
+
|
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
71
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
|
72
|
+
|
|
73
|
+
[homepage]: https://www.contributor-covenant.org
|
|
74
|
+
|
|
75
|
+
For answers to common questions about this code of conduct, see
|
|
76
|
+
https://www.contributor-covenant.org/faq
|
data/Gemfile.lock
CHANGED
|
@@ -1,72 +1,85 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
paperweight (1.2.
|
|
4
|
+
paperweight (1.2.1)
|
|
5
5
|
paperclip (>= 5)
|
|
6
6
|
rails (>= 5)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
actioncable (
|
|
12
|
-
actionpack (=
|
|
11
|
+
actioncable (6.0.2.1)
|
|
12
|
+
actionpack (= 6.0.2.1)
|
|
13
13
|
nio4r (~> 2.0)
|
|
14
14
|
websocket-driver (>= 0.6.1)
|
|
15
|
-
|
|
16
|
-
actionpack (=
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
actionmailbox (6.0.2.1)
|
|
16
|
+
actionpack (= 6.0.2.1)
|
|
17
|
+
activejob (= 6.0.2.1)
|
|
18
|
+
activerecord (= 6.0.2.1)
|
|
19
|
+
activestorage (= 6.0.2.1)
|
|
20
|
+
activesupport (= 6.0.2.1)
|
|
21
|
+
mail (>= 2.7.1)
|
|
22
|
+
actionmailer (6.0.2.1)
|
|
23
|
+
actionpack (= 6.0.2.1)
|
|
24
|
+
actionview (= 6.0.2.1)
|
|
25
|
+
activejob (= 6.0.2.1)
|
|
19
26
|
mail (~> 2.5, >= 2.5.4)
|
|
20
27
|
rails-dom-testing (~> 2.0)
|
|
21
|
-
actionpack (
|
|
22
|
-
actionview (=
|
|
23
|
-
activesupport (=
|
|
24
|
-
rack (~> 2.0)
|
|
28
|
+
actionpack (6.0.2.1)
|
|
29
|
+
actionview (= 6.0.2.1)
|
|
30
|
+
activesupport (= 6.0.2.1)
|
|
31
|
+
rack (~> 2.0, >= 2.0.8)
|
|
25
32
|
rack-test (>= 0.6.3)
|
|
26
33
|
rails-dom-testing (~> 2.0)
|
|
27
|
-
rails-html-sanitizer (~> 1.0, >= 1.0
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
35
|
+
actiontext (6.0.2.1)
|
|
36
|
+
actionpack (= 6.0.2.1)
|
|
37
|
+
activerecord (= 6.0.2.1)
|
|
38
|
+
activestorage (= 6.0.2.1)
|
|
39
|
+
activesupport (= 6.0.2.1)
|
|
40
|
+
nokogiri (>= 1.8.5)
|
|
41
|
+
actionview (6.0.2.1)
|
|
42
|
+
activesupport (= 6.0.2.1)
|
|
30
43
|
builder (~> 3.1)
|
|
31
44
|
erubi (~> 1.4)
|
|
32
45
|
rails-dom-testing (~> 2.0)
|
|
33
|
-
rails-html-sanitizer (~> 1.
|
|
34
|
-
activejob (
|
|
35
|
-
activesupport (=
|
|
46
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
|
47
|
+
activejob (6.0.2.1)
|
|
48
|
+
activesupport (= 6.0.2.1)
|
|
36
49
|
globalid (>= 0.3.6)
|
|
37
|
-
activemodel (
|
|
38
|
-
activesupport (=
|
|
39
|
-
activerecord (
|
|
40
|
-
activemodel (=
|
|
41
|
-
activesupport (=
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
activerecord (=
|
|
50
|
+
activemodel (6.0.2.1)
|
|
51
|
+
activesupport (= 6.0.2.1)
|
|
52
|
+
activerecord (6.0.2.1)
|
|
53
|
+
activemodel (= 6.0.2.1)
|
|
54
|
+
activesupport (= 6.0.2.1)
|
|
55
|
+
activestorage (6.0.2.1)
|
|
56
|
+
actionpack (= 6.0.2.1)
|
|
57
|
+
activejob (= 6.0.2.1)
|
|
58
|
+
activerecord (= 6.0.2.1)
|
|
46
59
|
marcel (~> 0.3.1)
|
|
47
|
-
activesupport (
|
|
60
|
+
activesupport (6.0.2.1)
|
|
48
61
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
49
62
|
i18n (>= 0.7, < 2)
|
|
50
63
|
minitest (~> 5.1)
|
|
51
64
|
tzinfo (~> 1.1)
|
|
52
|
-
|
|
65
|
+
zeitwerk (~> 2.2)
|
|
53
66
|
ast (2.4.0)
|
|
54
|
-
builder (3.2.
|
|
67
|
+
builder (3.2.4)
|
|
55
68
|
bundler-audit (0.6.1)
|
|
56
69
|
bundler (>= 1.2.0, < 3)
|
|
57
70
|
thor (~> 0.18)
|
|
58
71
|
climate_control (0.2.0)
|
|
59
|
-
concurrent-ruby (1.1.
|
|
60
|
-
crass (1.0.
|
|
61
|
-
docile (1.3.
|
|
62
|
-
erubi (1.
|
|
72
|
+
concurrent-ruby (1.1.5)
|
|
73
|
+
crass (1.0.5)
|
|
74
|
+
docile (1.3.2)
|
|
75
|
+
erubi (1.9.0)
|
|
63
76
|
globalid (0.4.2)
|
|
64
77
|
activesupport (>= 4.2.0)
|
|
65
|
-
i18n (1.
|
|
78
|
+
i18n (1.7.0)
|
|
66
79
|
concurrent-ruby (~> 1.0)
|
|
67
|
-
jaro_winkler (1.5.
|
|
68
|
-
json (2.
|
|
69
|
-
loofah (2.
|
|
80
|
+
jaro_winkler (1.5.4)
|
|
81
|
+
json (2.2.0)
|
|
82
|
+
loofah (2.4.0)
|
|
70
83
|
crass (~> 1.0.2)
|
|
71
84
|
nokogiri (>= 1.5.9)
|
|
72
85
|
mail (2.7.1)
|
|
@@ -74,15 +87,15 @@ GEM
|
|
|
74
87
|
marcel (0.3.3)
|
|
75
88
|
mimemagic (~> 0.3.2)
|
|
76
89
|
method_source (0.9.2)
|
|
77
|
-
mime-types (3.
|
|
90
|
+
mime-types (3.3.1)
|
|
78
91
|
mime-types-data (~> 3.2015)
|
|
79
|
-
mime-types-data (3.
|
|
92
|
+
mime-types-data (3.2019.1009)
|
|
80
93
|
mimemagic (0.3.3)
|
|
81
|
-
mini_mime (1.0.
|
|
94
|
+
mini_mime (1.0.2)
|
|
82
95
|
mini_portile2 (2.4.0)
|
|
83
|
-
minitest (5.
|
|
84
|
-
nio4r (2.
|
|
85
|
-
nokogiri (1.10.
|
|
96
|
+
minitest (5.13.0)
|
|
97
|
+
nio4r (2.5.2)
|
|
98
|
+
nokogiri (1.10.7)
|
|
86
99
|
mini_portile2 (~> 2.4.0)
|
|
87
100
|
paperclip (6.1.0)
|
|
88
101
|
activemodel (>= 4.2.0)
|
|
@@ -90,73 +103,72 @@ GEM
|
|
|
90
103
|
mime-types
|
|
91
104
|
mimemagic (~> 0.3.0)
|
|
92
105
|
terrapin (~> 0.6.0)
|
|
93
|
-
parallel (1.
|
|
94
|
-
parser (2.6.
|
|
106
|
+
parallel (1.19.1)
|
|
107
|
+
parser (2.6.5.0)
|
|
95
108
|
ast (~> 2.4.0)
|
|
96
|
-
|
|
97
|
-
psych (3.1.0)
|
|
98
|
-
rack (2.0.6)
|
|
109
|
+
rack (2.0.8)
|
|
99
110
|
rack-test (1.1.0)
|
|
100
111
|
rack (>= 1.0, < 3)
|
|
101
|
-
rails (
|
|
102
|
-
actioncable (=
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
112
|
+
rails (6.0.2.1)
|
|
113
|
+
actioncable (= 6.0.2.1)
|
|
114
|
+
actionmailbox (= 6.0.2.1)
|
|
115
|
+
actionmailer (= 6.0.2.1)
|
|
116
|
+
actionpack (= 6.0.2.1)
|
|
117
|
+
actiontext (= 6.0.2.1)
|
|
118
|
+
actionview (= 6.0.2.1)
|
|
119
|
+
activejob (= 6.0.2.1)
|
|
120
|
+
activemodel (= 6.0.2.1)
|
|
121
|
+
activerecord (= 6.0.2.1)
|
|
122
|
+
activestorage (= 6.0.2.1)
|
|
123
|
+
activesupport (= 6.0.2.1)
|
|
111
124
|
bundler (>= 1.3.0)
|
|
112
|
-
railties (=
|
|
125
|
+
railties (= 6.0.2.1)
|
|
113
126
|
sprockets-rails (>= 2.0.0)
|
|
114
127
|
rails-dom-testing (2.0.3)
|
|
115
128
|
activesupport (>= 4.2.0)
|
|
116
129
|
nokogiri (>= 1.6)
|
|
117
|
-
rails-html-sanitizer (1.0
|
|
118
|
-
loofah (~> 2.
|
|
119
|
-
railties (
|
|
120
|
-
actionpack (=
|
|
121
|
-
activesupport (=
|
|
130
|
+
rails-html-sanitizer (1.3.0)
|
|
131
|
+
loofah (~> 2.3)
|
|
132
|
+
railties (6.0.2.1)
|
|
133
|
+
actionpack (= 6.0.2.1)
|
|
134
|
+
activesupport (= 6.0.2.1)
|
|
122
135
|
method_source
|
|
123
136
|
rake (>= 0.8.7)
|
|
124
|
-
thor (>= 0.
|
|
137
|
+
thor (>= 0.20.3, < 2.0)
|
|
125
138
|
rainbow (3.0.0)
|
|
126
|
-
rake (
|
|
127
|
-
rubocop (0.
|
|
139
|
+
rake (13.0.1)
|
|
140
|
+
rubocop (0.78.0)
|
|
128
141
|
jaro_winkler (~> 1.5.1)
|
|
129
142
|
parallel (~> 1.10)
|
|
130
|
-
parser (>= 2.
|
|
131
|
-
powerpack (~> 0.1)
|
|
132
|
-
psych (>= 3.1.0)
|
|
143
|
+
parser (>= 2.6)
|
|
133
144
|
rainbow (>= 2.2.2, < 4.0)
|
|
134
145
|
ruby-progressbar (~> 1.7)
|
|
135
|
-
unicode-display_width (
|
|
136
|
-
ruby-progressbar (1.10.
|
|
137
|
-
simplecov (0.
|
|
146
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
|
147
|
+
ruby-progressbar (1.10.1)
|
|
148
|
+
simplecov (0.17.1)
|
|
138
149
|
docile (~> 1.1)
|
|
139
150
|
json (>= 1.8, < 3)
|
|
140
151
|
simplecov-html (~> 0.10.0)
|
|
141
152
|
simplecov-html (0.10.2)
|
|
142
|
-
sprockets (
|
|
153
|
+
sprockets (4.0.0)
|
|
143
154
|
concurrent-ruby (~> 1.0)
|
|
144
155
|
rack (> 1, < 3)
|
|
145
156
|
sprockets-rails (3.2.1)
|
|
146
157
|
actionpack (>= 4.0)
|
|
147
158
|
activesupport (>= 4.0)
|
|
148
159
|
sprockets (>= 3.0.0)
|
|
149
|
-
sqlite3 (1.
|
|
160
|
+
sqlite3 (1.4.2)
|
|
150
161
|
terrapin (0.6.0)
|
|
151
162
|
climate_control (>= 0.0.3, < 1.0)
|
|
152
163
|
thor (0.20.3)
|
|
153
164
|
thread_safe (0.3.6)
|
|
154
|
-
tzinfo (1.2.
|
|
165
|
+
tzinfo (1.2.6)
|
|
155
166
|
thread_safe (~> 0.1)
|
|
156
|
-
unicode-display_width (1.
|
|
157
|
-
websocket-driver (0.7.
|
|
167
|
+
unicode-display_width (1.6.0)
|
|
168
|
+
websocket-driver (0.7.1)
|
|
158
169
|
websocket-extensions (>= 0.1.0)
|
|
159
|
-
websocket-extensions (0.1.
|
|
170
|
+
websocket-extensions (0.1.4)
|
|
171
|
+
zeitwerk (2.2.2)
|
|
160
172
|
|
|
161
173
|
PLATFORMS
|
|
162
174
|
ruby
|
|
@@ -166,10 +178,10 @@ DEPENDENCIES
|
|
|
166
178
|
bundler-audit (~> 0.6)
|
|
167
179
|
minitest (~> 5.11)
|
|
168
180
|
paperweight!
|
|
169
|
-
rake (~>
|
|
170
|
-
rubocop (~> 0.
|
|
181
|
+
rake (~> 13.0)
|
|
182
|
+
rubocop (~> 0.71)
|
|
171
183
|
simplecov (~> 0.16)
|
|
172
|
-
sqlite3 (= 1.
|
|
184
|
+
sqlite3 (= 1.4.2)
|
|
173
185
|
|
|
174
186
|
BUNDLED WITH
|
|
175
|
-
2.
|
|
187
|
+
2.1.2
|
data/LICENSE
CHANGED
data/README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# Paperweight
|
|
2
2
|
|
|
3
|
+
[](https://github.com/CultureHQ/paperweight/actions)
|
|
3
4
|
[](https://github.com/CultureHQ/paperweight)
|
|
4
5
|
|
|
5
6
|
Handles `Paperclip` attachments on the backend in a delayed process.
|
data/lib/paperweight.rb
CHANGED
|
@@ -3,8 +3,21 @@
|
|
|
3
3
|
require 'open-uri'
|
|
4
4
|
require 'net/http'
|
|
5
5
|
require 'paperclip'
|
|
6
|
-
require '
|
|
6
|
+
require 'uri'
|
|
7
|
+
|
|
8
|
+
module Paperclip
|
|
9
|
+
class UrlGenerator
|
|
10
|
+
# We're overriding this module inside of UrlGenerator in order to get rid
|
|
11
|
+
# of the warning that came in in Ruby 2.7.
|
|
12
|
+
module URI
|
|
13
|
+
def self.escape(url)
|
|
14
|
+
::URI::DEFAULT_PARSER.escape(url)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
7
19
|
|
|
20
|
+
require 'rails'
|
|
8
21
|
require 'active_job'
|
|
9
22
|
|
|
10
23
|
require 'paperweight/attachment_name'
|
data/lib/paperweight/download.rb
CHANGED
|
@@ -7,6 +7,7 @@ module Paperweight
|
|
|
7
7
|
|
|
8
8
|
DOWNLOAD_ERRORS = [
|
|
9
9
|
Errno::ECONNREFUSED, # invalid url
|
|
10
|
+
Errno::EADDRNOTAVAIL, # cannot connect
|
|
10
11
|
SocketError, # domain not found
|
|
11
12
|
OpenURI::HTTPError, # response status 4xx or 5xx
|
|
12
13
|
RuntimeError, # redirection errors (e.g. redirection loop)
|
data/lib/paperweight/version.rb
CHANGED
data/paperweight.gemspec
CHANGED
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
|
10
10
|
spec.authors = ['Kevin Deisz']
|
|
11
11
|
spec.email = ['kevin.deisz@gmail.com']
|
|
12
12
|
|
|
13
|
-
spec.summary = '
|
|
13
|
+
spec.summary = 'Handles Paperclip attachments in the background'
|
|
14
14
|
spec.homepage = 'https://github.com/CultureHQ/paperweight'
|
|
15
15
|
spec.license = 'MIT'
|
|
16
16
|
|
|
@@ -27,8 +27,8 @@ Gem::Specification.new do |spec|
|
|
|
27
27
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
|
28
28
|
spec.add_development_dependency 'bundler-audit', '~> 0.6'
|
|
29
29
|
spec.add_development_dependency 'minitest', '~> 5.11'
|
|
30
|
-
spec.add_development_dependency 'rake', '~>
|
|
31
|
-
spec.add_development_dependency 'rubocop', '~> 0.
|
|
30
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
|
31
|
+
spec.add_development_dependency 'rubocop', '~> 0.71'
|
|
32
32
|
spec.add_development_dependency 'simplecov', '~> 0.16'
|
|
33
|
-
spec.add_development_dependency 'sqlite3', '= 1.
|
|
33
|
+
spec.add_development_dependency 'sqlite3', '= 1.4.2'
|
|
34
34
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: paperweight
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kevin Deisz
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-12-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: paperclip
|
|
@@ -86,28 +86,28 @@ dependencies:
|
|
|
86
86
|
requirements:
|
|
87
87
|
- - "~>"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: '
|
|
89
|
+
version: '13.0'
|
|
90
90
|
type: :development
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: '
|
|
96
|
+
version: '13.0'
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
98
|
name: rubocop
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
101
|
- - "~>"
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '0.
|
|
103
|
+
version: '0.71'
|
|
104
104
|
type: :development
|
|
105
105
|
prerelease: false
|
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
107
|
requirements:
|
|
108
108
|
- - "~>"
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: '0.
|
|
110
|
+
version: '0.71'
|
|
111
111
|
- !ruby/object:Gem::Dependency
|
|
112
112
|
name: simplecov
|
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -128,14 +128,14 @@ dependencies:
|
|
|
128
128
|
requirements:
|
|
129
129
|
- - '='
|
|
130
130
|
- !ruby/object:Gem::Version
|
|
131
|
-
version: 1.
|
|
131
|
+
version: 1.4.2
|
|
132
132
|
type: :development
|
|
133
133
|
prerelease: false
|
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
|
135
135
|
requirements:
|
|
136
136
|
- - '='
|
|
137
137
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: 1.
|
|
138
|
+
version: 1.4.2
|
|
139
139
|
description:
|
|
140
140
|
email:
|
|
141
141
|
- kevin.deisz@gmail.com
|
|
@@ -143,10 +143,12 @@ executables: []
|
|
|
143
143
|
extensions: []
|
|
144
144
|
extra_rdoc_files: []
|
|
145
145
|
files:
|
|
146
|
-
- ".github/
|
|
146
|
+
- ".github/workflows/push.yml"
|
|
147
147
|
- ".gitignore"
|
|
148
|
+
- ".mergify.yml"
|
|
148
149
|
- ".rubocop.yml"
|
|
149
150
|
- CHANGELOG.md
|
|
151
|
+
- CODE_OF_CONDUCT.md
|
|
150
152
|
- Gemfile
|
|
151
153
|
- Gemfile.lock
|
|
152
154
|
- LICENSE
|
|
@@ -181,8 +183,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
181
183
|
- !ruby/object:Gem::Version
|
|
182
184
|
version: '0'
|
|
183
185
|
requirements: []
|
|
184
|
-
rubygems_version: 3.
|
|
186
|
+
rubygems_version: 3.1.2
|
|
185
187
|
signing_key:
|
|
186
188
|
specification_version: 4
|
|
187
|
-
summary:
|
|
189
|
+
summary: Handles Paperclip attachments in the background
|
|
188
190
|
test_files: []
|
data/.github/main.workflow
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
workflow "Main" {
|
|
2
|
-
on = "push"
|
|
3
|
-
resolves = "Publish"
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
action "Bundler" {
|
|
7
|
-
uses = "docker://culturehq/actions-bundler:latest"
|
|
8
|
-
runs = "gem install bundler"
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
action "Install" {
|
|
12
|
-
needs = "Bundler"
|
|
13
|
-
uses = "docker://culturehq/actions-bundler:latest"
|
|
14
|
-
args = "install"
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
action "Audit" {
|
|
18
|
-
needs = "Install"
|
|
19
|
-
uses = "docker://culturehq/actions-bundler:latest"
|
|
20
|
-
args = "exec bundle audit"
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
action "Lint" {
|
|
24
|
-
needs = "Install"
|
|
25
|
-
uses = "docker://culturehq/actions-bundler:latest"
|
|
26
|
-
args = "exec rubocop --parallel"
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
action "Test" {
|
|
30
|
-
needs = "Install"
|
|
31
|
-
uses = "docker://culturehq/actions-bundler:latest"
|
|
32
|
-
args = "exec rake test"
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
action "Tag" {
|
|
36
|
-
needs = ["Audit", "Lint", "Test"]
|
|
37
|
-
uses = "actions/bin/filter@master"
|
|
38
|
-
args = "tag"
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
action "Publish" {
|
|
42
|
-
needs = "Tag"
|
|
43
|
-
uses = "docker://culturehq/actions-bundler:latest"
|
|
44
|
-
args = "build release:rubygem_push"
|
|
45
|
-
secrets = ["BUNDLE_GEM__PUSH_KEY"]
|
|
46
|
-
}
|