Rakefile in brighter_planet_layout-0.3.2 vs Rakefile in brighter_planet_layout-0.3.3
- old
+ new
@@ -1,57 +1,72 @@
-require 'rubygems'
-require 'rake'
+require 'bundler'
+Bundler::GemHelper.install_tasks
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "brighter_planet_layout"
- gem.summary = %Q{Layout assets for Brighter Planet sites}
- gem.description = %Q{Layouts, partials, stylesheets, and images}
- gem.email = "andy@rossmeissl.net"
- gem.homepage = "http://github.com/brighterplanet/brighter_planet_layout"
- gem.authors = ["Andy Rossmeissl", "Seamus Abshere"]
- # doesn't work in ruby 1.9; use spox-ultraviolet
- # each app is going to have to require this separately
- # gem.add_dependency 'ultraviolet', '>=0.10.2'
- gem.add_dependency 'simple-rss', '>=1.2.3'
- gem.files.reject! { |fn| fn.downcase =~ /\.ai$/ }
- gem.files.reject! { |fn| fn.downcase =~ /\.psd$/ }
- end
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
-end
-
+require 'rake'
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end
begin
- require 'rcov/rcovtask'
- Rcov::RcovTask.new do |test|
- test.libs << 'test'
- test.pattern = 'test/**/test_*.rb'
- test.verbose = true
+ require 'rake/rdoctask'
+ Rake::RDocTask.new do |rdoc|
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = 'remote_table'
+ rdoc.options << '--line-numbers' << '--inline-source'
+ rdoc.rdoc_files.include('README*')
+ rdoc.rdoc_files.include('lib/**/*.rb')
end
rescue LoadError
- task :rcov do
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
- end
+ puts "Rdoc is not available"
end
-task :test => :check_dependencies
-
-task :default => :test
-
-require 'rake/rdoctask'
-Rake::RDocTask.new do |rdoc|
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
-
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = "brighter_planet_layout #{version}"
- rdoc.rdoc_files.include('README*')
- rdoc.rdoc_files.include('lib/**/*.rb')
+# sabshere 11/17/10 not worth it --cache-control=\"public, max-age=7776000\"
+task :update_s3 do
+ missing = %w{ AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY SSL_CERT_DIR S3SYNC_DIR }.select { |i| ENV[i].to_s.empty? }
+ raise "get #{missing.join(', ')} from Seamus" unless missing.empty?
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
+ require 'brighter_planet_layout'
+ ENV['S3SYNC_NATIVE_CHARSET'] = 'UTF-8'
+ cmd = "ruby #{ENV['S3SYNC_DIR']}/s3sync.rb #{'--dryrun ' unless ENV['REAL'] == 'true'}--exclude=\"\\.ai\" --exclude=\"\\.psd\" -v -r --ssl --public-read #{BrighterPlanetLayout.public_path}/ #{BrighterPlanetLayout::S3_BUCKET}:#{BrighterPlanetLayout::VERSION}/"
+ if ENV['REAL'] == 'true'
+ $stderr.puts "Really updating"
+ else
+ $stderr.puts "Dry run... set REAL=true if you want to update for real"
+ end
+ $stderr.puts cmd
+ system cmd
+ $stderr.puts "Done"
end
+
+# sabshere 11/18/10 access control header doesn't work
+# vidalia:~/github/brighter_planet_layout (master) $ ruby ~/bp/propsgod/s3sync/s3cmd.rb -v -s put brighterplanetlayout:0.2.43/stylesheets/fonts/KievitWebPro.woff public/stylesheets/fonts/KievitWebPro.woff x-amz-acl:public-read "Access-Control-Allow-Origin:*"
+# put to key brighterplanetlayout:0.2.43/stylesheets/fonts/KievitWebPro.woff from public/stylesheets/fonts/KievitWebPro.woff {"Access-Control-Allow-Origin"=>"*", "x-amz-acl"=>"public-read", "Content-Length"=>"61924"}
+#
+# vidalia:~ $ curl -O -v http://brighterplanetlayout.s3.amazonaws.com/0.2.43/stylesheets/fonts/KievitWebPro.woff* About to connect() to brighterplanetlayout.s3.amazonaws.com port 80 (#0)
+# * Trying 72.21.207.165... % Total % Received % Xferd Average Speed Time Time Time Current
+# Dload Upload Total Spent Left Speed
+# 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0connected
+# * Connected to brighterplanetlayout.s3.amazonaws.com (72.21.207.165) port 80 (#0)
+# > GET /0.2.43/stylesheets/fonts/KievitWebPro.woff HTTP/1.1
+# > User-Agent: curl/7.20.0 (i386-apple-darwin9.8.0) libcurl/7.20.0 OpenSSL/0.9.8m zlib/1.2.3 libidn/1.16
+# > Host: brighterplanetlayout.s3.amazonaws.com
+# > Accept: */*
+# >
+# < HTTP/1.1 200 OK
+# < x-amz-id-2: lVNwntUjGX/0UxlygqXa+8yR2hFpAV+EZAzITK/ZMJQTnTOuJXvHEULNgPr1r9vt
+# < x-amz-request-id: 2B46C5DEBD6083E3
+# < Date: Thu, 18 Nov 2010 15:36:14 GMT
+# < Last-Modified: Thu, 18 Nov 2010 15:33:11 GMT
+# < ETag: "83c664104e2127f1b8519b653adc98dd"
+# < Accept-Ranges: bytes
+# < Content-Type:
+# < Content-Length: 61924
+# < Server: AmazonS3
+# <
+# { [data not shown]
+# 100 61924 100 61924 0 0 138k 0 --:--:-- --:--:-- --:--:-- 216k* Connection #0 to host brighterplanetlayout.s3.amazonaws.com left intact
+#
+# * Closing connection #0
+# vidalia:~ $