vendorer 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +1 -1
- data/Readme.md +46 -24
- data/lib/vendorer/version.rb +1 -1
- data/lib/vendorer.rb +1 -1
- data/spec/vendorer_spec.rb +7 -0
- metadata +4 -4
data/Gemfile.lock
CHANGED
data/Readme.md
CHANGED
@@ -1,45 +1,63 @@
|
|
1
1
|
Vendorer
|
2
|
+
========
|
2
3
|
|
3
4
|
- documented dependencies
|
4
5
|
- automatic updates
|
5
6
|
- no unwanted/accidental updates
|
6
7
|
|
8
|
+
|
7
9
|
Install
|
8
|
-
|
9
|
-
Install curl and git, then:
|
10
|
+
-------
|
10
11
|
|
11
|
-
|
12
|
+
Ensure you have:
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
- Curl
|
15
|
+
- Git v1.7+
|
16
|
+
- Ruby v1.8.7 or v1.9.2+
|
17
|
+
|
18
|
+
then:
|
19
|
+
|
20
|
+
``` bash
|
21
|
+
$ gem install vendorer
|
22
|
+
```
|
23
|
+
|
24
|
+
Or add vendorer to your `Gemfile`:
|
16
25
|
|
17
|
-
|
18
|
-
|
26
|
+
``` ruby
|
27
|
+
gem 'vendorer', :group => :development
|
28
|
+
```
|
19
29
|
|
20
|
-
# execute a block after updates
|
21
|
-
file 'public/javascripts/jquery.js', 'http://code.jquery.com/jquery.js' do |path|
|
22
|
-
puts "Do something useful with #{path}"
|
23
|
-
rewrite(path){|content| content.gsub(/\r\n/,\n).gsub(/\t/,' ') }
|
24
|
-
end
|
25
30
|
|
26
|
-
|
27
|
-
|
31
|
+
Usage
|
32
|
+
-----
|
33
|
+
|
34
|
+
Add a `Vendorfile` to your project root:
|
28
35
|
|
29
|
-
# DRY folders
|
30
|
-
folder 'public/javascripts' do
|
31
|
-
file 'jquery.js', 'http://code.jquery.com/jquery-latest.js'
|
32
|
-
end
|
33
36
|
|
34
|
-
|
37
|
+
``` ruby
|
38
|
+
file 'vendor/assets/javascripts/jquery.min.js', 'http://code.jquery.com/jquery-latest.min.js'
|
39
|
+
folder 'vendor/plugins/parallel_tests', 'https://github.com/grosser/parallel_tests.git'
|
35
40
|
|
36
|
-
|
41
|
+
# Execute a block after updates
|
42
|
+
file 'vendor/assets/javascripts/jquery.js', 'http://code.jquery.com/jquery.js' do |path|
|
43
|
+
puts "Do something useful with #{path}"
|
44
|
+
rewrite(path) { |content| content.gsub(/\r\n/, \n).gsub /\t/, ' ' }
|
45
|
+
end
|
37
46
|
|
38
|
-
|
47
|
+
# Checkout a specific :ref/:tag/:branch
|
48
|
+
folder 'vendor/plugins/parallel_tests', 'https://github.com/grosser/parallel_tests.git', :tag => 'v0.6.10'
|
39
49
|
|
40
|
-
|
50
|
+
# DRY folders
|
51
|
+
folder 'vendor/assets/javascripts' do
|
52
|
+
file 'jquery.js', 'http://code.jquery.com/jquery-latest.js'
|
53
|
+
end
|
54
|
+
```
|
41
55
|
|
42
|
-
|
56
|
+
|
57
|
+
- excute all installations: `vendorer`
|
58
|
+
- Update all dependencies: `vendorer update`
|
59
|
+
- update a single dependency: `vendorer update vendor/assets/javascripts/jquery.min.js`
|
60
|
+
- update everything in a specific folder: `vendorer update vendor/assets/javascripts`
|
43
61
|
|
44
62
|
|
45
63
|
TODO
|
@@ -48,6 +66,10 @@ TODO
|
|
48
66
|
|
49
67
|
Author
|
50
68
|
======
|
69
|
+
|
70
|
+
### [Contributors](http://github.com/grosser/vendorer/contributors)
|
71
|
+
- [Kurtis Rainbolt-Greene](https://github.com/krainboltgreene)
|
72
|
+
|
51
73
|
[Michael Grosser](http://grosser.it)<br/>
|
52
74
|
michael@grosser.it<br/>
|
53
75
|
License: MIT<br/>
|
data/lib/vendorer/version.rb
CHANGED
data/lib/vendorer.rb
CHANGED
@@ -14,7 +14,7 @@ class Vendorer
|
|
14
14
|
path = complete_path(path)
|
15
15
|
update_or_not path do
|
16
16
|
run "mkdir -p #{File.dirname(path)}"
|
17
|
-
run "curl '#{url}' -o #{path}"
|
17
|
+
run "curl '#{url}' -L -o #{path}"
|
18
18
|
raise "Downloaded empty file" unless File.exist?(path)
|
19
19
|
yield path if block_given?
|
20
20
|
end
|
data/spec/vendorer_spec.rb
CHANGED
@@ -74,6 +74,13 @@ describe Vendorer do
|
|
74
74
|
read('public/javascripts/jquery.min.js').should include('jQuery')
|
75
75
|
end
|
76
76
|
|
77
|
+
it "can download a file via redirect" do
|
78
|
+
# old github raw urls are redirected
|
79
|
+
write 'Vendorfile', "file 'xxx', 'https://github.com/grosser/vendorer/raw/master/Gemfile'"
|
80
|
+
vendorer
|
81
|
+
read('xxx').should include('rspec')
|
82
|
+
end
|
83
|
+
|
77
84
|
it "does not update an existing file" do
|
78
85
|
simple_vendorfile
|
79
86
|
vendorer
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vendorer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-01-02 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email: michael@grosser.it
|
@@ -44,7 +44,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
44
44
|
version: '0'
|
45
45
|
segments:
|
46
46
|
- 0
|
47
|
-
hash:
|
47
|
+
hash: 53423261
|
48
48
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
49
49
|
none: false
|
50
50
|
requirements:
|
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
version: '0'
|
54
54
|
segments:
|
55
55
|
- 0
|
56
|
-
hash:
|
56
|
+
hash: 53423261
|
57
57
|
requirements: []
|
58
58
|
rubyforge_project:
|
59
59
|
rubygems_version: 1.8.10
|