azdeploy 1.0.26 → 1.0.27

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/azdeploy.gemspec +1 -1
  3. data/lib/transform.rb +27 -8
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a48674a0076eaee4d6cbd6623d76108b26f7c9a5
4
- data.tar.gz: 0f38fac994ed4155dc760b2323f709c106c466f8
3
+ metadata.gz: 859355fe780d4165303731253688604839dec974
4
+ data.tar.gz: d31a57cdc98296f560b9590081c02f06a4484fbd
5
5
  SHA512:
6
- metadata.gz: 0ae3ed2272b855b91a3b9396ec5158ce17e5885b28e882744c5e6b7e174cde5d2163c8585ce07685527dae67d05892f896acfef6cacf7e943a30502da344a424
7
- data.tar.gz: e1a7d5f92a9733681070c7e97b5558a84e72ef0edbd6673c32ce3edc9a0f64b91136ddd5797a4752e562172ac1d0167dbcf856a5c5fa1838234d65e1d25ce58c
6
+ metadata.gz: b51ae0226a48d3625b7127adda10279e36fa053cba18d3896f037e699fc64b996301a5e5c3fe3d55fcec65434d35d42712fa1da20ca148e8c96b54d6fcef9823
7
+ data.tar.gz: 926e921ef0012b7462c9403a0b7f5ef1c3a8d3a7cb8058c091d783cb3d919a4c2cd52e03a431307170a646865673cf2a4c677cd1e210a774799a58c98f7eb448
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'azdeploy'
3
- s.version = '1.0.26'
3
+ s.version = '1.0.27'
4
4
  s.date = '2015-08-07'
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'
@@ -10,7 +10,8 @@ class Transform
10
10
  ROWKEY = 'RowKey'
11
11
  SETTING = 'setting'
12
12
  VALUE = 'value'
13
- APPID = 'AppId'
13
+ APPCLIENTID = 'AppClientId'
14
+ OLDAPPID = 'AppId'
14
15
  EMPTY_STR = ''
15
16
  STORAGEACCOUNT = 'StorageAccount'
16
17
  STORAGEACCOUNTKEY = "#{STORAGEACCOUNT}Key"
@@ -64,13 +65,19 @@ class Transform
64
65
  if (key.to_s != EMPTY_STR && value.to_s != EMPTY_STR)
65
66
  k = key
66
67
  v = value
67
- update_appsetting(k, v, doc, file)
68
+ status = update_appsetting(k, v, doc, file)
69
+ if status == :updated
70
+ puts "Updated key #{k} with #{v}"
71
+ end
68
72
  else
69
73
  if (!@settings.nil?)
70
74
  @settings.each { |i|
71
75
  k = i.properties[ROWKEY] || NO_VALUE
72
76
  v = i.properties[SETTING] || NO_VALUE
73
- update_appsetting(k, v, doc, file)
77
+ status = update_appsetting(k, v, doc, file)
78
+ if status == :updated
79
+ puts "Updated key #{k} with #{v}"
80
+ end
74
81
  }
75
82
  end
76
83
  end
@@ -78,6 +85,7 @@ class Transform
78
85
  end
79
86
 
80
87
  def update_appsetting(k, v, doc, file)
88
+ status = :noargs
81
89
  if (k != NO_VALUE && v != NO_VALUE)
82
90
  node = doc.at_css "appSettings/add[@key='#{k}']"
83
91
  if !node.nil?
@@ -85,8 +93,13 @@ class Transform
85
93
  node[VALUE] = v
86
94
  #puts "New value: #{v}"
87
95
  File.write(file, doc.to_xml)
96
+ status = :updated
97
+ else
98
+ status = :notfound
88
99
  end
89
100
  end
101
+
102
+ status
90
103
  end
91
104
 
92
105
  def transform_servicemodelconfig
@@ -293,12 +306,18 @@ class Transform
293
306
  transform_appsettings("unitest#{CONNECTIONSTRING}", unitest_connstr)
294
307
  end
295
308
 
296
- puts "updating #{APPID}..."
297
- appId = ENV[APPID] || NO_VALUE
298
- if appId == NO_VALUE
299
- puts "No #{APPID} found."
309
+ puts "updating #{APPCLIENTID}..."
310
+ appClientId = ENV[APPCLIENTID] || NO_VALUE
311
+ if appClientId == NO_VALUE
312
+ puts "No #{APPCLIENTID} found."
313
+ # old version notify check
314
+ oldAppId = ENV[OLDAPPID]
315
+ if oldAppId != NO_VALUE
316
+ puts "You appear to be using the old AppId environment variable, AppClientId is expected. Proceeding with old AppId update."
317
+ transform_appsettings(OLDAPPID, oldAppId)
318
+ end
300
319
  else
301
- transform_appsettings(APPID, appId)
320
+ transform_appsettings(APPCLIENTID, appClientId)
302
321
  end
303
322
 
304
323
  @service_name = ENV['ServiceName']
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.26
4
+ version: 1.0.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Suresh Batta