table_sync 1.9.0 → 1.10.0

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: '079ab25e5512270ad9c1161f2a0f239fccb7954b5fbe56814605c39a72a87890'
4
- data.tar.gz: 51b8c5718e91e03aaf7ce45421670999ef83ad7aaefea3961198a09f678149c2
3
+ metadata.gz: '08f6482ff6549370e3855dced47343465678ed5b095f3c613363c4a6bbe743ef'
4
+ data.tar.gz: 59a541d16d2d2f0ae6e7f317b798aa1d3d8e4c7cc7a8dcd5e8696d6a892288c5
5
5
  SHA512:
6
- metadata.gz: fed258e3f7e24eed98df488c1b5d8ccef4732af5629001695c8053bcd239a46e52b79fef61d9febd627c7c44fe77b7d785f9f4b613aee8492161ec19f2d82288
7
- data.tar.gz: baf41f7542804dadcdb2c29861bfe82724bdeb743c9b986cec943f0875b97568429c01c6afb4409e49b4f45680a0df5ea951d3bf5c06e874aed6d66a9ed16577
6
+ metadata.gz: 623bf01e97409e583b008890f458d8bf8646254e373bc1ee4f9406ef54f4cb470957437c284e5309b0b5b0a5285589a7713beb7e64f4935d2473d71180f45dff
7
+ data.tar.gz: ce06f381c631a0ce48eabf873b239f48310fe6bc120d2c4152c8ce0a81e47101fb16ed256eb00d4e89d6a32f24dfb8c6b01bbfee9412104bf4d0c8d4f2c0ed10
data/.travis.yml CHANGED
@@ -1,26 +1,34 @@
1
1
  language: ruby
2
+
2
3
  matrix:
3
4
  fast_finish: true
4
5
  include:
5
- - rvm: 2.3
6
- - rvm: 2.4
7
- - rvm: 2.5
8
- - rvm: 2.6
9
- - rvm: ruby-head
6
+ - rvm: 2.3
7
+ - rvm: 2.4
8
+ - rvm: 2.5
9
+ - rvm: 2.6
10
+ - rvm: ruby-head
10
11
  allow_failures:
11
- - rvm: ruby-head
12
+ - rvm: ruby-head
13
+
12
14
  sudo: false
15
+
13
16
  dist: xenial
17
+
14
18
  cache: bundler
19
+
15
20
  services:
16
21
  - postgresql
22
+
17
23
  addons:
18
24
  postgresql: "10"
25
+
19
26
  before_install: gem install bundler
27
+
20
28
  before_script:
21
29
  - psql -c 'create database table_sync_test;' -U postgres
22
- script:
23
- - bundle exec rake bundle:audit
24
- - bundle exec rubocop
25
- - bundle exec rspec
26
30
 
31
+ script:
32
+ - bundle exec rake bundle:audit
33
+ - bundle exec rubocop
34
+ - bundle exec rspec
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [1.10.0] - 2019-08-28
5
+ ### Added
6
+ - convert symbolic values to strings in hashes to support older versions of activejob
7
+
4
8
  ## [1.9.0] - 2019-07-23
5
9
  ### Added
6
10
  - add notifications
data/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  source "https://rubygems.org"
4
- git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
+
5
5
  gemspec
@@ -61,7 +61,7 @@ class TableSync::BasePublisher
61
61
  when Hash
62
62
  object
63
63
  .transform_keys(&method(:filter_safe_for_serialization))
64
- .transform_values(&method(:filter_safe_for_serialization))
64
+ .transform_values(&method(:filter_safe_hash_values))
65
65
  .select { |*objects| objects.all?(&method(:object_mapped?)) }
66
66
  when Float::INFINITY
67
67
  NOT_MAPPED
@@ -72,6 +72,15 @@ class TableSync::BasePublisher
72
72
  end
73
73
  end
74
74
 
75
+ def filter_safe_hash_values(value)
76
+ case value
77
+ when Symbol
78
+ value.to_s
79
+ else
80
+ filter_safe_for_serialization(value)
81
+ end
82
+ end
83
+
75
84
  def object_mapped?(object)
76
85
  object != NOT_MAPPED
77
86
  end
@@ -14,6 +14,8 @@ module TableSync::Model
14
14
  def before_committed!(*); end
15
15
 
16
16
  def rolledback!(*); end
17
+
18
+ def trigger_transactional_callbacks?(*); end
17
19
  end
18
20
 
19
21
  def initialize(table_name)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TableSync
4
- VERSION = "1.9.0"
4
+ VERSION = "1.10.0"
5
5
  end
data/table_sync.gemspec CHANGED
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
35
35
  spec.add_development_dependency "rubocop-config-umbrellio", "~> 0.70"
36
36
  spec.add_development_dependency "simplecov", "~> 0.16"
37
37
 
38
- spec.add_development_dependency "activejob"
38
+ spec.add_development_dependency "activejob", ">= 4.2.11"
39
39
  spec.add_development_dependency "activerecord"
40
40
  spec.add_development_dependency "pg", "~> 0.18"
41
41
  spec.add_development_dependency "sequel"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: table_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Umbrellio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-23 00:00:00.000000000 Z
11
+ date: 2019-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: memery
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: 4.2.11
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: 4.2.11
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: activerecord
127
127
  requirement: !ruby/object:Gem::Requirement