Git Product home page Git Product logo

dotify's People

Contributors

vderyagin 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  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  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dotify's Issues

Manifests to Install 3rd Party Projects?

Do you have plans to, and/or would you accept a pull request to, introduce support for manifests that allow the easy installation of 3rd party tools?

Over in the YADR project, we have been discussing the best way to handle:

  1. installation of the various files we need
  2. customizations

We've already written a simple rake task to symlink the appropriate files, but want to focus our attention on the actual configuration. Not the plumbing.

How It Works - Draft

  1. Projects define a manifest that includes both dependencies and their own installation instructions (these are like homebrew brews).
  2. The user does ...
dotify install yadr

...Checking dependencies...

Do you want to install prezto?
Y
...Installing...
...Configuring...

Do you want to install vim?
...<snip>...

...Installing YADR...
...Configuring YADR...
  1. Dotify analyzes the dependencies, and installs all the appropriate configuration files per instructions included in the manifest.
  2. Running dotify upgrade yadr updates files to the latest version.
  3. Extra Credit Dotify provides a central location for the customization of dotfiles. When using a project like yadr, oh-my-zsh, or prezto the user doesn't want to maintain a project fork just so they can make changes to the configuration. Manifests should include customization instructions. Dotify should create the appropriate directories and files. Changes to these files can be managed using git. Here's how we customize zsh using custom/zsh/[before|after] directories.

I'd be happy to work on the feature, but will likely need some guidance on how best to tackle it. I also noticed you're working on a refactoring so we can discuss once that is done if that makes more sense.

Kyle

Specifying paths for linking file/directory contents?

Really impressed with dotify. Significantly better solution than some of the others I've seen (and much better than the nightmare I used for myself). Didn't want to get too far into the idea before running it past you, but thoughts on being able to specify paths for files/directories?

Use case. Let's say I'm storing a bunch of zsh files in a subdirectory like so for simplifying management (lots of dotfiles):

~/.dotify/zsh/**
~/.dotify/zsh/**
~/.dotify/foo/**

Those files in zsh are eventually going to be linked directly into the home directory, i.e. ~/.dotify/zsh/zlogin >> ~/.zlogin" but being able to keep them separated in my~/.dotifydirectory is still nevertheless a huge productivity boon when you're dealing with more than just one or two dotfiles. I was thinking a simple setting in.dotrc``` ought to be sufficient:

dotify_contents_to_root:
  - zsh
  - vim
  - git
  - misc

Any directories in the list would just have their contents linked directly to home root. Corollary might be an option might be for linking whole directories, ala something like this:

dotify_directory:
  - dir1
  - dir2

Anyhow, I was planning on implementing something similar to the first on my fork but wanted to ask and see if you had any thoughts/were planning on something similar before I jumped the gun, so to speak.

Updating dotfiles

First off, great gem and tool! Is there a way to update the dotfiles (pull from repo)? Or do I have to unlink each individual file and then install them again?

Setup on a second machine from git

Say I've installed and setup on one machine, and added .dotify to a git repository.

Now since I want to use the same dotfiles cross all my machines, I installed dotify on another machine. Then how can I fetch the git repository and setup dotify based on it?

It seems I need to copy all files out of the .dotify folder to my home folder, then do a link or setup manually?

How about adding a command to delete existing files under home folder, copy these files from .dotify, then link them automatically?

dotify github does not pick up on removed dotfiles

The following sequence of events is giving me an issue:

  • I removed a dotfile using dotify unlink.
  • I used dotify save
  • I got a message that said No files have been changed in Dotify. Would you like to push these changed to Github? [Yn]
  • I said Y
  • I get a message that said Pushing up to Github... Successfully pushed!

However the changes did not show up in my repo. I went to the .dotify directory and ran git status. Sure enough, the changes were there but hadn't been staged or commited. I had to do that manually.

In a nutshell: dotify save does not catch dotfiles removed with dotify unlink

[Feature] Turn configuration into DSL

I don't really like YAML configuration. It feels very limiting and is not a free as something like a DSL. I intend to have this feature added (at least an initial version) by v0.8.0.

Pull from github

I want to use the same dotfiles on a number of machines.

I can install from github no problem but how do I pull in updates from github?

Dotify for non-dotfiles

First off, great work on dotify! I just started using it and am very happy with it so far.

Do you have plans to allow linking arbitrary (i.e., NOT home folder dotfiles) files to Dotify? My use case is that I'm keeping several configuration files under version control which aren't strictly dotfiles, but which behave similarly. An example would be certain .plist files under ~/Library/Preferences.

I'm working on a simple gem, dotlink, which roughly mirrors Dotify's linking behavior, simply linking files from the filesystem at large to their corresponding path inside ~/.dotlink.

This gem would work perfectly well in tandem with Dotify (I'd just link the .dotlink folder), but I'm wondering whether it would be more useful to add this functionality to Dotify and submit it as a pull request. What are your thoughts? Would you consider incorporating such a feature? (No offense will be taken if not; I can see how this would seem a strange feature to many users.)

Install from github causes error

I have tried to install my dofiles from an existing github repo.

I installed via the following command

dotify github dagda1/dots

If I run a command such as

dotify list

I get the following error:

➜ ~ dotify list
/Users/paulcowan/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/psych.rb:154:in parse': (/Users/paulcowan/.dotrc): couldn't parse YAML at line 8 column 8 (Psych::SyntaxError) from /Users/paulcowan/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/psych.rb:154:inparse_stream'
from /Users/paulcowan/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/psych.rb:125:in parse' from /Users/paulcowan/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/psych.rb:112:inload'
from /Users/paulcowan/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/psych.rb:229:in load_file' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify/config.rb:49:inretrieve'
from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify/config.rb:43:in ignore' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify/filter.rb:26:infilter_ignore_files!'
from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify/filter.rb:9:in home' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify/collection.rb:12:ininitialize'
from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify.rb:23:in new' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify.rb:23:incollection'
from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/lib/dotify/cli.rb:88:in list' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/thor-0.15.4/lib/thor/task.rb:27:inrun'
from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/thor-0.15.4/lib/thor/invocation.rb:120:in invoke_task' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/thor-0.15.4/lib/thor.rb:275:indispatch'
from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/thor-0.15.4/lib/thor/base.rb:425:in start' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/gems/dotify-0.6.6/bin/dotify:6:in<top (required)>'
from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/bin/dotify:19:in load' from /Users/paulcowan/.rvm/gems/ruby-1.9.3-preview1/bin/dotify:19:in

'

My .dotrc looks like this

# Set the editor to use when editing Dotify dotfiles.
#   Default: 'vim'
#   Options: 'vi', 'vim', 'emacs', '[ANY OTHER TERMINAL BASED EDITOR]'
#
  editor: 'vi'
#
# Ignoring files in ~/.dotify when linking:
#
 ignore:
   dotify:
   - '.git'
   - '.gitignore'
   - '.gitmodules'
   # Ignoring files in the home directory when linking:
   dotify:
   - '.rbenv'
   - '.rvm'

Adding new dotfiles

Hey!

I have one suggestion: from what I tried, adding a new file means running the dotify setup again, which will ask if I want to add every single dotfile, even those I already added.

What about a dotify add command, which can be used by the setup itself.

Thanks for this handy project! ;)

Meaning of [Yn]

I've just spent a couple of hours trying to figure out why when presented with the prompt Do you want to link [file] to Dotify? [Yn] and hitting enter, no link was made, no message was given.

Turns out you have to type Y and then hit enter. I'm hoping this is a bug and not the intended way it should work?

Cucumber scenarios failing

I was trying to extend a functionality on dotify, but I wanted to keep the bdd approach dotify already has. I cloned the repo, created a new (rvm) empty gemset and then I ran bundle install. After that on the root directory, I ran cucumber:

dotify $ cucumber
[...]
  @linking @interactive
  Scenario: Linking files                                      # features/linking/linking.feature:16
    When I run `dotify link` interactively                     # aruba-0.4.11/lib/aruba/cucumber.rb:74
    And I type "no"                                            # aruba-0.4.11/lib/aruba/cucumber.rb:78
    And I type "no"                                            # aruba-0.4.11/lib/aruba/cucumber.rb:78
    And I type "yes"                                           # aruba-0.4.11/lib/aruba/cucumber.rb:78
    And I type "yes"                                           # aruba-0.4.11/lib/aruba/cucumber.rb:78
    Then a file named ".dotify/.bash_profile" should not exist # aruba-0.4.11/lib/aruba/cucumber.rb:219
      expected file?(".dotify/.bash_profile") to return false, got true (RSpec::Expectations::ExpectationNotMetError)
      features/linking/linking.feature:22:in `Then a file named ".dotify/.bash_profile" should not exist'
    Then a file named ".dotify/.gemrc" should not exist        # aruba-0.4.11/lib/aruba/cucumber.rb:219
    Then a file named ".dotify/.vimrc" should exist            # aruba-0.4.11/lib/aruba/cucumber.rb:215
    Then a file named ".dotify/.zshrc" should exist            # aruba-0.4.11/lib/aruba/cucumber.rb:215
[...]

In the end, I found that one failing scenario and 3 skipped, but dotify is actually working fine so I was wondering if the issue was on my configuration or the test itself.

Another thing that could be important. To run cucumber I had to add simplecov as a development dependency on the gemspec because I was getting an error about that library missing.

dotify github with non-case-sensitive username

On github, it doesn't matter whether you enter your username with upper or lower case, it'll work. On dotify, it won't find my dotfiles if I enter trevoke/dotfiles but it'll find it if I enter Trevoke/dotfiles.

It would be nice if I could use all lower case.

symbolize_keys!': undefined method `each' for false:FalseClass (NoMethodError)

  1. This sounds awesome! I've been looking for exactly this kind of utility.
  2. I had to manually install thor, git and multi_json. I think they should go into the gemspec as dependencies?
  3. Whenever I try to dotify install I get the following error:
(ruby-1.9.3) ~ $ dotify install
/Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/lib/dotify/config.rb:65:in `symbolize_keys!': undefined method `each' for false:FalseClass (NoMethodError)
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/lib/dotify/config.rb:48:in `retrieve'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/lib/dotify/config.rb:43:in `ignore'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/lib/dotify/filter.rb:26:in `filter_ignore_files!'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/lib/dotify/filter.rb:9:in `home'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/lib/dotify/collection.rb:11:in `initialize'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/lib/dotify.rb:23:in `new'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/lib/dotify.rb:23:in `collection'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/lib/dotify/cli.rb:160:in `link'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor.rb:275:in `dispatch'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:109:in `invoke'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/lib/dotify/cli.rb:142:in `install'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor.rb:275:in `dispatch'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.4/lib/thor/base.rb:425:in `start'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.6.3/bin/dotify:6:in `<top (required)>'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/bin/dotify:19:in `load'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/bin/dotify:19:in `<main>'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
    from /Users/alexkalish/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'

Any ideas?

Thanks.

Exception on setup

Clean install, basically executing setup for first time gave me this.

{12:59}[1.9.3]~ ➭ dotify setup
      create  .dotify
Do you want to add .pry_history to Dotify? [Yn] y
      create  .dotify/.pry_history
Do you want to add .cups to Dotify? [Yn] y
      create  /home/jaimie/.dotify/.cups
Do you want to add .zsh-update to Dotify? [Yn] y
      create  .dotify/.zsh-update
Do you want to add .dropbox to Dotify? [Yn] y
/home/jaimie/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:1357:in `copy': cannot handle socket (RuntimeError)
    from /home/jaimie/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:465:in `block in copy_entry'
    from /home/jaimie/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:1433:in `preorder_traverse'
    from /home/jaimie/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:462:in `copy_entry'
    from /home/jaimie/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:437:in `block in cp_r'
    from /home/jaimie/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:1515:in `block in fu_each_src_dest'
    from /home/jaimie/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:1531:in `fu_each_src_dest0'
    from /home/jaimie/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:1513:in `fu_each_src_dest'
    from /home/jaimie/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:436:in `cp_r'
    from /home/jaimie/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.1.1/lib/dotify/cli.rb:33:in `block in setup'
    from /home/jaimie/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.1.1/lib/dotify/cli.rb:26:in `each'
    from /home/jaimie/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.1.1/lib/dotify/cli.rb:26:in `setup'
    from /home/jaimie/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.3/lib/thor/task.rb:27:in `run'
    from /home/jaimie/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.3/lib/thor/invocation.rb:120:in `invoke_task'
    from /home/jaimie/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.3/lib/thor.rb:275:in `dispatch'
    from /home/jaimie/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.3/lib/thor/base.rb:425:in `start'
    from /home/jaimie/.rvm/gems/ruby-1.9.3-p194/gems/dotify-0.1.1/bin/dotify:6:in `<top (required)>'
    from /home/jaimie/.rvm/gems/ruby-1.9.3-p194/bin/dotify:23:in `load'
    from /home/jaimie/.rvm/gems/ruby-1.9.3-p194/bin/dotify:23:in `<main>'

Env:

{13:00}[1.9.3]~ ➭ uname -a
Linux jaimie-pc 3.2.0-26-generic #41-Ubuntu SMP Thu Jun 14 17:49:24 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Configurable environment values

Hi, any idea how make values configurable in dotfiles?

For example the .gitconfig. In the work I've a other email address than at home.

[user]
  name = ...
  email = ...

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.