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

Installs/Configures dotnetconfig

Policyfile
Berkshelf
Knife
cookbook 'dotnetconfig', '~> 0.2.4', :supermarket
cookbook 'dotnetconfig', '~> 0.2.4'
knife supermarket install dotnetconfig
knife supermarket download dotnetconfig
README
Dependencies
Changelog
Quality 17%

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.

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

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

config_set_connection_string_property(document, 'Database2', 'password', 'NewValue123654')

Saving changes made to the file

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.4 failed this metric

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

Contributing File Metric
            

0.2.4 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.2.4 failed this metric

FC066: Ensure chef_version is set in metadata: dotnetconfig/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.2.4 passed this metric

Testing File Metric
            

0.2.4 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.2.4 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number