snfoil-context 1.2.1 → 1.3.0

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: 3c0a135f165751090edfb064b8af3fe1290c8d4a43826dd1e613e466d0c70632
4
- data.tar.gz: c1c7e5e532f45c44b387a7ac783d5d4c861287184e0fab76778d9314d72c325e
3
+ metadata.gz: b9fed805520481b3b040a44ca0cec16c43fd5159388eeef51ffa09216d03b391
4
+ data.tar.gz: 18126e59b615d290bcc213cc5d1b889ae443600d7162d2812c3f189afc66cff7
5
5
  SHA512:
6
- metadata.gz: '00820f4a6801a17d7979b0c8d4ebd8b55ae8f21112e5816ba1b7df8b77baf91a27b596234993474e9bac85208882b23c0d57b203caa93195aaf53a01f5de7b67'
7
- data.tar.gz: 0f60091640051b9e57ab235abb479bb9d02d495ab27aa0186476cf0d856372560e33ec344476548b80790e1e1a8305cfa4749a109f022d50d739511b2e2aed08
6
+ metadata.gz: c33d7f50667077f99f09d24990fd37e26448de09ae341c83fbaf8082ab68e820ef2c2154d28c4c18fce725d206248a6d2ba389080974b96e5e5a18d813ecd9ac
7
+ data.tar.gz: c180cd013322fe05a1346d2cf4018c74fad8bc99c22f9ac69d2cc5b1101ba2d6ecf55f4b1653e8d26168ac5f18595ccc3240c4ff74ac5acabdea83e3dee840d8
data/Dockerfile ADDED
@@ -0,0 +1,18 @@
1
+ ARG RUBY_VERSION=3.4.3
2
+
3
+ FROM ruby:${RUBY_VERSION}-slim
4
+
5
+ RUN apt update && \
6
+ apt install -y --no-install-recommends \
7
+ build-essential \
8
+ libyaml-dev \
9
+ git \
10
+ curl
11
+
12
+ WORKDIR /workspace
13
+
14
+ COPY . .
15
+
16
+ RUN bundle install
17
+
18
+ CMD ["bundle", "exec", "rspec"]
data/Gemfile CHANGED
@@ -6,12 +6,12 @@ source 'https://rubygems.org'
6
6
  gemspec
7
7
 
8
8
  group :development, :test do
9
- gem 'bundle-audit', '~> 0.1.0'
10
- gem 'fasterer', '~> 0.10.0'
11
- gem 'pry-byebug', '~> 3.9', platform: :mri
9
+ gem 'bundler-audit', '~> 0.9.0'
10
+ gem 'debug', '~> 1.10'
11
+ gem 'fasterer', '~> 0.11.0'
12
12
  gem 'rake', '~> 13.0'
13
13
  gem 'rspec', '~> 3.10'
14
- gem 'rubocop', '1.33'
15
- gem 'rubocop-performance', '1.14.3'
16
- gem 'rubocop-rspec', '2.12.1'
14
+ gem 'rubocop', '~> 1.75'
15
+ gem 'rubocop-performance', '~> 1.25'
16
+ gem 'rubocop-rspec', '~> 3.6'
17
17
  end
@@ -0,0 +1,11 @@
1
+ services:
2
+ workspace:
3
+ build:
4
+ context: .
5
+ dockerfile: Dockerfile
6
+ command: sleep infinity
7
+ volumes:
8
+ - .:/workspace
9
+ env_file:
10
+ - path: .env
11
+ required: false
@@ -14,7 +14,7 @@
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
16
 
17
- require_relative './error'
17
+ require_relative 'error'
18
18
  require 'active_support/concern'
19
19
 
20
20
  module SnFoil
@@ -16,6 +16,6 @@
16
16
 
17
17
  module SnFoil
18
18
  module Context
19
- VERSION = '1.2.1'
19
+ VERSION = '1.3.0'
20
20
  end
21
21
  end
@@ -14,9 +14,9 @@
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
16
 
17
- require_relative './context/error'
18
- require_relative './context/argument_error'
19
- require_relative './context/structure'
17
+ require_relative 'context/error'
18
+ require_relative 'context/argument_error'
19
+ require_relative 'context/structure'
20
20
 
21
21
  require 'active_support/concern'
22
22
 
@@ -60,7 +60,7 @@ module SnFoil
60
60
 
61
61
  private
62
62
 
63
- # rubocop:disable reason: These are builder/mapping methods that are just too complex to simplify without
63
+ # rubocop disable reason: These are builder/mapping methods that are just too complex to simplify without
64
64
  # making them more complex. If anyone has a better way please let me know
65
65
  class_methods do # rubocop:disable Metrics/BlockLength
66
66
  def define_workflow(name)
@@ -97,7 +97,7 @@ module SnFoil
97
97
  instance_variable_set("@#{singleton_var}", [])
98
98
  define_singleton_method(singleton_var) { instance_variable_get("@#{singleton_var}") }
99
99
  define_singleton_method(method_name) do |with: nil, **options, &block|
100
- raise SnFoil::Context::ArgumentError, "\##{method_name} requires either a method name or a block" if with.nil? && block.nil?
100
+ raise SnFoil::Context::ArgumentError, "##{method_name} requires either a method name or a block" if with.nil? && block.nil?
101
101
 
102
102
  instance_variable_get("@#{singleton_var}") << { method: with,
103
103
  block: block,
@@ -117,8 +117,9 @@ module SnFoil
117
117
 
118
118
  def run_action_primary(method, block, **options)
119
119
  return send(method, **options) if method
120
+ return instance_exec(**options, &block) if block
120
121
 
121
- instance_exec(**options, &block)
122
+ true
122
123
  end
123
124
  end
124
125
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = 'An easy way to make extensible workflows and actions'
13
13
  spec.homepage = 'https://github.com/limited-effort/snfoil-context'
14
14
  spec.license = 'Apache-2.0'
15
- spec.required_ruby_version = '>= 2.6'
15
+ spec.required_ruby_version = '>= 3.0'
16
16
 
17
17
  spec.metadata['homepage_uri'] = spec.homepage
18
18
  spec.metadata['source_code_uri'] = spec.homepage
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snfoil-context
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Howes
8
8
  - Cliff Campbell
9
- autorequire:
10
9
  bindir: exe
11
10
  cert_chain: []
12
- date: 2023-03-24 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: activesupport
@@ -35,9 +34,11 @@ extra_rdoc_files: []
35
34
  files:
36
35
  - CHANGELOG.md
37
36
  - CODE_OF_CONDUCT.md
37
+ - Dockerfile
38
38
  - Gemfile
39
39
  - LICENSE.txt
40
40
  - README.md
41
+ - docker-compose.yaml
41
42
  - lib/snfoil/context.rb
42
43
  - lib/snfoil/context/argument_error.rb
43
44
  - lib/snfoil/context/error.rb
@@ -52,7 +53,6 @@ metadata:
52
53
  source_code_uri: https://github.com/limited-effort/snfoil-context
53
54
  changelog_uri: https://github.com/limited-effort/snfoil-context/blob/main/CHANGELOG.md
54
55
  rubygems_mfa_required: 'true'
55
- post_install_message:
56
56
  rdoc_options: []
57
57
  require_paths:
58
58
  - lib
@@ -60,15 +60,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - ">="
62
62
  - !ruby/object:Gem::Version
63
- version: '2.6'
63
+ version: '3.0'
64
64
  required_rubygems_version: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  requirements: []
70
- rubygems_version: 3.3.7
71
- signing_key:
70
+ rubygems_version: 3.6.7
72
71
  specification_version: 4
73
72
  summary: Setup Simple Pipelined Workflows
74
73
  test_files: []