rebuild 0.5.1 → 0.5.2

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: 7206e799fd8b130c0d6f98733d916f933c980e6a
4
- data.tar.gz: 59f82a9602dbdfc3ac99c0926e4843db28a058f4
3
+ metadata.gz: 23da9bc1ca1c0d7c3e3c722a523aae8338727e7b
4
+ data.tar.gz: 161c5d792532a2510d53dcd3f72a1ed7ca3c6760
5
5
  SHA512:
6
- metadata.gz: 70eae261736d60854096290f2478b69767faf0be94491c76e210f9ceaf7faeb338e97a4572b3291a033faa133153a42d9b20f0e8cfdc0e064f662089fa1baca2
7
- data.tar.gz: af0ad56ac372ce5b3d2e0439b33dd4509ac130d1b946afe1307f93dd4d01597500f718d840df46226255c93fc6893eafaf3dd4e9f0b50ce831a4dfee97ba2520
6
+ metadata.gz: 999827f9507aed6c03ef74f76d5ca95554eed755cc649a7e4cf8a733dffd43e45fd19373495bb1e4338b250bb71ba37eab640a4814ab5a17d702f3fb852c3eb7
7
+ data.tar.gz: 2bf8bae7129342b9f4144d3f986569aebfcea031723020d69e25c6830fb90d62e5712e6d23d1618d76598f60018136c924a7265eb470efb194d0ae72b7c4135c
data/README.md CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  Development environment bootstrap automation toolkit for OSX
4
4
 
5
- ![](http://pic.k0kubun.com/174syGrQYpdTo0N.gif)
6
-
7
5
  ## What's this?
8
6
 
9
7
  `rebuild` allows you to achieve mouse-free command line tools installation in OSX Yosemite.
@@ -33,8 +31,6 @@ Your repository will be available at `~/[repository]`.
33
31
 
34
32
  ### Sync multiple environments
35
33
 
36
- ![](http://pic.k0kubun.com/1B8yBClo0bg4W7Q.gif)
37
-
38
34
  ```bash
39
35
  # force update repository by `-f`
40
36
  $ rebuild -f k0kubun/dotfiles
@@ -65,8 +61,6 @@ EOS
65
61
 
66
62
  ## Config
67
63
 
68
- ![](http://pic.k0kubun.com/wsrFmSZhBOug1Yj.gif)
69
-
70
64
  You can skip choosing option by ~/.gitconfig
71
65
 
72
66
  ```conf
@@ -22,11 +22,14 @@ module Rebuild
22
22
  opt.on('-f', '--force-update') { |v| options[:update] = true }
23
23
  opt.on('-d', '--directory=VAL') { |v| options[:directory] = v }
24
24
  opt.on('-s', '--scriptdir=VAL') { |v| options[:scriptdir] = v }
25
+ opt.on('-k', '--keep-sudo') { |v| options[:keep_sudo] = true }
25
26
 
26
27
  args = opt.parse!(ARGV)
27
28
  return show_usage if options[:help]
28
29
  return print_version if options[:version]
29
30
 
31
+ keep_sudo if options[:keep_sudo]
32
+
30
33
  CommandLineTools.install unless CommandLineTools.installed?
31
34
  License.agree unless License.agreed?
32
35
 
@@ -46,6 +49,15 @@ module Rebuild
46
49
 
47
50
  private
48
51
 
52
+ # Vendored from:
53
+ # https://github.com/mathiasbynens/dotfiles/blob/6e9822e879caed207f743c9eeadbf724610bff02/.osx#L5-L9
54
+ def keep_sudo
55
+ system(<<-EOS)
56
+ sudo -v
57
+ while true; do sudo -n true; sleep 1; kill -0 #{Process.pid} || exit; done 2>/dev/null &
58
+ EOS
59
+ end
60
+
49
61
  def bootstrap(repo, stdin, options)
50
62
  repo_path = Repository.new(repo, options).fetch
51
63
  primary_scripts = (stdin || options[:dependency] || '').split
@@ -95,6 +107,7 @@ module Rebuild
95
107
  -h, [--help] Show this
96
108
  -v, [--version] Print version
97
109
  -f, [--force-update] By default, git pull is not executed
110
+ -k, [--keep-sudo] Keep sudo enabled while execution
98
111
  -d, [--directory=/path/to/clone] Default: ~/PROJECT
99
112
  -s, [--scriptdir=/script/placed/dir] Default: '' (root)
100
113
 
@@ -1,3 +1,3 @@
1
1
  module Rebuild
2
- VERSION = '0.5.1'
2
+ VERSION = '0.5.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rebuild
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-07 00:00:00.000000000 Z
11
+ date: 2014-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unindent
@@ -97,7 +97,6 @@ files:
97
97
  - README.md
98
98
  - Rakefile
99
99
  - bin/rebuild
100
- - gempush.rb
101
100
  - lib/rebuild.rb
102
101
  - lib/rebuild/cli.rb
103
102
  - lib/rebuild/command_line_tools.rb
data/gempush.rb DELETED
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require_relative './lib/rebuild/version'
4
- `gem build rebuild.gemspec`
5
- `gem push rebuild-#{Rebuild::VERSION}.gem`