typed_operation 0.4.1 → 1.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,29 @@
1
+ if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.2.0")
2
+ require "polyfill-data"
3
+ end
4
+
5
+ require "literal"
6
+
1
7
  require "typed_operation/version"
2
- require "typed_operation/railtie"
8
+ require "typed_operation/railtie" if defined?(Rails::Railtie)
9
+ require "typed_operation/operations/introspection"
10
+ require "typed_operation/operations/parameters"
11
+ require "typed_operation/operations/partial_application"
12
+ require "typed_operation/operations/callable"
13
+ require "typed_operation/operations/lifecycle"
14
+ require "typed_operation/operations/deconstruct"
15
+ require "typed_operation/operations/attribute_builder"
16
+ require "typed_operation/operations/executable"
17
+ require "typed_operation/curried"
18
+ require "typed_operation/immutable_base"
3
19
  require "typed_operation/base"
4
20
  require "typed_operation/partially_applied"
5
21
  require "typed_operation/prepared"
6
22
 
7
23
  module TypedOperation
8
- class ParameterError < StandardError; end
24
+ class InvalidOperationError < StandardError; end
25
+
26
+ class MissingParameterError < ArgumentError; end
27
+
28
+ class ParameterError < TypeError; end
9
29
  end
metadata CHANGED
@@ -1,65 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typed_operation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 1.0.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Ierodiaconou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-22 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rails
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '6.0'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '8.0'
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: '6.0'
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '8.0'
33
- - !ruby/object:Gem::Dependency
34
- name: vident-typed
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: 0.1.0
40
- type: :runtime
41
- prerelease: false
42
- version_requirements: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: 0.1.0
47
- - !ruby/object:Gem::Dependency
48
- name: dry-initializer
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '3.0'
54
- type: :runtime
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: '3.0'
61
- description: TypedOperation is a command pattern implementation where inputs can be
62
- defined with runtime type checks. Operations can be partially applied.
11
+ date: 2023-08-26 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Command pattern, which is callable, and can be partially applied, curried
14
+ and has typed parameters. Authorization to execute via action_policy if desired.
63
15
  email:
64
16
  - stevegeek@gmail.com
65
17
  executables: []
@@ -68,7 +20,6 @@ extra_rdoc_files: []
68
20
  files:
69
21
  - MIT-LICENSE
70
22
  - README.md
71
- - Rakefile
72
23
  - lib/generators/USAGE
73
24
  - lib/generators/templates/operation.rb
74
25
  - lib/generators/templates/operation_test.rb
@@ -76,9 +27,19 @@ files:
76
27
  - lib/generators/typed_operation/install/install_generator.rb
77
28
  - lib/generators/typed_operation/install/templates/application_operation.rb
78
29
  - lib/generators/typed_operation_generator.rb
79
- - lib/tasks/typed_operation_tasks.rake
80
30
  - lib/typed_operation.rb
31
+ - lib/typed_operation/action_policy_auth.rb
81
32
  - lib/typed_operation/base.rb
33
+ - lib/typed_operation/curried.rb
34
+ - lib/typed_operation/immutable_base.rb
35
+ - lib/typed_operation/operations/attribute_builder.rb
36
+ - lib/typed_operation/operations/callable.rb
37
+ - lib/typed_operation/operations/deconstruct.rb
38
+ - lib/typed_operation/operations/executable.rb
39
+ - lib/typed_operation/operations/introspection.rb
40
+ - lib/typed_operation/operations/lifecycle.rb
41
+ - lib/typed_operation/operations/parameters.rb
42
+ - lib/typed_operation/operations/partial_application.rb
82
43
  - lib/typed_operation/partially_applied.rb
83
44
  - lib/typed_operation/prepared.rb
84
45
  - lib/typed_operation/railtie.rb
@@ -97,15 +58,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
97
58
  requirements:
98
59
  - - ">="
99
60
  - !ruby/object:Gem::Version
100
- version: '0'
61
+ version: '3.1'
101
62
  required_rubygems_version: !ruby/object:Gem::Requirement
102
63
  requirements:
103
- - - ">="
64
+ - - ">"
104
65
  - !ruby/object:Gem::Version
105
- version: '0'
66
+ version: 1.3.1
106
67
  requirements: []
107
- rubygems_version: 3.4.10
68
+ rubygems_version: 3.4.19
108
69
  signing_key:
109
70
  specification_version: 4
110
- summary: TypedOperation is a command pattern implementation
71
+ summary: TypedOperation is a command pattern with typed parameters, which is callable,
72
+ and can be partially applied.
111
73
  test_files: []
data/Rakefile DELETED
@@ -1,3 +0,0 @@
1
- require "bundler/setup"
2
-
3
- require "bundler/gem_tasks"
@@ -1,4 +0,0 @@
1
- # desc "Explaining what the task does"
2
- # task :typed_operation do
3
- # # Task goes here
4
- # end