azdeploy 1.0.20 → 1.0.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/azdeploy.gemspec +1 -1
- data/lib/transform.rb +16 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8707d85f73db0211b6caefbfbb4493e2de43b978
|
4
|
+
data.tar.gz: eebb48c2ecf5f7976aa0fe6b00c24c2fc26eb651
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a46411e9673eef5388c04b6c5b746e05a913bfbef3e1d1a787aaa012e0a10454fab9a830b995cbae3d1ff3e0d48ef724fd3a78a4db6073f59c32fbf9d584ac79
|
7
|
+
data.tar.gz: 5c6d2f2673f27c6d7bb2ee521ba1102ce82cf22e3e01a1eabb464aad16b83c1cf96c0b1f84eb2195a0ecd422f0cbc618e0db5d5d8e261694ef85f081145d05ac
|
data/azdeploy.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'azdeploy'
|
3
|
-
s.version = '1.0.
|
3
|
+
s.version = '1.0.21'
|
4
4
|
s.date = '2015-08-06'
|
5
5
|
s.summary = 'Setup and scripting support for .Net project builds'
|
6
6
|
s.description = 'Azure Deployment Gem. Provides easy setup and deployment scripting support for .Net project builds'
|
data/lib/transform.rb
CHANGED
@@ -67,24 +67,29 @@ class Transform
|
|
67
67
|
else
|
68
68
|
v = value
|
69
69
|
end
|
70
|
+
update_appsetting(k, v, doc, file)
|
70
71
|
else
|
71
72
|
@settings.each { |i|
|
72
73
|
k = i.properties[ROWKEY] || NO
|
73
74
|
v = i.properties[SETTING] || NO
|
75
|
+
update_appsetting(k, v, doc, file)
|
74
76
|
}
|
75
77
|
end
|
76
|
-
if (k != NO && v != NO)
|
77
|
-
node = doc.at_css "appSettings/add[@key='#{k}']"
|
78
|
-
if !node.nil?
|
79
|
-
#puts "Old value: #{node[VALUE]}"
|
80
|
-
node[VALUE] = v
|
81
|
-
#puts "New value: #{v}"
|
82
|
-
File.write(file, doc.to_xml)
|
83
|
-
end
|
84
|
-
end
|
85
78
|
}
|
86
79
|
end
|
87
80
|
|
81
|
+
def update_appsetting(k, v, doc, file)
|
82
|
+
if (k != NO && v != NO)
|
83
|
+
node = doc.at_css "appSettings/add[@key='#{k}']"
|
84
|
+
if !node.nil?
|
85
|
+
#puts "Old value: #{node[VALUE]}"
|
86
|
+
node[VALUE] = v
|
87
|
+
#puts "New value: #{v}"
|
88
|
+
File.write(file, doc.to_xml)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
88
93
|
def transform_servicemodelconfig
|
89
94
|
@config_files.each{|file|
|
90
95
|
doc = Nokogiri::XML(File.read(file))
|
@@ -183,6 +188,8 @@ class Transform
|
|
183
188
|
val_from_settings = get_value('AI_InstrumentationKey')
|
184
189
|
if (val_from_settings.to_s == '')
|
185
190
|
aikey = ENV['AI_InstrumentationKey'] || NO
|
191
|
+
else
|
192
|
+
aikey = val_from_settings
|
186
193
|
end
|
187
194
|
if (aikey != NO)
|
188
195
|
node.content = aikey
|
@@ -275,7 +282,6 @@ class Transform
|
|
275
282
|
if should_update_settings_connstr == NO
|
276
283
|
puts 'Flag for Setttings Connection String Update not set.'
|
277
284
|
else
|
278
|
-
puts settings_connstr
|
279
285
|
transform_appsettings('connectionString', settings_connstr)
|
280
286
|
end
|
281
287
|
|