better_interactor 1.0.0 → 1.0.1

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: 47df3c729fd268322b7e1c16ed660ee5390d2701766a3f2892bb6859186222bf
4
- data.tar.gz: bce8bdc90bc8508170dc19fd3f610b2da2e6ec79e440c772209906624a34f84e
3
+ metadata.gz: 639eafdbe3f21672f1954622cea7d47d3fc046d1b5b9d2297eb8a22aa1ab96ab
4
+ data.tar.gz: e1342b3ce0729c2509129a6131bde95e77009c6bd5044780b11b4859a8431b4e
5
5
  SHA512:
6
- metadata.gz: 57d31e2133e2801e2a03f2189f1e03133481d5ce1f7c27de5e1d2e044c0d101cec37a68f5f8b1eccbb9da3a32fd228592d189cb2e6b178cacf4a00432387a4ef
7
- data.tar.gz: 3d43c73d5608b7d9b037254270df3f74bd1e475a5a5a1477b91aa87ad563b57e8f8c50301fa3d9204c5804ef464f5cd2af8170a76b920f7cdf90d46c7f203b23
6
+ metadata.gz: 335ad144b4c44b45ffbb570ed133d88a376b95d1eac91d92e99885b56f9fc28e4a6604887c5e3c516d7566cdd1165f4e8a2c91c7189388743e4c1834f44c00a2
7
+ data.tar.gz: abddf86851b23555df4e78bf4579decfc14cdcca6ee0b3230daa75e5cde646af2f4670be863f176d2a8b19f8bf00413339160dd0ae6b757627a06aed74df1d6f
@@ -0,0 +1,14 @@
1
+ name: CI/CD
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+
7
+ jobs:
8
+ run-tests:
9
+ uses: ./.forgejo/workflows/test.yml
10
+
11
+ publish-gem:
12
+ needs: run-tests
13
+ uses: ./.forgejo/workflows/publish.yml
14
+ secrets: inherit
@@ -0,0 +1,36 @@
1
+ name: Publish to RubyGems
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ #tags:
8
+ # - 'v*'
9
+
10
+ jobs:
11
+ publish:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: https://github.com/actions/checkout@v4
15
+
16
+ - name: Set up Ruby
17
+ uses: https://github.com/ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: '3.2'
20
+ bundler-cache: true
21
+
22
+ - name: Build and Publish to RubyGems
23
+ env:
24
+ GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
25
+ run: |
26
+ mkdir -p $HOME/.gem
27
+ touch $HOME/.gem/credentials
28
+ chmod 0600 $HOME/.gem/credentials
29
+
30
+ cat <<EOF > $HOME/.gem/credentials
31
+ ---
32
+ :rubygems_api_key: ${GEM_HOST_API_KEY}
33
+ EOF
34
+
35
+ gem build *.gemspec
36
+ gem push *.gem
@@ -0,0 +1,29 @@
1
+ name: Test Ruby
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+
8
+ pull_request:
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ name: Ruby ${{ matrix.ruby }}
14
+ strategy:
15
+ matrix:
16
+ ruby:
17
+ - '3.2.0'
18
+
19
+ steps:
20
+ - uses: https://github.com/actions/checkout@v4
21
+ with:
22
+ persist-credentials: false
23
+ - name: Set up Ruby
24
+ uses: https://github.com/ruby/setup-ruby@v1
25
+ with:
26
+ ruby-version: ${{ matrix.ruby }}
27
+ bundler-cache: true
28
+ - name: Run Tests
29
+ run: bundle exec rspec
data/README.md CHANGED
@@ -4,7 +4,7 @@ Better Interactor is a gem that aims to extend the default usage for the [Intera
4
4
 
5
5
  - adding a condition to your interactors, in the organizer, to skip its call, if that returns false
6
6
  - defining a default condition for each interactor call, in the organizer
7
- - [UNDER DEVELOPMENT] defining a method inside the organizer and call that instead of an organizer
7
+ - defining a method inside the organizer and call that instead of an organizer
8
8
 
9
9
  ## Installation
10
10
 
@@ -24,7 +24,7 @@ gem install better_interactor
24
24
 
25
25
  ### Conditional Call
26
26
 
27
- passing an hash instead of and interactor allows you to define 2 keys inside of it:
27
+ passing an hash instead of an interactor allows you to define 2 keys inside of it:
28
28
 
29
29
  - class: with the interactor class name
30
30
  - if: with a symbol with the same name as the method that responds to our condition
@@ -74,7 +74,7 @@ In this example:
74
74
  - ChargeCard will always be called, because there's no method named **can_charge_card?**
75
75
  - SendThankYou will be called only if the method **can_send_thank_you?**, with the passed context, returns true
76
76
 
77
- **In case of Interactors inside of Modules (Client::SendThanksYou) the modules are included inside the method name (can_client_send_thanks_you?)**
77
+ **In case of Interactors inside of Modules (Client::SendThankYou) the modules are included inside the method name (can_client_send_thank_you?)**
78
78
 
79
79
  ### Interactor-like method
80
80
 
@@ -110,6 +110,13 @@ Clone this repo, run bundle and you are good to go.
110
110
 
111
111
  Bug reports and pull requests are welcome on GitHub at https://github.com/gimbardo/better_interactor.
112
112
 
113
+ To contribute:
114
+
115
+ 1. Fork the project.
116
+ 2. Write a failing test.
117
+ 3. Commit changes that fix the tests.
118
+ 5. Be patient.
119
+
113
120
  ## License
114
121
 
115
122
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BetterInteractor
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better_interactor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gamberi Elia
8
+ autorequire:
8
9
  bindir: exe
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2026-01-14 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: interactor-rails
@@ -37,12 +38,16 @@ dependencies:
37
38
  - - ">="
38
39
  - !ruby/object:Gem::Version
39
40
  version: '6.0'
41
+ description:
40
42
  email:
41
43
  - me@gimbaro.dev
42
44
  executables: []
43
45
  extensions: []
44
46
  extra_rdoc_files: []
45
47
  files:
48
+ - ".forgejo/workflows/main.yml"
49
+ - ".forgejo/workflows/publish.yml"
50
+ - ".forgejo/workflows/test.yml"
46
51
  - LICENSE.txt
47
52
  - README.md
48
53
  - Rakefile
@@ -57,6 +62,7 @@ metadata:
57
62
  allowed_push_host: https://rubygems.org/
58
63
  homepage_uri: https://gimbaro.dev
59
64
  source_code_uri: https://github.com/Gimbardo/better_interactor
65
+ post_install_message:
60
66
  rdoc_options: []
61
67
  require_paths:
62
68
  - lib
@@ -71,7 +77,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
77
  - !ruby/object:Gem::Version
72
78
  version: '0'
73
79
  requirements: []
74
- rubygems_version: 3.7.2
80
+ rubygems_version: 3.4.19
81
+ signing_key:
75
82
  specification_version: 4
76
83
  summary: Better Interactor is a small gem that aims to improve a lot of stuff that
77
84
  is missing in the main interactor gem