enigmamachine 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{enigmamachine}
8
- s.version = "0.4.0"
8
+ s.version = "0.4.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dave Hrycyszyn"]
12
- s.date = %q{2010-07-20}
12
+ s.date = %q{2010-07-21}
13
13
  s.default_executable = %q{enigmamachine}
14
14
  s.description = %q{A RESTful video encoder which you can use as either a front-end to ffmpeg or headless on a server.}
15
15
  s.email = %q{dave@caprica}
@@ -10,11 +10,14 @@ Video.blueprint do
10
10
  encoder
11
11
  file { File.dirname(__FILE__) + "/afile.mpg" }
12
12
  state { "unencoded" }
13
- callback_url { "http://example.org/call/back/id" }
14
13
  created_at DateTime.now
15
14
  updated_at DateTime.now
16
15
  end
17
16
 
17
+ Video.blueprint(:with_callback) do
18
+ callback_url { "http://example.com/call/back/id" }
19
+ end
20
+
18
21
  EncodingTask.blueprint do
19
22
  name { "320x240 flv"}
20
23
  output_file_suffix { ".foo.flv" }
@@ -513,6 +513,24 @@ class TestEnigmamachine < Test::Unit::TestCase
513
513
  end
514
514
  end
515
515
 
516
+ context "when video[callback_url] is set" do
517
+ setup do
518
+ @num_videos = Video.count
519
+ post "/videos", {
520
+ :video => Video.plan(:with_callback),
521
+ :encoder_id => Encoder.make.id}, basic_auth_creds
522
+ follow_redirect!
523
+ end
524
+
525
+ should "create a video" do
526
+ assert_equal @num_videos + 1, Video.count
527
+ end
528
+
529
+ should "redirect to /videos" do
530
+ assert_equal "http://example.org/videos", last_request.url
531
+ end
532
+ end
533
+
516
534
  context "and invalid video params" do
517
535
  setup do
518
536
  @num_videos = Video.count
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enigmamachine
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 0
10
- version: 0.4.0
9
+ - 1
10
+ version: 0.4.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dave Hrycyszyn
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-20 00:00:00 +01:00
18
+ date: 2010-07-21 00:00:00 +01:00
19
19
  default_executable: enigmamachine
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency