Skip to content
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

FIX #51 possibility to add checksum #80

Merged
merged 4 commits into from
Nov 3, 2016

Conversation

gbloquel
Copy link
Contributor

@gbloquel gbloquel commented Oct 10, 2016

New feature to set the checksum.

To use you must use the optional parameter md5sum
For example

class{ '::nexus':
        version               => '3.0.2',
        revision              => '02',
        download_site         => 'http://download.sonatype.com/nexus/3',
        nexus_type            => 'unix',
        md5sum                => '73425709c2c73f368655d32a2c757b24',
        nexus_work_dir_manage => false,
      }

@@ -41,4 +41,5 @@
$nexus_data_folder = undef
$download_folder = '/srv'
$manage_config = true
$md5sum = ''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this default to empty string instead of undef?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right the undef value is better. I change it!

@@ -24,6 +24,7 @@
'revision' => '01',
'version' => '2.11.2',
'download_folder' => '/srv',
'md5sum' => '',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this supposed to be undef now?

Copy link
Contributor Author

@gbloquel gbloquel Oct 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are almost right.

md5sum can not be used with undef value, that will cause during test:

ruby -c spec/classes/package_spec.rb
spec/classes/package_spec.rb:27: syntax error, unexpected keyword_undef
          'md5sum'                        => undef,
                                                  ^
spec/classes/package_spec.rb:115: syntax error, unexpected keyword_end, expecting '}'
rake aborted!
Command failed with status (1): [ruby -c spec/classes/package_spec.rb...]

caused by undef can not be used in hash

The empty value is used to be compatible with strict mode during the test

@pranav
Copy link
Contributor

pranav commented Nov 3, 2016

lgtm

@kenbreeman kenbreeman merged commit 4db8c5d into hubspotdevops:master Nov 3, 2016
@gbloquel gbloquel deleted the feature/checksum branch November 24, 2016 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants