couchdb-replicator 0.0.3 → 0.0.4

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 50929af4b5e6c139c7d66abd6f502323b210c96a
4
+ data.tar.gz: e0f94d746f8c7f7ca13c38c9975d7dd27e533e02
5
+ SHA512:
6
+ metadata.gz: a432236cd4277dd855da467b61d6aaae659b2b08c378615edda15370b357815d2a70fdd9c5dbee4ccaecd8f37aef5dc19c8fc43538fcf36bc411fb7206e46675
7
+ data.tar.gz: 482d2491064de216ed63efb6932e7fdf262169c043391e87d4d50b464ad4447a964144b173a14572b244ee0d3a7c17d218f37ae15e2842753782d142d5e4d8cd
@@ -1,4 +1,3 @@
1
- module VagrantPlugins
2
1
  module Couchdb
3
2
  class Plugin < Vagrant.plugin("2")
4
3
  name "couchdb_replicator"
@@ -7,14 +6,13 @@ module VagrantPlugins
7
6
  DESC
8
7
 
9
8
  config(:couchdb_replicator, :provisioner) do
10
- require File.expand_path('../couchdb_replicator/config', __FILE__)
9
+ require File.expand_path('./couchdb_replicator/config', __FILE__)
11
10
  Config
12
11
  end
13
12
 
14
13
  provisioner :couchdb_replicator do
15
- require File.expand_path('../couchdb_replicator/provisioner', __FILE__)
14
+ require File.expand_path('./couchdb_replicator/provisioner', __FILE__)
16
15
  Provisioner
17
16
  end
18
17
  end
19
- end
20
- end
18
+ end
@@ -1,4 +1,4 @@
1
- module VagrantPlugins
1
+
2
2
  module Couchdb
3
3
  class Config < Vagrant.plugin(2, :config)
4
4
  attr_accessor :dbhosts
@@ -12,5 +12,4 @@ module VagrantPlugins
12
12
  { "CouchDB Sync" => errors }
13
13
  end
14
14
  end
15
- end
16
- end
15
+ end
@@ -1,7 +1,13 @@
1
- requires "../couch"
2
- module VagrantPlugins
3
- module CouchDB
1
+ requires "./couch"
2
+ module CouchDB
4
3
  class Provisioner < Vagrant.plugin("2", :provisioner)
4
+ def configure(root_config)
5
+ @to_be_copied = []
6
+ config.dbhosts.each do |conf|
7
+ @to_be_copied << conf
8
+ conf.prepare root_config.vm, tmp_root
9
+ end
10
+ end
5
11
  def provision
6
12
  couchHosts = config.dbHosts
7
13
 
@@ -41,6 +47,19 @@ module VagrantPlugins
41
47
  end
42
48
 
43
49
  end
50
+ def self.config_class
51
+ Config
52
+ end
53
+
54
+ private
55
+
56
+ def tmp_root
57
+ "/tmp/copy_my_conf"
58
+ end
59
+
60
+ def db_hosts
61
+ config.dbhosts || []
62
+ end
63
+
44
64
  end
45
- end
46
- end
65
+ end
@@ -1,5 +1,3 @@
1
1
  module Couchdb
2
- module Replicator
3
- VERSION = "0.0.3"
4
- end
2
+ VERSION = "0.0.4"
5
3
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: couchdb-replicator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
5
- prerelease:
4
+ version: 0.0.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - mike.feher@arisalex.com
@@ -18,40 +17,33 @@ executables: []
18
17
  extensions: []
19
18
  extra_rdoc_files: []
20
19
  files:
20
+ - lib/couchdb/couchdb_replicator.rb
21
+ - lib/couchdb/couchdb_replicator/config.rb
22
+ - lib/couchdb/couchdb_replicator/couch.rb
21
23
  - lib/couchdb/couchdb_replicator/provisioner.rb
22
24
  - lib/couchdb/couchdb_replicator/version.rb
23
- - lib/couchdb/couchdb_replicator/couch.rb
24
- - lib/couchdb/couchdb_replicator/config.rb
25
- - lib/couchdb/couchdb_replicator.rb
26
25
  homepage: ''
27
26
  licenses:
28
27
  - MIT
28
+ metadata: {}
29
29
  post_install_message:
30
30
  rdoc_options: []
31
31
  require_paths:
32
32
  - lib
33
33
  required_ruby_version: !ruby/object:Gem::Requirement
34
- none: false
35
34
  requirements:
36
- - - ! '>='
35
+ - - ">="
37
36
  - !ruby/object:Gem::Version
38
37
  version: '0'
39
- segments:
40
- - 0
41
- hash: 1332916954806387323
42
38
  required_rubygems_version: !ruby/object:Gem::Requirement
43
- none: false
44
39
  requirements:
45
- - - ! '>='
40
+ - - ">="
46
41
  - !ruby/object:Gem::Version
47
42
  version: '0'
48
- segments:
49
- - 0
50
- hash: 1332916954806387323
51
43
  requirements: []
52
44
  rubyforge_project:
53
- rubygems_version: 1.8.23
45
+ rubygems_version: 2.2.2
54
46
  signing_key:
55
- specification_version: 3
47
+ specification_version: 4
56
48
  summary: Use this to replicate to couch instances
57
49
  test_files: []