GithubHelp home page GithubHelp logo

keyboardcowboy / drush-denver Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 64 KB

Drush plugin to quickly and easily personalize your Drupal site per environment.

License: GNU General Public License v2.0

PHP 100.00%

drush-denver's People

Contributors

keyboardcowboy avatar thetubgoat avatar

Watchers

 avatar  avatar

Forkers

andbicscadmedia

drush-denver's Issues

Provide Option to Hide Summary

The screen gets really cluttered when running large commands due to the summary printing before the prompt, then each component being run.

We should add a delimiter after the prompt and add an option to hide the summary so it doesn't pollute the logs when run in automated commands.

Only Display Components that Will Be Run

The --groups option may be specified to run only certain components of a definition. However, the full definition is still displayed when that option is used, which can mislead the user.

Show composite env defs in env-info

Just like we can set composite env-defs (drush env local+chris), we should be able to inspect them this way to see everything that the command will run.

Groups option failing hard

Chris: ✗ drush env devify --groups=commands
PHP Fatal error:  Unsupported operand types in /Users/Chris/.drush/plugins/dev/denver/Denver.class.php on line 615

Quote Aliases

Drush aliases use the @, which is protected in YAML parsing. The tests included in this package contain unquoted aliases. These need to be quoted to prevent the following error:

exception 'Symfony\Component\Yaml\Exception\ParseException' with message 'The reserved indicator "@" cannot start a plain scalar; you need to quote the scalar at line 11 (near "alias: @test").' in /app/vendor/symfony/yaml/Inline.php:353         [error]
Stack trace:
#0 /app/vendor/symfony/yaml/Inline.php(125): Symfony\Component\Yaml\Inline::parseScalar('@test', 0, NULL, 5, true, Array)
#1 /app/vendor/symfony/yaml/Parser.php(783): Symfony\Component\Yaml\Inline::parse('@test', 0, Array)
#2 /app/vendor/symfony/yaml/Parser.php(387): Symfony\Component\Yaml\Parser->parseValue('@test', 0, 'mapping')
#3 /app/vendor/symfony/yaml/Parser.php(504): Symfony\Component\Yaml\Parser->doParse('alias: @test\nar...', 0)
#4 /app/vendor/symfony/yaml/Parser.php(365): Symfony\Component\Yaml\Parser->parseBlock(10, 'alias: @test\nar...', 0)
#5 /app/vendor/symfony/yaml/Parser.php(504): Symfony\Component\Yaml\Parser->doParse('# Longform synt...', 0)
#6 /app/vendor/symfony/yaml/Parser.php(365): Symfony\Component\Yaml\Parser->parseBlock(8, '# Longform synt...', 0)
#7 /app/vendor/symfony/yaml/Parser.php(141): Symfony\Component\Yaml\Parser->doParse('modules:\n  enab...', 0)
#8 /app/vendor/symfony/yaml/Yaml.php(111): Symfony\Component\Yaml\Parser->parse('modules:\n  enab...', 0)
#9 /app/docroot/sites/all/drush/commands/drush-denver/Denver.class.php(672): Symfony\Component\Yaml\Yaml::parse('modules:\n  enab...')
#10 /app/docroot/sites/all/drush/commands/drush-denver/Denver.class.php(654): Denver->extractEnv('/app/docroot/si...')
#11 /app/docroot/sites/all/drush/commands/drush-denver/Denver.class.php(639): Denver->loadEnvFile(Object(stdClass))
#12 /app/docroot/sites/all/drush/commands/drush-denver/Denver.class.php(49): Denver->findEnvironments()
#13 /app/docroot/sites/all/drush/commands/drush-denver/environment.drush.inc(67): Denver->__construct()
#14 [internal function]: drush_environment('reset')
#15 /app/vendor/drush/drush/includes/command.inc(422): call_user_func_array('drush_environme...', Array)
#16 /app/vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#17 [internal function]: drush_command('reset')
#18 /app/vendor/drush/drush/includes/command.inc(199): call_user_func_array('drush_command', Array)
#19 /app/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#20 /app/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#21 /app/vendor/drush/drush/drush.php(12): drush_main()
#22 {main}

Allow INFO or YAML files for definitions?

PHP is nice in that it lets us nest commands under a category. INFO files are nice in that they are simple, readable text. YAML is a nice combination of both, but requires extra modules to work.

Can/should we allow multiple formats?

Export settings directly to a definition

Just like you can export a component to a feature, I'd like to be able to export module status, variable values and permissions to an environment definition.

Change env-list to env-info

Instead of calling drush env-list to inspect environments, call drush env-info. This makes more sense when inspecting a definition like drush env-info <env>.

Allow The Same Command to Be Listed More Than Once in a Definition

Currently, the way the definitions are loaded, the command name is the key of the command array, meaning each command can only be listed once. There are cases where we might want to run the same command with different parameters in a single definition.

There is a slight workaround where, if a command has an alias, you can use the alias as a second command.

Simplify Command Notation

Current command notation is very terse.

Ex.

commands:
  command-name:
    @site.alias
    arguments:
      arg1: value
    options:
      opt1: value
      opt2:
        - item1
        - item2

This could be simplified by using the notation we are already familiar with to identify args, opts and aliases.

Ex.

commands:
  command-name:
    @site.alias
    arg1: value
    arg2: value
    --opt1: value
    --opt2:
      - item1
      - item2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.