entangler 1.1.2 → 1.2.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: 85849db77d8ac84bbb9e7230de8f2d20f88dba32786a029ae0fb06c2700707b6
4
- data.tar.gz: 27e90f34ff9c31bc325b907926cf9906144f363d56b361100a62da2ab81a8539
3
+ metadata.gz: 04a6d5ab6db60640272b7acd3922ba845d2ab171ee4001f4be0b753b7d151c28
4
+ data.tar.gz: 962a2ab010fffe236dea92a6f5eba83d0ade41ce4edb9af0f867054d2923279c
5
5
  SHA512:
6
- metadata.gz: c57b439657b3314fe8cc44018208e364610321de33939bc9cf34fceb4b0108de61c4385a9aaf7700748f122118af4d62a3fff267461eb912b8cf421103fc4ddd
7
- data.tar.gz: 85da07278c48587669f37ed4e8e16abb4474ba55c3fc13a850dc322e1cea66f7934136261bc1302ade69074bbd6d29e9022609693a8db85d0edc48021c729117
6
+ metadata.gz: 3db61680fd1d006a4ce4dd9a1559c95090c74c898e8c4668378eb4ee5e440f919960104b1d97a62e14846214619e825f16f00385a72fdc4aae05b70dc565ad34
7
+ data.tar.gz: 65567038136a7bb19280347c8f1a82a59e5b40e0627d4be1ac79f54057c73f00a34b0a91ac8c81e2996a1e646e5649b989122a013db2aaf6377a4109ff333743
data/README.md CHANGED
@@ -19,7 +19,7 @@ $ entangler master /some/base/path user@remote:/some/remote/path
19
19
 
20
20
  ```
21
21
  $ entangler -h
22
- Entangler v1.1.2
22
+ Entangler v1.2.0
23
23
 
24
24
  Usage:
25
25
  entangler master <base_dir> <remote_user>@<remote_host>:<remote_base_dir> [options]
@@ -20,11 +20,14 @@ Gem::Specification.new do |spec|
20
20
  spec.bindir = 'exe'
21
21
  spec.executables = ['entangler']
22
22
  spec.require_paths = ['lib']
23
+ spec.required_ruby_version = '>= 2.5'
23
24
 
24
25
  spec.add_development_dependency 'bundler', '>= 2.1'
25
- spec.add_development_dependency 'rake', '>= 12.3.3'
26
+ spec.add_development_dependency 'rake', '>= 13.0.1'
26
27
  spec.add_development_dependency 'rspec', '>= 3.9'
27
- spec.add_development_dependency 'rubocop', '>= 0.80'
28
- spec.add_dependency 'listen', '~> 3.1'
29
- spec.add_dependency 'to_regexp', '~> 0.2.0'
28
+ spec.add_development_dependency 'rubocop', '~> 1.6'
29
+ spec.add_development_dependency 'rubocop-rake', '~> 0.5.1'
30
+ spec.add_development_dependency 'rubocop-rspec', '~> 2.0'
31
+ spec.add_dependency 'listen', '~> 3.3'
32
+ spec.add_dependency 'to_regexp', '~> 0.2.1'
30
33
  end
@@ -58,7 +58,7 @@ module Entangler
58
58
  def remove_recently_changed_files(entangled_files)
59
59
  @recently_received_paths.select! { |_, time| Time.now.to_f < time + 0.5 }
60
60
  paths = @recently_received_paths.map(&:first)
61
- logger.debug("Skipping paths #{paths.join(", ")} as they have changed recently") if paths.any?
61
+ logger.debug("Skipping paths #{paths.join(', ')} as they have changed recently") if paths.any?
62
62
  entangled_files.reject { |ef| paths.include?(ef.path) }
63
63
  end
64
64
 
@@ -111,9 +111,9 @@ module Entangler
111
111
  @listener_pauses[idx] = true
112
112
  listener.pause
113
113
  yield
114
- ensure
115
- @listener_pauses[idx] = false
116
- listener.start if @listener_pauses.none?
114
+ ensure
115
+ @listener_pauses[idx] = false
116
+ listener.start if @listener_pauses.none?
117
117
  end
118
118
 
119
119
  def with_log_time(msg)
@@ -23,7 +23,7 @@ module Entangler
23
23
 
24
24
  def log_outputs
25
25
  outs = [Entangler::Logger.log_file_path(base_dir)]
26
- outs << STDOUT unless @opts[:quiet]
26
+ outs << $stdout unless @opts[:quiet]
27
27
  end
28
28
 
29
29
  def perform_initial_rsync
@@ -5,13 +5,13 @@ module Entangler
5
5
  class Slave < Base
6
6
  def initialize(base_dir, opts = {})
7
7
  super(base_dir, opts)
8
- STDIN.binmode
9
- STDOUT.binmode
10
- STDIN.sync = true
11
- STDOUT.sync = true
8
+ $stdin.binmode
9
+ $stdout.binmode
10
+ $stdin.sync = true
11
+ $stdout.sync = true
12
12
 
13
- @remote_reader = STDIN
14
- @remote_writer = STDOUT
13
+ @remote_reader = $stdin
14
+ @remote_writer = $stdout
15
15
  $stderr.reopen(File.join(Entangler::Logger.log_file_path(base_dir, 'entangler.err')), 'w')
16
16
  end
17
17
  end
@@ -13,7 +13,7 @@ module Entangler
13
13
  File.join(base_dir, '.entangler', 'log', log_file_name)
14
14
  end
15
15
 
16
- def initialize(outputs, verbose = false)
16
+ def initialize(outputs, verbose: false)
17
17
  @loggers = Array(outputs).map do |output|
18
18
  logger = ::Logger.new(output)
19
19
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Entangler
4
- VERSION = '1.1.2'
4
+ VERSION = '1.2.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: entangler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Allie
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-10 00:00:00.000000000 Z
11
+ date: 2020-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 12.3.3
33
+ version: 13.0.1
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 12.3.3
40
+ version: 13.0.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -56,44 +56,72 @@ dependencies:
56
56
  name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.80'
61
+ version: '1.6'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.80'
68
+ version: '1.6'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop-rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.5.1
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.5.1
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop-rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '2.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '2.0'
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: listen
71
99
  requirement: !ruby/object:Gem::Requirement
72
100
  requirements:
73
101
  - - "~>"
74
102
  - !ruby/object:Gem::Version
75
- version: '3.1'
103
+ version: '3.3'
76
104
  type: :runtime
77
105
  prerelease: false
78
106
  version_requirements: !ruby/object:Gem::Requirement
79
107
  requirements:
80
108
  - - "~>"
81
109
  - !ruby/object:Gem::Version
82
- version: '3.1'
110
+ version: '3.3'
83
111
  - !ruby/object:Gem::Dependency
84
112
  name: to_regexp
85
113
  requirement: !ruby/object:Gem::Requirement
86
114
  requirements:
87
115
  - - "~>"
88
116
  - !ruby/object:Gem::Version
89
- version: 0.2.0
117
+ version: 0.2.1
90
118
  type: :runtime
91
119
  prerelease: false
92
120
  version_requirements: !ruby/object:Gem::Requirement
93
121
  requirements:
94
122
  - - "~>"
95
123
  - !ruby/object:Gem::Version
96
- version: 0.2.0
124
+ version: 0.2.1
97
125
  description: Two way file syncer using platform native notify.
98
126
  email:
99
127
  - dave@daveallie.com
@@ -133,7 +161,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
133
161
  requirements:
134
162
  - - ">="
135
163
  - !ruby/object:Gem::Version
136
- version: '0'
164
+ version: '2.5'
137
165
  required_rubygems_version: !ruby/object:Gem::Requirement
138
166
  requirements:
139
167
  - - ">="