vagrant-vaimo-unison 0.0.2 → 0.1.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
  SHA1:
3
- metadata.gz: d0dfc2c9527b5c0f8a8218c166e62b066b5a6474
4
- data.tar.gz: 370dc703f3f5844a769203a0468245cc6174e28f
3
+ metadata.gz: 082fe642839fc7f5f951dc7ce097399fc77e8d53
4
+ data.tar.gz: 6edb0d30b2dc5bb26063bb312221539d057b1060
5
5
  SHA512:
6
- metadata.gz: 13c669a03e5845a66f6945a17974d6013ca68bd0d452e4972fa8c0baa433841fee1f09225d6284550597c66080a18c689779df50be5908450ad2c5fbb3356ead
7
- data.tar.gz: 1b6fd39a2d502765a132aee4004c401a57c4af41adcf0b3903b9b15f1a3bced553b5927ae88e0a1c2e32095137e5a8368f2a0643344574e10898548f9bcb404d
6
+ metadata.gz: a466b2ffb35765ae19f003e1ac993c18d0f325150a326ef4aad42045f70b841d4d1ea0433daf5e4cb03304d137206508fa07f11ddeabdea9ca37e6ec90abd391
7
+ data.tar.gz: a61d815896c8cc7a4053fdb8443fef1fa42100b0553f488e2c84bd06de1ce1ed17accd9e405a7d4944013c174c906a38f5426472b538f1ba5fc3c732205a6c38
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
@@ -6,5 +6,6 @@ group :development do
6
6
  # We depend on Vagrant for development, but we don't add it as a
7
7
  # gem dependency because we expect to be installed within the
8
8
  # Vagrant environment itself using `vagrant plugin`.
9
- gem "vagrant", :git => "git://github.com/mitchellh/vagrant.git"
9
+ gem 'vagrant',
10
+ :git => 'https://github.com/mitchellh/vagrant.git'
10
11
  end
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ $stdout.sync = true
8
8
  $stderr.sync = true
9
9
 
10
10
  # Change to the directory of this file.
11
- Dir.chdir(File.expand_path("../", __FILE__))
11
+ Dir.chdir(File.expand_path('../', __FILE__))
12
12
 
13
13
  # This installs the tasks that help with gem creation and
14
14
  # publishing.
@@ -18,4 +18,4 @@ Bundler::GemHelper.install_tasks
18
18
  RSpec::Core::RakeTask.new
19
19
 
20
20
  # Default task is to run the unit tests
21
- task :default => "spec"
21
+ task :default => 'spec'
@@ -1,6 +1,6 @@
1
- require "log4r"
2
- require "vagrant"
3
- require "thread"
1
+ require 'log4r'
2
+ require 'vagrant'
3
+ require 'thread'
4
4
 
5
5
  require_relative 'unison_paths'
6
6
  require_relative 'ssh_command'
@@ -9,11 +9,11 @@ require_relative 'unison_sync'
9
9
 
10
10
  module VagrantPlugins
11
11
  module Unison
12
- class CommandOnce < Vagrant.plugin("2", :command)
12
+ class CommandOnce < Vagrant.plugin('2', :command)
13
13
  include UnisonSync
14
14
 
15
15
  def self.synopsis
16
- "sync the unison shared folder once"
16
+ 'sync the unison shared folder once'
17
17
  end
18
18
 
19
19
  def execute
@@ -22,9 +22,9 @@ module VagrantPlugins
22
22
  execute_sync_command(machine) do |command|
23
23
  command.batch = true
24
24
  command.terse = true
25
- command = command.to_s
25
+ command = command.to_s
26
26
 
27
- @env.ui.info "Running unison once"
27
+ @env.ui.info 'Running unison once '
28
28
  @env.ui.info " #{command}"
29
29
 
30
30
  status = system(command)
@@ -44,7 +44,7 @@ module VagrantPlugins
44
44
  attr_accessor :bg_thread
45
45
 
46
46
  def self.synopsis
47
- "sync the unison shared folder forever, by polling for changes"
47
+ 'sync the unison shared folder forever, by polling for changes'
48
48
  end
49
49
 
50
50
  def execute
@@ -53,8 +53,8 @@ module VagrantPlugins
53
53
  @bg_thread = watch_vm_for_memory_leak(machine)
54
54
  execute_sync_command(machine) do |command|
55
55
  command.repeat = true
56
- command.terse = true
57
- command = command.to_s
56
+ command.terse = true
57
+ command = command.to_s
58
58
 
59
59
  @env.ui.info "Running #{command}"
60
60
 
@@ -68,7 +68,7 @@ module VagrantPlugins
68
68
  begin
69
69
  sleep 2 if exit_on_next_sigint
70
70
  exit_on_next_sigint = false
71
- status = system(command)
71
+ status = system(command)
72
72
  @env.ui.info "**** unison exited. success: #{status} ****"
73
73
  rescue Interrupt
74
74
  if exit_on_next_sigint
@@ -78,16 +78,16 @@ module VagrantPlugins
78
78
  @env.ui.info '** Hit Ctrl + C again to kill. **'
79
79
  exit_on_next_sigint = true
80
80
  rescue Exception
81
- @env.ui.info '** Sync crashed. Respawning. Hit Ctrl + C twice to kill. **'
81
+ @env.ui.info '** Sync crashed. Respawning. Hit Ctrl + C twice to kill. **'
82
82
  end
83
83
  end
84
84
  end
85
85
  end
86
86
  if status
87
87
  return 0
88
- else
89
- return 1
90
88
  end
89
+
90
+ 1
91
91
  end
92
92
 
93
93
  def watch_vm_for_memory_leak(machine)
@@ -95,16 +95,16 @@ module VagrantPlugins
95
95
  Thread.new(ssh_command.ssh, machine.config.unison.mem_cap_mb) do |ssh_command_text, mem_cap_mb|
96
96
  while true
97
97
  sleep 15
98
- total_mem = `#{ssh_command_text} 'free -m | egrep "^Mem:" | awk "{print \\$2}"' 2>/dev/null`
98
+ total_mem = `#{ssh_command_text} 'free -m | egrep "^Mem:" | awk "{print \\$2}"' 2>/dev/null`
99
99
  _unison_proc_returnval = (
100
- `#{ssh_command_text} 'ps aux | grep "[u]nison -server" | awk "{print \\$2, \\$4}"' 2>/dev/null`
100
+ `#{ssh_command_text} 'ps aux | grep "[u]nison -server" | awk "{print \\$2, \\$4}"' 2>/dev/null`
101
101
  )
102
102
  if _unison_proc_returnval == ''
103
- puts "Unison not running in VM"
103
+ puts 'Unison not running in VM'
104
104
  next
105
105
  end
106
106
  pid, mem_pct_unison = _unison_proc_returnval.strip.split(' ')
107
- mem_unison = (total_mem.to_f * mem_pct_unison.to_f/100).round(1)
107
+ mem_unison = (total_mem.to_f * mem_pct_unison.to_f/100).round(1)
108
108
  # Debugging: uncomment to log every loop tick
109
109
  # puts "Unison running as #{pid} using #{mem_unison} mb"
110
110
  if mem_unison > mem_cap_mb
@@ -116,9 +116,9 @@ module VagrantPlugins
116
116
  end
117
117
  end
118
118
 
119
- class CommandCleanup < Vagrant.plugin("2", :command)
119
+ class CommandCleanup < Vagrant.plugin('2', :command)
120
120
  def self.synopsis
121
- "remove all unison supporting state on local and remote system"
121
+ 'remove all unison supporting state on local and remote system'
122
122
  end
123
123
 
124
124
  def execute
@@ -133,7 +133,7 @@ module VagrantPlugins
133
133
  @env.ui.info "Running #{command} on guest VM (delete all files from directory including hidden ones)"
134
134
  machine.communicate.sudo(command)
135
135
 
136
- command = "rm -rf ~/.unison"
136
+ command = 'rm -rf ~/.unison'
137
137
  @env.ui.info "Running #{command} on guest VM"
138
138
  machine.communicate.execute(command)
139
139
  end
@@ -142,18 +142,18 @@ module VagrantPlugins
142
142
  end
143
143
  end
144
144
 
145
- class CommandInteract < Vagrant.plugin("2", :command)
145
+ class CommandInteract < Vagrant.plugin('2', :command)
146
146
  include UnisonSync
147
147
 
148
148
  def self.synopsis
149
- "run unison in interactive mode, to resolve conflicts"
149
+ 'run unison in interactive mode, to resolve conflicts'
150
150
  end
151
151
 
152
152
  def execute
153
153
  with_target_vms do |machine|
154
154
  execute_sync_command(machine) do |command|
155
155
  command.terse = true
156
- command = command.to_s
156
+ command = command.to_s
157
157
 
158
158
  @env.ui.info "Running #{command}"
159
159
 
@@ -1,8 +1,8 @@
1
- require "vagrant"
1
+ require 'vagrant'
2
2
 
3
3
  module VagrantPlugins
4
4
  module Unison
5
- class Config < Vagrant.plugin("2", :config)
5
+ class Config < Vagrant.plugin('2', :config)
6
6
  # Host Folder to Sync
7
7
  #
8
8
  # @return [String]
@@ -70,16 +70,16 @@ module VagrantPlugins
70
70
 
71
71
  def finalize!
72
72
  # The access keys default to nil
73
- @host_folder = nil if @host_folder == UNSET_VALUE
74
- @guest_folder = nil if @guest_folder == UNSET_VALUE
75
- @ignore = nil if @ignore == UNSET_VALUE
76
- @repeat = 1 if @repeat == UNSET_VALUE
77
- @ssh_host = '127.0.0.1' if @ssh_host == UNSET_VALUE
78
- @ssh_port = 2222 if @ssh_port == UNSET_VALUE
79
- @ssh_user = 'vagrant' if @ssh_user == UNSET_VALUE
80
- @mem_cap_mb = 200 if @mem_cap_mb == UNSET_VALUE
81
- @perms = nil if @perms == UNSET_VALUE
82
- @ssh_use_agent = false if @ssh_use_agent == UNSET_VALUE
73
+ @host_folder = nil if @host_folder == UNSET_VALUE
74
+ @guest_folder = nil if @guest_folder == UNSET_VALUE
75
+ @ignore = nil if @ignore == UNSET_VALUE
76
+ @repeat = 1 if @repeat == UNSET_VALUE
77
+ @ssh_host = '127.0.0.1' if @ssh_host == UNSET_VALUE
78
+ @ssh_port = 2222 if @ssh_port == UNSET_VALUE
79
+ @ssh_user = 'vagrant' if @ssh_user == UNSET_VALUE
80
+ @mem_cap_mb = 200 if @mem_cap_mb == UNSET_VALUE
81
+ @perms = nil if @perms == UNSET_VALUE
82
+ @ssh_use_agent = false if @ssh_use_agent == UNSET_VALUE
83
83
 
84
84
  # Mark that we finalized
85
85
  @__finalized = true
@@ -88,12 +88,12 @@ module VagrantPlugins
88
88
  def validate(machine)
89
89
  errors = []
90
90
 
91
- if !(@host_folder.nil? && @guest_folder.nil?)
92
- errors << I18n.t("vagrant_unison.config.unison_host_folder_required") if @host_folder.nil?
93
- errors << I18n.t("vagrant_unison.config.unison_guest_folder_required") if @guest_folder.nil?
91
+ unless @host_folder.nil? && @guest_folder.nil?
92
+ errors << I18n.t('vagrant_unison.config.unison_host_folder_required') if @host_folder.nil?
93
+ errors << I18n.t('vagrant_unison.config.unison_guest_folder_required') if @guest_folder.nil?
94
94
  end
95
95
 
96
- { "Unison" => errors }
96
+ { 'Unison' => errors }
97
97
  end
98
98
  end
99
99
  end
@@ -1,9 +1,9 @@
1
- require "vagrant"
1
+ require 'vagrant'
2
2
 
3
3
  module Vagrant
4
4
  module Errors
5
5
  class UnisonError < VagrantError
6
- error_key(:unison_error, "vagrant_unison.errors")
6
+ error_key(:unison_error, 'vagrant_unison.errors')
7
7
  end
8
8
  end
9
9
  end
@@ -1,82 +1,82 @@
1
1
  begin
2
- require "vagrant"
2
+ require 'vagrant'
3
3
  rescue LoadError
4
- raise "The vagrant-unison plugin must be run within Vagrant."
4
+ raise 'The vagrant-unison plugin must be run within Vagrant.'
5
5
  end
6
6
 
7
7
  # This is a sanity check to make sure no one is attempting to install
8
8
  # this into an early Vagrant version.
9
- if Vagrant::VERSION < "1.1.0"
10
- raise "The vagrant-unison plugin is only compatible with Vagrant 1.1+"
9
+ if Vagrant::VERSION < '1.9.0'
10
+ raise 'The vagrant-unison plugin is only compatible with Vagrant 1.9+'
11
11
  end
12
12
 
13
13
  module VagrantPlugins
14
14
  module Unison
15
- class Plugin < Vagrant.plugin("2")
16
- name "Unison"
15
+ class Plugin < Vagrant.plugin('2')
16
+ name 'Unison'
17
17
  description <<-DESC
18
18
  This plugin syncs files over SSH from a local folder
19
19
  to your Vagrant VM (local or on AWS).
20
20
  DESC
21
21
 
22
- config "unison" do
23
- require_relative "config"
22
+ config 'unison' do
23
+ require_relative 'config'
24
24
  Config
25
25
  end
26
26
 
27
- command "unison-sync-once" do
27
+ command 'unison-sync-once' do
28
28
  setup_logging
29
29
  setup_i18n
30
30
 
31
31
  #Return the command
32
- require_relative "command"
32
+ require_relative 'command'
33
33
  CommandOnce
34
34
  end
35
35
 
36
- command "unison-sync-interact" do
36
+ command 'unison-sync-interact' do
37
37
  # Setup logging and i18n
38
38
  setup_logging
39
39
  setup_i18n
40
40
 
41
41
  #Return the command
42
- require_relative "command"
42
+ require_relative 'command'
43
43
  CommandInteract
44
44
  end
45
45
 
46
46
 
47
- command "unison-sync-polling" do
47
+ command 'unison-sync-polling' do
48
48
  # Setup logging and i18n
49
49
  setup_logging
50
50
  setup_i18n
51
51
 
52
52
  #Return the command
53
- require_relative "command"
53
+ require_relative 'command'
54
54
  CommandPolling
55
55
  end
56
56
 
57
- command "unison-cleanup" do
57
+ command 'unison-cleanup' do
58
58
  # Setup logging and i18n
59
59
  setup_logging
60
60
  setup_i18n
61
61
 
62
62
  #Return the command
63
- require_relative "command"
63
+ require_relative 'command'
64
64
  CommandCleanup
65
65
  end
66
66
 
67
67
  # This initializes the internationalization strings.
68
68
  def self.setup_i18n
69
- I18n.load_path << File.expand_path("locales/en.yml", Unison.source_root)
69
+ I18n.load_path << File.expand_path('locales/en.yml', Unison.source_root)
70
70
  I18n.reload!
71
71
  end
72
72
 
73
73
  # This sets up our log level to be whatever VAGRANT_LOG is.
74
74
  def self.setup_logging
75
- require "log4r"
75
+ require 'log4r'
76
76
 
77
77
  level = nil
78
78
  begin
79
- level = Log4r.const_get(ENV["VAGRANT_LOG"].upcase)
79
+ level = Log4r.const_get(ENV['VAGRANT_LOG'].upcase)
80
80
  rescue NameError
81
81
  # This means that the logging constant wasn't found,
82
82
  # which is fine. We just keep `level` as `nil`. But
@@ -92,10 +92,10 @@ module VagrantPlugins
92
92
  # Set the logging level on all "vagrant" namespaced
93
93
  # logs as long as we have a valid level.
94
94
  if level
95
- logger = Log4r::Logger.new("vagrant_unison")
95
+ logger = Log4r::Logger.new('vagrant_unison')
96
96
  logger.outputters = Log4r::Outputter.stderr
97
- logger.level = level
98
- logger = nil
97
+ logger.level = level
98
+ logger = nil
99
99
  end
100
100
  end
101
101
  end
@@ -2,9 +2,9 @@ module VagrantPlugins
2
2
  module Unison
3
3
  class ShellCommand
4
4
  def initialize(machine, unison_paths, ssh_command)
5
- @machine = machine
5
+ @machine = machine
6
6
  @unison_paths = unison_paths
7
- @ssh_command = ssh_command
7
+ @ssh_command = ssh_command
8
8
  end
9
9
 
10
10
  attr_accessor :batch, :repeat, :terse
@@ -39,7 +39,6 @@ module VagrantPlugins
39
39
  prefer_arg,
40
40
  ssh_args,
41
41
  ].flatten.compact
42
- _args
43
42
  end
44
43
 
45
44
  def local_root_arg
@@ -99,7 +98,7 @@ module VagrantPlugins
99
98
  # directory.
100
99
  def force_arg
101
100
  return ['-force', local_root_arg] if force_local
102
- return ['-force', remote_root_arg] if force_remote
101
+ ['-force', remote_root_arg] if force_remote
103
102
  end
104
103
 
105
104
  # from the docs, via Daniel Low (thx daniel):
@@ -111,7 +110,7 @@ module VagrantPlugins
111
110
  # This is much safer than -force
112
111
  def prefer_arg
113
112
  return ['-prefer', local_root_arg] if prefer_local
114
- return ['-prefer', remote_root_arg] if prefer_remote
113
+ ['-prefer', remote_root_arg] if prefer_remote
115
114
  end
116
115
  end
117
116
  end
@@ -9,14 +9,14 @@ module VagrantPlugins
9
9
  %W(
10
10
  ssh
11
11
  #{@machine.config.unison.ssh_user}@#{@machine.config.unison.ssh_host}
12
- #{ssh_args}
12
+ #{ssh_args}
13
13
  ).compact.join(' ')
14
14
  end
15
15
 
16
16
  def ssh_args
17
17
  %W(
18
18
  -p #{@machine.config.unison.ssh_port}
19
- #{proxy_command}
19
+ #{proxy_command}
20
20
  -o StrictHostKeyChecking=no
21
21
  -o UserKnownHostsFile=/dev/null
22
22
  #{identity}
@@ -25,7 +25,7 @@ module VagrantPlugins
25
25
 
26
26
  def uri(unison_paths)
27
27
  username = @machine.config.unison.ssh_user
28
- host = @machine.config.unison.ssh_host
28
+ host = @machine.config.unison.ssh_host
29
29
 
30
30
  "ssh://#{username}@#{host}/#{unison_paths.guest}"
31
31
  end
@@ -42,7 +42,7 @@ module VagrantPlugins
42
42
  if @machine.config.unison.ssh_use_agent
43
43
  ''
44
44
  else
45
- (%w(-o IdentitiesOnly=yes) << key_paths).join(' ')
45
+ (%w(-o IdentitiesOnly=yes) << key_paths).join(' ')
46
46
  end
47
47
  end
48
48
 
@@ -2,7 +2,7 @@ module VagrantPlugins
2
2
  module Unison
3
3
  class UnisonPaths
4
4
  def initialize(env, machine, project = '')
5
- @env = env
5
+ @env = env
6
6
  @machine = machine
7
7
  @project = project
8
8
  end
@@ -1,4 +1,4 @@
1
- require "optparse"
1
+ require 'optparse'
2
2
 
3
3
  module VagrantPlugins
4
4
  module Unison
@@ -12,7 +12,7 @@ module VagrantPlugins
12
12
  unison_paths = UnisonPaths.new(@env, machine, options[:project])
13
13
 
14
14
  guest_path = unison_paths.guest
15
- host_path = unison_paths.host
15
+ host_path = unison_paths.host
16
16
 
17
17
  @env.ui.info "Unisoning changes from {host}::#{host_path} --> {guest VM}::#{guest_path}"
18
18
 
@@ -20,14 +20,14 @@ module VagrantPlugins
20
20
  machine.communicate.sudo("mkdir -p '#{guest_path}'")
21
21
  machine.communicate.sudo("chown #{machine.config.unison.ssh_user} '#{guest_path}'")
22
22
 
23
- ssh_command = SshCommand.new(machine)
23
+ ssh_command = SshCommand.new(machine)
24
24
  shell_command = ShellCommand.new(machine, unison_paths, ssh_command)
25
25
 
26
- shell_command.prefer_local = options[:prefer_local]
26
+ shell_command.prefer_local = options[:prefer_local]
27
27
  shell_command.prefer_remote = options[:prefer_remote]
28
- shell_command.force_local = options[:force_local]
29
- shell_command.force_remote = options[:force_remote]
30
- shell_command.project = options[:project]
28
+ shell_command.force_local = options[:force_local]
29
+ shell_command.force_remote = options[:force_remote]
30
+ shell_command.project = options[:project]
31
31
 
32
32
  yield shell_command
33
33
  end
@@ -52,12 +52,12 @@ module VagrantPlugins
52
52
 
53
53
  def options
54
54
  @options ||= {
55
- :prefer_local => false,
55
+ :prefer_local => false,
56
56
  :prefer_remote => false,
57
- :force_local => false,
58
- :force_remote => false,
59
- :verbose => false,
60
- :project => nil,
57
+ :force_local => false,
58
+ :force_remote => false,
59
+ :verbose => false,
60
+ :project => nil,
61
61
  }
62
62
  end
63
63
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Unison
3
- VERSION = '0.0.2'
3
+ VERSION = '0.1.0'
4
4
  end
5
5
  end
@@ -1,7 +1,7 @@
1
- require "pathname"
1
+ require 'pathname'
2
2
 
3
- require "vagrant-vaimo-unison/plugin"
4
- require "vagrant-vaimo-unison/errors"
3
+ require 'vagrant-vaimo-unison/plugin'
4
+ require 'vagrant-vaimo-unison/errors'
5
5
 
6
6
  module VagrantPlugins
7
7
  module Unison
@@ -9,7 +9,7 @@ module VagrantPlugins
9
9
  #
10
10
  # @return [Pathname]
11
11
  def self.source_root
12
- @source_root ||= Pathname.new(File.expand_path("../../", __FILE__))
12
+ @source_root ||= Pathname.new(File.expand_path('../../', __FILE__))
13
13
  end
14
14
  end
15
15
  end
@@ -1,21 +1,29 @@
1
- require "vagrant-vaimo-unison/config"
1
+ require 'vagrant-vaimo-unison/config'
2
2
 
3
3
  describe VagrantPlugins::Unison::Config do
4
4
  let(:instance) { described_class.new }
5
5
 
6
- describe "defaults" do
6
+ describe 'defaults' do
7
7
  subject do
8
8
  instance.tap do |o|
9
9
  o.finalize!
10
10
  end
11
11
  end
12
12
 
13
- its("host_folder") { should be_nil }
14
- its("guest_folder") { should be_nil }
15
- its("ignore") { should be_nil }
13
+ its('host_folder') {
14
+ should be_nil
15
+ }
16
+
17
+ its('guest_folder') {
18
+ should be_nil
19
+ }
20
+
21
+ its('ignore') {
22
+ should be_nil
23
+ }
16
24
  end
17
25
 
18
- describe "overriding defaults" do
26
+ describe 'overriding defaults' do
19
27
  # I typically don't meta-program in tests, but this is a very
20
28
  # simple boilerplate test, so I cut corners here. It just sets
21
29
  # each of these attributes to "foo" in isolation, and reads the value
@@ -23,9 +31,9 @@ describe VagrantPlugins::Unison::Config do
23
31
  [:host_folder, :guest_folder].each do |attribute|
24
32
 
25
33
  it "should not default #{attribute} if overridden" do
26
- instance.send("#{attribute}=".to_sym, "foo")
34
+ instance.send("#{attribute}=".to_sym, 'foo')
27
35
  instance.finalize!
28
- instance.send(attribute).should == "foo"
36
+ instance.send(attribute).should == 'foo'
29
37
  end
30
38
  end
31
39
  end
@@ -1,34 +1,35 @@
1
- $:.unshift File.expand_path("../lib", __FILE__)
2
- require "vagrant-vaimo-unison/version"
1
+ $:.unshift File.expand_path('../lib', __FILE__)
2
+
3
+ require 'vagrant-vaimo-unison/version'
3
4
 
4
5
  Gem::Specification.new do |s|
5
- s.name = "vagrant-vaimo-unison"
6
- s.version = VagrantPlugins::Unison::VERSION
7
- s.platform = Gem::Platform::RUBY
8
- s.authors = ["David Laing", "dmatora", "Danny Cosson"]
9
- s.email = "dcosson@gmail.com"
10
- s.homepage = "http://github.com/dcosson/vagrant-unison"
11
- s.summary = "Vagrant 1.7+ plugin to sync local files to VM over SSH using Unison"
12
- s.description = "Vagrant 1.7+ plugin to sync local files to VM over SSH using Unison"
6
+ s.name = 'vagrant-vaimo-unison'
7
+ s.version = VagrantPlugins::Unison::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ['David Laing', 'dmatora', 'Danny Cosson', 'Platform Team @ Vaimo']
10
+ s.email = 'platform@vaimo.com'
11
+ s.homepage = 'https://bitbucket.org/vaimo/vagrant-vaimo-unison'
12
+ s.summary = 'Vagrant plugin to sync local files to VM over SSH using Unison'
13
+ s.description = 'Vagrant 1.9+ plugin to sync local files to VM over SSH using Unison'
13
14
 
14
- s.required_rubygems_version = ">= 1.3.6"
15
+ s.required_rubygems_version = '>= 1.3.6'
15
16
 
16
17
  s.add_development_dependency 'rake', '< 11.0'
17
- s.add_development_dependency "rspec-core", "~> 2.12.2"
18
- s.add_development_dependency "rspec-expectations", "~> 2.12.1"
19
- s.add_development_dependency "rspec-mocks", "~> 2.12.1"
18
+ s.add_development_dependency 'rspec-core', '~> 2.12.2'
19
+ s.add_development_dependency 'rspec-expectations', '~> 2.12.1'
20
+ s.add_development_dependency 'rspec-mocks', '~> 2.12.1'
20
21
 
21
22
  # The following block of code determines the files that should be included
22
23
  # in the gem. It does this by reading all the files in the directory where
23
24
  # this gemspec is, and parsing out the ignored files from the gitignore.
24
25
  # Note that the entire gitignore(5) syntax is not supported, specifically
25
26
  # the "!" syntax, but it should mostly work correctly.
26
- root_path = File.dirname(__FILE__)
27
- all_files = Dir.chdir(root_path) { Dir.glob("**/{*,.*}") }
28
- all_files.reject! { |file| [".", ".."].include?(File.basename(file)) }
29
- gitignore_path = File.join(root_path, ".gitignore")
27
+ root_path = File.dirname(__FILE__)
28
+ all_files = Dir.chdir(root_path) { Dir.glob('**/{*,.*}') }
29
+ all_files.reject! { |file| %w(. ..).include?(File.basename(file)) }
30
+ gitignore_path = File.join(root_path, '.gitignore')
30
31
  gitignore = File.readlines(gitignore_path)
31
- gitignore.map! { |line| line.chomp.strip }
32
+ gitignore.map! { |line| line.chomp.strip }
32
33
  gitignore.reject! { |line| line.empty? || line =~ /^(#|!)/ }
33
34
 
34
35
  unignored_files = all_files.reject do |file|
@@ -49,7 +50,7 @@ Gem::Specification.new do |s|
49
50
  end
50
51
  end
51
52
 
52
- s.files = unignored_files
53
- s.executables = unignored_files.map { |f| f[/^bin\/(.*)/, 1] }.compact
54
- s.require_path = 'lib'
53
+ s.files = unignored_files
54
+ s.executables = unignored_files.map { |f| f[/^bin\/(.*)/, 1] }.compact
55
+ s.require_path = 'lib'
55
56
  end
metadata CHANGED
@@ -1,16 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-vaimo-unison
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Laing
8
8
  - dmatora
9
9
  - Danny Cosson
10
+ - Platform Team @ Vaimo
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2017-06-21 00:00:00.000000000 Z
14
+ date: 2017-07-26 00:00:00.000000000 Z
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: rake
@@ -68,8 +69,8 @@ dependencies:
68
69
  - - "~>"
69
70
  - !ruby/object:Gem::Version
70
71
  version: 2.12.1
71
- description: Vagrant 1.7+ plugin to sync local files to VM over SSH using Unison
72
- email: dcosson@gmail.com
72
+ description: Vagrant 1.9+ plugin to sync local files to VM over SSH using Unison
73
+ email: platform@vaimo.com
73
74
  executables: []
74
75
  extensions: []
75
76
  extra_rdoc_files: []
@@ -93,7 +94,7 @@ files:
93
94
  - locales/en.yml
94
95
  - spec/vagrant-unison/config_spec.rb
95
96
  - vagrant-vaimo-unison.gemspec
96
- homepage: http://github.com/dcosson/vagrant-unison
97
+ homepage: https://bitbucket.org/vaimo/vagrant-vaimo-unison
97
98
  licenses: []
98
99
  metadata: {}
99
100
  post_install_message:
@@ -112,8 +113,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
113
  version: 1.3.6
113
114
  requirements: []
114
115
  rubyforge_project:
115
- rubygems_version: 2.6.12
116
+ rubygems_version: 2.5.1
116
117
  signing_key:
117
118
  specification_version: 4
118
- summary: Vagrant 1.7+ plugin to sync local files to VM over SSH using Unison
119
+ summary: Vagrant plugin to sync local files to VM over SSH using Unison
119
120
  test_files: []