-
Notifications
You must be signed in to change notification settings - Fork 87
(MAINT) Add CI workflow #310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fcddc6d
to
ec68c99
Compare
Prior to this commit puppet-strings relied on travis for ci. We have since moved away from travis and use github actions. This commit creates a new ci.yml workflow that runs on: * A nightly cron * pull request to main * workflow_dispatch
This commit removes the legacy travis workflow from this repository
Prior to this commit Rubocop was constrained to an older version. This was causing cop errors when executed with newer rubies. This commit removes the version constraint from the Gemfile and bumps the target ruby version in rubocops config to 2.5 which is the current minimum supported version.
d9d68e5
to
294c627
Compare
06abf37
to
08d63d3
Compare
08d63d3
to
67795af
Compare
Prior to this commit the rubocop config in this repository differed from configs used across the modules ecosystem. This commit attempts to align the config and versions used.
1955993
to
c0bd743
Compare
c0bd743
to
1bf8ef5
Compare
1bf8ef5
to
cd4efbd
Compare
raise RuntimeError, 'This face requires Ruby 1.9 or greater.' if RUBY_VERSION.match?(/^1\.8/) | ||
raise "The 'yard' gem must be installed in order to use this face." unless Puppet.features.yard? | ||
raise "The 'rgen' gem must be installed in order to use this face." unless Puppet.features.rgen? | ||
raise 'This face requires Ruby 1.9 or greater.' if RUBY_VERSION.match?(%r{^1\.8}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The funny thing here is that .match?
didn’t exist until Ruby 2.4.6.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm yes.. and to be honest given the minimum ruby for this gem is now 2.5x i wonder if these constraints could be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A third of the way through so far, some small thoughts
@david22swan With regards to the It looks like it is a requirement brought forward by inheritance. The base class for our Given that our classes seem to build on the OO nature of YARD i'd be hesitant to remove it because we do not know whether other methods will be expecting an object with a signature of I think what can be misleading here is using There is however documentation for the param on most of these methods that states it's intention:
There may be more value ensuring that this message is constant across all of the What do you think? |
Sounds good to me |
cd4efbd
to
ea5b786
Compare
195e88d
to
ab3e011
Compare
ab3e011
to
f68b2be
Compare
@@ -114,18 +114,18 @@ def output(name, data, undoc = nil) | |||
@undocumented += undoc if undoc.is_a?(Integer) | |||
data = | |||
if undoc | |||
('%5s (% 5d undocumented)' % [data, undoc]) | |||
"#{data} (#{undoc} undocumented)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what the new output will look like if there is more than 9 of some type (assuming I didn’t read this wrong):
Files: 1
Modules: 0 (0 undocumented)
Classes: 0 (0 undocumented)
Constants: 0 (0 undocumented)
Attributes: 0 (0 undocumented)
Methods: 0 (0 undocumented)
Puppet Classes: 10 (0 undocumented)
Puppet Data Types: 0 (0 undocumented)
Puppet Data Type Aliases: 10 (10 undocumented)
Puppet Defined Types: 1 (0 undocumented)
Puppet Types: 0 (0 undocumented)
Puppet Functions: 0 (0 undocumented)
Puppet Providers: 0 (0 undocumented)
Puppet Plans: 0 (0 undocumented)
Puppet Tasks: 0 (0 undocumented)
I think that’s fine, especially since I imagine the vast majority of modules have fewer than <10 of anything. Just wanted to make it explicit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @chelnak
These changes are well overdue! 👍
Merging as the outstanding status is for Travis CI which has been removed. |
Prior to this commit puppet-strings relied on travis for ci. We have since moved away from travis and use GitHub actions.
This commit creates a new ci.yml workflow that runs on:
We also remove the legacy travis workflow.
In addition to the above there are also a number of rubocop fixes in this PR. These fixes were required to ensure that spec and linting tests were green.