verbalize 2.3.0 → 2.3.1

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: 318052d8276c42ce2790698c6293930e55f6ae6a726e53e15279f4e562b8daeb
4
- data.tar.gz: cb2e05c821a3e0af1e9c7ded9677c756b5eaf5e2466acd7ce63f46fd48a5cc5a
3
+ metadata.gz: b4ab48694dce4b9810ed7289498ee4ff0533919ed08041d5abfa4dda1a3800a7
4
+ data.tar.gz: e2a160824182fef4e702a65b27116505f492cf5f02022bfe928198bb822b2aae
5
5
  SHA512:
6
- metadata.gz: 0a2d4819f7168e6062a2ddf1cd8b2881988371597604601ab8f40d7e7e730574bac68f189d7d0aea9f3d1ac878b0e28a4ebab205766935f2c7d202a16faf21ce
7
- data.tar.gz: 31a1b94052096f62aef1238ef6f1a250f7dc5eabadca325ee1c730feaba78e24492f7e4d931363c9f7743abc736cf0da178e1f586bc3fe5fd53fc9941cf8627d
6
+ metadata.gz: a533db1a4cc25d45a4c5474a96671d3f172f1e84e7c6bf574f2d281caebbce7967d61f96106a9582cdb3915d4d24c6d4ae33b39577734723b65e0ea4ffcab8d0
7
+ data.tar.gz: 9068fc27d208da171b89f173eec3af2d78b3a3d90bdc589ec737cf97a978c9044b22a7cc4a8b57237149562169859f819bfce672a65a94978ecaa227a216d907
@@ -0,0 +1,8 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "11:00"
8
+ open-pull-requests-limit: 10
@@ -0,0 +1,25 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test:
11
+
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ ruby-version: ['2.6', '2.7', '3.0']
16
+
17
+ steps:
18
+ - uses: actions/checkout@v2
19
+ - name: Set up Ruby
20
+ uses: ruby/setup-ruby@v1
21
+ with:
22
+ ruby-version: ${{ matrix.ruby-version }}
23
+ bundler-cache: true
24
+ - name: Run tests
25
+ run: bundle exec rspec
data/CHANGELOG.md CHANGED
@@ -4,9 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
- ## [Unreleased]
7
+ ## 2.3.1 - 2021-06-02
8
8
  ### Added
9
9
  - release documentation
10
+ - ruby 2.7 compatibility to remove deprecation warnings
10
11
 
11
12
  ## 2.3.0 - 2019-09-23
12
13
  ### Added
data/Dockerfile ADDED
@@ -0,0 +1,45 @@
1
+ ARG BUNDLER_VERSION=2.0.2
2
+ ARG RUBY_VERSION=2.7.1
3
+ ARG APP_ROOT=/gem
4
+
5
+ #######################################
6
+ ### Builder
7
+ FROM ruby:${RUBY_VERSION}-alpine AS build-env
8
+
9
+ ARG APP_ROOT
10
+
11
+ ENV BUNDLE_APP_CONFIG="$APP_ROOT/.bundle"
12
+ ARG PACKAGES="curl tzdata less git"
13
+ RUN mkdir $APP_ROOT
14
+ WORKDIR $APP_ROOT
15
+
16
+ RUN apk update \
17
+ && apk upgrade \
18
+ && apk add --update --no-cache $PACKAGES
19
+
20
+ #######################################
21
+ ### Development
22
+ FROM build-env AS development
23
+
24
+ ARG BUNDLER_VERSION
25
+ ARG APP_ROOT
26
+ ENV BUNDLE_APP_CONFIG="$APP_ROOT/.bundle"
27
+
28
+ WORKDIR $APP_ROOT
29
+
30
+ RUN apk add --update --no-cache \
31
+ build-base \
32
+ git \
33
+ tzdata \
34
+ less
35
+
36
+ RUN gem install bundler:$BUNDLER_VERSION
37
+
38
+ COPY . $APP_ROOT
39
+
40
+ RUN bundle install -j4 --retry 3 \
41
+ && rm -rf /usr/local/bundle/cache/*.gem \
42
+ && find /usr/local/bundle/gems/ -name "*.c" -delete \
43
+ && find /usr/local/bundle/gems/ -name "*.o" -delete
44
+
45
+
@@ -0,0 +1,12 @@
1
+ version: '3.7'
2
+
3
+ services:
4
+ ruby:
5
+ build:
6
+ context: .
7
+ dockerfile: Dockerfile
8
+ target: development
9
+ command: bundle exec rspec
10
+ volumes:
11
+ - .:/gem
12
+
@@ -106,32 +106,56 @@ module Verbalize
106
106
  .to_h
107
107
  end
108
108
 
109
- def perform(*args)
110
- new(*args).send(:call)
111
- end
109
+ if RUBY_VERSION < "2.7"
110
+ def perform(*args)
111
+ new(*args).send(:call)
112
+ end
113
+
114
+ def __proxied_call(*args)
115
+ error = catch(:verbalize_error) do
116
+ value = perform(*args)
117
+ return Success.new(value)
118
+ end
112
119
 
113
- # We used __proxied_call/__proxied_call! for 2 reasons:
114
- # 1. The declaration of call/call! needs to be explicit so that tools
115
- # like rspec-mocks can verify the actions keywords actually
116
- # exist when stubbing
117
- # 2. Because #1, meta-programming a simple interface to these proxied
118
- # methods is much simpler than meta-programming the full methods
119
- def __proxied_call(*args)
120
- error = catch(:verbalize_error) do
121
- value = perform(*args)
122
- return Success.new(value)
120
+ Failure.new(error)
123
121
  end
124
122
 
125
- Failure.new(error)
126
- end
123
+ def __proxied_call!(*args)
124
+ perform(*args)
125
+ rescue UncaughtThrowError => uncaught_throw_error
126
+ fail_value = uncaught_throw_error.value
127
+ error = Verbalize::Error.new("Unhandled fail! called with: #{fail_value.inspect}.")
128
+ error.set_backtrace(uncaught_throw_error.backtrace[2..-1])
129
+ raise error
130
+ end
131
+ else
132
+ def perform(**args)
133
+ new(**args).send(:call)
134
+ end
135
+
136
+ # We used __proxied_call/__proxied_call! for 2 reasons:
137
+ # 1. The declaration of call/call! needs to be explicit so that tools
138
+ # like rspec-mocks can verify the actions keywords actually
139
+ # exist when stubbing
140
+ # 2. Because #1, meta-programming a simple interface to these proxied
141
+ # methods is much simpler than meta-programming the full methods
142
+ def __proxied_call(**args)
143
+ error = catch(:verbalize_error) do
144
+ value = perform(**args)
145
+ return Success.new(value)
146
+ end
147
+
148
+ Failure.new(error)
149
+ end
127
150
 
128
- def __proxied_call!(*args)
129
- perform(*args)
130
- rescue UncaughtThrowError => uncaught_throw_error
131
- fail_value = uncaught_throw_error.value
132
- error = Verbalize::Error.new("Unhandled fail! called with: #{fail_value.inspect}.")
133
- error.set_backtrace(uncaught_throw_error.backtrace[2..-1])
134
- raise error
151
+ def __proxied_call!(**args)
152
+ perform(**args)
153
+ rescue UncaughtThrowError => uncaught_throw_error
154
+ fail_value = uncaught_throw_error.value
155
+ error = Verbalize::Error.new("Unhandled fail! called with: #{fail_value.inspect}.")
156
+ error.set_backtrace(uncaught_throw_error.backtrace[2..-1])
157
+ raise error
158
+ end
135
159
  end
136
160
  end
137
161
  end
@@ -1,3 +1,3 @@
1
1
  module Verbalize
2
- VERSION = '2.3.0'.freeze
2
+ VERSION = '2.3.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: verbalize
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Taylor
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-26 00:00:00.000000000 Z
11
+ date: 2021-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,7 +94,7 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
- description:
97
+ description:
98
98
  email:
99
99
  - taylorzr@gmail.com
100
100
  executables: []
@@ -102,18 +102,20 @@ extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
104
  - ".codeclimate.yml"
105
+ - ".github/dependabot.yml"
106
+ - ".github/workflows/tests.yml"
105
107
  - ".gitignore"
106
108
  - ".rspec"
107
109
  - ".rubocop.yml"
108
- - ".travis.yml"
109
110
  - CHANGELOG.md
111
+ - Dockerfile
110
112
  - Gemfile
111
113
  - LICENSE.txt
112
114
  - README.md
113
115
  - Rakefile
114
116
  - bin/console
115
117
  - bin/setup
116
- - circle.yml
118
+ - docker-compose.yml
117
119
  - lib/verbalize.rb
118
120
  - lib/verbalize/action.rb
119
121
  - lib/verbalize/build.rb
@@ -127,7 +129,7 @@ homepage: https://github.com/taylorzr/verbalize
127
129
  licenses:
128
130
  - MIT
129
131
  metadata: {}
130
- post_install_message:
132
+ post_install_message:
131
133
  rdoc_options: []
132
134
  require_paths:
133
135
  - lib
@@ -143,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
145
  version: '0'
144
146
  requirements: []
145
147
  rubygems_version: 3.0.3
146
- signing_key:
148
+ signing_key:
147
149
  specification_version: 4
148
150
  summary: Verb based class pattern
149
151
  test_files: []
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.6
4
- - 2.5
5
- - 2.4
6
- - 2.3
data/circle.yml DELETED
@@ -1,3 +0,0 @@
1
- machine:
2
- ruby:
3
- version: '2.2'