dotstrap 0.3.1 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 249a0a5f9933e523230f50d14e42f7780ea07003
4
- data.tar.gz: 8c5d0586c07392f18d4e7fabed00f4a0f72128d2
3
+ metadata.gz: 7167b72efc0621e48617fe33eebe36a16db65814
4
+ data.tar.gz: 2a499c24969d7de214eeb0f8aeee4a889f28f7db
5
5
  SHA512:
6
- metadata.gz: 672a96c0590edabeed903de3cfd2b3f82f69779885eb6c7d7d556fee9f368026edcd51d16f14241d3790cf028f1a51d52a72a11c080ae01d2ee1b37ae75b69ef
7
- data.tar.gz: 7a5fbcac243f56b355fd2baaf8a88980bc30ae516f15cc74b3a3ec03a9e9c86ba1fc78eba75927cb183e8e25c0b50f8606592b61b86dafb50463f0307ad1c329
6
+ metadata.gz: f43822682d70730bca2c6f8e7420ac38dcd52d5d316671b6471f5d8d7ae50fe04b195e7cdd9ba5878425024a75375145b40a75d84c4799daabad077e060f8392
7
+ data.tar.gz: 74fe59e42634d474c153eb526129cdbbfb27da611722d0f3cc6fcfabc2094ecb6c9a37ed64e8b458deed9362c4ffb8927c7cd92ae0acdb87029bf1aed17b8401
data/README.md CHANGED
@@ -30,20 +30,20 @@ rake install
30
30
 
31
31
  download (or update) and configure `REPOs`:
32
32
  ```bash
33
- ds install REPO|FILE
33
+ dotstrap install REPO|FILE
34
34
  ```
35
35
 
36
36
  completely remove any symbolic links, `source` statements from dotstrap's config file, & the repository itself:
37
37
  ```bash
38
- ds uninstall REPO
38
+ dotstrap uninstall REPO
39
39
  ```
40
40
 
41
41
  list the URL and install path for all currently installed repositories:
42
42
  ```bash
43
- ds list [REPO]
43
+ dotstrap list [REPO]
44
44
  ```
45
45
 
46
- `REPO` is a GitHub repository slug like `mkwmms/dotstrap-osx`
46
+ `REPO` is a GitHub clone URL or repository slug like `mkwmms/dotstrap-osx`
47
47
 
48
48
  `FILE` is a newline separated list of `REPOS`
49
49
 
@@ -2,17 +2,17 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: dotstrap 0.3.1 ruby lib
5
+ # stub: dotstrap 0.4.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "dotstrap"
9
- s.version = "0.3.1"
9
+ s.version = "0.4.1"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.metadata = { "documentation" => "http://www.rubydoc.info/github/mkwmms/dotstrap/master/Dotstrap", "source_code" => "http://github.com/mkwmms/dotstrap" } if s.respond_to? :metadata=
13
13
  s.require_paths = ["lib"]
14
14
  s.authors = ["William Myers"]
15
- s.date = "2015-12-13"
15
+ s.date = "2015-12-23"
16
16
  s.description = "bootstrap your shell dotfiles in parallel from GitHub repos"
17
17
  s.executables = ["dotstrap"]
18
18
  s.extra_rdoc_files = [
@@ -8,7 +8,7 @@ require_relative 'dotstrap/shell'
8
8
  module Dotstrap
9
9
  NAME = 'dotstrap'
10
10
  EXE_NAME = 'dotstrap'
11
- VERSION = '0.3.1'
11
+ VERSION = '0.4.1'
12
12
  AUTHOR = 'William Myers'
13
13
  HOMEPAGE = 'http://github.com/mkwmms/dotstrap'
14
14
  SOURCE_URL = 'http://github.com/mkwmms/dotstrap'
@@ -23,7 +23,7 @@ module Dotstrap
23
23
  require 'pathname'
24
24
 
25
25
  def config_home
26
- return ENV['DOTSTRAP_CONFIG_HOME'] if ENV.has_key?('DOTSTRAP_CONFIG_HOME')
26
+ return ENV['DOTSTRAP_CONFIG_DIR'] if ENV.has_key?('DOTSTRAP_CONFIG_DIR')
27
27
 
28
28
  config_dir = ENV.fetch('XDG_CONFIG_HOME', Dir.home)
29
29
  if config_dir == Dir.home
@@ -11,6 +11,7 @@ module Dotstrap
11
11
  # TODO: allow an option to specify to download with SSH or HTTPs from Git
12
12
  @url = determine_url(@repo)
13
13
  @repo_owner, @repo_name = split_repo_slug(@repo)
14
+ # @repo_path = File.join(dest_dir, "#{@repo_owner}.#{@repo_name}")
14
15
  @repo_path = File.join(dest_dir, "#{@repo_owner}-#{@repo_name}")
15
16
  # @repo_path = File.join(dest_dir, @github_user, @repo_name)
16
17
  end
@@ -48,7 +49,9 @@ module Dotstrap
48
49
 
49
50
  def split_repo_slug(repo, sep = "/")
50
51
  partition = repo.partition(sep)
51
- return partition[0], partition[2]
52
+ # TODO: make dotstrap ansible role compatible
53
+ # return partition[0], partition[2].gsub("ansible-", "")
54
+ return partition[0], partition[2].gsub("ansible-", "")
52
55
  end
53
56
 
54
57
  def git_verbosity
@@ -7,9 +7,9 @@ describe Dotstrap::Bundle do
7
7
  'mkwmms/fish-basic' =>
8
8
  %w(clear.fish mkcd.fish port_kill.fish port_top.fish td.fish)
9
9
  }
10
- @dotstrap_config_home = Dir.mktmpdir('test_dotstrap_config_home_')
10
+ @dotstrap_config_dir = Dir.mktmpdir('test_dotstrap_config_dir_')
11
11
  # @bundle = FactoryGirl.create :bundle(@config_home, @repos)
12
- @bundle = Dotstrap::Bundle.new(@dotstrap_config_home, @repos.keys)
12
+ @bundle = Dotstrap::Bundle.new(@dotstrap_config_dir, @repos.keys)
13
13
  end
14
14
 
15
15
  describe '#download' do
@@ -18,7 +18,7 @@ describe Dotstrap::Bundle do
18
18
  @repos.each do |repo, expected_files|
19
19
  # TODO: or should I uses checksums or something?
20
20
  actual_files = []
21
- Dir.glob(@dotstrap_config_home + repo + '**/*.{fish,sh,zsh}') do |f|
21
+ Dir.glob(@dotstrap_config_dir + repo + '**/*.{fish,sh,zsh}') do |f|
22
22
  actual_files.push File.basename(f)
23
23
  end
24
24
  actual_files.each { |actual| expect(actual).to eql(expected_files) }
@@ -29,6 +29,6 @@ describe Dotstrap::Bundle do
29
29
  # TODO: write test for load_configs
30
30
 
31
31
  after :all do
32
- FileUtils.rm_r @dotstrap_config_home, force: true
32
+ FileUtils.rm_r @dotstrap_config_dir, force: true
33
33
  end
34
34
  end
@@ -8,13 +8,13 @@ describe Dotstrap::Shell do
8
8
  # 'mkwmms/fish-basic/functions' =>
9
9
  # %w(clear.fish mkcd.fish port_kill.fish port_top.fish td.fish)
10
10
  }
11
- @dotstrap_config_home = Dir.mktmpdir('test_dotstrap_config_home_')
11
+ @dotstrap_config_dir = Dir.mktmpdir('test_dotstrap_config_dir_')
12
12
  @shell_config_home = Dir.mktmpdir('test_dotstrap_shell_config_home_')
13
13
  # @bundle = FactoryGirl.create :bundle(@config_home, @repos)
14
- @shell = Dotstrap::Shell.new(@dotstrap_config_home, @config_files.keys)
14
+ @shell = Dotstrap::Shell.new(@dotstrap_config_dir, @config_files.keys)
15
15
 
16
16
  @config_files.each do |repo, files|
17
- dir = File.join(@dotstrap_config_home, repo, 'functions')
17
+ dir = File.join(@dotstrap_config_dir, repo, 'functions')
18
18
  FileUtils.mkdir_p dir
19
19
  files.each do |f|
20
20
  File.write(File.join(dir, f), 'TEST CONFIG')
@@ -42,7 +42,7 @@ describe Dotstrap::Shell do
42
42
  actual_files = []
43
43
  expected_files = []
44
44
  @config_files.each do |repo, files|
45
- dir = File.join(@dotstrap_config_home, repo)
45
+ dir = File.join(@dotstrap_config_dir, repo)
46
46
  actual_files.push @shell.fish_functions(dir)
47
47
  files.each do |f|
48
48
  expected_files.push File.join(dir, 'functions', f)
@@ -64,7 +64,7 @@ describe Dotstrap::Shell do
64
64
  # end
65
65
 
66
66
  after :all do
67
- [@dotstrap_config_home, @shell_config_home].each do |dir|
67
+ [@dotstrap_config_dir, @shell_config_home].each do |dir|
68
68
  FileUtils.rm_r dir, force: true
69
69
  end
70
70
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dotstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Myers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-13 00:00:00.000000000 Z
11
+ date: 2015-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize