honkster-encosion 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.3.3
@@ -5,10 +5,10 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{honkster-encosion}
8
- s.version = "0.3.2"
8
+ s.version = "0.3.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Rob Cameron", "Mason Glaves"]
11
+ s.authors = ["Rob Cameron"]
12
12
  s.date = %q{2010-04-07}
13
13
  s.email = %q{cannikinn@gmail.com}
14
14
  s.extra_rdoc_files = [
@@ -132,6 +132,23 @@ module Encosion
132
132
  end
133
133
  end
134
134
 
135
+ def delete_by_reference_id(*args)
136
+ options = extract_options(args)
137
+ id = args.flatten.compact.uniq.first
138
+
139
+ if id.class == String
140
+ options.merge!({:reference_id => id})
141
+ else
142
+ options.merge!({:video_id => id})
143
+ end
144
+
145
+ if response = write('delete_video', options)
146
+ return response["error"].nil? ? true : response["error"]
147
+ else
148
+ return nil
149
+ end
150
+ end
151
+
135
152
 
136
153
  # the actual method that calls a get (user can use this directly if they want to call a method that's not included here)
137
154
  def read(method,options)
@@ -1,7 +1,36 @@
1
1
  require 'test_helper'
2
2
 
3
3
  class EncosionTest < Test::Unit::TestCase
4
- should "probably rename this file and start testing for real" do
5
- flunk "hey buddy, you should probably rename this file and start testing for real"
4
+ should "do stuff" do
5
+ #!/usr/bin/env ruby
6
+
7
+ Encosion.options[:read_token] = 'WZvNvOA-dhN8Q1VCBfJlAH1GNbk-fp48rG7r0LnRNvd1nuRvwJy6uw..'
8
+ Encosion.options[:write_token] = 'UuVyFQ0u58r_1FBxTmmt1bp640RvkkOQjNK9UCBTFH2VW3DA2o_Itw..'
9
+
10
+ p Encosion::Video.delete_by_reference_id("testvideo")
11
+
12
+ new_video = Encosion::Video.new(
13
+ :file => File.new("/home/honk/workspace/honkster-encosion/test/movie.mov"),
14
+ :name => "test video",
15
+ :short_description => "NEW Test video",
16
+ :long_description => "/home/honk/workspace/honkster-encosion/test/movie.mov",
17
+ :reference_id => "testvideo",
18
+ :tags => ["test"],
19
+ :link_url => "http://test",
20
+ :link_text => "NEW text",
21
+ :encode_to => "MP4",
22
+ :create_multiple_renditions => true
23
+ )
24
+ p new_video.save
25
+ #
26
+ #
27
+ # v = Encosion::Video.find_by_reference_id("testvideo")
28
+ # puts v
29
+ #
30
+ # p Encosion::Video.delete_by_reference_id("testvideo")
31
+ #
32
+ # v = Encosion::Video.find_by_reference_id("testvideo")
33
+ # puts v
34
+
6
35
  end
7
36
  end
metadata CHANGED
@@ -1,11 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honkster-encosion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Cameron
8
- - Mason Glaves
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []