waz-sync 0.0.3.3 → 0.0.3.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -102,7 +102,7 @@ you can take a look at this override lib file (tested on Rails 2.3.14) :
102
102
  container = azure.find_or_create_container(folder)
103
103
  azure.send_or_update(container, joined_asset_path, filename)
104
104
  rescue
105
- logger.info("Azure Sync Failed")
105
+ Rails.logger.info("Azure Sync Failed")
106
106
  end
107
107
 
108
108
  ######################
@@ -1,3 +1,5 @@
1
+ require 'progressbar'
2
+
1
3
  namespace :waz do
2
4
  task :app_env do
3
5
  if defined?(RAILS_ROOT)
@@ -14,7 +16,7 @@ namespace :waz do
14
16
  end
15
17
  end
16
18
 
17
- desc "Sync your assets to Windows Azure, usage : rake waz_sync:sync folders=images,stylesheets,javascripts (you can skip folders arg)"
19
+ desc "Sync your assets to Windows Azure, usage : rake waz:sync folders=images,stylesheets,javascripts (you can skip folders arg)"
18
20
  task :sync => :app_env do
19
21
 
20
22
  STDOUT.sync = true
@@ -30,9 +32,9 @@ namespace :waz do
30
32
  azure = WazSync.new()
31
33
 
32
34
  folders.each{|folder|
33
-
34
- puts " ==> Syncing #{folder}"
35
-
35
+
36
+ puts(" => Syncing #{folder}")
37
+ pbar = ProgressBar.new(" Progress", 100)
36
38
  container = azure.find_or_create_container(folder)
37
39
 
38
40
  i = 0
@@ -43,12 +45,13 @@ namespace :waz do
43
45
  j = 0
44
46
  Dir.glob("#{Rails.root.to_s}/public/#{folder}/**/*").each do |file|
45
47
  if File.file?(file)
46
- filename = file.gsub("/public/#{folder}/", "").gsub("#{Rails.root.to_s}", "")
47
- print "\r ==> #{(((j.to_f/i.to_f)*10000).to_i / 100.0).ceil}%"
48
+ filename = file.gsub("/public/#{folder}/", "").gsub("#{Rails.root.to_s}", "")
48
49
  azure.send_or_update(container, file, filename)
50
+ pbar.set((((j.to_f/i.to_f)*10000).to_i / 100.0).ceil)
49
51
  end
50
52
  j+=1
51
53
  end
54
+ pbar.finish
52
55
  print "\n"
53
56
  }
54
57
 
data/waz-sync.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |gem|
3
3
  gem.name = 'waz-sync'
4
- gem.version = '0.0.3.3'
4
+ gem.version = '0.0.3.5'
5
5
  gem.date = '2012-04-20'
6
6
  gem.description = %q{A simple client library aim to sync assets to Windows Azure CDN, using a modified version of the great waz-storage gem}
7
7
  gem.summary = %q{Client library for Syncing assets to Windows Azure CDN}
@@ -12,4 +12,5 @@ Gem::Specification.new do |gem|
12
12
  gem.homepage = 'https://github.com/gmontard/waz-sync'
13
13
  gem.require_paths = ["lib"]
14
14
  gem.rubyforge_project = 'waz-sync'
15
+ gem.add_dependency('ruby-progressbar')
15
16
  end
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 0
8
8
  - 3
9
- - 3
10
- version: 0.0.3.3
9
+ - 5
10
+ version: 0.0.3.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Guillaume MONTARD
@@ -17,8 +17,19 @@ cert_chain: []
17
17
 
18
18
  date: 2012-04-20 00:00:00 +02:00
19
19
  default_executable:
20
- dependencies: []
21
-
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: ruby-progressbar
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 0
30
+ version: "0"
31
+ type: :runtime
32
+ version_requirements: *id001
22
33
  description: A simple client library aim to sync assets to Windows Azure CDN, using a modified version of the great waz-storage gem
23
34
  email: montard@gmail.com
24
35
  executables: []