Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8391539
no_duplicate.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
862 B
Subscribers
None
no_duplicate.rb
View Options
#!/usr/bin/env ruby
`git clone https://github.com/puppetlabs/puppetlabs-stdlib stdlib`
extlib_functions
=
[]
Dir
.
glob
(
'lib/puppet/parser/functions/*.rb'
)
.
each
do
|
path
|
extlib_functions
<<
path
.
split
(
'/'
)
[-
1
].
split
(
'.'
)
[
0
]
end
stdlib_functions
=
[]
Dir
.
glob
(
'stdlib/lib/puppet/parser/functions/*.rb'
)
.
each
do
|
path
|
stdlib_functions
<<
path
.
split
(
'/'
)
[-
1
].
split
(
'.'
)
[
0
]
end
puts
'Stdlib functions:'
puts
stdlib_functions
puts
''
puts
'Extlib functions:'
puts
extlib_functions
puts
''
duplicate_functions
=
stdlib_functions
&
extlib_functions
puts
'Duplicate functions:'
puts
duplicate_functions
puts
''
if
duplicate_functions
.
length
>
0
puts
'Duplicate function(s) found! Please have unique function names between'
puts
'stdlib and extlib'
puts
'Test failed'
exit
1
else
puts
'No duplicate functions found'
puts
'Test passed'
exit
0
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Jun 4 2025, 6:45 PM (14 w, 15 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3373414
Attached To
rSPEXTL puppet-extlib
Event Timeline
Log In to Comment