Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Deprecate creating properties whose names are already methodsadamleff/warn-on-dangerous-property-names | Adam Leff | 2017-01-18 | 1 | -0/+31 |
| | | | | | | | | | | | | | | | | When creating a resource, a user can create a property that is the same name as an already-existing Ruby method, such as `#hash`. In the case of the `#hash` method, this can cause issues when attempting to adding resources to other data structures, such as Arrays or Hashes. In other examples, this could cause unexpected behavior that is incredibly difficult to troubleshoot. This change adds a deprecation warning in the case where a user adds a property to a resource that the resource instance already responds to. If y'all are OK with this approach, I'll be happy to write up the deprecation doc for this for docs.chef.io. Signed-off-by: Adam Leff <adam@leff.co> | ||||
* | Structure deprecations with additional metadatatm/deprecation_with_url | Thom May | 2016-11-16 | 1 | -5/+5 |
| | | | | | | | | This adds URLs to each class of deprecation, and correctly prints and formats them for maximum user efficiency. We also provide the URL to the data collector for Visibility to ingest. Signed-off-by: Thom May <thom@chef.io> | ||||
* | improve property-resource namespace collision exception | Lamont Granquist | 2016-10-31 | 1 | -4/+4 |
| | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org> | ||||
* | Allow flagging a resource property as sensitiveadamleff/sensitive-properties | Adam Leff | 2016-08-25 | 1 | -1/+12 |
| | | | | | | | | | | | | Some properties in custom resources may include sensitive data, such as a password for a database server. When the Resource's state is built for use by Data Collector or similar auditing tool, `Chef::Resource#state_for_resource_reporter` builds a hash of all state properties for that resource and their values. This leads to sensitive data being transmitted and potentially stored in the clear. This change enhances properties with the ability to set an individual property as sensitive and then have the value of that property suppressed when exporting the Resource's state. | ||||
* | fix Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgrade | Lamont Granquist | 2016-08-17 | 1 | -2/+2 |
| | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org> | ||||
* | tweak 3694 warnings | Lamont Granquist | 2016-07-01 | 1 | -2/+6 |
| | | | | | | | | - clean up "ZenMaster" resource - clean up 3694 detection to use properties - unlazy the resource_name in the trivial resource check - fixes an issue with resources-as-definitions pattern emitting 3694 errors for trivial resources | ||||
* | add nillable apt_repository and nillable properties | Lamont Granquist | 2016-04-14 | 1 | -2/+9 |
| | | | | | | in Chef-13 nillable will become 'true' by default and we'll have to deprecate and remove all nillable properties, but for now this lets us opt-in, which was can't currently do in Chef-12. | ||||
* | Issue 4334: Because set(property, nil) gets turned into get(property), add a ↵cd/fix-spurious-warnings | Chris Doherty | 2016-03-11 | 1 | -3/+4 |
| | | | | 'nil_set' parameter to get() to skip a spurious warning when that happens. | ||||
* | Fix property coercion in both places, because they were different and | Noah Kantrowitz | 2016-03-09 | 1 | -1/+1 |
| | | | one in Chef::Mixin::Properties would result in duplicated values. | ||||
* | convert MultilineOperationIndentation style to "indented" | Lamont Granquist | 2016-02-12 | 1 | -7/+7 |
| | | | | this looks nicer. | ||||
* | autofixing whitespace cops | Lamont Granquist | 2016-02-05 | 1 | -11/+10 |
| | | | | | | | | | | | | | | | | | | | | | | 4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment | ||||
* | Copyright year update for 2016 and massive cleanup. | Noah Kantrowitz | 2016-02-02 | 1 | -1/+1 |
| | | | Generated via git ls-files | xargs perl -pi -e "s/[Cc]opyright (?:\([Cc]\) )?((?\!$(date +%Y))\\d{4})(-\\d{4})?([, ][ \d]+)*(,|(?= ))/Copyright \\1-$(date +%Y),/g" | ||||
* | Simplify fix for property_type with defaultsjk/property-type-default-check | John Keiser | 2016-02-01 | 1 | -1/+1 |
| | | | | `property_type(is: [:a, :b], default: :c)` was broken because ParamsValidate requires its input to have a name and property types don't have one. | ||||
* | Fix defaults on property_type | John Keiser | 2016-02-01 | 1 | -2/+7 |
| | |||||
* | Fix nil with properties: | John Keiser | 2016-01-27 | 1 | -34/+95 |
| | | | | | | 1. Warn when default values are invalid. 2. Never validate nil (on set or get) if there is no default. 3. Emit "will be invalid in Chef 13" warning when setting an invalid nil value. | ||||
* | Fix #4334: don't warn about ambiguous property usage | John Keiser | 2016-01-22 | 1 | -1/+2 |
| | | | | unless using properties on the resource | ||||
* | Use double quotes by default | Thom May | 2016-01-14 | 1 | -4/+4 |
| | | | | | | | This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing. | ||||
* | Only warn about potentially duplicate properties during the resource initializerjk/reduce-property-dup-warning | John Keiser | 2015-12-14 | 1 | -3/+6 |
| | |||||
* | Don't warn when setting a property to nil unless its value wouldjk/updates2 | John Keiser | 2015-12-14 | 1 | -8/+11 |
| | | | | | actually change. Gets rid of cases where we are initializing a resource with values from another resource. | ||||
* | Get rid of ambiguity with `template 'x' do ...`jk/error-on-property-with-block | John Keiser | 2015-12-10 | 1 | -2/+10 |
| | |||||
* | Improve commentsjk/warn-dup-property | John Keiser | 2015-12-10 | 1 | -3/+15 |
| | |||||
* | Warn when user sets a property of an inline resource to itself. | John Keiser | 2015-12-10 | 1 | -0/+10 |
| | | | | (User will expect "x x" to grab the parent property.) | ||||
* | Make Property.derive create derived properties of the same typejk/custom_properties | John Keiser | 2015-10-28 | 1 | -1/+1 |
| | |||||
* | Accept coercion as a way to accept nil values | John Keiser | 2015-10-08 | 1 | -1/+4 |
| | |||||
* | Add ability for default to override name_propertyjk/name-default | John Keiser | 2015-09-29 | 1 | -4/+7 |
| | |||||
* | Make sure name_attribute works on derived propertiesjk/name-attribute-dup | John Keiser | 2015-09-29 | 1 | -1/+7 |
| | |||||
* | Use 2.0-compatible Hash rather than to_h | John Keiser | 2015-09-25 | 1 | -1/+1 |
| | |||||
* | If both name_attribute and name_property are specified, raise an error.jk/property-default-nil | John Keiser | 2015-09-25 | 1 | -19/+20 |
| | |||||
* | Don't treat name_property/attribute as defaults if they are false | John Keiser | 2015-09-25 | 1 | -1/+5 |
| | |||||
* | Fix up property deprecation text | John Keiser | 2015-09-25 | 1 | -1/+1 |
| | |||||
* | Prefer name_property: true over default: nil | John Keiser | 2015-09-25 | 1 | -11/+12 |
| | |||||
* | Add deprecation warning for properties that specify default and name_propertyjk/default-ignoring | John Keiser | 2015-09-22 | 1 | -7/+9 |
| | |||||
* | Honor the ordering of whichever `name_attribute` or `default` comes first | John Keiser | 2015-09-22 | 1 | -0/+15 |
| | |||||
* | Rename log.deprecation to log_deprecation | John Keiser | 2015-09-01 | 1 | -1/+1 |
| | |||||
* | Pass deprecations through formatter instead of logs | John Keiser | 2015-09-01 | 1 | -1/+1 |
| | |||||
* | Remove freeze of defaults, add warning for array/hash constant defaults | John Keiser | 2015-08-03 | 1 | -4/+1 |
| | |||||
* | Don't set keys unless you must (for easier debugging) | John Keiser | 2015-07-27 | 1 | -1/+1 |
| | |||||
* | Move property type derivation from "property_type" to "property" | John Keiser | 2015-07-03 | 1 | -46/+7 |
| | | | | to keep property_type simple | ||||
* | Add Property.create and Resource.property_type for type system overriding | John Keiser | 2015-07-03 | 1 | -9/+83 |
| | |||||
* | Bring set_or_return behavior back in line with what it used to be | John Keiser | 2015-07-03 | 1 | -13/+0 |
| | |||||
* | Only stick non-frozen values to the resource | John Keiser | 2015-07-03 | 1 | -4/+12 |
| | |||||
* | Code review comments | John Keiser | 2015-07-03 | 1 | -6/+24 |
| | |||||
* | Make required name attributes work | John Keiser | 2015-07-03 | 1 | -0/+491 |