azdeploy 1.0.20 → 1.0.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/azdeploy.gemspec +1 -1
  3. data/lib/transform.rb +16 -10
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f44fe4d7f6c34024cc9807e921bc5e3474bc7404
4
- data.tar.gz: fa1d0b6b5f31843d4ae7a9ce625f73e283a7a3ff
3
+ metadata.gz: 8707d85f73db0211b6caefbfbb4493e2de43b978
4
+ data.tar.gz: eebb48c2ecf5f7976aa0fe6b00c24c2fc26eb651
5
5
  SHA512:
6
- metadata.gz: 5740cfe22441487a334a8cfcf1b0c36cf91454f4d27f2aa3b9730a0194ea35014430471496bccdd92f339b0775a419368707da8129d1fc63fdb019d0e494954c
7
- data.tar.gz: 54d83b7dbcf8a783584c134c7e936f5201fa4ebb8ccd9b841ce565554831c060f522523b90086042bc33118caa7f03480e5b19c83c71ac84d43bd56d6ca708df
6
+ metadata.gz: a46411e9673eef5388c04b6c5b746e05a913bfbef3e1d1a787aaa012e0a10454fab9a830b995cbae3d1ff3e0d48ef724fd3a78a4db6073f59c32fbf9d584ac79
7
+ data.tar.gz: 5c6d2f2673f27c6d7bb2ee521ba1102ce82cf22e3e01a1eabb464aad16b83c1cf96c0b1f84eb2195a0ecd422f0cbc618e0db5d5d8e261694ef85f081145d05ac
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'azdeploy'
3
- s.version = '1.0.20'
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'
@@ -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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azdeploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.20
4
+ version: 1.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Suresh Batta