vendorer 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,7 +1,6 @@
1
1
  source :rubygems
2
2
  gemspec
3
3
 
4
- group :development do
5
- gem 'rake'
6
- gem 'rspec', '~>2'
7
- end
4
+ gem "bump"
5
+ gem "rake"
6
+ gem "rspec", ">= 2"
data/Gemfile.lock CHANGED
@@ -1,11 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vendorer (0.1.12)
4
+ vendorer (0.1.13)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
8
8
  specs:
9
+ bump (0.3.5)
9
10
  diff-lcs (1.1.3)
10
11
  rake (0.9.2)
11
12
  rspec (2.6.0)
@@ -21,6 +22,7 @@ PLATFORMS
21
22
  ruby
22
23
 
23
24
  DEPENDENCIES
25
+ bump
24
26
  rake
25
- rspec (~> 2)
27
+ rspec (>= 2)
26
28
  vendorer!
data/Rakefile CHANGED
@@ -1,19 +1,7 @@
1
- require "bundler"
2
- Bundler::GemHelper.install_tasks
1
+ require "bundler/setup"
2
+ require "bundler/gem_tasks"
3
+ require "bump/tasks"
3
4
 
4
5
  task :default do
5
6
  sh "rspec spec/"
6
7
  end
7
-
8
- rule /^version:bump:.*/ do |t|
9
- file = 'lib/vendorer/version.rb'
10
- sh "git status | grep 'nothing to commit'" # ensure we are not dirty
11
- index = ['major', 'minor','patch'].index(t.name.split(':').last)
12
- version_file = File.read(file)
13
- old_version, *version_parts = version_file.match(/(\d+)\.(\d+)\.(\d+)/).to_a
14
- version_parts[index] = version_parts[index].to_i + 1
15
- new_version = version_parts * '.'
16
- File.open(file,'w'){|f| f.write(version_file.sub(old_version, new_version)) }
17
-
18
- sh "bundle && git add #{file} Gemfile.lock && git commit -m 'bump version to #{new_version}'"
19
- end
data/lib/vendorer.rb CHANGED
@@ -18,7 +18,7 @@ class Vendorer
18
18
  if @copy_from_url
19
19
  copy_from_path(target_path, url || path)
20
20
  else
21
- run "curl '#{url}' -L -o #{target_path}"
21
+ run "curl '#{url}' -L --compressed -o #{target_path}"
22
22
  raise "Downloaded empty file" unless File.exist?(target_path)
23
23
  end
24
24
  yield target_path if block_given?
@@ -1,3 +1,3 @@
1
1
  class Vendorer
2
- VERSION = '0.1.12'
2
+ VERSION = '0.1.13'
3
3
  end
@@ -159,6 +159,18 @@ describe Vendorer do
159
159
  vendorer.should_not include(@output)
160
160
  end
161
161
  end
162
+
163
+ context "with a compressed resource" do
164
+ def vendorfile_for_compressed_resource
165
+ write 'Vendorfile', "file 'public/javascripts/highcharts.js', 'http://code.highcharts.com/highcharts.js'"
166
+ end
167
+
168
+ it "decompresses to plain text" do
169
+ vendorfile_for_compressed_resource
170
+ vendorer
171
+ read('public/javascripts/highcharts.js').should include('Highcharts')
172
+ end
173
+ end
162
174
  end
163
175
 
164
176
  describe '#folder' do
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vendorer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
5
4
  prerelease:
5
+ version: 0.1.13
6
6
  platform: ruby
7
7
  authors:
8
8
  - Michael Grosser
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-25 00:00:00.000000000 Z
12
+ date: 2012-12-03 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: michael@grosser.it
@@ -37,23 +37,23 @@ rdoc_options: []
37
37
  require_paths:
38
38
  - lib
39
39
  required_ruby_version: !ruby/object:Gem::Requirement
40
- none: false
41
40
  requirements:
42
41
  - - ! '>='
43
42
  - !ruby/object:Gem::Version
44
43
  version: '0'
45
44
  segments:
46
45
  - 0
47
- hash: 3814910532642010770
48
- required_rubygems_version: !ruby/object:Gem::Requirement
46
+ hash: 321203829197918083
49
47
  none: false
48
+ required_rubygems_version: !ruby/object:Gem::Requirement
50
49
  requirements:
51
50
  - - ! '>='
52
51
  - !ruby/object:Gem::Version
53
52
  version: '0'
54
53
  segments:
55
54
  - 0
56
- hash: 3814910532642010770
55
+ hash: 321203829197918083
56
+ none: false
57
57
  requirements: []
58
58
  rubyforge_project:
59
59
  rubygems_version: 1.8.24