stance 0.5.0 → 0.6.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: 3e3331680d4153bfa8cefa453b03db38cc87ad2ee34e5413790e70fca91e9626
4
- data.tar.gz: aaf358e5b0a7f9f42c08df1860b5410536a591ee61525ab24e8449714c257d00
3
+ metadata.gz: a4678a743eb587bc836b518b9aa6303e473446cd5a85e563c1cf75089323c5f2
4
+ data.tar.gz: 71504954ca7ec983a8f4af5930c0a4d641e083ea64b692ae704774306efd8d59
5
5
  SHA512:
6
- metadata.gz: 3f98996364a4ebd043d9718e9c0ef7052bbc0fd03048376f66736c686c2d05fd97a1cec05833ad809e8a48361e90e8af33ac01c33a87863865916a3dbd98bd4c
7
- data.tar.gz: 970e10e13187da5d36c3d7dff886c9c1d4971b539ef0c57d180f56a029f2987f3231b5851c377e9b9c7d0eb94bd1cece8a32a7777a594df8ae093c3bccd5609b
6
+ metadata.gz: 11cc7006854156fa8bb0a43ca8fa767ee90fea148a2b0e62c1afa985618f675cb7e80ba3d1873344c35f15c86620e4dab5387341ff59e9b55930c40a1a448d65
7
+ data.tar.gz: aa8c0034e856a3cc63322f14f4903df023f59a1220a66c12201230e51cdb5bac5b1cc50b87c37c2b4024dd9e248a1342d9096a8e84923d1bf42fcd1914911c3e
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /spec/reports/
8
8
  /tmp/
9
9
  /test/internal/db/*.sqlite
10
+ .DS_Store
data/.rubocop.yml CHANGED
@@ -5,4 +5,6 @@ Style/Documentation:
5
5
  Layout/LineLength:
6
6
  Max: 100
7
7
  Metrics/MethodLength:
8
- Max: 12
8
+ Max: 15
9
+ Style/ClassVars:
10
+ Enabled: false
data/Gemfile CHANGED
@@ -13,4 +13,6 @@ gem 'minitest-focus'
13
13
  gem 'mocha'
14
14
  gem 'rake', '~> 13.0'
15
15
  gem 'rubocop'
16
+ gem 'rubocop-minitest'
17
+ gem 'rubocop-rake'
16
18
  gem 'sqlite3'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stance (0.4.0)
4
+ stance (0.5.3)
5
5
  activerecord (>= 5)
6
6
  multi_json
7
7
  railties (>= 5)
@@ -9,101 +9,105 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionpack (6.1.1)
13
- actionview (= 6.1.1)
14
- activesupport (= 6.1.1)
12
+ actionpack (6.1.4.1)
13
+ actionview (= 6.1.4.1)
14
+ activesupport (= 6.1.4.1)
15
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.1.1)
20
- activesupport (= 6.1.1)
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
- activemodel (6.1.1)
26
- activesupport (= 6.1.1)
27
- activerecord (6.1.1)
28
- activemodel (= 6.1.1)
29
- activesupport (= 6.1.1)
30
- activesupport (6.1.1)
25
+ activemodel (6.1.4.1)
26
+ activesupport (= 6.1.4.1)
27
+ activerecord (6.1.4.1)
28
+ activemodel (= 6.1.4.1)
29
+ activesupport (= 6.1.4.1)
30
+ activesupport (6.1.4.1)
31
31
  concurrent-ruby (~> 1.0, >= 1.0.2)
32
32
  i18n (>= 1.6, < 2)
33
33
  minitest (>= 5.1)
34
34
  tzinfo (~> 2.0)
35
35
  zeitwerk (~> 2.3)
36
- ast (2.4.1)
36
+ ast (2.4.2)
37
37
  autotest-suffix (1.1.0)
38
38
  builder (3.2.4)
39
- combustion (1.3.1)
39
+ combustion (1.3.5)
40
40
  activesupport (>= 3.0.0)
41
41
  railties (>= 3.0.0)
42
42
  thor (>= 0.14.6)
43
- concurrent-ruby (1.1.8)
43
+ concurrent-ruby (1.1.9)
44
44
  crass (1.0.6)
45
45
  erubi (1.10.0)
46
- i18n (1.8.7)
46
+ i18n (1.8.11)
47
47
  concurrent-ruby (~> 1.0)
48
- loofah (2.9.0)
48
+ loofah (2.12.0)
49
49
  crass (~> 1.0.2)
50
50
  nokogiri (>= 1.5.9)
51
51
  method_source (1.0.0)
52
- mini_portile2 (2.5.0)
53
- minitest (5.14.3)
52
+ mini_portile2 (2.6.1)
53
+ minitest (5.14.4)
54
54
  minitest-autotest (1.1.1)
55
55
  minitest-server (~> 1.0)
56
56
  path_expander (~> 1.0)
57
- minitest-focus (1.2.1)
57
+ minitest-focus (1.3.1)
58
58
  minitest (>= 4, < 6)
59
59
  minitest-server (1.0.6)
60
60
  minitest (~> 5.0)
61
- mocha (1.12.0)
61
+ mocha (1.13.0)
62
62
  multi_json (1.15.0)
63
- nokogiri (1.11.1)
64
- mini_portile2 (~> 2.5.0)
63
+ nokogiri (1.12.5)
64
+ mini_portile2 (~> 2.6.1)
65
65
  racc (~> 1.4)
66
- parallel (1.20.1)
67
- parser (3.0.0.0)
66
+ parallel (1.21.0)
67
+ parser (3.0.3.1)
68
68
  ast (~> 2.4.1)
69
69
  path_expander (1.1.0)
70
- racc (1.5.2)
70
+ racc (1.6.0)
71
71
  rack (2.2.3)
72
72
  rack-test (1.1.0)
73
73
  rack (>= 1.0, < 3)
74
74
  rails-dom-testing (2.0.3)
75
75
  activesupport (>= 4.2.0)
76
76
  nokogiri (>= 1.6)
77
- rails-html-sanitizer (1.3.0)
77
+ rails-html-sanitizer (1.4.2)
78
78
  loofah (~> 2.3)
79
- railties (6.1.1)
80
- actionpack (= 6.1.1)
81
- activesupport (= 6.1.1)
79
+ railties (6.1.4.1)
80
+ actionpack (= 6.1.4.1)
81
+ activesupport (= 6.1.4.1)
82
82
  method_source
83
- rake (>= 0.8.7)
83
+ rake (>= 0.13)
84
84
  thor (~> 1.0)
85
85
  rainbow (3.0.0)
86
- rake (13.0.3)
87
- regexp_parser (2.0.3)
88
- rexml (3.2.4)
89
- rubocop (1.8.1)
86
+ rake (13.0.6)
87
+ regexp_parser (2.1.1)
88
+ rexml (3.2.5)
89
+ rubocop (1.23.0)
90
90
  parallel (~> 1.10)
91
91
  parser (>= 3.0.0.0)
92
92
  rainbow (>= 2.2.2, < 4.0)
93
93
  regexp_parser (>= 1.8, < 3.0)
94
94
  rexml
95
- rubocop-ast (>= 1.2.0, < 2.0)
95
+ rubocop-ast (>= 1.12.0, < 2.0)
96
96
  ruby-progressbar (~> 1.7)
97
97
  unicode-display_width (>= 1.4.0, < 3.0)
98
- rubocop-ast (1.4.0)
99
- parser (>= 2.7.1.5)
98
+ rubocop-ast (1.13.0)
99
+ parser (>= 3.0.1.1)
100
+ rubocop-minitest (0.17.0)
101
+ rubocop (>= 0.90, < 2.0)
102
+ rubocop-rake (0.6.0)
103
+ rubocop (~> 1.0)
100
104
  ruby-progressbar (1.11.0)
101
105
  sqlite3 (1.4.2)
102
- thor (1.0.1)
106
+ thor (1.1.0)
103
107
  tzinfo (2.0.4)
104
108
  concurrent-ruby (~> 1.0)
105
- unicode-display_width (2.0.0)
106
- zeitwerk (2.4.2)
109
+ unicode-display_width (2.1.0)
110
+ zeitwerk (2.5.1)
107
111
 
108
112
  PLATFORMS
109
113
  ruby
@@ -117,8 +121,10 @@ DEPENDENCIES
117
121
  mocha
118
122
  rake (~> 13.0)
119
123
  rubocop
124
+ rubocop-minitest
125
+ rubocop-rake
120
126
  sqlite3
121
127
  stance!
122
128
 
123
129
  BUNDLED WITH
124
- 2.1.4
130
+ 2.2.31
@@ -4,7 +4,7 @@ module Stance
4
4
  module ActiveRecordCallbacks
5
5
  extend ActiveSupport::Concern
6
6
 
7
- CALLBACKS = %i[before_validation after_validation before_save before_create
7
+ CALLBACKS = %i[after_initialize before_validation after_validation before_save before_create
8
8
  after_create before_update after_update before_destroy after_destroy after_save
9
9
  after_touch after_commit after_save_commit after_create_commit
10
10
  after_update_commit after_destroy_commit after_rollback].freeze
data/lib/stance/event.rb CHANGED
@@ -34,12 +34,12 @@ module Stance
34
34
  def create
35
35
  return self if singleton_exists?
36
36
 
37
- Rails.logger.info "Event: #{full_name}"
38
-
39
37
  Stance::EventRecord.transaction do
40
38
  run_callbacks :create do
41
39
  # Call each public method of the Event class if a custom class.
42
40
  if self.class.name != 'Stance::Event'
41
+ Rails.logger.info "Event: #{full_name}"
42
+
43
43
  (public_methods(false) - Stance::Event.instance_methods(false)).each do |method|
44
44
  send method
45
45
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stance
4
- VERSION = '0.5.0'
4
+ VERSION = '0.6.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Moss
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-27 00:00:00.000000000 Z
11
+ date: 2021-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '5'
55
- description:
55
+ description:
56
56
  email:
57
57
  - joel@developwithstyle.com
58
58
  executables: []
@@ -89,7 +89,7 @@ metadata:
89
89
  homepage_uri: https://github.com/joelmoss/stance
90
90
  source_code_uri: https://github.com/joelmoss/stance
91
91
  changelog_uri: https://github.com/joelmoss/stance/releases
92
- post_install_message:
92
+ post_install_message:
93
93
  rdoc_options: []
94
94
  require_paths:
95
95
  - lib
@@ -104,8 +104,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  requirements: []
107
- rubygems_version: 3.1.4
108
- signing_key:
107
+ rubygems_version: 3.2.22
108
+ signing_key:
109
109
  specification_version: 4
110
110
  summary: Event System for Rails
111
111
  test_files: []