Skip to content

With new ruby (1.9.3) and puppet (3.2) the module does not work #1

Closed
@onyxmaster

Description

@onyxmaster

Attaching patch that fixed it for me: The first change is harmless, the second one is backwards incompatible.

--- lib/puppet/provider/net_share/net_share.rb  2013-05-23 15:40:04.000000000 +0400
+++ lib/puppet/provider/net_share/net_share.rb  2013-05-23 15:47:07.000000000 +0400
@@ -73,7 +73,7 @@

     properties[:ensure] = :present

-    output.each do |line|
+    output.each_line do |line|
       break if line.rstrip.length == 0

       last_name = name
--- lib/puppet/type/net_share.rb    2013-05-23 15:40:04.000000000 +0400
+++ lib/puppet/type/net_share.rb    2013-05-23 15:47:07.000000000 +0400
@@ -51,10 +51,8 @@
     desc "An array of permissions. Example: ['computer\\user,full', 'computer\\user2,change', 'computer\\user3,read']"

     munge do |value|
-      value.collect do |item|
-        user, access = item.split(',', 2)
-        "#{user.strip},#{access.strip.downcase}"
-      end
+      user, access = value.split(',', 2)
+      "#{user.strip},#{access.strip.downcase}"
     end
   end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions