ruby-quilt 0.1.1 → 0.1.2
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.
- data/lib/quilt.rb +11 -5
- metadata +23 -1
data/lib/quilt.rb
CHANGED
@@ -3,6 +3,7 @@ require 'json'
|
|
3
3
|
require 'net/http'
|
4
4
|
require 'popen4'
|
5
5
|
require 'fileutils'
|
6
|
+
require 'ecology'
|
6
7
|
|
7
8
|
class Quilt
|
8
9
|
HEADER_KEY = "header"
|
@@ -13,15 +14,20 @@ class Quilt
|
|
13
14
|
DEBUG_PREFIX_KEY = "debug_prefix"
|
14
15
|
ARCHIVE_SUFFIX = ".tgz"
|
15
16
|
|
16
|
-
def initialize(config, log = Logger.new(STDOUT))
|
17
|
-
@config =
|
17
|
+
def initialize(config = "quilt", log = Logger.new(STDOUT))
|
18
|
+
@config = {
|
19
|
+
:local_path => Ecology.property("#{config ? "#{config}:" : ""}local_path"),
|
20
|
+
:remote_host => Ecology.property("#{config ? "#{config}:" : ""}remote_host"),
|
21
|
+
:remote_path => Ecology.property("#{config ? "#{config}:" : ""}remote_path"),
|
22
|
+
:remote_port => Ecology.property("#{config ? "#{config}:" : ""}remote_port")
|
23
|
+
};
|
18
24
|
@versions = {};
|
19
25
|
@log = log
|
20
26
|
|
21
|
-
if (config[:local_path])
|
22
|
-
Dir.foreach(config[:local_path]) do |version_dir|
|
27
|
+
if (@config[:local_path])
|
28
|
+
Dir.foreach(@config[:local_path]) do |version_dir|
|
23
29
|
next if version_dir == "." || version_dir == ".."
|
24
|
-
@versions[version_dir] = load_version(config[:local_path], version_dir)
|
30
|
+
@versions[version_dir] = load_version(@config[:local_path], version_dir)
|
25
31
|
end
|
26
32
|
else
|
27
33
|
throw "Quilt: local path not specified";
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-quilt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -55,6 +55,28 @@ dependencies:
|
|
55
55
|
- - ! '>='
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: 0.1.2
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: ecology
|
60
|
+
requirement: !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ~>
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0.0'
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.0.14
|
69
|
+
type: :runtime
|
70
|
+
prerelease: false
|
71
|
+
version_requirements: !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ~>
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0.0'
|
77
|
+
- - ! '>='
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: 0.0.14
|
58
80
|
- !ruby/object:Gem::Dependency
|
59
81
|
name: rake
|
60
82
|
requirement: !ruby/object:Gem::Requirement
|