How can I configure $source_dir to match /Users/${user}/src/${github-owner}/${project}?

I’m new to Boxen and I’m trying to create a project manifest that points the correct path for a given project. I organize my source code in /Users/${user}/src/${github-owner}/${repo} that matches github urls.

Is there a way to do this with boxen?

  • Install Git before Boxen, or Boxen before Git?
  • Can github boxen run in mac os 10.7 (Lion)
  • For example, here’s my configuration for a basic static site:

    class projects::blog {
      boxen::project { 'blog':
        server_name => 'faun.dev',
        source      => 'faun/blog',
        ruby        => '2.0.0-p353',
        nginx       => "projects/shared/nginx.middleman.conf.erb"
      }
    }
    

    When I run boxen, it places the source code in /Users/faun/src/blog, but it really should go in /Users/faun/src/faun/blog. Ideally, I’d like to all projects to work this way, since all projects live under the owner directory.

    I’ve tried modifying $source_dir, but if I override it, I must provide a fully-qualified path. Is there a way to replace $source_dir with some version of ${boxen::config::srcdir}/${github-owner}/${name} globally?

  • Git ignore changes to committed file
  • Git workflow for a small team of developers and designers
  • Save space when downloading Android source
  • Push a new commit without previous commit dependencies
  • PHP exec fails when called from a browser but not from CLI
  • How can I squash commits between A and K into one commit Z
  • 2 Solutions collect form web for “How can I configure $source_dir to match /Users/${user}/src/${github-owner}/${project}?”

    When I consider boxen manifest like this one, I see you can define a configuration setup, like:

    # Configuration Setup
    $env = {
      directories => {
        home      => '/Users/jamison',
        dotfiles  => '/Users/jamison/.dotfiles'
      },
    }
    

    Why not add a github-owner in there:

      github-owner => 'faun',
    

    And use it with $env['github-owner'] in your source-dir override (similar to L166-L175).

    The configuration that I ended up with looks like this:

    class projects::blog {
      boxen::project { 'blog':
        dir         => "${boxen::config::srcdir}/faun/blog",
        server_name => 'faun.dev',
        source      => 'faun/blog',
        ruby        => '2.0.0-p353',
        nginx       => 'projects/shared/nginx.middleman.conf.erb',
      }
    }
    
    Git Baby is a git and github fan, let's start git clone.