entangler 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9903130b1c46dd5555b89bfeaca78446d9326108
4
- data.tar.gz: eaab17609bbbbcfb18f48a52558114096a5f2a8b
3
+ metadata.gz: 7664234684080baaf20298dfc18cb7ab65894387
4
+ data.tar.gz: e90330937c330a0967e086057d8e044785505e35
5
5
  SHA512:
6
- metadata.gz: 1ff26850233910d6a3f0868571f3e6c8c69ef371417784d62cda84e48d7026052245ba4ddddbcb708ec9ef1ef1299c0bdb9ee6f6cb6698f61ce6a9c3863825bd
7
- data.tar.gz: ef43547587b7ed6085a630eb82cd9a57ec7d282a7924af8dda5efda5d13b2b5fd96688e7460a8d09e29bacb4137b5759df61c334e9abfde4e72fb4fd9ab66059
6
+ metadata.gz: da01d358c301ff60072b67b10e74703446ca0e24a4d70ba0bef1a9eb6a23be7ac16b021de7f768934ffce9e9262e410f619dbf02ab20b6886c88839324092c8c
7
+ data.tar.gz: 0824476a729ee980afd9ad8eb0d0c371c5b0bbe5f31b826678131027afc9b985341520f9f565e5a2ed3a282406d08c8b960c79eecaebf6898400b63d480467bd
data/README.md CHANGED
@@ -18,7 +18,7 @@ $ entangler master /some/base/path user@remote:/some/remote/path
18
18
 
19
19
  ```
20
20
  $ entangler -h
21
- Entangler v1.1.0
21
+ Entangler v1.1.1
22
22
 
23
23
  Usage:
24
24
  entangler master <base_dir> <remote_user>@<remote_host>:<remote_base_dir> [options]
@@ -37,8 +37,8 @@ Options:
37
37
 
38
38
  ### Ignoring files and folders
39
39
 
40
- If you specify a string, instead of a regex, it will match any path starting with that string, i.e. `-i '.git'` will ignore the `.git`
41
- folder and all its sub-directories. If you want to just ignore the the `.git` sub-directories but not the content in the git folder, you'll
40
+ If you specify a string, instead of a regex, it will match any path starting with that string, i.e. `-i '.git'` will ignore the `.git`
41
+ folder and all its sub-directories. If you want to just ignore the the `.git` sub-directories but not the content in the git folder, you'll
42
42
  have to use regex. `-i '/^\.git(?:\/[^\/]+){2,}$/'` will match all sub-directories of `.git/`, but not the files in `.git`.
43
43
 
44
44
  You can specify multiple `-i` or `--ignore` flags to ignore multiple paths.
@@ -3,19 +3,19 @@ require 'entangler'
3
3
  require 'optparse'
4
4
  require 'to_regexp'
5
5
 
6
- options = {}
7
- def bool_opt(opts, key, *args)
6
+ def bool_opt(options, opts, key, *args)
8
7
  opts.on(*args) do
9
8
  options[key] = true
10
9
  end
11
10
  end
12
11
 
13
- def value_opt(opts, key, *args)
12
+ def value_opt(options, opts, key, *args)
14
13
  opts.on(*args) do |val|
15
14
  options[key] = val
16
15
  end
17
16
  end
18
17
 
18
+ options = {}
19
19
  OptionParser.new do |opts|
20
20
  opts.banner = %(Entangler v#{Entangler::VERSION}
21
21
 
@@ -32,10 +32,10 @@ Usage:
32
32
  options[:ignore] << ignore
33
33
  end
34
34
 
35
- value_opt(opts, :port, '-p', '--port PORT', 'Overwrite the SSH port (usually 22)',
35
+ value_opt(options, opts, :port, '-p', '--port PORT', 'Overwrite the SSH port (usually 22)',
36
36
  "(doesn't do anything in slave mode)")
37
- bool_opt(opts, :verbose, '-v', '--verbose', 'Log Debug lines')
38
- bool_opt(opts, :quiet, '-q', '--quiet', "Don't log to stdout in master process")
37
+ bool_opt(options, opts, :verbose, '-v', '--verbose', 'Log Debug lines')
38
+ bool_opt(options, opts, :quiet, '-q', '--quiet', "Don't log to stdout in master process")
39
39
 
40
40
  opts.on_tail('--version', 'Show version number') do
41
41
  puts Entangler::VERSION
@@ -1,6 +1,8 @@
1
1
  module Entangler
2
2
  module Helper
3
3
  def self.with_temp_file(name: 'tmp_file', contents: nil)
4
+ require 'tempfile'
5
+
4
6
  t = Tempfile.new(name)
5
7
  t.puts(contents) unless contents.nil?
6
8
  t.close
@@ -1,3 +1,3 @@
1
1
  module Entangler
2
- VERSION = '1.1.0'.freeze
2
+ VERSION = '1.1.1'.freeze
3
3
  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.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Allie
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-01 00:00:00.000000000 Z
11
+ date: 2017-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  version: '0'
142
142
  requirements: []
143
143
  rubyforge_project:
144
- rubygems_version: 2.6.8
144
+ rubygems_version: 2.6.12
145
145
  signing_key:
146
146
  specification_version: 4
147
147
  summary: Two way file syncer using platform native notify.