]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
(Maint) Fix interpreter lines
authorJeff McCune <jeff@puppetlabs.com>
Thu, 19 Jul 2012 22:27:52 +0000 (15:27 -0700)
committerJeff McCune <jeff@puppetlabs.com>
Thu, 19 Jul 2012 22:41:41 +0000 (15:41 -0700)
This time around I actually know why I'm doing this thanks to the
reminder from Nick Lewis.

Ruby will replace itself in memory with the executable listed in the
interpreter line if the string "ruby" is not in there.

Since /usr/bin/env rspec doesn't contain the substring "ruby", you can't
actually run ruby -W1 or whatever on the file.

This patch fixes the problem by making sure "ruby" is present,
preventing ruby from replacing itself in memory.

47 files changed:
spec/unit/puppet/parser/functions/abs_spec.rb
spec/unit/puppet/parser/functions/bool2num_spec.rb
spec/unit/puppet/parser/functions/capitalize_spec.rb
spec/unit/puppet/parser/functions/chomp_spec.rb
spec/unit/puppet/parser/functions/chop_spec.rb
spec/unit/puppet/parser/functions/delete_at_spec.rb
spec/unit/puppet/parser/functions/delete_spec.rb
spec/unit/puppet/parser/functions/downcase_spec.rb
spec/unit/puppet/parser/functions/empty_spec.rb
spec/unit/puppet/parser/functions/flatten_spec.rb
spec/unit/puppet/parser/functions/grep_spec.rb
spec/unit/puppet/parser/functions/hash_spec.rb
spec/unit/puppet/parser/functions/is_array_spec.rb
spec/unit/puppet/parser/functions/is_domain_name_spec.rb
spec/unit/puppet/parser/functions/is_float_spec.rb
spec/unit/puppet/parser/functions/is_hash_spec.rb
spec/unit/puppet/parser/functions/is_integer_spec.rb
spec/unit/puppet/parser/functions/is_ip_address_spec.rb
spec/unit/puppet/parser/functions/is_mac_address_spec.rb
spec/unit/puppet/parser/functions/is_numeric_spec.rb
spec/unit/puppet/parser/functions/is_string_spec.rb
spec/unit/puppet/parser/functions/join_spec.rb
spec/unit/puppet/parser/functions/keys_spec.rb
spec/unit/puppet/parser/functions/lstrip_spec.rb
spec/unit/puppet/parser/functions/member_spec.rb
spec/unit/puppet/parser/functions/num2bool_spec.rb
spec/unit/puppet/parser/functions/parsejson_spec.rb
spec/unit/puppet/parser/functions/parseyaml_spec.rb
spec/unit/puppet/parser/functions/prefix_spec.rb
spec/unit/puppet/parser/functions/range_spec.rb
spec/unit/puppet/parser/functions/reverse_spec.rb
spec/unit/puppet/parser/functions/rstrip_spec.rb
spec/unit/puppet/parser/functions/shuffle_spec.rb
spec/unit/puppet/parser/functions/size_spec.rb
spec/unit/puppet/parser/functions/sort_spec.rb
spec/unit/puppet/parser/functions/squeeze_spec.rb
spec/unit/puppet/parser/functions/str2bool_spec.rb
spec/unit/puppet/parser/functions/strftime_spec.rb
spec/unit/puppet/parser/functions/strip_spec.rb
spec/unit/puppet/parser/functions/swapcase_spec.rb
spec/unit/puppet/parser/functions/time_spec.rb
spec/unit/puppet/parser/functions/type_spec.rb
spec/unit/puppet/parser/functions/unique_spec.rb
spec/unit/puppet/parser/functions/upcase_spec.rb
spec/unit/puppet/parser/functions/values_at_spec.rb
spec/unit/puppet/parser/functions/values_spec.rb
spec/unit/puppet/parser/functions/zip_spec.rb

index 65ba2e8cc7b6606348798e0b890dd88e534e0f9c..2361b9352c56ed4d7e918caee6af44296cb99845 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the abs function" do
index d5da18c8d60d0701280974c2906a047299a89d5e..10fc21b7898d15cfddacc392a4f20407ccb3bbc2 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the bool2num function" do
index 1c45821ae64b288db78f3c65bcde2d2385c65f42..a173f2f3b9d5dce37affcb8493ec3f06386b92ac 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the capitalize function" do
index 0592115054d8f1ecdedc41f993757e7d0dc40dba..3134e53f08cbe7801e4783c5a6db4f81fd08ed57 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the chomp function" do
index 0c456a8af2a3d6afdc9a8e50d624a9f73faf144e..c7088678d6a00a5ec9b875e000421508da174bdd 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the chop function" do
index 27db0c8773ebac812db02217c49ded9115f77c10..cf10197dbcb87cc92db6517c1d69155017b89224 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the delete_at function" do
index fab3230e330686f3f77cb5649c982920cbc88e00..90b2eab60059992948f4eb5ce786a0f33f7d9d0a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the delete function" do
index 0bccd5f12955ff9e6b8093d93a32cf3c79f5e667..bc4f79758321b404e10cde5b4cf86909d6472850 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the downcase function" do
index cb0021f74f057ac6eeba84c7893e9e6b9c387d0e..8d69c839563de384d2ccce8e127e73ddf50a8654 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the empty function" do
index 7bedeb2367106a3aaa986746c522bd30ac960ad1..e186fad6e8b47062164eb838c54e887f5be10e10 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the flatten function" do
index b1f647cd3fed60fd91211ff3c6db075f54267bfc..97f31a09f940bdb696167303226fc0cdb905c08b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the grep function" do
index 6d3d48c7293cdd8461cd2830ebd1629594fb7f96..f76fbe340241b5d3928a98950565543674b8bd9c 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the hash function" do
index 537595c0765bb0e8493d9a01d95b036204ffc8fe..6a46bfe498507cfb1353588081312809729b963f 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the is_array function" do
index ccd327619902d2e4f82a3c8c678b219879f3b5d4..2e17dfbf99bd68c8dbe9303f6f9caacb0bf88c75 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the is_domain_name function" do
index 55ba8cfc04aacc69c2df51dd0e3f17ced7d06358..2cfc7890424a68d2809f888af3aae83f47118454 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the is_float function" do
index 94364f5e4bcd35e3d80ccac56eda9c3a3c415e32..112c9abc916332d9be279558a9c61acdc2599535 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the is_hash function" do
index faf6f2d5680f175b2720784c4d2478a771597a3b..d4b8f6b855b0b1542d502eeb1a54548daf7959c6 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the is_integer function" do
index 98ce8283a941e8709e35299bd006f7adc3af68de..793063489b17a34d59db76dd9e90ab0ad97b2231 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the is_ip_address function" do
index c9b963791c8132088babb3492e2e906ac1e39b88..4ba896eb413847fc60448542f3630c4278377ba1 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the is_mac_address function" do
index 2191b7bd086f770f088bcf9fcee48c8e8e1c3d22..0b0a834426fed429cc996b9d0f63dedffab065ad 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the is_numeric function" do
index 4f3f5fd2448d8b0a3f1762b230a74085aa21ef32..e54562d0bac56bd954da9002b76c38a742564b0e 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the is_string function" do
index 1b3dec8a9259572345417b6a984c1fdcf84e05ef..60c1c95b064ab9d7a9a82cc7fb3a611155bb1422 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the join function" do
index d9285624bd1c5ab262c1e2da8372a451b341b4c2..455acb829b9f8560dd57934d05ca9618614f5cd3 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the keys function" do
index ac331fa25e82982d1290b7a3184a5dc47aaca9b4..1bac793419edd5ac3f373c2aa9d118a723ccfe19 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the lstrip function" do
index 2cebc0d697ec0a8ec3526219ff9180cb49966a7d..8462e04da71b551fe1e02b06c363bcf0ced16e0a 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the member function" do
index 6585273c41301fe82d288553afe6debd2292a5f1..3c9f846f1adca72eb9249531b1d2af279dc5f471 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the num2bool function" do
index 26eea360353658741ca75a8bbe8a7590a22c96de..22fe27e55d0186043e36405208ee59961c467305 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the parsejson function" do
index f9cb049038bc0592f75a4c55c5cd92c3ba51c2be..7c29f1a5e3320f84a4187edf62143a70f0920c58 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the parseyaml function" do
index a0cbcabc7082c8238717a17645d417a32ad4ac22..c093d9e38a4b3534686c83be0484eb32620f575a 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the prefix function" do
index 060423af5123369cc63cc030d16c42f5664dd24b..210fec8928bd7aa67bcbae07e0c53b755209105b 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the range function" do
index 4fa50e4ac869dfe690266cf920307a7e0c8b5d25..a07bdd6b315745a80be888bc38b160329983109e 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the reverse function" do
index af8cc125e95c031a86e4ae67b1c16230c41aa737..b6a461ab61ef8545785ea57c1d977e3d7b9ce10d 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the rstrip function" do
index f04fda597c7b1835d9e92477e9562d99de282343..e66fdc5580e821e5e781c0c7e33a1e80f8b8ddb9 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the shuffle function" do
index ccaa335328daa1819920bcedee81d80558e419e4..20c3580d53a38881efa25dcd92dc58c149f7f15a 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the size function" do
index fbe3073f191e947fb7fd8b1a98f3d48995954e29..0f2343abede1dcba2b20d50448c6e6ca098ed02b 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the sort function" do
index 9355ad255c4f9e008a9308ff109bbb402b409859..4e84c123c1c7303aa559beb80c6a0983b5e85723 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the squeeze function" do
index d7f0ac9db3c494238171e8a85e4070503161c44c..fff9f5d6a558e2473fbfb0828da4c14041023c60 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the str2bool function" do
index f7a2cd9b5a558cf9a3c6bcd2bbc44322a8a31c08..a0ca9d5f7b4b75a89df2fc09ec2db94978697be7 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the strftime function" do
index 48a52dd58bffb629fdfd78e8d13a99e65c9c64a8..c051038d4b649db8a2329bc592a465cc56e5ff88 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the strip function" do
index 26860546cf917202667afa9c07dc2bf0c5805855..b40e199c6ce3e1cdc3855ab996525f289c237dfb 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the swapcase function" do
index 5d6cd977f9514cda10c484c3683867006a905100..4b1ab5eaf170315547f98a395713a099c57a3497 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the time function" do
index e3c28ed35ffb44c09fbcd63446e382601cb0f26e..ad5efdcb53daa99b296e318739bae193862323c8 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the type function" do
index 627dc334c429bbe2d632008192cb18982e369c8b..82edb26a33c9a4a0fb51c999485cfd8f643e8ed0 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the unique function" do
index 5d188469e646a0412dcc6d023ff6075913305f3f..d779b169440963730e10396b0d1c9f903d7ed5b6 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the upcase function" do
index 6c45316c143b1898c797abf0c06864102f0f38cd..c1c9a6acadabe052b1ede4356fa9699942ed4c2a 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the values_at function" do
index a5fbbd880aac20dd60e187e78c260fc9ce907e12..0c7f1f95a57d67e2c92ccffc74fe960b1ab3b515 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the values function" do
index 074f4dfbf1dfe2eebc9951f0dbcfa56f1e0321e0..9badb06cf1a20ffa2b1e7acfef6e12d5428baca1 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env rspec
+#! /usr/bin/env ruby -S rspec
 require 'spec_helper'
 
 describe "the zip function" do