Giter Site home page Giter Site logo

project's Introduction

Hey! ๐Ÿ‘‹

Clients

I'm Josh, a software engineer and technical leader. My work spans from hands-on projects building large platforms to leading some of the best-performing teams in our industry.

I also run internationally recognised conferences and events, which bring people from all over the world to the heart of Leeds to learn, inspire and share stories.

project's People

Contributors

reactormonk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

project's Issues

Commands are completely isolated from each other

If you have a workflow with the two commands:

  • cd /some/path
  • rake

The rake command would not be executed in relation to the directory that was just changed to. This happens because each command within a workflow is executed within its own sub shell. One solution to this would be to chain each command into one single command, however project would then lose the abilty to pretty print the output. I'm unsure what would be prefered behaviour, as it's also quite nice to have isolated commands.

Add project subcommands

I have a somehow complex environment I need to run for my project (think Sphinx, delayed_job, etc...) and a nice addition for project would be to add project subcommands, so you can run stuff when starting a work session and stop stuff when finishing.

I.e, if I have this .project file:

:workflows:
  :default:
    :start:
      - mate %path
      - mysql_start # Start MySQL
      - cd %path && rake ts:start #start Sphinx
      - cd %path && rails server
    :stop:
      - mysql_stop # Stop MySQL
      - cd %path && rake ts:stop #stop Sphinx
:projects:
  :myproject:
    :path: /path/to/project
    :workflow: default

then running

$ project myproject start

would open TextMate, bring MySQL and Sphinx up, and start the Rails server, and

$ project myproject stop

would stop MySQL and Sphinx.

(The 'start' command would be default, so project myproject would be equivalent to project myproject start)

I may have a go at it, but I make no promises... : )

Workflow steps are not independent.

I have following settings:

:workflows:
 :default:
   - gvim %path
   - cd %path && git st

:projects:
 :projectA:
  :path: /a//valid/path/
  :workflow: default

And when I exeute:

project projectA

the script launches gvim but waits for it to be closed before executing cd command.

workflow with multiple paths doesn't load

The path variable can't be passed arbitrarily. I want to open multiple projects at once.
So I setup another workflow sso as below with multiple paths. When I run it, it complains about the path variable not set.
Why does it looks for the path var only?

:workflows:
  :default:
    - mate %path
    - cd %path
    - open 'http://%app'
  :sso:
    - mate %path1
    - cd %path1
    - mate %path2
    - mate %path3
:projects:
  :projectA:
    :path1: /Users/millisami/apps/projectA
    :app: project.local
    :path2: /Users/millisami/apps/projectB
    :path3: /Users/millisami/apps/projectC
    :workflow: sso

And here is the error:

ree-1.8.7-2010.02 [~] โž” project projectA
* Opening project 'projectA' using workflow 'sso'
/Users/millisami/.rvm/gems/ree-1.8.7-2010.02@global/gems/project-1.0.0/lib/project/template.rb:17:in `parse!': No variable named %path was found on the specified project. (Project::MissingTemplateVariable)
    from /Users/millisami/.rvm/gems/ree-1.8.7-2010.02@global/gems/project-1.0.0/lib/project/template.rb:15:in `each'
    from /Users/millisami/.rvm/gems/ree-1.8.7-2010.02@global/gems/project-1.0.0/lib/project/template.rb:15:in `parse!'
    from /Users/millisami/.rvm/gems/ree-1.8.7-2010.02@global/gems/project-1.0.0/lib/project/runner.rb:22:in `run!'
    from /Users/millisami/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/ostruct.rb:83:in `each_with_index'
    from /Users/millisami/.rvm/gems/ree-1.8.7-2010.02@global/gems/project-1.0.0/lib/project/runner.rb:21:in `each'
    from /Users/millisami/.rvm/gems/ree-1.8.7-2010.02@global/gems/project-1.0.0/lib/project/runner.rb:21:in `each_with_index'
    from /Users/millisami/.rvm/gems/ree-1.8.7-2010.02@global/gems/project-1.0.0/lib/project/runner.rb:21:in `run!'
    from /Users/millisami/.rvm/gems/ree-1.8.7-2010.02@global/gems/project-1.0.0/bin/project:5
    from /Users/millisami/.rvm/gems/ree-1.8.7-2010.02@global/bin/project:19:in `load'
    from /Users/millisami/.rvm/gems/ree-1.8.7-2010.02@global/bin/project:19

Example workflow doesn't work

A ruby script can't change the directory of its parent process (the shell, in this case) by using %x (or system, for that matter). So a default workflow of cd %path will execute just fine, but have no effect.

Not entirely certain of the way to fix this.

Workflows cannot alter the state of the parent shell

If a workflow contains commands that would alter the state of the current shell (e.g. a cd command), after exiting the state of the parent shell would remain unchanged. This is intended as there are cases where you may want to perform a chain of commands and leave the current context unchanged. Might add support for this in the future as I can see it being a blocker for certain workflows.

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.