nexus_cqrs 0.3.0 → 0.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: c4e6e4a145007fe8658503e9745e3be716436749d9bea2c714bca1d47b1ea4ab
4
- data.tar.gz: aedbcb7c36185faf7d546e3ea5c268cba6642d0880a0a2c2cdf612e761f5096c
3
+ metadata.gz: 22851e4cf72bdb9d4895163003f9ccaef81182f71ba64de7b9729c80f06ea40b
4
+ data.tar.gz: a39184dedf35d590ad9b7f3dab51facbd233fd5e9ec7ddeab27c714604c47018
5
5
  SHA512:
6
- metadata.gz: 83c240bd9f056d0d82e5437f52c45527be6092e83f6356c765bfa127153d8d5c5c660437598707fb470879606ede7c9fc1a28f11e42355401b177c29b37e7c45
7
- data.tar.gz: 0dab29f1d52e3f4110cfb948ffbe425c342f682c01f1945ceced2385aa022201e84c7025b1cc7eb633110029efdf4e7b5e0366baf2b7466183a164a040df5ff3
6
+ metadata.gz: 5dd0e3cf9cb2014329a289bb94a9659144109988775709566996eb69aeaf663cc504ceb9cc83fb33b9e99fe2fc3e424c2584d0269d0b57564cecb148c1e0006c
7
+ data.tar.gz: 92497f3e118eb6bfad46e842fc0713fb64a8785ac0251296215003449593515c445de351c0afe9ff5f30efb9e5df1e0c4cf72c9c5c486ec253293c0e1e3094d4
data/.gitignore CHANGED
@@ -9,3 +9,5 @@
9
9
  /.gem
10
10
  /spec/lib/tmp
11
11
  *.gem
12
+
13
+ results/rubocop.html
data/Gemfile CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  source 'https://rubygems.org'
2
3
 
3
4
  # Specify your gem's dependencies in cqrs-core.gemspec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nexus_cqrs (0.3.0)
4
+ nexus_cqrs (0.3.1)
5
5
  generator_spec
6
6
  ibsciss-middleware
7
7
  thread_safe
@@ -9,99 +9,101 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionpack (6.0.3.2)
13
- actionview (= 6.0.3.2)
14
- activesupport (= 6.0.3.2)
15
- rack (~> 2.0, >= 2.0.8)
12
+ actionpack (6.1.4.1)
13
+ actionview (= 6.1.4.1)
14
+ activesupport (= 6.1.4.1)
15
+ rack (~> 2.0, >= 2.0.9)
16
16
  rack-test (>= 0.6.3)
17
17
  rails-dom-testing (~> 2.0)
18
18
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
19
- actionview (6.0.3.2)
20
- activesupport (= 6.0.3.2)
19
+ actionview (6.1.4.1)
20
+ activesupport (= 6.1.4.1)
21
21
  builder (~> 3.1)
22
22
  erubi (~> 1.4)
23
23
  rails-dom-testing (~> 2.0)
24
24
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
25
- activesupport (6.0.3.2)
25
+ activesupport (6.1.4.1)
26
26
  concurrent-ruby (~> 1.0, >= 1.0.2)
27
- i18n (>= 0.7, < 2)
28
- minitest (~> 5.1)
29
- tzinfo (~> 1.1)
30
- zeitwerk (~> 2.2, >= 2.2.2)
31
- ast (2.4.1)
27
+ i18n (>= 1.6, < 2)
28
+ minitest (>= 5.1)
29
+ tzinfo (~> 2.0)
30
+ zeitwerk (~> 2.3)
31
+ ast (2.4.2)
32
32
  builder (3.2.4)
33
- concurrent-ruby (1.1.7)
33
+ concurrent-ruby (1.1.9)
34
34
  crass (1.0.6)
35
35
  diff-lcs (1.4.4)
36
- erubi (1.9.0)
36
+ erubi (1.10.0)
37
37
  generator_spec (0.9.4)
38
38
  activesupport (>= 3.0.0)
39
39
  railties (>= 3.0.0)
40
- i18n (1.8.5)
40
+ i18n (1.8.11)
41
41
  concurrent-ruby (~> 1.0)
42
42
  ibsciss-middleware (0.4.2)
43
- loofah (2.6.0)
43
+ loofah (2.12.0)
44
44
  crass (~> 1.0.2)
45
45
  nokogiri (>= 1.5.9)
46
46
  method_source (1.0.0)
47
- mini_portile2 (2.4.0)
48
- minitest (5.14.1)
49
- nokogiri (1.10.10)
50
- mini_portile2 (~> 2.4.0)
51
- parallel (1.19.2)
52
- parser (2.7.1.4)
47
+ mini_portile2 (2.6.1)
48
+ minitest (5.14.4)
49
+ nokogiri (1.12.5)
50
+ mini_portile2 (~> 2.6.1)
51
+ racc (~> 1.4)
52
+ parallel (1.21.0)
53
+ parser (3.0.2.0)
53
54
  ast (~> 2.4.1)
55
+ racc (1.6.0)
54
56
  rack (2.2.3)
55
57
  rack-test (1.1.0)
56
58
  rack (>= 1.0, < 3)
57
59
  rails-dom-testing (2.0.3)
58
60
  activesupport (>= 4.2.0)
59
61
  nokogiri (>= 1.6)
60
- rails-html-sanitizer (1.3.0)
62
+ rails-html-sanitizer (1.4.2)
61
63
  loofah (~> 2.3)
62
- railties (6.0.3.2)
63
- actionpack (= 6.0.3.2)
64
- activesupport (= 6.0.3.2)
64
+ railties (6.1.4.1)
65
+ actionpack (= 6.1.4.1)
66
+ activesupport (= 6.1.4.1)
65
67
  method_source
66
- rake (>= 0.8.7)
67
- thor (>= 0.20.3, < 2.0)
68
+ rake (>= 0.13)
69
+ thor (~> 1.0)
68
70
  rainbow (3.0.0)
69
- rake (13.0.1)
70
- regexp_parser (1.7.1)
71
- rexml (3.2.4)
72
- rspec (3.9.0)
73
- rspec-core (~> 3.9.0)
74
- rspec-expectations (~> 3.9.0)
75
- rspec-mocks (~> 3.9.0)
76
- rspec-core (3.9.2)
77
- rspec-support (~> 3.9.3)
78
- rspec-expectations (3.9.2)
71
+ rake (13.0.6)
72
+ regexp_parser (2.1.1)
73
+ rexml (3.2.5)
74
+ rspec (3.10.0)
75
+ rspec-core (~> 3.10.0)
76
+ rspec-expectations (~> 3.10.0)
77
+ rspec-mocks (~> 3.10.0)
78
+ rspec-core (3.10.1)
79
+ rspec-support (~> 3.10.0)
80
+ rspec-expectations (3.10.1)
79
81
  diff-lcs (>= 1.2.0, < 2.0)
80
- rspec-support (~> 3.9.0)
81
- rspec-mocks (3.9.1)
82
+ rspec-support (~> 3.10.0)
83
+ rspec-mocks (3.10.2)
82
84
  diff-lcs (>= 1.2.0, < 2.0)
83
- rspec-support (~> 3.9.0)
84
- rspec-support (3.9.3)
85
- rubocop (0.86.0)
85
+ rspec-support (~> 3.10.0)
86
+ rspec-support (3.10.3)
87
+ rubocop (1.22.3)
86
88
  parallel (~> 1.10)
87
- parser (>= 2.7.0.1)
89
+ parser (>= 3.0.0.0)
88
90
  rainbow (>= 2.2.2, < 4.0)
89
- regexp_parser (>= 1.7)
91
+ regexp_parser (>= 1.8, < 3.0)
90
92
  rexml
91
- rubocop-ast (>= 0.0.3, < 1.0)
93
+ rubocop-ast (>= 1.12.0, < 2.0)
92
94
  ruby-progressbar (~> 1.7)
93
- unicode-display_width (>= 1.4.0, < 2.0)
94
- rubocop-ast (0.3.0)
95
- parser (>= 2.7.1.4)
96
- rubocop-shopify (1.0.4)
97
- rubocop (>= 0.85, < 0.87)
98
- ruby-progressbar (1.10.1)
99
- thor (1.0.1)
95
+ unicode-display_width (>= 1.4.0, < 3.0)
96
+ rubocop-ast (1.13.0)
97
+ parser (>= 3.0.1.1)
98
+ rubocop-shopify (1.0.7)
99
+ rubocop (~> 1.4)
100
+ ruby-progressbar (1.11.0)
101
+ thor (1.1.0)
100
102
  thread_safe (0.3.6)
101
- tzinfo (1.2.7)
102
- thread_safe (~> 0.1)
103
- unicode-display_width (1.7.0)
104
- zeitwerk (2.4.0)
103
+ tzinfo (2.0.4)
104
+ concurrent-ruby (~> 1.0)
105
+ unicode-display_width (2.1.0)
106
+ zeitwerk (2.5.1)
105
107
 
106
108
  PLATFORMS
107
109
  ruby
data/Rakefile CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "bundler/gem_tasks"
2
3
  require 'bundler/gem_tasks'
3
4
  task(default: :spec)
data/bin/console CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'bundler/setup'
4
5
  require 'cqrs/core'
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  Rails.configuration.to_prepare do
3
-
4
3
  middleware_stack = Middleware::Builder.new do |b|
5
4
  b.use(NexusCqrsAuth::AuthMiddleware)
6
5
  end
@@ -7,16 +7,15 @@ module NexusCqrs
7
7
  end
8
8
 
9
9
  def autoregister(base_class, dir = 'app/domain/commands', ignore_strings = ['.rb', 'app/domain/'])
10
-
11
10
  # Iterate over the director passed and find all ruby files, removing unwanted parts of the string.
12
11
  Dir["#{dir}/*.rb"].each do |file|
13
- ignore_strings.each { |i|
12
+ ignore_strings.each do |i|
14
13
  file.slice!(i)
15
- }
14
+ end
16
15
  begin
17
16
  # Constantize class name to constant to force rails to autoload this class
18
17
  file.camelize.constantize
19
- rescue NameError => e
18
+ rescue NameError
20
19
  puts "WARN: Tried to autoregister #{file.camelize} but class could not be found"
21
20
  end
22
21
  end
@@ -25,15 +24,19 @@ module NexusCqrs
25
24
  handler_name = (c.to_s + "Handler")
26
25
  begin
27
26
  handler = handler_name.constantize.new
28
- rescue NameError => e
29
- Rails.logger.error "WARN: A command/query called `#{c}` tried to autoregister `#{handler_name}` but the class was not found"
27
+ rescue NameError
28
+ Rails.logger.error(
29
+ "WARN: A command `#{c}` tried to autoregister `#{handler_name}` but the class was not found"
30
+ )
30
31
  next
31
32
  end
32
33
 
33
34
  if handler.respond_to?(:call)
34
35
  register_command(c, handler)
35
36
  else
36
- Rails.logger.error "WARN: A command/query called `#{c}` tried to autoregister `#{handler_name}` but the class did not have a `call` method"
37
+ Rails.logger.error(
38
+ "WARN: A command `#{c}` tried to autoregister `#{handler_name}` but `call` method did not exist"
39
+ )
37
40
  end
38
41
  end
39
42
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module NexusCqrs
3
- VERSION = '0.3.0'
3
+ VERSION = '0.3.1'
4
4
  end
data/nexus_cqrs.gemspec CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require_relative 'lib/nexus_cqrs/version'
2
3
 
3
4
  Gem::Specification.new do |spec|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexus_cqrs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dean Lovett