MrMurano 1.1.1 → 1.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.
- checksums.yaml +4 -4
- data/README.markdown +4 -3
- data/TODO.taskpaper +1 -1
- data/bin/mr +4 -1
- data/lib/MrMurano/Solution-File.rb +21 -1
- data/lib/MrMurano/Solution.rb +14 -0
- data/lib/MrMurano/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37c49c0b975dd14d40e55d57a2c806931d442423
|
4
|
+
data.tar.gz: 98a232cf51e5155d5943ff02f5d2b32a62a76cb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e40e5b6b729e25dec8ec4f07785805b2185ee9106dfe7bfc07e31ba75703ca14d56272056f6815aa7f3accaa3809fd200f5541b3fa8c9d2a576566c498d19e29
|
7
|
+
data.tar.gz: 1e067ca68bbc3948af5540d8c89afc1a2f3508b3466ee253dab8ec989cd8834fc80e2d91fe33b1a38f7aeed4b4b89cb3c609a58ab3b7dd0cb83b8ab92057ce2e
|
data/README.markdown
CHANGED
@@ -11,11 +11,12 @@ To start from an existing project in Murano
|
|
11
11
|
mkdir myproject
|
12
12
|
cd myproject
|
13
13
|
mr config solution.id XXXXXX
|
14
|
-
mr syncdown
|
14
|
+
mr syncdown
|
15
15
|
```
|
16
16
|
|
17
|
-
Do stuff, see what changed: `mr status
|
18
|
-
Then deploy `mr syncup
|
17
|
+
Do stuff, see what changed: `mr status` or `mr diff`.
|
18
|
+
Then deploy with `mr syncup`
|
19
|
+
|
19
20
|
|
20
21
|
|
21
22
|
|
data/TODO.taskpaper
CHANGED
@@ -33,7 +33,7 @@ Config:
|
|
33
33
|
|
34
34
|
SolutionBase:
|
35
35
|
- All network traffic is serialized. Make some parallel.
|
36
|
-
- Add the --curl verbose option.
|
36
|
+
- Add the --curl verbose option. @done(2016-08-12)
|
37
37
|
- Rebuild how local names and paths are computed from remote items. @done(2016-07-27)
|
38
38
|
|
39
39
|
Bundles:
|
data/bin/mr
CHANGED
@@ -16,6 +16,9 @@ global_option('-n', '--dry', %{Don't run actions that make changes}) {
|
|
16
16
|
$cfg['tool.dry'] = true
|
17
17
|
$cfg['tool.verbose'] = true # dry implies verbose
|
18
18
|
}
|
19
|
+
global_option('-L', '--curl', 'Print out a curl command for each network call') {
|
20
|
+
$cfg['tool.curldebug'] = true
|
21
|
+
}
|
19
22
|
global_option '--skip-plugins', %{Don't load plugins. Good for when one goes bad.}
|
20
23
|
|
21
24
|
global_option('-C', '--configfile FILE', %{Load additional configuration file}) {|file|
|
@@ -49,7 +52,7 @@ pgds = [
|
|
49
52
|
if not ARGV.include? '--skip-plugins' then
|
50
53
|
pgds << Pathname.new(ENV['MR_MURANO_PLUGIN_DIR']) if ENV.has_key? 'MR_MURANO_PLUGIN_DIR'
|
51
54
|
pgds.each do |path|
|
52
|
-
|
55
|
+
ext unless path.exist?
|
53
56
|
path.each_child do |plugin|
|
54
57
|
next if plugin.directory?
|
55
58
|
next unless plugin.readable?
|
@@ -51,6 +51,14 @@ module MrMurano
|
|
51
51
|
delete('/'+path)
|
52
52
|
end
|
53
53
|
|
54
|
+
def curldebug(request)
|
55
|
+
# The upload will get printed out inside of upload.
|
56
|
+
# Because we don't have the correct info here.
|
57
|
+
if request.method != 'PUT' then
|
58
|
+
super(request)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
54
62
|
##
|
55
63
|
# Upload a file
|
56
64
|
def upload(local, remote)
|
@@ -78,6 +86,16 @@ module MrMurano
|
|
78
86
|
request.content_length = form.content_length
|
79
87
|
request.body = form.to_s
|
80
88
|
|
89
|
+
if $cfg['tool.curldebug'] then
|
90
|
+
a = []
|
91
|
+
a << %{curl -s -H 'Authorization: #{request['authorization']}'}
|
92
|
+
a << %{-H 'User-Agent: #{request['User-Agent']}'}
|
93
|
+
a << %{-X #{request.method}}
|
94
|
+
a << %{'#{request.uri.to_s}'}
|
95
|
+
a << %{-F file=@#{local.to_s}}
|
96
|
+
puts a.join(' ')
|
97
|
+
end
|
98
|
+
|
81
99
|
response = http.request(request)
|
82
100
|
case response
|
83
101
|
when Net::HTTPSuccess
|
@@ -123,7 +141,9 @@ module MrMurano
|
|
123
141
|
end
|
124
142
|
raise "Not a directory: #{from.to_s}" unless from.directory?
|
125
143
|
|
126
|
-
Pathname.glob(from.to_s + '/**/*').
|
144
|
+
Pathname.glob(from.to_s + '/**/*').reject do |path|
|
145
|
+
path.directory?
|
146
|
+
end.map do |path|
|
127
147
|
name = toRemoteItem(from, path)
|
128
148
|
name[:local_path] = path
|
129
149
|
name
|
data/lib/MrMurano/Solution.rb
CHANGED
@@ -24,6 +24,19 @@ module MrMurano
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
+
def curldebug(request)
|
28
|
+
if $cfg['tool.curldebug'] then
|
29
|
+
a = []
|
30
|
+
a << %{curl -s -H 'Authorization: #{request['authorization']}'}
|
31
|
+
a << %{-H 'User-Agent: #{request['User-Agent']}'}
|
32
|
+
a << %{-H 'Content-Type: #{request.content_type}'}
|
33
|
+
a << %{-X #{request.method}}
|
34
|
+
a << %{'#{request.uri.to_s}'}
|
35
|
+
a << %{-d '#{request.body}'} unless request.body.nil?
|
36
|
+
puts a.join(' ')
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
27
40
|
def endPoint(path='')
|
28
41
|
parts = ['https:/', $cfg['net.host'], 'api:1'] + @uriparts
|
29
42
|
s = parts.map{|v| v.to_s}.join('/')
|
@@ -48,6 +61,7 @@ module MrMurano
|
|
48
61
|
|
49
62
|
def workit(request, &block)
|
50
63
|
set_req_defaults(request)
|
64
|
+
curldebug(request)
|
51
65
|
if block_given? then
|
52
66
|
yield request, http()
|
53
67
|
else
|
data/lib/MrMurano/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: MrMurano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Conrad Tadpol Tilstra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commander
|