<commit_before># Puppet module to install composer

## Description

install php composer - from http://getcomposer.org/ with puppet-composer module

## Installation

#### Installation via puppet forge (RECOMMENDED, automatically installs all dependencies)

    puppet module install --target-dir=/your/path/to/modules tPl0ch-composer

#### Installation via git submodule

    git submodule add git://github.com/tPl0ch/puppet-composer.git modules/composer

## Dependencies

This module requires the module ```puppetlabs/git```, which when installed with the

## Usage

#### Simple include just installs with defaults

In your manifest.pp:

    include composer

#### Configuring the composer install

In your manifest.pp:

    # configure composer install - not nessecary, comes with sane defaults
    class { 'composer':
        target_dir      => '/usr/local/bin',
        composer_file   => 'composer', # could also be 'composer.phar'
        download_method => 'curl', # or 'wget'
    }

#### Creating a project

In your manifest.pp:

    # create a project
    composer::project { 'silex':
        project_name   => 'fabpot/silex-skeleton',  # REQUIRED
        target_dir     => '/vagrant/silex', # REQUIRED
        prefer_source  => true,
        stability      => 'dev', # Minimum stability setting
        keep_vcs       => false, # Keep the VCS information
        dev            => true, # Install dev dependencies
        repository_url => 'http://repo.example.com' # Custom repository URL
    }

#### Updating a project / Updating package(s)

In your manifest.pp:

    # update a project
    composer::exec { 'silex-update':
        cmd                  => 'update',  # REQUIRED
        cwd                  => '/vagrant/silex', # REQUIRED
        packages             => ['silex/silex', 'symfony/browser-kit'], # leave empty or omit to update whole project
        prefer_source        => false, # Only one of prefer_source or prefer_dist can be true
        prefer_dist          => false, # Only one of prefer_source or prefer_dist can be true
        dry_run              => false, # Minimum stability setting
        no_custom_installers => false, # No custom installers
        no_scripts           => false, # No script execution
        no_interaction       => true, # No interactive questions
        optimize             => false, # Optimize autoloader
        dev                  => false, # Install dev dependencies
    }

#### Installing a project

In your manifest.pp:

    # install a project - packages variable is ignored with 'install' cmd
    composer::exec { 'silex-install':
        cmd                  => 'install',  # REQUIRED
        cwd                  => '/vagrant/silex', # REQUIRED
        prefer_source        => false,
        prefer_dist          => false,
        dry_run              => false, # Minimum stability setting
        no_custom_installers => false, # No custom installers
        no_scripts           => false, # No script execution
        no_interaction       => true, # No interactive questions
        optimize             => false, # Optimize autoloader
        dev                  => false, # Install dev dependencies
    }

## TODO

- Add type 'composer::require'
- Add rspec test cases<commit_msg>Fixed README<commit_after># Puppet module to install composer

## Description

install php composer - from http://getcomposer.org/ with puppet-composer module

## Installation

#### Installation via puppet forge (RECOMMENDED, automatically installs all dependencies)

    puppet module install --target-dir=/your/path/to/modules tPl0ch-composer

#### Installation via git submodule

    git submodule add git://github.com/tPl0ch/puppet-composer.git modules/composer

## Dependencies

This module requires the module ```puppetlabs/git```

## Usage

#### Simple include just installs with defaults

In your manifest.pp:

    include composer

#### Configuring the composer install

In your manifest.pp:

    # configure composer install - not nessecary, comes with sane defaults
    class { 'composer':
        target_dir      => '/usr/local/bin',
        composer_file   => 'composer', # could also be 'composer.phar'
        download_method => 'curl', # or 'wget'
    }

#### Creating a project

In your manifest.pp:

    # create a project
    composer::project { 'silex':
        project_name   => 'fabpot/silex-skeleton',  # REQUIRED
        target_dir     => '/vagrant/silex', # REQUIRED
        prefer_source  => true,
        stability      => 'dev', # Minimum stability setting
        keep_vcs       => false, # Keep the VCS information
        dev            => true, # Install dev dependencies
        repository_url => 'http://repo.example.com' # Custom repository URL
    }

#### Updating a project / Updating package(s)

In your manifest.pp:

    # update a project
    composer::exec { 'silex-update':
        cmd                  => 'update',  # REQUIRED
        cwd                  => '/vagrant/silex', # REQUIRED
        packages             => ['silex/silex', 'symfony/browser-kit'], # leave empty or omit to update whole project
        prefer_source        => false, # Only one of prefer_source or prefer_dist can be true
        prefer_dist          => false, # Only one of prefer_source or prefer_dist can be true
        dry_run              => false, # Minimum stability setting
        no_custom_installers => false, # No custom installers
        no_scripts           => false, # No script execution
        no_interaction       => true, # No interactive questions
        optimize             => false, # Optimize autoloader
        dev                  => false, # Install dev dependencies
    }

#### Installing a project

In your manifest.pp:

    # install a project - packages variable is ignored with 'install' cmd
    composer::exec { 'silex-install':
        cmd                  => 'install',  # REQUIRED
        cwd                  => '/vagrant/silex', # REQUIRED
        prefer_source        => false,
        prefer_dist          => false,
        dry_run              => false, # Minimum stability setting
        no_custom_installers => false, # No custom installers
        no_scripts           => false, # No script execution
        no_interaction       => true, # No interactive questions
        optimize             => false, # Optimize autoloader
        dev                  => false, # Install dev dependencies
    }

## TODO

- Add type 'composer::require'
- Add rspec test cases
{'fraction_non_alphanumeric': 0.09405788177339902, 'fraction_numerical': 0.0006157635467980296, 'mean_word_length': 2.1832435080842725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 65, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1607102', 'n_tokens_mistral': 1778, 'n_tokens_neox': 1736, 'n_words': 553}