From aae142bb475cb3f0160c644d071b1ab1561cd260 Mon Sep 17 00:00:00 2001 From: adam oneil Date: Wed, 8 Feb 2017 09:36:30 +0000 Subject: [PATCH] Modified readme to remove HTML comments --- README.md | 37 ++++++++++++++++++++----------------- metadata.rb | 2 +- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 5e554b2..5a8f11f 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,21 @@ -

dotnetconfig Cookbook

-

.NET configuration file editor. Provides functionality to update a .NET app / web configuration file with values from a chef run.

+dotnetconfig Cookbook +===================== -

WORK IN PROGRESS - Currently in Alpha, feel free to test it out but don't use in production until this message is removed or we have hit V1.0.0.

+##NET configuration file editor. Provides functionality to update a .NET app / web configuration file with values from a chef run. -

Open the file for editing, non locking

+WORK IN PROGRESS - Currently in Alpha, feel free to test it out but don't use in production until this message is removed or we have hit V1.0.0. + +##Open the file for editing, non locking ```ruby documentPath = 'C:\\Config\\' + 'app.config' document = config_getxml(documentPath) ``` -

Set app settings within the config file

-

Arguments:

-

Document: Pass document which was fetched from config_getxml

-

SettingName: The setting to update

-

SettingValue: The new value to apply to the configuration

+##Set app settings within the config file< +Arguments: + Document: Pass document which was fetched from config_getxml + SettingName: The setting to update + SettingValue: The new value to apply to the configuration ```ruby config_set_app_setting(document, 'fix-gateways', 'Replaced') @@ -24,8 +26,8 @@ config_set_app_setting(document, 'default-version', 'Edit5') config_set_app_setting(document, 'fix-service-test-file-name', 'Edit6') ``` -

Setting custom elements

-

Set an element's content using an xPath query, Example:

+##Setting custom elements +Set an element's content using an xPath query, Example: ```xml @@ -36,7 +38,7 @@ config_set_app_setting(document, 'fix-service-test-file-name', 'Edit6') ``` -

This block would find the first occurrence of the 'custom' element and set the content of each of its elements to a new value.

+This block would find the first occurrence of the 'custom' element and set the content of each of its elements to a new value. ```ruby config_set_element_content(document, '//configuration/custom/user', 'Edit8') config_set_element_content(document, '//configuration/custom/password', 'Edit9') @@ -44,25 +46,26 @@ config_set_element_content(document, '//configuration/custom/host', 'Edit10') config_set_element_content(document, '//configuration/custom/port', 'Edit11') ``` -

Setting the content of a specific element using xPath

-

This would find the first log4net appender called MyAppender

+##Setting the content of a specific element using xPath +This would find the first log4net appender called MyAppender ```ruby config_set_element_content(document, '//configuration/log4net/appender[@name="MyAppender"]/hostName', 'NewValue1') config_set_element_content(document, '//configuration/log4net/appender[@name="MyAppender"]/userName', 'NewValue2') config_set_element_content(document, '//configuration/log4net/appender[@name="MyAppender"]/password', 'NewValue3') ``` -

Set the the entire content of a connection string

+##Connection strings +Set the the entire content of a connection string ```ruby config_set_connection_string(document, 'Database1', 'Database=Partial;User Id=Replacement;Password=PasswordChanged;CommandTimeout=30;MinPoolSize=0') ``` -

Set an individual property within a connection string

+Set an individual property within a connection string ```ruby config_set_connection_string_property(document, 'Database2', 'password', 'NewValue123654') ``` -

Saving changes made to the file

+Saving changes made to the file ```ruby config_writexml(document, outputPath) ``` diff --git a/metadata.rb b/metadata.rb index cbdfd4c..b7a59a3 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ license 'All rights reserved' description 'Installs/Configures dotnetconfig' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '0.2.1' +version '0.2.3' #Cookbook dependencies - Nokogiri depends 'nokogiri'