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.3

Installs/Configures dotnetconfig

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

dotnetconfig Cookbook

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

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

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

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')

Setting custom elements

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

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

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')
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
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')

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
ruby
config_set_connection_string_property(document, 'Database2', 'password', 'NewValue123654')

Saving changes made to the file
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.3 failed this metric

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

Foodcritic Metric
            

0.2.3 passed this metric

License Metric
            

0.2.3 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.