knife-cookbook-doc 0.31.0 → 0.31.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 32146e1b9e4922d6ad79b91e13b265644ab5d015f0c5cbdb3ee19cbc41d7e3da
4
- data.tar.gz: 7b743e9a1dd63eb357f54bc3713c81c902f86f740163da01456cf7035b481913
3
+ metadata.gz: 560d8dabf901caec333d223a157a910bbab256197b6c4a70b344ed302719d5a0
4
+ data.tar.gz: b661f805fb0af099fdcf62c4cc9ce28b51c52bdd22ca0adb8f8ba80438f32c69
5
5
  SHA512:
6
- metadata.gz: b53f6f936367ddd06a000582f7c7e7f8aed90b277854d579933abbb31b2476920d9f9bb5fd1b9991ec25164dd2325c88feeb6db35225390b76a86fea5fc43d23
7
- data.tar.gz: 4cd5dff63120570a7ecfe3bb5da66fab1d2918c41f5b7c1334fc6e31d7048ada30678a9b8e17cd96527420bed0346c522d4165b5e23c9b6fed3ea479e54afe17
6
+ metadata.gz: ef26c18c5de72b383b62d098f8ee88ccfe8784cda62f1d0efd7625ebd30a9a426bdd1b3071192a4e0392299fd3ed1cbdf1d4321b2944a312afb0b6b0658e71d2
7
+ data.tar.gz: 85cd333305879017675bbeadd8623230968da8c6b122911921ffb98cdeb71e62cfe6099d85b16c1dafe5783d8f55ad9f575ae25971de1556d011d7492e71534d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # Unreleased
2
+
3
+ # v0.31.1 (Sep 5 2022)
4
+
5
+ * Remove `action_class` from data sent to `resource_class.class_eval`. Submitted by Justin Steele.
6
+
1
7
  # v0.31.0 (Feb 7 2022)
2
8
 
3
9
  * Prettify Chef version constraints.
@@ -11,3 +11,7 @@ attribute :my_attribute, default: 'a default value'
11
11
 
12
12
  # <> @property my_property This is a property.
13
13
  property :my_property, default: 'another default value'
14
+
15
+ action_class do
16
+ include FixtureCookbook::Library
17
+ end
@@ -107,6 +107,9 @@ module KnifeCookbookDoc
107
107
  resource_data = resource_data.gsub(/^ *\# ?\<\> (.*?)$/) do
108
108
  "desc #{$1.inspect}\n"
109
109
  end
110
+ resource_data = resource_data.gsub(/^action_class do\n(.*?)\nend/m) do
111
+ ''
112
+ end
110
113
 
111
114
  resource_class.class_eval(resource_data, filename, 1)
112
115
 
@@ -1,3 +1,3 @@
1
1
  module KnifeCookbookDoc
2
- VERSION = '0.31.0'
2
+ VERSION = '0.31.1'
3
3
  end
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ describe KnifeCookbookDoc::ResourceModel do
4
+ describe '#load_descriptions' do
5
+ subject do
6
+ KnifeCookbookDoc::ResourceModel.new('fixture', './fixture/resources/space.rb').name
7
+ end
8
+
9
+ it do
10
+ is_expected.to eq(:fixture_space)
11
+ end
12
+ end
13
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,2 +1,6 @@
1
1
  require 'rspec'
2
+ require 'chef'
2
3
  require_relative '../lib/knife_cookbook_doc/attributes_model'
4
+ require_relative '../lib/knife_cookbook_doc/base_model'
5
+ require_relative '../lib/knife_cookbook_doc/resource_model'
6
+ require_relative '../lib/knife_cookbook_doc/documenting_lwrp_base'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-cookbook-doc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.31.0
4
+ version: 0.31.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Lafeldt
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-02-07 00:00:00.000000000 Z
12
+ date: 2022-09-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chef
@@ -115,6 +115,7 @@ files:
115
115
  - lib/knife_cookbook_doc/resource_model.rb
116
116
  - lib/knife_cookbook_doc/version.rb
117
117
  - spec/knife_cookbook_doc/attribute_model_spec.rb
118
+ - spec/knife_cookbook_doc/resource_model_spec.rb
118
119
  - spec/spec_helper.rb
119
120
  homepage: http://realityforge.github.com/knife-cookbook-doc
120
121
  licenses:
@@ -141,4 +142,5 @@ specification_version: 4
141
142
  summary: Knife plugin to generate README.md for a cookbook
142
143
  test_files:
143
144
  - spec/knife_cookbook_doc/attribute_model_spec.rb
145
+ - spec/knife_cookbook_doc/resource_model_spec.rb
144
146
  - spec/spec_helper.rb