exceptional_synchrony 1.0.1 → 1.3.0

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
- SHA1:
3
- metadata.gz: 6b536ff75b55f1cd20206a7d4b6befd78555c587
4
- data.tar.gz: 9dcb17118c8e3be70aa63a9a1491f0d50d697c1e
2
+ SHA256:
3
+ metadata.gz: d067a2b3a9635740dbee2374a06e772c29ca9a8fe57a61108c94118ac15480bb
4
+ data.tar.gz: 665f4bf8ccc1ea699c0d56a4f7d38647c2e3e64e814b736562bf83b69ccd0d25
5
5
  SHA512:
6
- metadata.gz: 894cf6ac51e3b063e87ad8c125721a3ea3fecdd07ba307aa7e9430182adb8da94a25a6039e3859b5d3920e316e12def9f1b563a7819c5f005c82c4a9567a258c
7
- data.tar.gz: c6fee4da47ba5665bc2e5841d31c0a1fce01ca90d9480a9ac52c8e7d6bca4aef883d6a2cfa93e85b5dcf512466833b70317d7a3b558bd1f894bb09640fd3c4bb
6
+ metadata.gz: 9961b1ef53acfb4c94651611871b120279dab3b3564e1841b199a7b2fa1f7a3728bca945517f50964704b0491f9a086192cb857a3205c6008758ecb51a4fb9c5
7
+ data.tar.gz: 0a4d64204faf45276aaca59757ad43bb850c75ea668671e92eae251721a19c6b2ce0ecae5b3bb38c8a64179ba41d0b0864bf1a6640de4e234c4c772434bcfca0
@@ -0,0 +1,10 @@
1
+ ---
2
+ version: 1
3
+ update_configs:
4
+ - package_manager: "ruby:bundler"
5
+ directory: "/"
6
+ update_schedule: "live"
7
+ version_requirement_updates: "off"
8
+ commit_message:
9
+ prefix: "No-Jira"
10
+ include_scope: true
data/.gitignore CHANGED
@@ -33,6 +33,8 @@ Thumbs.db
33
33
  intermediate
34
34
  publish
35
35
  .bundle
36
+ pkg/
37
+ test/reports
36
38
 
37
39
  # Vim
38
40
  *.s[a-w][a-z]
@@ -0,0 +1,58 @@
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
+ }
@@ -0,0 +1,19 @@
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
+
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.6.5
data/CHANGELOG.md ADDED
@@ -0,0 +1,29 @@
1
+ # CHANGELOG for `exception_synchrony`
2
+
3
+ Inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
4
+
5
+ Note: This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ All notable changes to this project will be documented in this file.
8
+
9
+ ## [1.3.0] - 2021-02-04
10
+ ### Added
11
+ - Extend `EMP.defer` to have a new keyword argument, `wait_for_result` for the callers to control whether they should should block until the background thread returns. To preserve existing behavior, this option defaults to `true`, so `EMP.defer` will block in order to return the value (or raise an exception) from the deferred block. Callers can pass `wait_for_result: false` if they do not want to block.
12
+
13
+ ## [1.2.0] - 2020-06-02
14
+ ### Changed
15
+ - If `EMP.run` rescues an exception, previous versions would simply log the exception and continue.
16
+ Instead this version has an `on_error` option with possible values `:log` and `:raise`.
17
+ It defaults to `:log` and in that case, as before, logs any rescued `StandardError` exception and continues.
18
+ When `on_error` is set to `:raise`, the method raises a `FatalRunError` wrapper around the rescued exception.
19
+ This `FatalRunError` exception does not derive from `StandardError`, so it will not be erroneously rescued by any
20
+ registered `EMP.error_handler`. Instead it should be rescued at the outer edge of the process.
21
+ We expect that outer edge handler to log the exception chain (the wrapper plus nested `cause` exception(s))
22
+ and exit the process with a non-0 status code.
23
+
24
+ ## [1.1.1] - 2020-05-03
25
+ - Replace hobo_support with invoca_utils
26
+
27
+ [1.3.0]: https://github.com/Invoca/exceptional_synchrony/compare/v1.2.0...v1.3.0
28
+ [1.2.0]: https://github.com/Invoca/exceptional_synchrony/compare/v1.1.1...v1.2.0
29
+ [1.1.1]: https://github.com/Invoca/exceptional_synchrony/compare/v1.1.0...v1.1.1
data/Gemfile CHANGED
@@ -1,6 +1,16 @@
1
- # ruby '2.0.0'
1
+ # frozen_string_literal: true
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
5
  # Specify your gem's dependencies in attr_default.gemspec
6
6
  gemspec
7
+
8
+ group :development do
9
+ gem 'minitest'
10
+ gem 'minitest-reporters'
11
+ gem 'pry'
12
+ gem 'rake'
13
+ gem 'rr', '~> 1.2'
14
+ gem 'thor'
15
+ gem 'webmock', '~> 1.24'
16
+ end
data/Gemfile.lock CHANGED
@@ -1,121 +1,127 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- exceptional_synchrony (1.0.1)
4
+ exceptional_synchrony (1.3.0)
5
5
  em-http-request
6
- em-synchrony (~> 1.0.3)
7
- eventmachine (~> 1.0.3)
8
- exception_handling
9
- hobo_support
6
+ em-synchrony
7
+ eventmachine
8
+ exception_handling (~> 2.2)
9
+ invoca-utils (~> 0.3)
10
10
 
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- actionmailer (3.2.13)
15
- actionpack (= 3.2.13)
16
- mail (~> 2.5.3)
17
- actionpack (3.2.13)
18
- activemodel (= 3.2.13)
19
- activesupport (= 3.2.13)
20
- builder (~> 3.0.0)
21
- erubis (~> 2.7.0)
22
- journey (~> 1.0.4)
23
- rack (~> 1.4.5)
24
- rack-cache (~> 1.2)
25
- rack-test (~> 0.6.1)
26
- sprockets (~> 2.2.1)
27
- activemodel (3.2.13)
28
- activesupport (= 3.2.13)
29
- builder (~> 3.0.0)
30
- activerecord (3.2.13)
31
- activemodel (= 3.2.13)
32
- activesupport (= 3.2.13)
33
- arel (~> 3.0.2)
34
- tzinfo (~> 0.3.29)
35
- activeresource (3.2.13)
36
- activemodel (= 3.2.13)
37
- activesupport (= 3.2.13)
38
- activesupport (3.2.13)
39
- i18n (= 0.6.1)
40
- multi_json (~> 1.0)
41
- addressable (2.3.5)
42
- arel (3.0.3)
43
- builder (3.0.4)
44
- cookiejar (0.3.0)
45
- crack (0.4.1)
46
- safe_yaml (~> 0.9.0)
47
- em-http-request (1.1.2)
14
+ actionmailer (6.1.1)
15
+ actionpack (= 6.1.1)
16
+ actionview (= 6.1.1)
17
+ activejob (= 6.1.1)
18
+ activesupport (= 6.1.1)
19
+ mail (~> 2.5, >= 2.5.4)
20
+ rails-dom-testing (~> 2.0)
21
+ actionpack (6.1.1)
22
+ actionview (= 6.1.1)
23
+ activesupport (= 6.1.1)
24
+ rack (~> 2.0, >= 2.0.9)
25
+ rack-test (>= 0.6.3)
26
+ rails-dom-testing (~> 2.0)
27
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
28
+ actionview (6.1.1)
29
+ activesupport (= 6.1.1)
30
+ builder (~> 3.1)
31
+ erubi (~> 1.4)
32
+ rails-dom-testing (~> 2.0)
33
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
34
+ activejob (6.1.1)
35
+ activesupport (= 6.1.1)
36
+ globalid (>= 0.3.6)
37
+ activesupport (6.1.1)
38
+ concurrent-ruby (~> 1.0, >= 1.0.2)
39
+ i18n (>= 1.6, < 2)
40
+ minitest (>= 5.1)
41
+ tzinfo (~> 2.0)
42
+ zeitwerk (~> 2.3)
43
+ addressable (2.7.0)
44
+ public_suffix (>= 2.0.2, < 5.0)
45
+ ansi (1.5.0)
46
+ builder (3.2.4)
47
+ coderay (1.1.2)
48
+ concurrent-ruby (1.1.8)
49
+ contextual_logger (0.11.0)
50
+ activesupport
51
+ json
52
+ cookiejar (0.3.3)
53
+ crack (0.4.3)
54
+ safe_yaml (~> 1.0.0)
55
+ crass (1.0.6)
56
+ em-http-request (1.1.7)
48
57
  addressable (>= 2.3.4)
49
- cookiejar
58
+ cookiejar (!= 0.3.1)
50
59
  em-socksify (>= 0.3)
51
60
  eventmachine (>= 1.0.3)
52
61
  http_parser.rb (>= 0.6.0)
53
- em-socksify (0.3.0)
62
+ em-socksify (0.3.2)
54
63
  eventmachine (>= 1.0.0.beta.4)
55
- em-synchrony (1.0.3)
64
+ em-synchrony (1.0.6)
56
65
  eventmachine (>= 1.0.0.beta.1)
57
- erubis (2.7.0)
58
- eventmachine (1.0.3)
59
- exception_handling (0.1.2)
60
- actionmailer (= 3.2.13)
61
- actionpack (= 3.2.13)
62
- activesupport (= 3.2.13)
63
- eventmachine (>= 0.12.10)
64
- hike (1.2.3)
65
- hobo_support (2.0.1)
66
- rails (~> 3.2.0)
66
+ erubi (1.10.0)
67
+ eventmachine (1.2.7)
68
+ exception_handling (2.8.1)
69
+ actionmailer (>= 4.2, < 7.0)
70
+ actionpack (>= 4.2, < 7.0)
71
+ activesupport (>= 4.2, < 7.0)
72
+ contextual_logger (~> 0.7)
73
+ eventmachine (~> 1.0)
74
+ invoca-utils (~> 0.3)
75
+ globalid (0.4.2)
76
+ activesupport (>= 4.2.0)
77
+ hashdiff (1.0.1)
67
78
  http_parser.rb (0.6.0)
68
- i18n (0.6.1)
69
- journey (1.0.4)
70
- json (1.8.1)
71
- mail (2.5.4)
72
- mime-types (~> 1.16)
73
- treetop (~> 1.4.8)
74
- mime-types (1.25.1)
75
- minitest (4.7.5)
76
- multi_json (1.8.4)
77
- polyglot (0.3.3)
78
- rack (1.4.5)
79
- rack-cache (1.2)
80
- rack (>= 0.4)
81
- rack-ssl (1.3.3)
82
- rack
83
- rack-test (0.6.2)
84
- rack (>= 1.0)
85
- rails (3.2.13)
86
- actionmailer (= 3.2.13)
87
- actionpack (= 3.2.13)
88
- activerecord (= 3.2.13)
89
- activeresource (= 3.2.13)
90
- activesupport (= 3.2.13)
91
- bundler (~> 1.0)
92
- railties (= 3.2.13)
93
- railties (3.2.13)
94
- actionpack (= 3.2.13)
95
- activesupport (= 3.2.13)
96
- rack-ssl (~> 1.3.2)
97
- rake (>= 0.8.7)
98
- rdoc (~> 3.4)
99
- thor (>= 0.14.6, < 2.0)
100
- rake (10.1.1)
101
- rdoc (3.12.2)
102
- json (~> 1.4)
103
- rr (1.1.2)
104
- safe_yaml (0.9.7)
105
- sprockets (2.2.2)
106
- hike (~> 1.2)
107
- multi_json (~> 1.0)
108
- rack (~> 1.0)
109
- tilt (~> 1.1, != 1.3.0)
110
- thor (0.18.1)
111
- tilt (1.4.1)
112
- treetop (1.4.15)
113
- polyglot
114
- polyglot (>= 0.3.1)
115
- tzinfo (0.3.38)
116
- webmock (1.17.1)
117
- addressable (>= 2.2.7)
79
+ i18n (1.8.7)
80
+ concurrent-ruby (~> 1.0)
81
+ invoca-utils (0.4.1)
82
+ json (2.5.1)
83
+ loofah (2.9.0)
84
+ crass (~> 1.0.2)
85
+ nokogiri (>= 1.5.9)
86
+ mail (2.7.1)
87
+ mini_mime (>= 0.1.1)
88
+ method_source (1.0.0)
89
+ mini_mime (1.0.2)
90
+ mini_portile2 (2.5.0)
91
+ minitest (5.14.0)
92
+ minitest-reporters (1.4.2)
93
+ ansi
94
+ builder
95
+ minitest (>= 5.0)
96
+ ruby-progressbar
97
+ nokogiri (1.11.1)
98
+ mini_portile2 (~> 2.5.0)
99
+ racc (~> 1.4)
100
+ pry (0.13.1)
101
+ coderay (~> 1.1)
102
+ method_source (~> 1.0)
103
+ public_suffix (4.0.4)
104
+ racc (1.5.2)
105
+ rack (2.2.3)
106
+ rack-test (1.1.0)
107
+ rack (>= 1.0, < 3)
108
+ rails-dom-testing (2.0.3)
109
+ activesupport (>= 4.2.0)
110
+ nokogiri (>= 1.6)
111
+ rails-html-sanitizer (1.3.0)
112
+ loofah (~> 2.3)
113
+ rake (13.0.1)
114
+ rr (1.2.1)
115
+ ruby-progressbar (1.10.1)
116
+ safe_yaml (1.0.5)
117
+ thor (1.0.1)
118
+ tzinfo (2.0.4)
119
+ concurrent-ruby (~> 1.0)
120
+ webmock (1.24.6)
121
+ addressable (>= 2.3.6)
118
122
  crack (>= 0.3.2)
123
+ hashdiff
124
+ zeitwerk (2.4.2)
119
125
 
120
126
  PLATFORMS
121
127
  ruby
@@ -123,6 +129,12 @@ PLATFORMS
123
129
  DEPENDENCIES
124
130
  exceptional_synchrony!
125
131
  minitest
126
- rr (~> 1.1.2)
132
+ minitest-reporters
133
+ pry
134
+ rake
135
+ rr (~> 1.2)
127
136
  thor
128
- webmock (~> 1.17.1)
137
+ webmock (~> 1.24)
138
+
139
+ BUNDLED WITH
140
+ 1.17.3
data/Rakefile CHANGED
@@ -1,2 +1,13 @@
1
1
  #!/usr/bin/env rake
2
+ # frozen_string_literal: true
3
+
2
4
  require "bundler/gem_tasks"
5
+ require 'rake/testtask'
6
+
7
+ task default: :test
8
+
9
+ Rake::TestTask.new do |t|
10
+ t.warning = false
11
+ t.pattern = "test/**/*_test.rb"
12
+ end
13
+
@@ -1,26 +1,24 @@
1
1
  require File.expand_path('../lib/exceptional_synchrony/version', __FILE__)
2
2
 
3
- Gem::Specification.new do |gem|
4
- gem.name = 'exceptional_synchrony'
5
- gem.date = '2014-01-16'
6
- gem.summary = 'Extensions to EventMachine/Synchrony to work well with exceptions'
7
- gem.description = %q{}
8
- gem.authors = ['Colin Kelley']
9
- gem.email = 'colin@invoca.com'
10
- gem.homepage = 'https://github.com/Invoca/exceptional_synchrony'
11
- gem.license = 'MIT'
12
- gem.files = `git ls-files`.split($/)
13
- gem.version = ExceptionalSynchrony::VERSION
3
+ Gem::Specification.new do |spec|
4
+ spec.name = 'exceptional_synchrony'
5
+ spec.date = '2014-01-16'
6
+ spec.summary = 'Extensions to EventMachine/Synchrony to work well with exceptions'
7
+ spec.description = %q{}
8
+ spec.authors = ['Invoca']
9
+ spec.email = 'development@invoca.com'
10
+ spec.homepage = 'https://github.com/Invoca/exceptional_synchrony'
11
+ spec.license = 'MIT'
12
+ spec.files = `git ls-files`.split($/)
13
+ spec.version = ExceptionalSynchrony::VERSION
14
+ spec.metadata = {
15
+ "source_code_uri" => "https://github.com/Invoca/exceptional_synchrony",
16
+ "allowed_push_host" => "https://rubygems.org"
17
+ }
14
18
 
15
- gem.add_dependency 'exception_handling'
16
- gem.add_dependency 'eventmachine', '~> 1.0.3'
17
- gem.add_dependency 'em-synchrony', '~> 1.0.3'
18
- gem.add_dependency 'em-http-request'
19
- gem.add_dependency 'hobo_support'
20
-
21
- gem.add_development_dependency 'thor'
22
- gem.add_development_dependency 'minitest'
23
- gem.add_development_dependency 'webmock', '~> 1.17.1'
24
-
25
- gem.add_development_dependency 'rr', '~> 1.1.2'
19
+ spec.add_dependency 'em-synchrony'
20
+ spec.add_dependency 'em-http-request'
21
+ spec.add_dependency 'eventmachine'
22
+ spec.add_dependency 'exception_handling', '~> 2.2'
23
+ spec.add_dependency 'invoca-utils', '~> 0.3'
26
24
  end