Permalink
Browse files

fixed bugs

  • Loading branch information...
1 parent 522ddae commit e5949c21357c0279dfba65278b4cd3a8ae6650f9 Mateusz Heleniak committed Sep 1, 2012
Showing with 9 additions and 4 deletions.
  1. +1 −1 autoload.php
  2. +4 −0 broker
  3. +1 −1 composer.json
  4. +3 −2 src/rg/broker/commands/AddRepository.php
View
@@ -16,7 +16,7 @@ function includeIfExists($file)
}
}
-if ((!$loader = includeIfExists(__DIR__.'/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__.'/../../../autoload.php'))) {
+if ((!$loader = includeIfExists(__DIR__.'/vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__.'/../../autoload.php'))) {
die('You must set up the project dependencies, run the following commands:'.PHP_EOL.
'curl -s http://getcomposer.org/installer | php'.PHP_EOL.
'php composer.phar install'.PHP_EOL);
View
4 broker
@@ -0,0 +1,4 @@
+#!/usr/bin/env php
+<?php
+
+require __DIR__.'/broker.php';
View
@@ -18,7 +18,7 @@
"slim/slim":"1.6.2",
"dflydev/markdown":"dev-master"
},
- "bin": ["broker.php"],
+ "bin": ["broker"],
"autoload":{
"psr-0":{
"rg":"src/"
@@ -12,6 +12,7 @@
use rg\broker\customizations\ZipArchive;
use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class AddRepository extends \Symfony\Component\Console\Command\Command {
@@ -24,8 +25,8 @@ protected function configure() {
->setDefinition(array(
new \Symfony\Component\Console\Input\InputArgument('name', \Symfony\Component\Console\Input\InputArgument::REQUIRED),
new \Symfony\Component\Console\Input\InputArgument('composerUrl', \Symfony\Component\Console\Input\InputArgument::REQUIRED),
- new \Symfony\Component\Console\Input\InputOption('base-dir', null, InputOption::VALUE_REQUIRED, 'Where to put generated files (packages.json and dists)?', ROOT . '/repositories/'),
- new \Symfony\Component\Console\Input\InputOption('base-url', null, InputOption::VALUE_REQUIRED, 'Base URL used when accessing packages.json and dists', ROOTURL . '/repositories/'),
+ new InputOption('base-dir', null, InputOption::VALUE_REQUIRED, 'Where to put generated files (packages.json and dists)?', ROOT . '/repositories/'),
+ new InputOption('base-url', null, InputOption::VALUE_REQUIRED, 'Base URL used when accessing packages.json and dists', ROOTURL . '/repositories/'),
))
->setHelp('adds a new repository based on a composer json file');
}

0 comments on commit e5949c2

Please sign in to comment.