Sha256: 740b5d0a32ddbcb59ba893f00899ac24c4b6f594108815dea77fb691ec119559

Contents?: true

Size: 748 Bytes

Versions: 36

Compression:

Stored size: 748 Bytes

Contents

class Chef
  class Resource
    class RubyBlock < Chef::Resource
      def initialize(name, collection=nil, node=nil)
        super(name, collection, node)
        @resource_name = :ruby_block
        @action = :create
        @allowed_actions.push(:create)
      end
 
      def block(&block)
        if block
          @block = block
        else
          @block
        end
      end
    end
  end
end


class Chef
  class Provider
    class RubyBlock < Chef::Provider
      def load_current_resource
        Chef::Log.debug(@new_resource.inspect)
        true
      end
 
      def action_create
        @new_resource.block.call
      end
    end
  end
end

Chef::Platform.platforms[:default].merge! :ruby_block => Chef::Provider::RubyBlock

Version data entries

36 entries across 26 versions & 3 rubygems

Version Path
engineyard-recipes-0.5.0 lib/engineyard-recipes/generators/templates/cookbooks/main/libraries/ruby_block.rb
engineyard-recipes-0.5.0 lib/engineyard-recipes/generators/init_resin_chef_generator/templates/cookbooks/main/libraries/ruby_block.rb
engineyard-recipes-0.4.0 lib/engineyard-recipes/generators/init_generator/templates/cookbooks/main/libraries/ruby_block.rb
engineyard-recipes-0.3.2 lib/engineyard-recipes/generators/init_generator/templates/cookbooks/main/libraries/ruby_block.rb
engineyard-recipes-0.3.2.pre lib/engineyard-recipes/generators/init_generator/templates/cookbooks/main/libraries/ruby_block.rb
engineyard-recipes-0.3.0 lib/engineyard-recipes/generators/init_generator/templates/cookbooks/main/libraries/ruby_block.rb
engineyard-recipes-0.2.0 lib/engineyard-recipes/generators/init_generator/templates/cookbooks/main/libraries/ruby_block.rb
engineyard-recipes-0.2.0.pre3 lib/engineyard-recipes/generators/init_generator/templates/cookbooks/main/libraries/ruby_block.rb
engineyard-recipes-0.2.0.pre2 lib/engineyard-recipes/generators/init_generator/templates/cookbooks/main/libraries/ruby_block.rb
engineyard-recipes-0.2.0.pre1 lib/engineyard-recipes/generators/init_generator/templates/cookbooks/main/libraries/ruby_block.rb
engineyard-recipes-0.1.3 lib/engineyard-recipes/generators/init_generator/templates/cookbooks/main/libraries/ruby_block.rb
engineyard-recipes-0.1.2 lib/engineyard-recipes/generators/init_generator/templates/cookbooks/main/libraries/ruby_block.rb
engineyard-recipes-0.1.1 lib/engineyard-recipes/generators/init_generator/templates/cookbooks/main/libraries/ruby_block.rb
engineyard-recipes-0.1.0 lib/engineyard-recipes/generators/init_generator/templates/cookbooks/main/libraries/ruby_block.rb
engineyard-recipes-0.0.3 lib/engineyard-recipes/generators/init_generator/templates/cookbooks/main/libraries/ruby_block.rb
engineyard-recipes-0.0.2 lib/engineyard-recipes/generators/init_generator/templates/cookbooks/main/libraries/ruby_block.rb
engineyard-recipes-0.0.1 lib/engineyard-recipes/generators/init_generator/templates/cookbooks/main/libraries/ruby_block.rb
engineyard-jenkins-0.5.1 lib/engineyard-jenkins/cli/install_server_generator/templates/cookbooks/main/libraries/ruby_block.rb
engineyard-jenkins-0.5.1 lib/engineyard-jenkins/cli/install_generator/templates/cookbooks/main/libraries/ruby_block.rb
engineyard-jenkins-0.5.0 lib/engineyard-jenkins/cli/install_server_generator/templates/cookbooks/main/libraries/ruby_block.rb