public_activity 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/public_activity/migration/migration_generator.rb +1 -1
- data/lib/generators/public_activity/migration_upgrade/migration_upgrade_generator.rb +1 -2
- data/lib/generators/public_activity/migration_upgrade/templates/upgrade.rb +1 -1
- data/lib/public_activity/orm/active_record/activity.rb +3 -1
- data/lib/public_activity/version.rb +1 -1
- data/test/test_activity.rb +1 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa4a946e3b5ec45ad643a08338a4b150ddb912fa0489e053dc9d310727cc9367
|
4
|
+
data.tar.gz: ba63edb8f4731b604cee4043fd31bf76abdcf45ca9eab971502ec7caa1b31939
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04f48aec79e23c926de4ebe00219c611d5483e1eb9029cd400b501625eb1ca5d4be4b8071f6ae4552888175f2bfa4b7003b4fac9d610b4a649a8a5925d7d9676
|
7
|
+
data.tar.gz: cb0abcede1c4c52de2ce8f572b25818f98803413e95959fed94382e3f65b843ae1caab9db10ca76dbfba1b50174e90935d424f58231014803ba017f90ee90416
|
@@ -9,7 +9,7 @@ module PublicActivity
|
|
9
9
|
class MigrationGenerator < ActiveRecord::Generators::Base
|
10
10
|
extend Base
|
11
11
|
|
12
|
-
argument :name, type
|
12
|
+
argument :name, :type => :string, :default => 'create_activities'
|
13
13
|
# Create migration in project's folder
|
14
14
|
def generate_files
|
15
15
|
migration_template 'migration.rb', "db/migrate/#{name}.rb"
|
@@ -9,8 +9,7 @@ module PublicActivity
|
|
9
9
|
class MigrationUpgradeGenerator < ActiveRecord::Generators::Base
|
10
10
|
extend Base
|
11
11
|
|
12
|
-
argument :name, type
|
13
|
-
|
12
|
+
argument :name, :type => :string, :default => 'upgrade_activities'
|
14
13
|
# Create migration in project's folder
|
15
14
|
def generate_files
|
16
15
|
migration_template 'upgrade.rb', "db/migrate/#{name}.rb"
|
@@ -14,7 +14,7 @@ module PublicActivity
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
module ORM
|
19
19
|
module ActiveRecord
|
20
20
|
# The ActiveRecord model containing
|
@@ -53,6 +53,8 @@ module PublicActivity
|
|
53
53
|
end
|
54
54
|
rescue ::ActiveRecord::NoDatabaseError
|
55
55
|
warn("[WARN] database doesn't exist. Skipping PublicActivity::Activity#parameters's serialization")
|
56
|
+
rescue ::ActiveRecord::ConnectionNotEstablished
|
57
|
+
warn("[WARN] couldn't connect to database. Skipping PublicActivity::Activity#parameters's serialization")
|
56
58
|
rescue ::PG::ConnectionBad
|
57
59
|
warn("[WARN] couldn't connect to database. Skipping PublicActivity::Activity#parameters's serialization")
|
58
60
|
rescue Mysql2::Error::ConnectionError
|
data/test/test_activity.rb
CHANGED
@@ -17,8 +17,7 @@ describe 'PublicActivity::Activity Rendering' do
|
|
17
17
|
describe '#render' do
|
18
18
|
subject do
|
19
19
|
s = PublicActivity::Activity.new(key: 'activity.test', parameters: { one: 1 })
|
20
|
-
s.save
|
21
|
-
s
|
20
|
+
s.save && s
|
22
21
|
end
|
23
22
|
|
24
23
|
let(:template_output) { "<strong>1, 2</strong>\n<em>activity.test, #{subject.id}</em>\n" }
|
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: 2.0.
|
4
|
+
version: 2.0.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: 2022-
|
12
|
+
date: 2022-07-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -281,7 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
281
281
|
- !ruby/object:Gem::Version
|
282
282
|
version: '0'
|
283
283
|
requirements: []
|
284
|
-
rubygems_version: 3.3.
|
284
|
+
rubygems_version: 3.3.17
|
285
285
|
signing_key:
|
286
286
|
specification_version: 4
|
287
287
|
summary: Easy activity tracking for ActiveRecord models
|