lib/glitter.rb in glitter-0.0.2 vs lib/glitter.rb in glitter-0.0.3

- old
+ new

@@ -57,11 +57,11 @@ def url_for(path) "https://s3.amazonaws.com/#{bucket_name}/#{path}" end def service - @service ||= ::S3::Service.new(:access_key_id => access_key, :secret_access_key => secret_access_key) + @service ||= ::S3::Service.new(:access_key_id => access_key, :secret_access_key => secret_access_key, :use_ssl => true) end def bucket service.buckets.find(bucket_name) end @@ -162,15 +162,17 @@ File.open glitterfile_path, 'w+' do |file| file.write File.read(App::TemplatePath) end end - desc "push RELEASE_NOTES", "pushes a build to S3 with release notes." - def push(release_notes) - puts "Pushing #{app.head.object_name} to bucket #{app.s3.bucket_name}..." + desc "push", "pushes a build to S3 with release notes." + method_option :release_notes, :type => :string, :aliases => "-m" + def push + puts "Pushing app #{app.head.object_name}" + app.head.notes = options[:release_notes] app.head.push - app.appcast.push puts "App pushed to #{app.head.url}" + puts "Updated #{app.appcast.url}" end private def app @config ||= App.configure('./Glitterfile') \ No newline at end of file