public_activity 1.6.1 → 1.6.2

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: c9d4db4120a2252f6c9c9c7476b8f8bed122581cbb6acf4fcd49661cd6546485
4
- data.tar.gz: 4227f6ca7b2beeae4eb17779cee5a9e97a533f65268c0a4c7c16dd7110acc286
3
+ metadata.gz: e4ac952b994db15150b6a1e7f221b05f41442f0c35d6bd21c90c5277fbe537cd
4
+ data.tar.gz: 3b3bd32fa1deeba2d30b0f500290e477b98b63156cc07af3c199e834549c4529
5
5
  SHA512:
6
- metadata.gz: 2cdb0fe6e3d876bd47781552f8bf8071fe2ffacc5d2c6dfeadb334b2300f887abafa82dcb2ea143bd8760c80ff71df5c42752ea9f15ba92450e94485406cbf68
7
- data.tar.gz: d867b98dfba576a698628fa8c69c454da9c625e279fada756e16723dd2386b7231ca5ceaa2c4570bb16f857f9356bf5f75dc9df87ae9a4101a9f9b9f7e742102
6
+ metadata.gz: 58e047472974959e02d2f35f78a5f8e2101c669f6bef0aa2a51f1138f9a0a525701720a079ee9020061b328144a3d4af82559535acd3a1c471d0901a47633f22
7
+ data.tar.gz: c9c5f76120c511e6b2a9ed551de5a50349813ca1ee851f91612f60a8a0e5fdc416032ea98dcd45273f5259a857d6b506772bc63bc41fff57401357b804d80cca
data/README.md CHANGED
@@ -4,6 +4,12 @@
4
4
  in Rails 3.0 - 5.0. Simply put: it records what has been changed or created and gives you the ability to present those
5
5
  recorded activities to users - in a similar way to how GitHub does it.
6
6
 
7
+ ## Sponsors
8
+
9
+ <p align="center">
10
+ <a style="max-width: 478x" href="https://getstream.io/try-the-api/?utm_source=public-activity&utm_medium=banner&utm_campaign=github"><img src="https://i.imgur.com/q4c8wVO.png"/>
11
+ </p>
12
+
7
13
  ## Rails 5
8
14
 
9
15
  **As of 1.6.0 version, public_activity also supports Rails up to 5.2.**
@@ -27,8 +27,14 @@ module PublicActivity
27
27
  end
28
28
 
29
29
  # Serialize parameters Hash
30
- if table_exists? && ![:json, :jsonb, :hstore].include?(columns_hash['parameters'].type)
31
- serialize :parameters, Hash
30
+ begin
31
+ if table_exists?
32
+ serialize :parameters, Hash unless [:json, :jsonb, :hstore].include?(columns_hash['parameters'].type)
33
+ else
34
+ warn("[WARN] table #{name} doesn't exist. Skipping PublicActivity::Activity#parameters's serialization")
35
+ end
36
+ rescue ::ActiveRecord::NoDatabaseError => e
37
+ warn("[WARN] database doesn't exist. Skipping PublicActivity::Activity#parameters's serialization")
32
38
  end
33
39
 
34
40
  if ::ActiveRecord::VERSION::MAJOR < 4 || defined?(ProtectedAttributes)
@@ -1,4 +1,4 @@
1
1
  module PublicActivity
2
2
  # A constant with gem's version
3
- VERSION = '1.6.1'
3
+ VERSION = '1.6.2'
4
4
  end
data/test/test_helper.rb CHANGED
@@ -132,7 +132,11 @@ when :mongo_mapper
132
132
  end
133
133
 
134
134
  class ViewSpec < MiniTest::Spec
135
- include ActiveSupport::Testing::SetupAndTeardown
135
+ if ActiveSupport.version >= Gem::Version.new('5.2.0')
136
+ prepend ActiveSupport::Testing::SetupAndTeardown
137
+ else
138
+ include ActiveSupport::Testing::SetupAndTeardown
139
+ end
136
140
  include ActionView::TestCase::Behavior
137
141
  end
138
142
  MiniTest::Spec.register_spec_type(/Rendering$/, ViewSpec)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: public_activity
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotrek Okoński
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-07-24 00:00:00.000000000 Z
12
+ date: 2018-08-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack