Skip to content

Commit f730501

Browse files
committed
(maint) Add some docs and remove the Style/Documentation exclusions
1 parent 5d89caf commit f730501

File tree

7 files changed

+16
-19
lines changed

7 files changed

+16
-19
lines changed

.rubocop.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
require: rubocop-rspec
3-
inherit_from: .rubocop_todo.yml
43
AllCops:
54
TargetRubyVersion: '2.1'
65
Include:
@@ -157,4 +156,4 @@ Naming/UncommunicativeMethodParamName:
157156

158157
# This cop breaks syntax highlighting in VSCode
159158
Layout/ClosingHeredocIndentation:
160-
Enabled: false
159+
Enabled: false

.rubocop_todo.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

lib/puppet/resource_api.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
require 'puppet/type'
1313
require 'puppet/util/network_device'
1414

15+
# This module contains the main API to register and access types, providers and transports.
1516
module Puppet::ResourceApi
1617
@warning_count = 0
1718

lib/puppet/resource_api/base_context.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
require 'puppet/resource_api/type_definition'
22

3+
# rubocop:disable Style/Documentation
34
module Puppet; end
45
module Puppet::ResourceApi; end
6+
# rubocop:enable Style/Documentation
7+
8+
# This class provides access to all common external dependencies of providers and transports.
9+
# The runtime environment will inject an appropriate implementation.
510
class Puppet::ResourceApi::BaseContext
611
attr_reader :type
712

lib/puppet/resource_api/io_context.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
require 'puppet/resource_api/base_context'
22

3+
# Implement Resource API Conext to log through an IO object, defaulting to `$stderr`.
4+
# There is no access to a device here.
35
class Puppet::ResourceApi::IOContext < Puppet::ResourceApi::BaseContext
46
def initialize(definition, target = $stderr)
57
super(definition)

lib/puppet/resource_api/puppet_context.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
require 'puppet/resource_api/base_context'
22
require 'puppet/util/logging'
33

4+
# Implement Resource API Conext to log through Puppet facilities
5+
# and access/expose the puppet process' current device
46
class Puppet::ResourceApi::PuppetContext < Puppet::ResourceApi::BaseContext
57
def device
68
# TODO: evaluate facter_url setting for loading config if there is no `current` NetworkDevice

lib/puppet/resource_api/transport.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# rubocop:disable Style/Documentation
2+
module Puppet; end
3+
module Puppet::ResourceApi; end
4+
# rubocop:enable Style/Documentation
5+
16
# Remote target transport API
27
module Puppet::ResourceApi::Transport
38
def register(schema)

0 commit comments

Comments
 (0)