consyncful 0.3.1 → 0.3.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: 7ad64a565666dba235e4ab3592caabd69a05d04ef5a798a96cfe67c00bfe0d91
4
- data.tar.gz: 882c439d6764c88771721fa3b250579d9ee512f3ed1ac3f67b9fe89a2699e311
3
+ metadata.gz: abe63339fd87ddbe4b2456fd22a333580d6865c5981b4b9c9a3660d11943a8e3
4
+ data.tar.gz: be20c90cef3dc401fb3ab55eaec17c68d8484cf475aace68d50aec7bb626092e
5
5
  SHA512:
6
- metadata.gz: a5915c7aa97a89b138110c7eed85524777cb9f9fd68841ecea6b4761e0479b006dcb8ec52a58d7e0e4c747f9fea8af0cfbe87708afe6b580eb68aa6830a63c32
7
- data.tar.gz: 56d5f2bd09235fbe3144851e39fc8cd9ae7ab7d0d71f1ed5b03791b60386b588b64d5c2f899f38127c2fbe815fa00563634ab0db98550aa7384c54586451860b
6
+ metadata.gz: c7f91c8cf381d8eb5be0990261d9344fe870648b5f0879290ae8defbfdbc79a51d61b0db227c21de4d8be2d734e655070882dfe2e44acf9983c099b0366e4654
7
+ data.tar.gz: e3000098bc7effd1432ebfabffc511e764bdf7e3e562544c50d66e390e3936a486c297b4c3fb88cf062f7512608ebfbc631a52623b0a1371f869e63d615a70f2
@@ -1,9 +1 @@
1
-
2
-
3
-
4
- Metrics/LineLength:
5
- Max: 120
6
-
7
- Metrics/BlockLength:
8
- Exclude:
9
- - spec/**/*
1
+ inherit_from: .rubocop_todo.yml
@@ -0,0 +1,46 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2020-01-24 14:47:44 +1300 using RuboCop version 0.79.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ Metrics/AbcSize:
11
+ Max: 19
12
+
13
+ # Offense count: 7
14
+ # Configuration parameters: CountComments, ExcludedMethods.
15
+ # ExcludedMethods: refine
16
+ Metrics/BlockLength:
17
+ Max: 153
18
+
19
+ # Offense count: 4
20
+ # Cop supports --auto-correct.
21
+ # Configuration parameters: AutoCorrect, EnforcedStyle.
22
+ # SupportedStyles: nested, compact
23
+ Style/ClassAndModuleChildren:
24
+ Exclude:
25
+ - 'lib/consyncful/railtie.rb'
26
+ - 'spec/consyncful/base_spec.rb'
27
+ - 'spec/consyncful/sync_spec.rb'
28
+
29
+ # Offense count: 7
30
+ Style/Documentation:
31
+ Exclude:
32
+ - 'spec/**/*'
33
+ - 'test/**/*'
34
+ - 'lib/consyncful.rb'
35
+ - 'lib/consyncful/base.rb'
36
+ - 'lib/consyncful/item_mapper.rb'
37
+ - 'lib/consyncful/railtie.rb'
38
+ - 'lib/consyncful/stats.rb'
39
+ - 'lib/consyncful/sync.rb'
40
+
41
+ # Offense count: 42
42
+ # Cop supports --auto-correct.
43
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
44
+ # URISchemes: http, https
45
+ Layout/LineLength:
46
+ Max: 226
@@ -1,8 +1,14 @@
1
+ ---
1
2
  sudo: false
2
3
  language: ruby
4
+ cache: bundler
3
5
  rvm:
4
6
  - 2.5.1
5
- before_install: gem install bundler -v 1.16.1
6
-
7
+ - 2.6.5
8
+ before_install: gem install bundler -v 2.1.0
7
9
  services:
8
10
  - mongodb
11
+
12
+ script:
13
+ - bundle exec rake spec
14
+ - bundle exec rubocop -P
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- consyncful (0.3.0)
4
+ consyncful (0.3.2)
5
5
  contentful (>= 2.11.1, < 3.0.0)
6
6
  mongoid (>= 7.0.2, < 8.0.0)
7
7
  rainbow
@@ -9,64 +9,85 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activemodel (5.2.3)
13
- activesupport (= 5.2.3)
14
- activesupport (5.2.3)
12
+ activemodel (6.0.2.1)
13
+ activesupport (= 6.0.2.1)
14
+ activesupport (6.0.2.1)
15
15
  concurrent-ruby (~> 1.0, >= 1.0.2)
16
16
  i18n (>= 0.7, < 2)
17
17
  minitest (~> 5.1)
18
18
  tzinfo (~> 1.1)
19
- addressable (2.6.0)
20
- public_suffix (>= 2.0.2, < 4.0)
21
- bson (4.5.0)
22
- concurrent-ruby (1.1.5)
23
- contentful (2.13.0)
19
+ zeitwerk (~> 2.2)
20
+ addressable (2.7.0)
21
+ public_suffix (>= 2.0.2, < 5.0)
22
+ ast (2.4.0)
23
+ bson (4.7.1)
24
+ concurrent-ruby (1.1.6)
25
+ contentful (2.15.2)
24
26
  http (> 0.8, < 5.0)
25
27
  multi_json (~> 1)
26
- database_cleaner (1.7.0)
28
+ database_cleaner (1.8.3)
27
29
  diff-lcs (1.3)
28
- domain_name (0.5.20180417)
30
+ domain_name (0.5.20190701)
29
31
  unf (>= 0.0.5, < 1.0.0)
30
- http (4.1.1)
32
+ ffi (1.12.2)
33
+ ffi-compiler (1.0.1)
34
+ ffi (>= 1.0.0)
35
+ rake
36
+ http (4.3.0)
31
37
  addressable (~> 2.3)
32
38
  http-cookie (~> 1.0)
33
- http-form_data (~> 2.0)
34
- http_parser.rb (~> 0.6.0)
39
+ http-form_data (~> 2.2)
40
+ http-parser (~> 1.2.0)
35
41
  http-cookie (1.0.3)
36
42
  domain_name (~> 0.5)
37
- http-form_data (2.1.1)
38
- http_parser.rb (0.6.0)
39
- i18n (1.6.0)
43
+ http-form_data (2.2.0)
44
+ http-parser (1.2.1)
45
+ ffi-compiler (>= 1.0, < 2.0)
46
+ i18n (1.8.2)
40
47
  concurrent-ruby (~> 1.0)
41
- minitest (5.11.3)
42
- mongo (2.9.0)
48
+ jaro_winkler (1.5.4)
49
+ minitest (5.14.0)
50
+ mongo (2.11.3)
43
51
  bson (>= 4.4.2, < 5.0.0)
44
- mongoid (7.0.4)
45
- activemodel (>= 5.1, < 6.0.0)
52
+ mongoid (7.0.5)
53
+ activemodel (>= 5.1, < 6.1)
46
54
  mongo (>= 2.5.1, < 3.0.0)
47
- multi_json (1.13.1)
48
- public_suffix (3.1.1)
55
+ multi_json (1.14.1)
56
+ parallel (1.19.1)
57
+ parser (2.7.0.2)
58
+ ast (~> 2.4.0)
59
+ public_suffix (4.0.3)
49
60
  rainbow (3.0.0)
50
61
  rake (10.5.0)
51
- rspec (3.8.0)
52
- rspec-core (~> 3.8.0)
53
- rspec-expectations (~> 3.8.0)
54
- rspec-mocks (~> 3.8.0)
55
- rspec-core (3.8.0)
56
- rspec-support (~> 3.8.0)
57
- rspec-expectations (3.8.2)
62
+ rspec (3.9.0)
63
+ rspec-core (~> 3.9.0)
64
+ rspec-expectations (~> 3.9.0)
65
+ rspec-mocks (~> 3.9.0)
66
+ rspec-core (3.9.1)
67
+ rspec-support (~> 3.9.1)
68
+ rspec-expectations (3.9.0)
58
69
  diff-lcs (>= 1.2.0, < 2.0)
59
- rspec-support (~> 3.8.0)
60
- rspec-mocks (3.8.0)
70
+ rspec-support (~> 3.9.0)
71
+ rspec-mocks (3.9.1)
61
72
  diff-lcs (>= 1.2.0, < 2.0)
62
- rspec-support (~> 3.8.0)
63
- rspec-support (3.8.0)
73
+ rspec-support (~> 3.9.0)
74
+ rspec-support (3.9.2)
75
+ rubocop (0.79.0)
76
+ jaro_winkler (~> 1.5.1)
77
+ parallel (~> 1.10)
78
+ parser (>= 2.7.0.1)
79
+ rainbow (>= 2.2.2, < 4.0)
80
+ ruby-progressbar (~> 1.7)
81
+ unicode-display_width (>= 1.4.0, < 1.7)
82
+ ruby-progressbar (1.10.1)
64
83
  thread_safe (0.3.6)
65
- tzinfo (1.2.5)
84
+ tzinfo (1.2.6)
66
85
  thread_safe (~> 0.1)
67
86
  unf (0.1.4)
68
87
  unf_ext
69
88
  unf_ext (0.0.7.6)
89
+ unicode-display_width (1.6.1)
90
+ zeitwerk (2.2.2)
70
91
 
71
92
  PLATFORMS
72
93
  ruby
@@ -77,6 +98,7 @@ DEPENDENCIES
77
98
  database_cleaner
78
99
  rake (~> 10.0)
79
100
  rspec (~> 3.0)
101
+ rubocop (= 0.79.0)
80
102
 
81
103
  BUNDLED WITH
82
- 2.0.2
104
+ 2.1.0
data/README.md CHANGED
@@ -1,5 +1,4 @@
1
- # Consyncful
2
- [![Build Status](https://travis-ci.com/boost/consyncful.svg?branch=master)](https://travis-ci.com/boost/consyncful)
1
+ # Consyncful [![Build Status](https://travis-ci.org/boost/consyncful.svg?branch=master)](https://travis-ci.org/boost/consyncful)
3
2
 
4
3
  Contentful -> local database synchronisation for Rails
5
4
 
@@ -31,9 +31,10 @@ Gem::Specification.new do |spec|
31
31
  spec.require_paths = ['lib']
32
32
 
33
33
  spec.add_development_dependency 'bundler', '~> 2'
34
+ spec.add_development_dependency 'database_cleaner'
34
35
  spec.add_development_dependency 'rake', '~> 10.0'
35
36
  spec.add_development_dependency 'rspec', '~> 3.0'
36
- spec.add_development_dependency 'database_cleaner'
37
+ spec.add_development_dependency 'rubocop', '0.79.0'
37
38
 
38
39
  spec.add_dependency 'contentful', ['>=2.11.1', '<3.0.0']
39
40
  spec.add_dependency 'mongoid', ['>=7.0.2', '<8.0.0']
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rainbow'
3
4
 
4
5
  module Consyncful
@@ -19,12 +19,19 @@ namespace :consyncful do
19
19
  end
20
20
 
21
21
  task update_model_names: [:environment] do
22
- Rails.application.eager_load!
22
+ if Object.const_defined?('Zeitwerk::Loader') && Rails.application.config.autoloader.to_s == 'zeitwerk'
23
+ Zeitwerk::Loader.eager_load_all
24
+ else
25
+ Rails.application.eager_load!
26
+ end
27
+
23
28
  puts Rainbow('Updating model names:').blue
29
+
24
30
  Consyncful::Base.model_map.each do |contentful_name, constant|
25
31
  puts Rainbow("#{contentful_name}: #{constant}").yellow
26
32
  Consyncful::Base.where(contentful_type: contentful_name).update_all(_type: constant.to_s)
27
33
  end
34
+
28
35
  Consyncful::Base.where(:contentful_type.nin => Consyncful::Base.model_map.keys).update_all(_type: 'Consyncful::Base')
29
36
  end
30
37
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Consyncful
4
- VERSION = '0.3.1'
4
+ VERSION = '0.3.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: consyncful
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Anastasiadis-Gray
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-07-03 00:00:00.000000000 Z
12
+ date: 2020-02-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -25,6 +25,20 @@ dependencies:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '2'
28
+ - !ruby/object:Gem::Dependency
29
+ name: database_cleaner
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
28
42
  - !ruby/object:Gem::Dependency
29
43
  name: rake
30
44
  requirement: !ruby/object:Gem::Requirement
@@ -54,19 +68,19 @@ dependencies:
54
68
  - !ruby/object:Gem::Version
55
69
  version: '3.0'
56
70
  - !ruby/object:Gem::Dependency
57
- name: database_cleaner
71
+ name: rubocop
58
72
  requirement: !ruby/object:Gem::Requirement
59
73
  requirements:
60
- - - ">="
74
+ - - '='
61
75
  - !ruby/object:Gem::Version
62
- version: '0'
76
+ version: 0.79.0
63
77
  type: :development
64
78
  prerelease: false
65
79
  version_requirements: !ruby/object:Gem::Requirement
66
80
  requirements:
67
- - - ">="
81
+ - - '='
68
82
  - !ruby/object:Gem::Version
69
- version: '0'
83
+ version: 0.79.0
70
84
  - !ruby/object:Gem::Dependency
71
85
  name: contentful
72
86
  requirement: !ruby/object:Gem::Requirement
@@ -132,6 +146,7 @@ files:
132
146
  - ".gitignore"
133
147
  - ".rspec"
134
148
  - ".rubocop.yml"
149
+ - ".rubocop_todo.yml"
135
150
  - ".ruby-version"
136
151
  - ".travis.yml"
137
152
  - Gemfile