pwwka 0.22.5 → 0.22.6

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: 9ab97b0e8492d95d75e4279180b6a2e706ccbd14780bd2275cba1c537a2da738
4
- data.tar.gz: 4c25c451b221fdc09234d559b119804ad2bb56312e08ea449271439f2aafe99c
3
+ metadata.gz: 282868c5e4071c9ad47f0f4c553cf78ff177606af19105660fa25346645c1dce
4
+ data.tar.gz: b3d27d5902acbc6436cedbf901d6f80421a4b562dadee3bcb54e4786670c4485
5
5
  SHA512:
6
- metadata.gz: b44b4e00673f01df768d2d0e5dd98192cc81a27a050fd701f9c75f151917084650f997d6d434afd7d99e176e8a666091ee75b822517353443b4a43517c655a7d
7
- data.tar.gz: b1f323b80c62294bf52ff8407f57404081f0808c96dc2e9c591c107f1e111ada551b284afecb44c4a7486f52431916c772f4905972b51e920345c241a1b70571
6
+ metadata.gz: fc55c0a0ba5732e12673cdd88b2c094d670a9d96e55e37498ce0ab099974990983427674e8df2ae095580472d94ae300479bb276cd18713e1eabcb6b834661f2
7
+ data.tar.gz: fb8d23c0bc7e4f91798f25387c6384c5e36c5edb80a00c2b304ae17f2504ea4f008a3c9df0ee763f2c27fe997ae95b24293814e24d7179fcfc488f6810ffb481
@@ -3,16 +3,31 @@
3
3
  ---
4
4
  version: 2
5
5
  jobs:
6
- ruby-2.5.3-rails-5.2:
6
+ release:
7
7
  docker:
8
- - image: circleci/ruby:2.5.3
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.4.5-rails-5.2:
44
+ ruby-2.5.6-rails-6.0:
30
45
  docker:
31
- - image: circleci/ruby:2.4.5
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.5.3-rails-5.1:
68
+ ruby-2.6.4-rails-5.2:
53
69
  docker:
54
- - image: circleci/ruby:2.5.3
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.4.5-rails-5.1:
92
+ ruby-2.5.6-rails-5.2:
76
93
  docker:
77
- - image: circleci/ruby:2.4.5
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.5.3-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.4.5-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.5.3-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.4.5-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.5.3-rails-5.2:
161
+ - ruby-2.6.4-rails-6.0:
120
162
  context: org-global
121
- - ruby-2.4.5-rails-5.2:
163
+ - ruby-2.5.6-rails-6.0:
122
164
  context: org-global
123
- - ruby-2.5.3-rails-5.1:
165
+ - ruby-2.6.4-rails-5.2:
124
166
  context: org-global
125
- - ruby-2.4.5-rails-5.1:
167
+ - ruby-2.5.6-rails-5.2:
126
168
  context: org-global
@@ -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
 
@@ -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
 
@@ -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"
@@ -1,4 +1,4 @@
1
1
  module Pwwka
2
- VERSION = '0.22.5'
2
+ VERSION = '0.22.6'
3
3
  end
4
4
 
@@ -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.22.5
4
+ version: 0.22.6
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-01-16 00:00:00.000000000 Z
18
+ date: 2019-09-11 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
@@ -317,8 +318,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
317
318
  - !ruby/object:Gem::Version
318
319
  version: '0'
319
320
  requirements: []
320
- rubyforge_project:
321
- rubygems_version: 2.7.6
321
+ rubygems_version: 3.0.3
322
322
  signing_key:
323
323
  specification_version: 4
324
324
  summary: Send and receive messages via RabbitMQ