exceptional_synchrony 1.4.2 → 1.4.4

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: f2f574bdd917d5a7cab99f7844581ad87a86666f29678aa125aa68fdfb709d35
4
- data.tar.gz: 68d9c838bcf933a4edb2c51dd0701e36d24dd99a2faf5aa526ce038541b0163b
3
+ metadata.gz: 64473ec4185310154722e87211ea7c14db497e67d3f877a80b8fa260d0300453
4
+ data.tar.gz: 3f3c9d2a18c80120bde2264d515db9cf46d40e3177fc66ea5db15df65c4154f4
5
5
  SHA512:
6
- metadata.gz: 6b963e314d96e4e0ed269f6c532db13ae599a9f9478858a5087cea2cfc2fa85b011344cc4051da7ccdbb1a1142a627cb3c776a72c8cbacd4af99feede18a32e3
7
- data.tar.gz: 51316500edb4ce824d3c19df94c81e0f5f2411411110f70d80b9ac31447b46aaea61c0efb60034aaac7f9ab4f58c689f83060346952deaee7a8b96476f12fc85
6
+ metadata.gz: b63d62a1d09d4976caca3a3c8c5734a8567a97910970042262cab2c11b71b7aa512bc53294222ec47a1cd60b2335085b9137a1de256696f238613cc79c39ee45
7
+ data.tar.gz: 488170dc367327780a3e6ccd494c05df45f75cfd2b7f1d16a293046c4012b87b63f92bcc9097414b2026a7d002f0236710ad35a54f35dcc90d09f311fb198b64
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Pipeline
3
+ on: [push]
4
+ jobs:
5
+ tests:
6
+ name: Unit Tests
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ ruby: [2.6.5]
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - uses: ruby/setup-ruby@v1
15
+ with:
16
+ ruby-version: ${{ matrix.ruby }}
17
+ bundler: 1.17.3
18
+ bundler-cache: true
19
+ - name: Unit tests
20
+ run: bundle exec rake
data/CHANGELOG.md CHANGED
@@ -6,6 +6,14 @@ Note: This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0
6
6
 
7
7
  All notable changes to this project will be documented in this file.
8
8
 
9
+ ## [1.4.4] - 2022-03-25
10
+ ### Changed
11
+ - Default unused defer(context) argument to nil.
12
+
13
+ ## [1.4.3] - 2022-03-24
14
+ ### Changed
15
+ - Update exception_handling
16
+
9
17
  ## [1.4.2] - 2021-03-10
10
18
  ### Fixed
11
19
  - Additional symbol reference fixes in FaradayAdapterPatch_v1
@@ -37,6 +45,8 @@ All notable changes to this project will be documented in this file.
37
45
  ## [1.1.1] - 2020-05-03
38
46
  - Replace hobo_support with invoca_utils
39
47
 
48
+ [1.4.4]: https://github.com/Invoca/exceptional_synchrony/compare/v1.4.3...v1.4.4
49
+ [1.4.3]: https://github.com/Invoca/exceptional_synchrony/compare/v1.4.2...v1.4.3
40
50
  [1.4.2]: https://github.com/Invoca/exceptional_synchrony/compare/v1.4.1...v1.4.2
41
51
  [1.4.1]: https://github.com/Invoca/exceptional_synchrony/compare/v1.4.0...v1.4.1
42
52
  [1.4.0]: https://github.com/Invoca/exceptional_synchrony/compare/v1.3.0...v1.4.0
data/Gemfile.lock CHANGED
@@ -1,40 +1,40 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- exceptional_synchrony (1.4.2)
4
+ exceptional_synchrony (1.4.4)
5
5
  em-http-request
6
6
  em-synchrony
7
7
  eventmachine
8
- exception_handling (~> 2.2)
8
+ exception_handling (~> 2.10)
9
9
  invoca-utils (~> 0.3)
10
10
 
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- actionmailer (6.1.3)
15
- actionpack (= 6.1.3)
16
- actionview (= 6.1.3)
17
- activejob (= 6.1.3)
18
- activesupport (= 6.1.3)
14
+ actionmailer (6.1.5)
15
+ actionpack (= 6.1.5)
16
+ actionview (= 6.1.5)
17
+ activejob (= 6.1.5)
18
+ activesupport (= 6.1.5)
19
19
  mail (~> 2.5, >= 2.5.4)
20
20
  rails-dom-testing (~> 2.0)
21
- actionpack (6.1.3)
22
- actionview (= 6.1.3)
23
- activesupport (= 6.1.3)
21
+ actionpack (6.1.5)
22
+ actionview (= 6.1.5)
23
+ activesupport (= 6.1.5)
24
24
  rack (~> 2.0, >= 2.0.9)
25
25
  rack-test (>= 0.6.3)
26
26
  rails-dom-testing (~> 2.0)
27
27
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
28
- actionview (6.1.3)
29
- activesupport (= 6.1.3)
28
+ actionview (6.1.5)
29
+ activesupport (= 6.1.5)
30
30
  builder (~> 3.1)
31
31
  erubi (~> 1.4)
32
32
  rails-dom-testing (~> 2.0)
33
33
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
34
- activejob (6.1.3)
35
- activesupport (= 6.1.3)
34
+ activejob (6.1.5)
35
+ activesupport (= 6.1.5)
36
36
  globalid (>= 0.3.6)
37
- activesupport (6.1.3)
37
+ activesupport (6.1.5)
38
38
  concurrent-ruby (~> 1.0, >= 1.0.2)
39
39
  i18n (>= 1.6, < 2)
40
40
  minitest (>= 5.1)
@@ -45,7 +45,7 @@ GEM
45
45
  ansi (1.5.0)
46
46
  builder (3.2.4)
47
47
  coderay (1.1.2)
48
- concurrent-ruby (1.1.8)
48
+ concurrent-ruby (1.1.10)
49
49
  contextual_logger (0.11.0)
50
50
  activesupport
51
51
  json
@@ -66,51 +66,51 @@ GEM
66
66
  erubi (1.10.0)
67
67
  escalate (0.3.0)
68
68
  eventmachine (1.2.7)
69
- exception_handling (2.9.0)
69
+ exception_handling (2.10.0)
70
70
  actionmailer (>= 4.2, < 7.0)
71
71
  actionpack (>= 4.2, < 7.0)
72
72
  activesupport (>= 4.2, < 7.0)
73
73
  contextual_logger (~> 0.7)
74
- escalate (~> 0.2)
74
+ escalate (~> 0.3)
75
75
  eventmachine (~> 1.0)
76
76
  invoca-utils (~> 0.3)
77
- globalid (0.4.2)
78
- activesupport (>= 4.2.0)
77
+ globalid (1.0.0)
78
+ activesupport (>= 5.0)
79
79
  hashdiff (1.0.1)
80
- http_parser.rb (0.6.0)
81
- i18n (1.8.9)
80
+ http_parser.rb (0.8.0)
81
+ i18n (1.10.0)
82
82
  concurrent-ruby (~> 1.0)
83
83
  invoca-utils (0.4.1)
84
- json (2.5.1)
85
- loofah (2.9.0)
84
+ json (2.6.1)
85
+ loofah (2.15.0)
86
86
  crass (~> 1.0.2)
87
87
  nokogiri (>= 1.5.9)
88
88
  mail (2.7.1)
89
89
  mini_mime (>= 0.1.1)
90
90
  method_source (1.0.0)
91
- mini_mime (1.0.2)
92
- mini_portile2 (2.5.0)
93
- minitest (5.14.0)
91
+ mini_mime (1.1.2)
92
+ mini_portile2 (2.8.0)
93
+ minitest (5.15.0)
94
94
  minitest-reporters (1.4.2)
95
95
  ansi
96
96
  builder
97
97
  minitest (>= 5.0)
98
98
  ruby-progressbar
99
- nokogiri (1.11.1)
100
- mini_portile2 (~> 2.5.0)
99
+ nokogiri (1.13.3)
100
+ mini_portile2 (~> 2.8.0)
101
101
  racc (~> 1.4)
102
102
  pry (0.13.1)
103
103
  coderay (~> 1.1)
104
104
  method_source (~> 1.0)
105
105
  public_suffix (4.0.4)
106
- racc (1.5.2)
106
+ racc (1.6.0)
107
107
  rack (2.2.3)
108
108
  rack-test (1.1.0)
109
109
  rack (>= 1.0, < 3)
110
110
  rails-dom-testing (2.0.3)
111
111
  activesupport (>= 4.2.0)
112
112
  nokogiri (>= 1.6)
113
- rails-html-sanitizer (1.3.0)
113
+ rails-html-sanitizer (1.4.2)
114
114
  loofah (~> 2.3)
115
115
  rake (13.0.1)
116
116
  rr (1.2.1)
@@ -123,7 +123,7 @@ GEM
123
123
  addressable (>= 2.3.6)
124
124
  crack (>= 0.3.2)
125
125
  hashdiff
126
- zeitwerk (2.4.2)
126
+ zeitwerk (2.5.4)
127
127
 
128
128
  PLATFORMS
129
129
  ruby
@@ -19,6 +19,6 @@ Gem::Specification.new do |spec|
19
19
  spec.add_dependency 'em-synchrony'
20
20
  spec.add_dependency 'em-http-request'
21
21
  spec.add_dependency 'eventmachine'
22
- spec.add_dependency 'exception_handling', '~> 2.2'
22
+ spec.add_dependency 'exception_handling', '~> 2.10'
23
23
  spec.add_dependency 'invoca-utils', '~> 0.3'
24
24
  end
@@ -89,7 +89,7 @@ module ExceptionalSynchrony
89
89
  # This method will execute the block on the background thread pool
90
90
  # By default, it will block the caller until the background thread has finished, so that the result can be returned
91
91
  # :wait_for_result - setting this to false will prevent the caller from being blocked by this deferred work
92
- def defer(context, wait_for_result: true, &block)
92
+ def defer(_context = nil, wait_for_result: true, &block)
93
93
  if wait_for_result
94
94
  deferrable = EventMachine::DefaultDeferrable.new
95
95
  callback = -> (result) { deferrable.succeed(result) }
@@ -1,3 +1,3 @@
1
1
  module ExceptionalSynchrony
2
- VERSION = '1.4.2'
2
+ VERSION = '1.4.4'
3
3
  end
@@ -102,7 +102,7 @@ describe ExceptionalSynchrony::EventMachineProxy do
102
102
 
103
103
  it "should output its block's output when it doesn't raise an error, by default" do
104
104
  @em.run do
105
- assert_equal 12, @em.defer("#defer success") { 12 }
105
+ assert_equal 12, @em.defer { 12 }
106
106
  @em.stop
107
107
  end
108
108
  end
@@ -111,7 +111,7 @@ describe ExceptionalSynchrony::EventMachineProxy do
111
111
  @block_ran = false
112
112
 
113
113
  @em.run do
114
- assert_nil @em.defer("#defer success", wait_for_result: false) { @block_ran = true; 12 }
114
+ assert_nil @em.defer(wait_for_result: false) { @block_ran = true; 12 }
115
115
  refute @block_ran
116
116
  stop_em_after_defers_finish!(@em)
117
117
  end
@@ -123,7 +123,7 @@ describe ExceptionalSynchrony::EventMachineProxy do
123
123
  mock(ExceptionHandling).log_error(is_a(RuntimeError), "defer", {})
124
124
 
125
125
  @em.run do
126
- assert_nil @em.defer("#defer success", wait_for_result: false) { raise RuntimeError, "error in defer" }
126
+ assert_nil @em.defer(wait_for_result: false) { raise RuntimeError, "error in defer" }
127
127
  stop_em_after_defers_finish!(@em)
128
128
  end
129
129
  end
@@ -131,7 +131,7 @@ describe ExceptionalSynchrony::EventMachineProxy do
131
131
  it "should raise an error when its block raises an error" do
132
132
  @em.run do
133
133
  ex = assert_raises(ArgumentError) do
134
- @em.defer("#defer raising an error") { raise ArgumentError, "!!!" }
134
+ @em.defer { raise ArgumentError, "!!!" }
135
135
  end
136
136
 
137
137
  assert_equal "!!!", ex.message
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exceptional_synchrony
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Invoca
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2014-01-16 00:00:00.000000000 Z
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '2.2'
61
+ version: '2.10'
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
- version: '2.2'
68
+ version: '2.10'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: invoca-utils
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -87,9 +87,8 @@ extensions: []
87
87
  extra_rdoc_files: []
88
88
  files:
89
89
  - ".dependabot/config.yml"
90
+ - ".github/workflows/pipeline.yml"
90
91
  - ".gitignore"
91
- - ".jenkins/Jenkinsfile"
92
- - ".jenkins/ruby_build_pod.yml"
93
92
  - ".ruby-gemset"
94
93
  - ".ruby-version"
95
94
  - CHANGELOG.md
@@ -116,7 +115,7 @@ licenses:
116
115
  metadata:
117
116
  source_code_uri: https://github.com/Invoca/exceptional_synchrony
118
117
  allowed_push_host: https://rubygems.org
119
- post_install_message:
118
+ post_install_message:
120
119
  rdoc_options: []
121
120
  require_paths:
122
121
  - lib
@@ -132,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
131
  version: '0'
133
132
  requirements: []
134
133
  rubygems_version: 3.0.3
135
- signing_key:
134
+ signing_key:
136
135
  specification_version: 4
137
136
  summary: Extensions to EventMachine/Synchrony to work well with exceptions
138
137
  test_files: []
data/.jenkins/Jenkinsfile DELETED
@@ -1,58 +0,0 @@
1
- #!/usr/bin/groovy
2
- @Library('jenkins-pipeline@v0.4.5')
3
- import com.invoca.docker.*;
4
- pipeline {
5
- agent {
6
- kubernetes {
7
- defaultContainer "ruby"
8
- yamlFile ".jenkins/ruby_build_pod.yml"
9
- }
10
- }
11
-
12
- environment {
13
- GITHUB_TOKEN = credentials('github_token')
14
- GITHUB_KEY = credentials('github_key')
15
- BUNDLE_GEM__FURY__IO = credentials('gemfury_deploy_token')
16
- }
17
-
18
- stages {
19
- stage('Setup') {
20
- steps {
21
- updateGitHubStatus('clean-build', 'pending', 'Unit tests.')
22
- script {
23
- sh '''
24
- # get SSH setup inside the container
25
- eval `ssh-agent -s`
26
- echo "$GITHUB_KEY" | ssh-add -
27
- mkdir -p /root/.ssh
28
- ssh-keyscan -t rsa github.com > /root/.ssh/known_hosts
29
- bundle install
30
- ''' }
31
- }
32
- }
33
- stage('Unit Test') {
34
- steps {
35
- script {
36
- sh 'bundle exec rake'
37
- }
38
- }
39
- post {
40
- always { junit '*/reports/*.xml' }
41
- success { updateGitHubStatus('clean-build', 'success', 'Unit tests.') }
42
- failure { updateGitHubStatus('clean-build', 'failure', 'Unit tests.') }
43
- }
44
- }
45
- }
46
- }
47
-
48
- void updateGitHubStatus(String context, String status, String description) {
49
- gitHubStatus([
50
- repoSlug: 'Invoca/exceptional_synchrony',
51
- sha: env.GIT_COMMIT,
52
- description: description,
53
- context: context,
54
- targetURL: env.RUN_DISPLAY_URL,
55
- token: env.GITHUB_TOKEN,
56
- status: status
57
- ])
58
- }
@@ -1,19 +0,0 @@
1
- ---
2
- apiVersion: v1
3
- kind: Pod
4
- metadata:
5
- labels:
6
- jenkins/exceptional-synchrony: 'true'
7
- namespace: jenkins
8
- name: exceptional-synchrony
9
- spec:
10
- containers:
11
- - name: ruby
12
- image: ruby:2.6.5
13
- tty: true
14
- resources:
15
- requests:
16
- memory: "100Mi"
17
- command:
18
- - cat
19
-