dependencies 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.markdown +51 -12
  2. data/dependencies.gemspec +2 -2
  3. metadata +4 -4
data/README.markdown CHANGED
@@ -1,21 +1,19 @@
1
1
  Dependencies
2
2
  ============
3
3
 
4
- Dependencies manager for RACK enabled applications.
4
+ A simple way to express, manage and require your dependencies in Ruby.
5
5
 
6
6
  Description
7
7
  -----------
8
8
 
9
- Dependencies allows you to declare the list of libraries your application needs,
10
- even specifying the version and environment it will be required in, and all with
11
- the simple sintax we all have grown to know. It comes with a handy command line
12
- tool for inspecting your dependencies.
9
+ Dependencies allows you to declare the list of libraries your application needs
10
+ with a simple, readable syntax. It comes with a handy command line
11
+ tool for inspecting and vendoring your dependencies.
13
12
 
14
13
  Usage
15
14
  -----
16
15
 
17
- Declare your dependencies in a `dependencies` in the root of your project.
18
- This file will look like this:
16
+ Declare your dependencies in a `dependencies` file in the root of your project:
19
17
 
20
18
  rack ~> 1.0
21
19
  sinatra
@@ -32,15 +30,56 @@ Now you can try the `dep` command line tool to check your dependencies:
32
30
 
33
31
  $ dep list
34
32
 
35
- You can even specify an environment to see if requirements are met:
33
+ You can specify an environment to see if requirements are met:
36
34
 
37
35
  $ dep list test
38
36
 
39
- The list can contain not only gems, but libraries in `vendor` too. Dependencies
40
- first checks if a matching library in vendor exists, then tries to find a
41
- suitable gem.
37
+ The above is `RACK_ENV`-aware.
42
38
 
43
- In order to use it in your project, just require the `dependencies` gem.
39
+ Vendoring libraries
40
+ -------------------
41
+
42
+ In order to vendor a library you're using, simply:
43
+
44
+ $ dep vendor haml
45
+
46
+ If the dependency is expressed with a version number, it will be vendored using
47
+ `gem unpack`. Otherwise, it will try to clone from a Git repository.
48
+
49
+ It's common to vendor everything when you start a new project. Try this:
50
+
51
+ $ dep vendor --all
52
+
53
+ Loading dependencies in your project
54
+ ------------------------------------
55
+
56
+ Dependencies doesn't assume you want to use RubyGems, so you're in charge of
57
+ requiring it before requiring `dependencies` (in Ruby 1.9 you're cornered – there's
58
+ no way out).
59
+
60
+ # init.rb
61
+ require "rubygems"
62
+ require "dependencies"
63
+
64
+ That will work as long as RubyGems is available and you have Dependencies installed.
65
+ If a dependency is not found in `./vendor`, a call to `#gem` will be made.
66
+
67
+ Another option is to vendor Dependencies itself:
68
+
69
+ # init.rb
70
+ require "vendor/dependencies/lib/dependencies"
71
+
72
+ After that, all your `lib` directories below `./vendor` will be available in the `$LOAD_PATH`.
73
+
74
+ Additionally, Dependencies will leave your `./lib` in the `$LOAD_PATH`.
75
+
76
+ Benefits
77
+ --------
78
+
79
+ 1. Documentation. It's a text file any team member can read to see what the project depends on.
80
+ 2. Early failure. If a dependency is not met, the program terminates with a polite message inviting you to install the missing dependencies.
81
+ 3. Vendorability (™). Easily vendor everything for self-contained applications.
82
+ 4. Simplicity. It's a very lightweight tool. It won't do everything, but it's simple and works very well for us.
44
83
 
45
84
  Installation
46
85
  ------------
data/dependencies.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "dependencies"
3
- s.version = "0.0.6"
3
+ s.version = "0.0.7"
4
4
  s.summary = "Specify your project's dependencies in one file."
5
5
  s.authors = ["Damian Janowski", "Michel Martens"]
6
6
  s.email = ["djanowski@dimaion.com", "michel@soveran.com"]
@@ -11,5 +11,5 @@ Gem::Specification.new do |s|
11
11
 
12
12
  s.files = ["README.markdown", "Rakefile", "bin/dep", "dependencies.gemspec", "lib/dependencies/dep.rb", "lib/dependencies.rb", "test/dependencies_test.rb", "test/foobaz-0.3.gem", "test/vendor/bar/lib", "test/vendor/barz-2.0/lib", "test/vendor/baz-1.0/lib"]
13
13
 
14
- s.add_dependency("wycats-thor", "~> 0.11")
14
+ s.add_dependency("thor", "~> 0.11")
15
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependencies
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damian Janowski
@@ -10,11 +10,11 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-07-28 00:00:00 -03:00
13
+ date: 2009-08-20 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
- name: wycats-thor
17
+ name: thor
18
18
  type: :runtime
19
19
  version_requirement:
20
20
  version_requirements: !ruby/object:Gem::Requirement
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  requirements: []
67
67
 
68
68
  rubyforge_project: dependencies
69
- rubygems_version: 1.3.5
69
+ rubygems_version: 1.3.4
70
70
  signing_key:
71
71
  specification_version: 3
72
72
  summary: Specify your project's dependencies in one file.