pwwka 0.23.RC1 → 0.23.0.RC2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +66 -24
- data/Gemfile.rails-5.1 +1 -2
- data/Gemfile.rails-5.2 +1 -2
- data/Gemfile.rails-6.0 +7 -0
- data/lib/pwwka/configuration.rb +8 -3
- data/lib/pwwka/version.rb +1 -2
- data/pwwka.gemspec +1 -1
- data/spec/unit/configuration_spec.rb +5 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1566e5fcf144982ced4cbb8cd68a2018095fb15b7f3c2f2035efafbff5b6c6de
|
4
|
+
data.tar.gz: abb34f5e6fd3e568ece3f45b3d32d270f4f48ae27a559114ebc7aacf2cf4e591
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e72cc514ad6c61053f0032c9a7eecca722c4d5480a7d2263ea23bd28249c2a95c2bfc40989ad57403a56b86ba8e000eccb2561d8c40c18e4989f86894ee00a9f
|
7
|
+
data.tar.gz: fe191d94862d59e99eb99dc85d88f3e20b5db3dbc7b39075d37f250b4b8d5e0e6d4b6a2a807562c6fa4a6b491f5753c5d32bc1602f022f50cd33c583f223969e
|
data/.circleci/config.yml
CHANGED
@@ -3,16 +3,31 @@
|
|
3
3
|
---
|
4
4
|
version: 2
|
5
5
|
jobs:
|
6
|
-
|
6
|
+
release:
|
7
7
|
docker:
|
8
|
-
- image: circleci/ruby:2.6.
|
8
|
+
- image: circleci/ruby:2.6.4
|
9
|
+
steps:
|
10
|
+
- checkout
|
11
|
+
- run: bundle config stitchfix01.jfrog.io $ARTIFACTORY_USER:$ARTIFACTORY_TOKEN
|
12
|
+
- run: bundle install --full-index
|
13
|
+
- run:
|
14
|
+
name: Artifactory login
|
15
|
+
command: mkdir -p ~/.gem && curl -u$ARTIFACTORY_USER:$ARTIFACTORY_TOKEN https://stitchfix01.jfrog.io/stitchfix01/api/gems/eng-gems/api/v1/api_key.yaml
|
16
|
+
> ~/.gem/credentials && chmod 0600 ~/.gem/credentials
|
17
|
+
- run:
|
18
|
+
name: Build/release gem to artifactory
|
19
|
+
command: bundle exec rake push_artifactory
|
20
|
+
ruby-2.6.4-rails-6.0:
|
21
|
+
docker:
|
22
|
+
- image: circleci/ruby:2.6.4
|
9
23
|
environment:
|
10
|
-
BUNDLE_GEMFILE: Gemfile.rails-
|
24
|
+
BUNDLE_GEMFILE: Gemfile.rails-6.0
|
11
25
|
- image: redis:2.8.12
|
12
26
|
- image: rabbitmq:3.5.6
|
13
27
|
working_directory: "~/pwwka"
|
14
28
|
steps:
|
15
29
|
- checkout
|
30
|
+
- run: bundle config stitchfix01.jfrog.io $ARTIFACTORY_USER:$ARTIFACTORY_TOKEN
|
16
31
|
- run: bundle install --full-index
|
17
32
|
- run: bundle exec rspec --format RspecJunitFormatter --out /tmp/test-results/rspec.xml
|
18
33
|
--format=doc
|
@@ -22,20 +37,21 @@ jobs:
|
|
22
37
|
fi
|
23
38
|
- run:
|
24
39
|
name: Notify Pager Duty
|
25
|
-
command:
|
40
|
+
command: bundle exec y-notify "#eng-platform-alerts"
|
26
41
|
when: on_fail
|
27
42
|
- store_test_results:
|
28
43
|
path: "/tmp/test-results"
|
29
|
-
ruby-2.5.
|
44
|
+
ruby-2.5.6-rails-6.0:
|
30
45
|
docker:
|
31
|
-
- image: circleci/ruby:2.5.
|
46
|
+
- image: circleci/ruby:2.5.6
|
32
47
|
environment:
|
33
|
-
BUNDLE_GEMFILE: Gemfile.rails-
|
48
|
+
BUNDLE_GEMFILE: Gemfile.rails-6.0
|
34
49
|
- image: redis:2.8.12
|
35
50
|
- image: rabbitmq:3.5.6
|
36
51
|
working_directory: "~/pwwka"
|
37
52
|
steps:
|
38
53
|
- checkout
|
54
|
+
- run: bundle config stitchfix01.jfrog.io $ARTIFACTORY_USER:$ARTIFACTORY_TOKEN
|
39
55
|
- run: bundle install --full-index
|
40
56
|
- run: bundle exec rspec --format RspecJunitFormatter --out /tmp/test-results/rspec.xml
|
41
57
|
--format=doc
|
@@ -45,20 +61,21 @@ jobs:
|
|
45
61
|
fi
|
46
62
|
- run:
|
47
63
|
name: Notify Pager Duty
|
48
|
-
command:
|
64
|
+
command: bundle exec y-notify "#eng-platform-alerts"
|
49
65
|
when: on_fail
|
50
66
|
- store_test_results:
|
51
67
|
path: "/tmp/test-results"
|
52
|
-
ruby-2.6.
|
68
|
+
ruby-2.6.4-rails-5.2:
|
53
69
|
docker:
|
54
|
-
- image: circleci/ruby:2.6.
|
70
|
+
- image: circleci/ruby:2.6.4
|
55
71
|
environment:
|
56
|
-
BUNDLE_GEMFILE: Gemfile.rails-5.
|
72
|
+
BUNDLE_GEMFILE: Gemfile.rails-5.2
|
57
73
|
- image: redis:2.8.12
|
58
74
|
- image: rabbitmq:3.5.6
|
59
75
|
working_directory: "~/pwwka"
|
60
76
|
steps:
|
61
77
|
- checkout
|
78
|
+
- run: bundle config stitchfix01.jfrog.io $ARTIFACTORY_USER:$ARTIFACTORY_TOKEN
|
62
79
|
- run: bundle install --full-index
|
63
80
|
- run: bundle exec rspec --format RspecJunitFormatter --out /tmp/test-results/rspec.xml
|
64
81
|
--format=doc
|
@@ -68,20 +85,21 @@ jobs:
|
|
68
85
|
fi
|
69
86
|
- run:
|
70
87
|
name: Notify Pager Duty
|
71
|
-
command:
|
88
|
+
command: bundle exec y-notify "#eng-platform-alerts"
|
72
89
|
when: on_fail
|
73
90
|
- store_test_results:
|
74
91
|
path: "/tmp/test-results"
|
75
|
-
ruby-2.5.
|
92
|
+
ruby-2.5.6-rails-5.2:
|
76
93
|
docker:
|
77
|
-
- image: circleci/ruby:2.5.
|
94
|
+
- image: circleci/ruby:2.5.6
|
78
95
|
environment:
|
79
|
-
BUNDLE_GEMFILE: Gemfile.rails-5.
|
96
|
+
BUNDLE_GEMFILE: Gemfile.rails-5.2
|
80
97
|
- image: redis:2.8.12
|
81
98
|
- image: rabbitmq:3.5.6
|
82
99
|
working_directory: "~/pwwka"
|
83
100
|
steps:
|
84
101
|
- checkout
|
102
|
+
- run: bundle config stitchfix01.jfrog.io $ARTIFACTORY_USER:$ARTIFACTORY_TOKEN
|
85
103
|
- run: bundle install --full-index
|
86
104
|
- run: bundle exec rspec --format RspecJunitFormatter --out /tmp/test-results/rspec.xml
|
87
105
|
--format=doc
|
@@ -91,7 +109,7 @@ jobs:
|
|
91
109
|
fi
|
92
110
|
- run:
|
93
111
|
name: Notify Pager Duty
|
94
|
-
command:
|
112
|
+
command: bundle exec y-notify "#eng-platform-alerts"
|
95
113
|
when: on_fail
|
96
114
|
- store_test_results:
|
97
115
|
path: "/tmp/test-results"
|
@@ -99,14 +117,38 @@ workflows:
|
|
99
117
|
version: 2
|
100
118
|
on-commit:
|
101
119
|
jobs:
|
102
|
-
-
|
120
|
+
- release:
|
121
|
+
context: org-global
|
122
|
+
requires:
|
123
|
+
- ruby-2.6.4-rails-6.0
|
124
|
+
- ruby-2.5.6-rails-6.0
|
125
|
+
- ruby-2.6.4-rails-5.2
|
126
|
+
- ruby-2.5.6-rails-5.2
|
127
|
+
filters:
|
128
|
+
tags:
|
129
|
+
only: /^[0-9]+\.[0-9]+\.[0-9]+(\.?RC[-\.]?\d*)?$/
|
130
|
+
branches:
|
131
|
+
ignore: /.*/
|
132
|
+
- ruby-2.6.4-rails-6.0:
|
103
133
|
context: org-global
|
104
|
-
|
134
|
+
filters:
|
135
|
+
tags:
|
136
|
+
only: &1 /.*/
|
137
|
+
- ruby-2.5.6-rails-6.0:
|
105
138
|
context: org-global
|
106
|
-
|
139
|
+
filters:
|
140
|
+
tags:
|
141
|
+
only: *1
|
142
|
+
- ruby-2.6.4-rails-5.2:
|
107
143
|
context: org-global
|
108
|
-
|
144
|
+
filters:
|
145
|
+
tags:
|
146
|
+
only: *1
|
147
|
+
- ruby-2.5.6-rails-5.2:
|
109
148
|
context: org-global
|
149
|
+
filters:
|
150
|
+
tags:
|
151
|
+
only: *1
|
110
152
|
scheduled:
|
111
153
|
triggers:
|
112
154
|
- schedule:
|
@@ -116,11 +158,11 @@ workflows:
|
|
116
158
|
only:
|
117
159
|
- master
|
118
160
|
jobs:
|
119
|
-
- ruby-2.6.
|
161
|
+
- ruby-2.6.4-rails-6.0:
|
120
162
|
context: org-global
|
121
|
-
- ruby-2.5.
|
163
|
+
- ruby-2.5.6-rails-6.0:
|
122
164
|
context: org-global
|
123
|
-
- ruby-2.6.
|
165
|
+
- ruby-2.6.4-rails-5.2:
|
124
166
|
context: org-global
|
125
|
-
- ruby-2.5.
|
167
|
+
- ruby-2.5.6-rails-5.2:
|
126
168
|
context: org-global
|
data/Gemfile.rails-5.1
CHANGED
data/Gemfile.rails-5.2
CHANGED
data/Gemfile.rails-6.0
ADDED
data/lib/pwwka/configuration.rb
CHANGED
@@ -45,10 +45,15 @@ module Pwwka
|
|
45
45
|
def app_id
|
46
46
|
if @app_id.to_s.strip == ""
|
47
47
|
if defined?(Rails)
|
48
|
-
if Rails.respond_to?(:application)
|
49
|
-
|
48
|
+
if Rails.respond_to?(:application) && Rails.respond_to?(:version)
|
49
|
+
# Module#module_parent is the preferred technique, but we keep usage
|
50
|
+
# of the deprecated Module#parent for Rails 5 compatibility. see
|
51
|
+
# https://github.com/stitchfix/pwwka/issues/91 for context.
|
52
|
+
app_klass = Rails.application.class
|
53
|
+
app_parent = Rails.version =~ /^6/ ? app_klass.module_parent : app_klass.parent
|
54
|
+
app_parent.name
|
50
55
|
else
|
51
|
-
raise "'Rails' is defined, but it doesn't respond to #application, so could not derive the app_id; you must explicitly set it"
|
56
|
+
raise "'Rails' is defined, but it doesn't respond to #application or #version, so could not derive the app_id; you must explicitly set it"
|
52
57
|
end
|
53
58
|
else
|
54
59
|
raise "Could not derive the app_id; you must explicitly set it"
|
data/lib/pwwka/version.rb
CHANGED
data/pwwka.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.add_development_dependency("rake")
|
27
27
|
s.add_development_dependency("rspec")
|
28
28
|
s.add_development_dependency("resque")
|
29
|
-
s.add_development_dependency("resque-retry")
|
29
|
+
s.add_development_dependency("resque-retry", "~> 1.5.3")
|
30
30
|
s.add_development_dependency("sidekiq")
|
31
31
|
s.add_development_dependency("simplecov")
|
32
32
|
s.add_development_dependency("resqutils")
|
@@ -75,6 +75,10 @@ describe Pwwka::Configuration do
|
|
75
75
|
def self.application
|
76
76
|
MyAmazingApp::Application.new
|
77
77
|
end
|
78
|
+
|
79
|
+
def self.version
|
80
|
+
'5.2.0'
|
81
|
+
end
|
78
82
|
end
|
79
83
|
Object.const_set("Rails",rails)
|
80
84
|
end
|
@@ -97,7 +101,7 @@ describe Pwwka::Configuration do
|
|
97
101
|
it "blows up when not set" do
|
98
102
|
expect {
|
99
103
|
configuration.app_id
|
100
|
-
}.to raise_error(/'Rails' is defined, but it doesn't respond to #application, so could not derive the app_id; you must explicitly set it/)
|
104
|
+
}.to raise_error(/'Rails' is defined, but it doesn't respond to #application or #version, so could not derive the app_id; you must explicitly set it/)
|
101
105
|
end
|
102
106
|
end
|
103
107
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pwwka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.23.
|
4
|
+
version: 0.23.0.RC2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stitch Fix Engineering
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date: 2019-
|
18
|
+
date: 2019-12-16 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: bunny
|
@@ -119,16 +119,16 @@ dependencies:
|
|
119
119
|
name: resque-retry
|
120
120
|
requirement: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
124
|
+
version: 1.5.3
|
125
125
|
type: :development
|
126
126
|
prerelease: false
|
127
127
|
version_requirements: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - "
|
129
|
+
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: 1.5.3
|
132
132
|
- !ruby/object:Gem::Dependency
|
133
133
|
name: sidekiq
|
134
134
|
requirement: !ruby/object:Gem::Requirement
|
@@ -242,6 +242,7 @@ files:
|
|
242
242
|
- Gemfile.rails-5.0
|
243
243
|
- Gemfile.rails-5.1
|
244
244
|
- Gemfile.rails-5.2
|
245
|
+
- Gemfile.rails-6.0
|
245
246
|
- LICENSE
|
246
247
|
- README.md
|
247
248
|
- Rakefile
|