Skip to content

Commit

Permalink
Add support for installation as a gem.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémi Durieu committed Oct 10, 2020
1 parent e9d9af3 commit d00fde1
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.yardoc
doc
doc
*.gem
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@
## What does dotrs do?

dotrs uses a hidden git repository, placed in your `$HOME` folder to store
the dotfiles you want to keep synchronized.
the dotfiles you want to keep synchronized. Then it creates links to them in
your file system at the right location.

## Installation

dotrs is installed as a Ruby gem. To install dotrs, use the following commands:

```
git clone https://github.com/Sevodric/dotrs && cd dotrs
gem build dotrs.gemspec
gem install dotrs
```

## Setup

Expand All @@ -30,6 +41,16 @@ Once files have been added or modified, save the changes with:

`$ dotrs push`

### Retrieving changes

Get the last changes from the remove:

`$ dotrs pull`

Link any new missing file with:

`$ dotrs apply`

### Checking for tracked files

Use the `list` command to view all currently tracked files.
4 changes: 2 additions & 2 deletions bin/dotrs.rb → bin/dotrs
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH << '../lib/'
require 'git'
require 'optparse'
require 'master_tree'
require_relative '../lib/master_tree'

EXIT_SUCCESS = 0
EXIT_FAILURE = 1
Expand Down
23 changes: 23 additions & 0 deletions dotrs.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# frozen_string_literal: true

Gem::Specification.new do |spec|
spec.name = 'dotrs'
spec.version = '2.0.0'
spec.date = '2020-10-10'
spec.summary = 'Straighforward dotfiles management'
spec.description = 'Straighforward dotfiles management'
spec.author = 'Rémi Durieu'
spec.email = '[email protected]'
spec.files = [
Dir.glob('lib/**/*'),
'LICENSE',
'README.md'
].flatten
spec.homepage = 'https://github.com/Sevodric/dotrs'
spec.license = 'MIT'
spec.executables << 'dotrs'

spec.add_runtime_dependency 'git', '~> 1.7'
spec.add_development_dependency 'rubocop', '~> 0.92'
spec.add_development_dependency 'test-unit', '~> 3.3'
end

0 comments on commit d00fde1

Please sign in to comment.