subroutine-factory 0.2.0 → 0.4.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: 698ad2a1f2e741d5068f5d9f4a007113f85c7fc85603beffa396dbb8d6e6b83a
4
- data.tar.gz: 73acb2010c7f19347d1bfd16fd7557111903b665e97a8c52bdb13a8beb88c511
3
+ metadata.gz: 37f6569cbcd3c95b82e1264599fb1d80ea80205aab23a7e90f4184a47f935730
4
+ data.tar.gz: 69d9a815a47eb5b48605eed0a4534926f0a9e8cd81e43a0667a105c6d993c922
5
5
  SHA512:
6
- metadata.gz: 435308c5821c84856a8e496e99a3a90e56765d946d95423807b6a77e9a16190613c349efdf95b6fb5047d792a08b64454af33564f533f256fe607c8ae43c5143
7
- data.tar.gz: 1daefe1cfa4647168882612ed29ac44b379271d2fa1da147740c38c0a4847fcc6fd45ed5381094d09a21190d013f1f8581fb2b579cac05466661f28a4b4a3394
6
+ metadata.gz: 9e82ba0dacc08e478dfc8958b949b9ef7db5cb964ab7d0a466cd98eb1d1858c34b91803eb7e45f6af68b98ef85d835fa02e58405eb3fbbc355e1231071588e4d
7
+ data.tar.gz: 74a5d4b2ca29c07ff35029dfb6af687283bb5795290dcc5c510e67e24d5a5960d566cba8b2eb21c138b4e574e65179b4d4b14b1424ac2aa7cedee1e3ec5a9fc2
@@ -3,7 +3,7 @@
3
3
  module Subroutine
4
4
  module Factory
5
5
 
6
- VERSION = "0.2.0"
6
+ VERSION = "0.4.0"
7
7
 
8
8
  end
9
9
  end
@@ -11,24 +11,27 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = %q{Test factories for ops using Subroutine Ops}
13
13
  spec.description = %q{Test factories for ops using Subroutine Ops}
14
- spec.homepage = "https://github.com/mnelson/subroutine-factory"
14
+ spec.homepage = "https://github.com/guideline-tech/subroutine-factory"
15
15
  spec.license = "MIT"
16
16
 
17
17
  # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
18
18
  # delete this section to allow pushing this gem to any host.
19
19
  if spec.respond_to?(:metadata)
20
20
  spec.metadata['allowed_push_host'] = "https://rubygems.org"
21
+ spec.metadata["rubygems_mfa_required"] = "true"
21
22
  else
22
23
  raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
23
24
  end
24
25
 
25
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
- spec.bindir = "exe"
27
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
+ # Specify which files should be added to the gem when it is released.
27
+ spec.files = Dir["lib/**/*"] + Dir["*.gemspec"] + Dir["bin/**/*"]
28
+ spec.bindir = "bin"
29
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
30
+ spec.required_ruby_version = ">= 3.3.0"
28
31
  spec.require_paths = ["lib"]
29
32
 
30
33
  spec.add_dependency "subroutine"
31
- spec.add_dependency "activesupport", ">= 3.0"
34
+ spec.add_dependency "activesupport", ">= 6.1"
32
35
 
33
36
  spec.add_development_dependency "bundler"
34
37
  spec.add_development_dependency "rake"
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: subroutine-factory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Nelson
8
- autorequire:
9
- bindir: exe
8
+ bindir: bin
10
9
  cert_chain: []
11
- date: 2023-09-06 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: subroutine
@@ -30,14 +29,14 @@ dependencies:
30
29
  requirements:
31
30
  - - ">="
32
31
  - !ruby/object:Gem::Version
33
- version: '3.0'
32
+ version: '6.1'
34
33
  type: :runtime
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - ">="
39
38
  - !ruby/object:Gem::Version
40
- version: '3.0'
39
+ version: '6.1'
41
40
  - !ruby/object:Gem::Dependency
42
41
  name: bundler
43
42
  requirement: !ruby/object:Gem::Requirement
@@ -97,17 +96,12 @@ dependencies:
97
96
  description: Test factories for ops using Subroutine Ops
98
97
  email:
99
98
  - mike@mnelson.io
100
- executables: []
99
+ executables:
100
+ - console
101
+ - setup
101
102
  extensions: []
102
103
  extra_rdoc_files: []
103
104
  files:
104
- - ".gitignore"
105
- - ".ruby-version"
106
- - ".travis.yml"
107
- - Gemfile
108
- - LICENSE.txt
109
- - README.md
110
- - Rakefile
111
105
  - bin/console
112
106
  - bin/setup
113
107
  - lib/subroutine/factory.rb
@@ -116,12 +110,12 @@ files:
116
110
  - lib/subroutine/factory/spec_helper.rb
117
111
  - lib/subroutine/factory/version.rb
118
112
  - subroutine-factory.gemspec
119
- homepage: https://github.com/mnelson/subroutine-factory
113
+ homepage: https://github.com/guideline-tech/subroutine-factory
120
114
  licenses:
121
115
  - MIT
122
116
  metadata:
123
117
  allowed_push_host: https://rubygems.org
124
- post_install_message:
118
+ rubygems_mfa_required: 'true'
125
119
  rdoc_options: []
126
120
  require_paths:
127
121
  - lib
@@ -129,15 +123,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
129
123
  requirements:
130
124
  - - ">="
131
125
  - !ruby/object:Gem::Version
132
- version: '0'
126
+ version: 3.3.0
133
127
  required_rubygems_version: !ruby/object:Gem::Requirement
134
128
  requirements:
135
129
  - - ">="
136
130
  - !ruby/object:Gem::Version
137
131
  version: '0'
138
132
  requirements: []
139
- rubygems_version: 3.2.33
140
- signing_key:
133
+ rubygems_version: 4.0.9
141
134
  specification_version: 4
142
135
  summary: Test factories for ops using Subroutine Ops
143
136
  test_files: []
data/.gitignore DELETED
@@ -1,10 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- *.gem
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 3.0.6
data/.travis.yml DELETED
@@ -1,4 +0,0 @@
1
- language: ruby
2
-
3
- rvm:
4
- - 2.5.1
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in subroutine-factory.gemspec
4
- gemspec
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2015 Mike Nelson
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
data/README.md DELETED
@@ -1,84 +0,0 @@
1
- # Subroutine::Factory
2
-
3
- ## Installation
4
-
5
- Add this line to your application's Gemfile:
6
-
7
- ```ruby
8
- gem 'subroutine-factory'
9
- ```
10
-
11
- And then execute:
12
-
13
- $ bundle
14
-
15
- Or install it yourself as:
16
-
17
- $ gem install subroutine-factory
18
-
19
- ## Usage
20
-
21
- The Subroutine gem does a great job of encapsulating your app's business logic. To simplify the usage of Subroutine Ops in your test suite, utilize the subroutine-factory gem.
22
-
23
- Defining factories:
24
-
25
- ```ruby
26
- Subroutine::Factory.define :signup do
27
- op ::SignupOp
28
-
29
- inputs :email, sequence{|n| "foo{n}@example.com" }
30
- inputs :password, "password123"
31
-
32
- # by default, the op will be returned when the factory is used.
33
- # this `output` returns the value of the accessor on the resulting op
34
- output :user
35
- end
36
-
37
- Subroutine::Factory.define :business_signup do
38
-
39
- # all configurations are inherited from the "signup" factory
40
- parent :signup
41
-
42
- op ::BusinessSignupOp
43
-
44
- input :business_name, sequence{|n| "Business #{n}" }
45
-
46
- # you can output multiple things into a hash by using `outputs`
47
- outputs :user, :business
48
- end
49
- ```
50
-
51
- Using Factories:
52
-
53
- ```ruby
54
- user = Subroutine::Factory.create :signup
55
- user = Subroutine::Factory.create :signup, email: "foo@bar.com"
56
-
57
- out = Subroutine::Factory.create :business_signup
58
- out[:user] #=> User{}
59
- out[:business] #=> Business{}
60
- ```
61
-
62
- Spec / Test Helper:
63
- ```ruby
64
- #spec_helper.rb, test_helper.rb
65
- config.include ::Subroutine::Factory::SpecHelper
66
-
67
- # in your tests
68
- user = factory(:signup)
69
- ```
70
-
71
- ## Development
72
-
73
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
74
-
75
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
76
-
77
- ## Contributing
78
-
79
- Bug reports and pull requests are welcome on GitHub at https://github.com/mnelson/subroutine-factory.
80
-
81
-
82
- ## License
83
-
84
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile DELETED
@@ -1,10 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
3
-
4
- Rake::TestTask.new(:test) do |t|
5
- t.libs << "test"
6
- t.libs << "lib"
7
- t.test_files = FileList['test/**/*_test.rb']
8
- end
9
-
10
- task :default => :test