wfl_simple_activity 0.1.8 → 0.1.9

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: 78c695fff52b625303bdd26c47fc3ca061a2bdf11e804f19f18df10e9f6226fb
4
- data.tar.gz: ebfab69067ca298b6db7cddf5a637b66c43f3a2da7946715ad6612352b45dd65
3
+ metadata.gz: fb07938e75e645aa72551e8626b37338fc2e9f5a1b0201c941246d53390aee43
4
+ data.tar.gz: 907f485b24a088d0e76c3e8ada74cffc1e6ff5065f9508ea4c59350f3b8d5625
5
5
  SHA512:
6
- metadata.gz: c41f3ae3f24c6bd099b49b26523f93e02174581b5d8f5c816925d7f8c613c9efba9ff36ec2062f3bcc356bf61784116dcacd1519b8968ea982375488230b754b
7
- data.tar.gz: edd719a3310ed9bedc1d521b2ccc3ba8dbc84c37eb53b08a288b4ef54a33c8c00c6779f9cf8a2879cc1f80fde0bf34cf4d6bd758ea9fee9d98fb5c7c5a2e7d23
6
+ metadata.gz: 056fbcc244291f2c74335ea5f52b052bcca3af940a0d9912c265a65e81a0ac89b35c35d7889e337dbb321a0720af54813941c68cb0e6402e1f98d67b927bed9a
7
+ data.tar.gz: 52f1cf876b6926c0aeb6d9c92cbbed65eaf7daa596b982e67216d75ed3ff562d165f9221f0c34b4a1f42e0bb6475b00d5d3f0967d467bc3135b004e661cd33dd
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ *.gem
@@ -11,5 +11,13 @@ module CommonActivity
11
11
  request_params: proc {|controller, model| controller&.params&.to_h}
12
12
  }
13
13
  )
14
+
15
+ has_many :activities, as: :trackable, class_name: 'PublicActivity::Activity', dependent: :destroy
16
+
17
+ after_rollback proc {
18
+ self.create_activity key: "#{self.class.name.underscore}.failed", recipient: self
19
+ # 由于这里无法获取controller,需要自行采用其他方式来获取current_user,比如: 在oa-saas中有个Thread.current保存了全局的变量
20
+ # self.create_activity key: "#{self.class.name.underscore}.failed", owner: User.find(Thread.current[:user_id]), recipient: self
21
+ }
14
22
  end
15
23
  end
@@ -1,3 +1,3 @@
1
1
  module WflSimpleActivity
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wfl_simple_activity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - longhaoran
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-10 00:00:00.000000000 Z
11
+ date: 2019-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: public_activity
@@ -72,14 +72,6 @@ files:
72
72
  - lib/wfl_simple_activity.rb
73
73
  - lib/wfl_simple_activity/common_activity.rb
74
74
  - lib/wfl_simple_activity/version.rb
75
- - wfl_simple_activity-0.1.0.gem
76
- - wfl_simple_activity-0.1.1.gem
77
- - wfl_simple_activity-0.1.2.gem
78
- - wfl_simple_activity-0.1.3.gem
79
- - wfl_simple_activity-0.1.4.gem
80
- - wfl_simple_activity-0.1.5.gem
81
- - wfl_simple_activity-0.1.6.gem
82
- - wfl_simple_activity-0.1.7.gem
83
75
  - wfl_simple_activity.gemspec
84
76
  homepage: https://github.com/LongLonghaoran/wfl_simple_activity
85
77
  licenses: []
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file