pwwka 0.23.RC1 → 0.23.0.RC2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 312eaa13f1a4ba429bd2ab95c9c95713e7f95a8436870a268eb889824fde311a
4
- data.tar.gz: '008f9726a92efe538913689cd0b761e09bae1b5d967bf6c521db86a4527a7bb8'
3
+ metadata.gz: 1566e5fcf144982ced4cbb8cd68a2018095fb15b7f3c2f2035efafbff5b6c6de
4
+ data.tar.gz: abb34f5e6fd3e568ece3f45b3d32d270f4f48ae27a559114ebc7aacf2cf4e591
5
5
  SHA512:
6
- metadata.gz: 38b032c92ccbb1fbb216bb42b53c45f6679426426a2c2813a3d8c1af9e20da851da69ce2b1ca0ce2e90774d6ddcbf4023dbc0667a2c211e51d20b03941dc5ccb
7
- data.tar.gz: 53513f852876b8ce83fb101018205d8dd74dd150d0b61f6dc69fdb91c35cf6a3f5a280e7b890261f1e063220adab1b7ee70a78bce3211d53d7955dce45448f89
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
- ruby-2.6.1-rails-5.2:
6
+ release:
7
7
  docker:
8
- - image: circleci/ruby:2.6.1
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-5.2
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: 'bundle exec y-notify #eng-platform'
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.3-rails-5.2:
44
+ ruby-2.5.6-rails-6.0:
30
45
  docker:
31
- - image: circleci/ruby:2.5.3
46
+ - image: circleci/ruby:2.5.6
32
47
  environment:
33
- BUNDLE_GEMFILE: Gemfile.rails-5.2
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: 'bundle exec y-notify #eng-platform'
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.1-rails-5.1:
68
+ ruby-2.6.4-rails-5.2:
53
69
  docker:
54
- - image: circleci/ruby:2.6.1
70
+ - image: circleci/ruby:2.6.4
55
71
  environment:
56
- BUNDLE_GEMFILE: Gemfile.rails-5.1
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: 'bundle exec y-notify #eng-platform'
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.3-rails-5.1:
92
+ ruby-2.5.6-rails-5.2:
76
93
  docker:
77
- - image: circleci/ruby:2.5.3
94
+ - image: circleci/ruby:2.5.6
78
95
  environment:
79
- BUNDLE_GEMFILE: Gemfile.rails-5.1
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: 'bundle exec y-notify #eng-platform'
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
- - ruby-2.6.1-rails-5.2:
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
- - ruby-2.5.3-rails-5.2:
134
+ filters:
135
+ tags:
136
+ only: &1 /.*/
137
+ - ruby-2.5.6-rails-6.0:
105
138
  context: org-global
106
- - ruby-2.6.1-rails-5.1:
139
+ filters:
140
+ tags:
141
+ only: *1
142
+ - ruby-2.6.4-rails-5.2:
107
143
  context: org-global
108
- - ruby-2.5.3-rails-5.1:
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.1-rails-5.2:
161
+ - ruby-2.6.4-rails-6.0:
120
162
  context: org-global
121
- - ruby-2.5.3-rails-5.2:
163
+ - ruby-2.5.6-rails-6.0:
122
164
  context: org-global
123
- - ruby-2.6.1-rails-5.1:
165
+ - ruby-2.6.4-rails-5.2:
124
166
  context: org-global
125
- - ruby-2.5.3-rails-5.1:
167
+ - ruby-2.5.6-rails-5.2:
126
168
  context: org-global
data/Gemfile.rails-5.1 CHANGED
@@ -1,7 +1,6 @@
1
1
  # DO NOT MODIFY - this is managed by Git Reduce in goro
2
2
  #
3
- source 'https://gem.fury.io/me/'
4
- source 'https://www.rubygems.org'
3
+ source 'https://stitchfix01.jfrog.io/stitchfix01/api/gems/eng-gems/'
5
4
 
6
5
  gemspec
7
6
 
data/Gemfile.rails-5.2 CHANGED
@@ -1,7 +1,6 @@
1
1
  # DO NOT MODIFY - this is managed by Git Reduce in goro
2
2
  #
3
- source 'https://gem.fury.io/me/'
4
- source 'https://www.rubygems.org'
3
+ source 'https://stitchfix01.jfrog.io/stitchfix01/api/gems/eng-gems/'
5
4
 
6
5
  gemspec
7
6
 
data/Gemfile.rails-6.0 ADDED
@@ -0,0 +1,7 @@
1
+ # DO NOT MODIFY - this is managed by Git Reduce in goro
2
+ #
3
+ source 'https://stitchfix01.jfrog.io/stitchfix01/api/gems/eng-gems/'
4
+
5
+ gemspec
6
+
7
+ gem 'activesupport', '~> 6.0.0'
@@ -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
- Rails.application.class.parent.name
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
@@ -1,4 +1,3 @@
1
1
  module Pwwka
2
- VERSION = '0.23.RC1'
2
+ VERSION = '0.23.0.RC2'
3
3
  end
4
-
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.RC1
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-04-25 00:00:00.000000000 Z
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: '0'
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: '0'
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