Giter Site home page Giter Site logo

exogenesis's Introduction

exogenesis's People

Contributors

benreyn avatar bitboxer avatar moonglum avatar thegcat avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

exogenesis's Issues

Planning for Version 0.3

0.3

Codename: The Cardiff Rift

  • Splits the projects into two parts.
  • Thor

Exogenesis Repo

  • The DSL + CLI as a gem
  • Use Thor to build the CLI
  • Read passengers.yml (formerly package.yml)
  • exo get git clones/pulls passengers repo to ~/.passengers
    • Or this is just automatically done by each exogenesis task?
  • Run passengers lint before every run
  • exo update runs the update task for all passengers in the passengers.yml
  • exo update vim runs update task only for the vim passenger
Exogenesis::Passenger.create(:rvm) do
    # instance_eval on Passenger.new
    cover_emoji :bomb
    cover_text "RVM"

    required_config :rubies # basically needs to wrap def_delegator

    setup do
        # instance_eval on Task.new(:setup)
    end
end

NPM does not update bower anymore

Somehow npm stopped working for me when doing npm -g update bower. It prints out lot of this when doing it manually:

npm ERR! Object.keys called on non-object
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <http://github.com/npm/npm/issues>
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "update" "-g" "bower@latest"
npm ERR! node v0.10.34
npm ERR! npm  v2.1.14

There is an issue for this.

Problems with pip

Looks like pip does not like the --user argument when updating itself anymore. I am getting this error when using exogenesis:

Exception:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/commands/install.py", line 283, in run

    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/req.py", line 1435, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/req.py", line 671, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/req.py", line 901, in move_wheel_files
    pycompile=self.pycompile,
  File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/wheel.py", line 140, in move_wheel_files
    scheme = distutils_scheme(name, user=user, home=home, root=root)
  File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/locations.py", line 155, in distutils_scheme
    i.finalize_options()
  File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 272, in finalize_options
    raise DistutilsOptionError("can't combine user with prefix, "
DistutilsOptionError: can't combine user with prefix, exec_prefix/home, or install_(plat)base

Storing debug log for failure in /Users/bodo/.pip/pip.log

And when I try it on the console and leave out the --user, it works. With it, it stops with this message.

Add missing unit tests for passengers

Add unit tests for the passengers. Please check off when done:

  • dotfile.rb
  • fonts.rb
  • git_repo.rb
  • homebrew.rb
  • npm.rb
  • python.rb
  • rbenv.rb
  • rvm.rb
  • vundle.rb

Documentation

Currently we have no good documentation about the different package managers this project offers and how to configure them. This is confusing for people who want to start using this.

Let's start to discuss what form of documentation would be best fitting for this.

support for neovim

I am using vundle in my neovim and need to make the vundle thing to start neovim, not vim to update everything. What would you think is the best approach here?

Font Module

I want to add a font module. Do you think it would be okay to have a font direcoty and recursivly walk through it and link every Font that was found into ~/Library/Fonts ?

If this simple approach is okay for you I will go and implement it πŸ˜‰

OhMyZsh Branch hard coded

Currently the @moonglum Fork of OhMyZsh is hardcoded in the script. This should be configured by the dotfile user. I use my own fork, too πŸ˜‰

Add rake tasks to exogenesis

Instead of letting everyone add their own Rake Tasks, I think it would be better to have the rake tasks defined in exogenesis. What you you think?

Switch to `expect` RSpec syntax

Currently everything is in the should syntax. I love the 'new' expcect Syntax. Will change that in the next milestone. For now I allowed both expect and should in the spec helper.

Megingiard Follow Up

In #20 we introduced Megingiard. There are some things that need to be changed:

  • The entire Output class will be pushed to Megingiard moonglum/megingiard#5 and then remove it here.
  • Let users configure the emojis for success, failure and skip
  • The output is currently not configurable as it was before

Simplify

I'm thinking about a big simplification. Currently there are the following tasks:

  • setup: Installs the package manager itself
  • install: Installs all packages (the list has to be provided in the initialize method)
  • update: Updates the package manager itself and all packages
  • cleanup: Starts a clean-up process
  • teardown: Uninstalls all packages and the package manager itself

I'm thinking about reducing it to:

  • up: Installs the package manager if it was not installed, installs all packages that were not installed, updates all packages and cleans up
  • down: Uninstalls all packages and the package manager itself.

gem module

I have some command line utils that are delivered as gems. I think I want to have them installed via exogenesis.

Thoughts on this?

NPM uses wrong command

In this node ticket they explain that our update script is wrong. We should not use npm update but this instead:

for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f2)
do
    npm -g install "$package"
done

Because:

What that does is a bit surprising: without respecting semantic versioning, it updates all the
dependencies of bower (but not bower itself) to the latest available version.

Yep, sad 🐼 .

exogenesis command

@railsbros-dirk talked about his idea to create a thor-powered exogenesis command. And I thought about how one could implement this. So I came up with the following:

  • The exogenesis command reads a yml file whenever it is started. You can provide it with a --file option to give the path to a file. When you do not give a path, it will try exogenesis.yml, .exogenesis.yml and ~./exogenesis.yml in that order. This way you can call exogenesis from wherever you are on your system right now. But when you set it up for the first time, you can just give the path to the checked out file in your dotfile repo.
  • The exogenesis command then iterates through the list items of the yml file and initializes each of the items with the child nodes of this node as arguments.
  • It then executes the given command

An example for a YML file:

rvm:
  rubies:
    - ruby-1.9.3
    - ruby-2.0.0
dotfiles:
  path: "~/Code/dotfiles/tilde"

This would initialize the class RVM with the argument RVM.new(["ruby-1.9.3", "ruby-2.0.0"]) and the dotfiles class with Dotfile.new("~/Code/dotfiles/tilde"). The names for the parameters are just for the convenience of the user and are not used in any way. Once Apple bundles Ruby 2.0 (In 2043 approx.) we can then use Keyword-arguments for this ^^

The command can be called like this:

exogenesis update
# or
exogenesis --file exogenesis.yml install

What do you think?

Add Rakefile example in the readme

I think it would be a good idea to add an example Rakefile into the Readme that demonstrates the usage...or to link to your dotfile repo as an example?

Homebrew update is stuck during upgrading brews state

When I enter rake update and there are updates in homebrew, Homebrew is stuck in the upgrading brews state.

The stacktrace after I killed it:

code/exogenesis/lib/exogenesis/support/executor.rb:65:in `execute'
code/exogenesis/lib/exogenesis/homebrew.rb:36:in `update'

Homebrew fails if brew was already updated

Sometimes homebrew has to update several packages with references to each other. And when updating package a it also automagically updates package b. But exogenesis also tries to update packages b without checking if it was already updated. This leads to errors like this:

Error: gettext-0.18.3.2 already installed

...at least I think this is why that happens. Is my hypothesis correct?

Split into two projects

  • For the project to passengers
    • Remove everything except lib/exogenesis/passengers/ (move it to a folder passengers), the according specs and some helper files like Rakefile, Houndfile etc
  • In this project everything except passengers will be removed

The tool will then clone this to .passengers which will be updated before every run of the commandline app.

Should `update` remove things that are not marked to be installed anymore?

@bitboxer asked:

In the Font and Dotfiles classes, what do we do with the update task? I think it should do the same as the install task to make it actually possible to add the new fonts. But I need to remember what fonts I have installed to check if the font directory had changes and remove the now missing fonts from the ~/Library/Fonts . Where do I store that?

This question is in my opinion way broader. Let's take Homebrew as an example: If the user decides to remove one of the brews from his list, should the update task now remove this brew? I'm not really sure about that. It is not trivial to detect (just comparing the installed brews and the brews that should be installed doesn't do the trick because of dependencies) – and for other tasks it is almost impossible (Font comes to mind).

For Font the question has another facet: If you teardown Font, what should happen? Should it remove all fonts it knows? Because it can't detect which fonts it installed by just looking at the files.

I think this question needs some thought, and I guess until we found a solution, update should not remove brews, fonts, rubies or anything else.

Execute file from dotfile-repository after update

I keep a defaults.sh in my dotfiles-repository which contains some default settings for my Mac OSX.

After updating via rake up the file should be executed.

How can this be implemented the best way?

Passenger Control

A linter for passenger.yml:

  • Are the passenger names all valid?
  • Are all required keys for all passengers there?
  • Do they have the right format?

Discussion: linux and mac?!

I am now working for a company that hired bitcrowd. For them I have created a nice little virtual machine. But I want to have all the comfort of my dotfiles in there, too.

Currently I just commented out the stuff that would not work on a linux box (aka homebrew). Which is not a very clean solution. Basically this would mean a new linux branch for the new machine.

What do you think about this? Should the recipies know that they only can run on osx or linux and prevent them to run otherwise? Is there another solution I don't see right now?

npm module

a module for the growing list of npm packages I use would be great πŸ˜‰

Add Support for Installing Python and pip packages

I just installed the new powerline (which is created by the author of vim-powerline and is rewritten in Python. It can be used in Vim, tmux, the shell and iPython currently – using it in tmux only). This process included installing python, linking it and installing a pip package, in this case:

brew install python
brew link --overwrite python
pip install --user git+git://github.com/Lokaltog/powerline

I will add a new class that will be able to do just that πŸ˜„

Package Managers

  • Pathogen? Seems to be a better solution when wrapped. Installer clones pathogen. Then clones all the repos
  • htop-setup (needs to be version aware)
  • iTerm Theme
  • Homebrew Tapping incl. Homebrew Cask for MacTeX, GUI Software and also awesome things like Quicklook Plugins #50
  • NPM: coffee-script, jslint, jshint #17
  • Cabal: pandoc
  • OS X Software Updates (man softwareupdate)
  • Install standard gems for all rubies: bundler, tmuxinator, guard, gem-man #18

Extract Executor

Some notes:

Yes, that is true. And it is something really ugly to test. As with the output stuff, I want to extract it into a different gem. This would then be tested with something like test construct. But first I want the API of the executor to solidify – there are some things that are bugging me right now πŸ˜‰ Therefore it is part of the next milestone, not this one!

I think the executor will become a mashup of the excellent standard libraries FileUtils and PathName plus nice output via Megingiard.

  • task_skip should work like succeed und failed.

rbenv module

Why no rbenv 😭 ... I will fix that in the next week! With proper setup and teardown

Mac default settings

Where do we want to store changes to the mac defaults?

E.g. if you want to disable the dashboard in your Mac, you need to run this:

defaults write com.apple.dashboard mcx-disabled -boolean YES 
killall Dock

How do we want to implement this? A class that reads a yml/json file with all values that should be set?

Passenger: Standards + Linting

  • Standardize the passengers file: rubies is always an Array that looks like this etc.
  • Lint the passengers.yml by checking:
    • Are the passenger names all valid?
    • Are all required keys for all passengers there?
    • Do they have the right format?

The Current Classes are not complete

  • Make Dotfiles more flexible by providing the path to the folder in initialize (instead of assuming tilde)
  • Add Homebrew#setup
  • Add Homebrew#teardown
  • Add Homebrew#cleanup
  • OhMyZSH#install => OhMyZSH#setup
  • OhMyZSH#update
  • RVM#setup
  • RVM#teardown
  • RVM#cleanup
  • Adjust Vundle

brew again :(

I have a strange error during the brew phase. I am not sure why it complains about the line in the Gemfile?!

                                             Updating Homebrew: βœ—
  An Error occured while executing `brew update`:
   /Users/bodo/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/dsl.rb:35:in `eval_gemfile': Gemfile syntax error: (Bundler::GemfileError)
  /Users/bodo/code/dotfiles/Gemfile:2: syntax error, unexpected ':', expecting $end
  gem 'exogenesis', git: "https://github.com/moonglum/exogenesis.git"
                  ^
from /Users/bodo/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/dsl.rb:7:in `evaluate'
from /Users/bodo/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/definition.rb:18:in `build'
from /Users/bodo/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler.rb:144:in `definition'
from /Users/bodo/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler.rb:112:in `setup'
from /Users/bodo/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/setup.rb:17

Basically it happens too when you use "bundle exec brew update" . The fix was to change the line in the Gemfile to this:

gem 'exogenesis', {:git => "https://github.com/moonglum/exogenesis.git"}

But I have no clue, why this happens?!

gcc42 still required for rvm?

I haven't dug far enough in the past to see why gcc42 is required for rvm, a couple of questions:

  • is it still required? At least rubies 2.1 and 2.2 build without a gcc argument on Yosemite.
  • shouldn't rvm take care itself of what gcc a ruby builds or doesn't build with?
  • if we still need to build with gcc42, we should make sure it's installed before trying to run rvm with it, Yosemite doesn't bring it anymore it seems.

Exogenesis DSL

@klaustopher suggested that instead of classes, exogenesis "adapters" could be written with a DSL. I thought about it this weekend, and I think that this can be nicely combined with the methods of the executor. So for example this is the translation of the install task from Vundle.

# Define the Vundle Adapter
Exogenesis.describe :vundle do

  # Describe the install task
  install do
    execute_interactive "Install", "vim +BundleInstall\! +qall"
    execute_interactive "Clean", "vim +BundleClean\! +qall"
  end
end

In this case the setup task would automatically call start_section with :vundle as its argument.
But a task like execute would still need to take a block with Ruby code to check for certain things to skip the task.

What do you think?

Add brew cask passenger

I'll try to work on that soonβ„’ (currently reinstalling my machine because the recovery thing just thought "lol, EFI partition, who needs dat?" 😭

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.