vendorer 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vendorer (0.1.6)
4
+ vendorer (0.1.7)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
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
- sudo gem install vendorer
12
+ Ensure you have:
12
13
 
13
- Usage
14
- =====
15
- Add a `Vendorfile` to your project root:
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
- file 'public/javascripts/jquery.min.js', 'http://code.jquery.com/jquery-latest.min.js'
18
- folder 'vendor/plugins/parallel_tests', 'https://github.com/grosser/parallel_tests.git'
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
- # checkout a specific :ref/:tag/:branch
27
- folder 'vendor/plugins/parallel_tests', 'https://github.com/grosser/parallel_tests.git', :tag => 'v0.6.10'
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
- Call `vendorer`
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
- If you added something new: `vendorer`
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
- Update all dependencies: `vendorer update`
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
- Update one dependencies: `vendorer update public/javascripts/jquery.min.js`
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
- Update everything in a folder: `vendorer update public/javascripts`
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/>
@@ -1,3 +1,3 @@
1
1
  class Vendorer
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
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
@@ -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.6
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: 2011-12-23 00:00:00.000000000 Z
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: 181505217
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: 181505217
56
+ hash: 53423261
57
57
  requirements: []
58
58
  rubyforge_project:
59
59
  rubygems_version: 1.8.10