dep 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/dep +2 -1
  2. data/man/dep.1 +115 -0
  3. metadata +13 -7
data/bin/dep CHANGED
@@ -53,7 +53,8 @@ end
53
53
 
54
54
  def install
55
55
  if @list.missing_libraries.empty?
56
- abort("dep: nothing to install")
56
+ puts "dep: nothing to install"
57
+ exit
57
58
  end
58
59
 
59
60
  @list.missing_libraries.each do |lib|
data/man/dep.1 ADDED
@@ -0,0 +1,115 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "DEP" "1" "April 2012" "" ""
5
+ .
6
+ .SH "NAME"
7
+ \fBDEP\fR \- basic dependency tracking
8
+ .
9
+ .SH "SYNOPSIS"
10
+ .
11
+ .nf
12
+
13
+ dep check
14
+ dep add libname [\-\-pre]
15
+ dep rm libname
16
+ dep install
17
+ .
18
+ .fi
19
+ .
20
+ .SH "DESCRIPTION"
21
+ .
22
+ .TP
23
+ check
24
+ Checks that all dependencies are met\.
25
+ .
26
+ .TP
27
+ add
28
+ Fetches the latest version of the library in question and automatically adds it to your \.gems file\.
29
+ .
30
+ .TP
31
+ rm
32
+ Simply removes the corresponding entry in your \.gems file\.
33
+ .
34
+ .TP
35
+ install
36
+ Installs all the missing dependencies for you\. An important point here is that it simply does a \fBgem install\fR for each dependency you have\. Dep assumes that you use some form of sandboxing like gs, RVM or rbenv\-gemset\.
37
+ .
38
+ .SH "INSTALLATION"
39
+ .
40
+ .nf
41
+
42
+ $ gem install dep
43
+ .
44
+ .fi
45
+ .
46
+ .SH "HISTORY"
47
+ dep is actually more of a workflow than a tool\. If you think about package managers and the problem of dependencies, you can summarize what you absolutely need from them in just two points:
48
+ .
49
+ .IP "1." 4
50
+ When you build an application which relies on 3rd party libraries, it\'s best to explicitly declare the version numbers of these libraries\.
51
+ .
52
+ .IP "2." 4
53
+ You can either bundle the specific library version together with your application, or you can have a list of versions\.
54
+ .
55
+ .IP "" 0
56
+ .
57
+ .P
58
+ The first approach is handled by vendoring the library\. The second approach typically is done using Bundler\. But why do you need such a complicated tool when all you need is simply listing version numbers?
59
+ .
60
+ .P
61
+ We dissected what we were doing and eventually reached the following workflow:
62
+ .
63
+ .IP "1." 4
64
+ We maintain a \.gems file for every application which lists the libraries and the version numbers\.
65
+ .
66
+ .IP "2." 4
67
+ We omit dependencies of dependencies in that file, the reason being is that that should already be handled by the package manager (typically rubygems)\.
68
+ .
69
+ .IP "3." 4
70
+ Whenever we add a new library, we add the latest version\.
71
+ .
72
+ .IP "4." 4
73
+ When we pull the latest changes, we want to be able to rapidly check if the dependencies we have is up to date and matches what we just pulled\.
74
+ .
75
+ .IP "" 0
76
+ .
77
+ .P
78
+ So after doing this workflow manually for a while, we decided to build the simplest tool to aid us with our workflow\.
79
+ .
80
+ .IP "\(bu" 4
81
+ The first point is handled implicitly by dep\. You can also specify a different file by doing dep \-f\.
82
+ .
83
+ .IP "\(bu" 4
84
+ The second point is more of an implementation detail\. We thought about doing dependencies, but then, why re\-implement something that\'s already done for you by rubygems?
85
+ .
86
+ .IP "\(bu" 4
87
+ The third point (and also the one which is most inconvenient), is handled by dep add\.
88
+ .
89
+ .IP "" 0
90
+ .
91
+ .P
92
+ The manual workflow for \fBdep add\fR would be:
93
+ .
94
+ .IP "" 4
95
+ .
96
+ .nf
97
+
98
+ gem search \-r "^ohm$" [\-\-pre] # check and remember the version number
99
+ echo "ohm \-v X\.x\.x" >> \.gems
100
+ .
101
+ .fi
102
+ .
103
+ .IP "" 0
104
+ .
105
+ .P
106
+ If you try doing that repeatedly, it will quickly become cumbersome\.
107
+ .
108
+ .P
109
+ The fourth and final point is handled by typing dep check or simply dep\. Practically speaking it\'s just:
110
+ .
111
+ .P
112
+ \fBgit pull dep\fR
113
+ .
114
+ .P
115
+ And that\'s it\. The dep command typically happens in 0\.2 seconds which is something we LOVE\.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dep
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,19 +10,24 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-04-03 00:00:00.000000000 Z
13
+ date: 2013-01-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: clap
17
- requirement: &70133804725260 !ruby/object:Gem::Requirement
17
+ requirement: !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
21
21
  - !ruby/object:Gem::Version
22
- version: 0.0.2
22
+ version: 1.0.0
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70133804725260
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ~>
29
+ - !ruby/object:Gem::Version
30
+ version: 1.0.0
26
31
  description: Specify your project's dependencies in one file.
27
32
  email:
28
33
  - cyx.ucron@gmail.com
@@ -36,7 +41,8 @@ files:
36
41
  - bin/dep
37
42
  - lib/dep.rb
38
43
  - test/dep.rb
39
- homepage: http://github.com/twpil/dep
44
+ - man/dep.1
45
+ homepage: http://twpil.github.com/dep
40
46
  licenses: []
41
47
  post_install_message:
42
48
  rdoc_options: []
@@ -56,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
62
  version: '0'
57
63
  requirements: []
58
64
  rubyforge_project:
59
- rubygems_version: 1.8.11
65
+ rubygems_version: 1.8.23
60
66
  signing_key:
61
67
  specification_version: 3
62
68
  summary: Dependencies manager