Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

dotnetconfig (15) Versions 0.2.2

Installs/Configures dotnetconfig

Policyfile
Berkshelf
Knife
cookbook 'dotnetconfig', '= 0.2.2', :supermarket
cookbook 'dotnetconfig', '= 0.2.2'
knife supermarket install dotnetconfig
knife supermarket download dotnetconfig
README
Dependencies
Changelog
Quality 33%

<h1>dotnetconfig Cookbook</h1>
<h2>.NET configuration file editor. Provides functionality to update a .NET app / web configuration file with values from a chef run.</h2>

<p>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.</p>

<h3>Open the file for editing, non locking</h3>
ruby
documentPath = 'C:\\Config\\' + 'app.config'
document = config_getxml(documentPath)

<h3>Set app settings within the config file</h3>
<p>Arguments:</p>
<p> Document: Pass document which was fetched from config_getxml</p>
<p> SettingName: The setting to update</p>
<p> SettingValue: The new value to apply to the configuration</p>

config_set_app_setting(document, 'fix-gateways', 'Replaced')
config_set_app_setting(document, 'service-installer-service-name', 'Edit2')
config_set_app_setting(document, 'service-installer-service-description', 'Edit3')
config_set_app_setting(document, 'log-fixmessage-to-db', 'Edit4')
config_set_app_setting(document, 'default-version', 'Edit5')
config_set_app_setting(document, 'fix-service-test-file-name', 'Edit6')

<h3>Setting custom elements</h3>
<p>Set an element's content using an xPath query, Example:</p>

<custom>
  <user>AValue1</user>
  <password>AValue2</password>
  <host>AValue3</host>
  <port>AValue4</port>
</custom>

<p>This block would find the first occurrence of the 'custom' element and set the content of each of its elements to a new value.</p>
ruby
config_set_element_content(document, '//configuration/custom/user', 'Edit8')
config_set_element_content(document, '//configuration/custom/password', 'Edit9')
config_set_element_content(document, '//configuration/custom/host', 'Edit10')
config_set_element_content(document, '//configuration/custom/port', 'Edit11')

<h3>Setting the content of a specific element using xPath</h3>
<p>This would find the first log4net appender called MyAppender</p>
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')

<h3>Set the the entire content of a connection string</h3>
ruby
config_set_connection_string(document, 'Database1', 'Database=Partial;User Id=Replacement;Password=PasswordChanged;CommandTimeout=30;MinPoolSize=0')

<h3>Set an individual property within a connection string</h3>
ruby
config_set_connection_string_property(document, 'Database2', 'password', 'NewValue123654')

<h3>Saving changes made to the file</h3>
ruby
config_writexml(document, outputPath)

Dependent cookbooks

nokogiri >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

dotnetconfig CHANGELOG

This file is used to list changes made in each version of the dotnetconfig cookbook.

0.1.0 - 0.1.x

  • jerseyfoxcom - Initial release of dotnetconfig, contains structural pre-release uploads to test functionality of the Supermarket before checking in any working code.

Check the Markdown Syntax Guide for help with Markdown.

The Github Flavored Markdown page describes the differences between markdown on github and standard markdown.

Collaborator Number Metric
            

0.2.2 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Foodcritic Metric
            

0.2.2 passed this metric

License Metric
            

0.2.2 failed this metric

dotnetconfig does not have a valid open source license.
Acceptable licenses include Apache 2.0, apachev2, MIT, mit, GNU Public License 2.0, gplv2, GNU Public License 3.0, gplv3.