(PDOC-28) Adding syntax higlighting. Refactoring the gemspec a bit.
This commit is contained in:
parent
aac19e67b7
commit
0dc8d95ce4
1
Gemfile
1
Gemfile
|
@ -2,7 +2,6 @@ source 'https://rubygems.org'
|
|||
|
||||
gemspec
|
||||
|
||||
gem 'yard'
|
||||
gem 'rgen'
|
||||
gem 'redcarpet'
|
||||
|
||||
|
|
10
README.md
10
README.md
|
@ -124,7 +124,7 @@ style guide.
|
|||
### Functions
|
||||
Here's an example of how you might document a 4x function:
|
||||
|
||||
```
|
||||
```ruby
|
||||
# When given two numbers, returns the one that is larger.
|
||||
# You could have a several line description here if you wanted,
|
||||
# but I don't have much to say about this function.
|
||||
|
@ -147,7 +147,7 @@ Here's an example of how you might document a 4x function:
|
|||
|
||||
Here's an example of how you might document a class:
|
||||
|
||||
```
|
||||
```puppet
|
||||
# This class is meant to serve as an example of how one might
|
||||
# want to document a manifest in a way that is compatible.
|
||||
# with the strings module
|
||||
|
@ -209,11 +209,15 @@ Rake Tasks
|
|||
|
||||
This module is also available as a Gem and makes two rake tasks (`generate` and `serve`) available in `puppet-strings/rake_tasks`. To add this to your module's CI workflow, be sure to add this module to your `Gemfile`:
|
||||
|
||||
gem 'puppet-strings', :git => 'https://github.com/puppetlabs/puppet-strings.git'
|
||||
```ruby
|
||||
gem 'puppetlabs-strings', :git => 'https://github.com/puppetlabs/puppet-strings.git'
|
||||
```
|
||||
|
||||
To use the rake tasks, `require puppet-strings/rake_tasks` in your `Rakefile`:
|
||||
|
||||
```ruby
|
||||
require 'puppet-strings/rake_tasks'
|
||||
```
|
||||
|
||||
Developing and Contributing
|
||||
-----
|
||||
|
|
|
@ -3,16 +3,14 @@ require 'json'
|
|||
puppet_metadata = JSON.load File.open(File.expand_path(File.join(__FILE__, '..', 'metadata.json'))).read
|
||||
|
||||
Gem::Specification.new do |s|
|
||||
s.name = 'puppet-strings'
|
||||
s.author = puppet_metadata['author']
|
||||
s.version = puppet_metadata['version']
|
||||
s.license = puppet_metadata['license']
|
||||
s.summary = puppet_metadata['summary']
|
||||
s.homepage = puppet_metadata['project_page']
|
||||
%w(name author version license summary).each do |section|
|
||||
s.send("#{section}=", puppet_metadata[section])
|
||||
end
|
||||
|
||||
s.description = s.summary
|
||||
s.files = Dir['lib/**/*'].reject { |f| f if File.directory?(f) }
|
||||
s.homepage = puppet_metadata['project_page']
|
||||
s.description = s.summary
|
||||
s.files = Dir['lib/**/*'].reject { |f| f if File.directory?(f) }
|
||||
|
||||
s.add_runtime_dependency 'puppet', '>= 3.7.0'
|
||||
s.add_runtime_dependency 'yard'
|
||||
s.add_runtime_dependency 'puppet', '>= 3.7.0'
|
||||
s.add_runtime_dependency 'yard', '~> 0.8'
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue