airplay 0.2.6 → 0.2.8

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.
@@ -1,29 +1,33 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :post
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
5
  uri: http://mocktv.local:7000/play
6
- body: ! 'Content-Location: http://www.yo-yo.org/mp4/yu.mp4
6
+ body:
7
+ encoding: US-ASCII
8
+ base64_string: |
9
+ Q29udGVudC1Mb2NhdGlvbjogaHR0cDovL3d3dy55by15by5vcmcvbXA0L3l1
10
+ Lm1wNApTdGFydC1Qb3NpdGlvbjogMAo=
7
11
 
8
- Start-Position: 0
9
-
10
- '
11
- headers:
12
- user-agent:
12
+ headers:
13
+ user-agent:
13
14
  - MediaControl/1.0
14
- connection:
15
+ connection:
15
16
  - keep-alive
16
- keep-alive:
17
+ keep-alive:
17
18
  - 30
18
- response: !ruby/struct:VCR::Response
19
- status: !ruby/struct:VCR::ResponseStatus
19
+ response:
20
+ status:
20
21
  code: 200
21
22
  message: OK
22
- headers:
23
- date:
24
- - Thu, 13 Oct 2011 12:30:19 GMT
25
- content-length:
26
- - '0'
27
- body: !!null
28
- http_version: '1.1'
29
- ignored: false
23
+ headers:
24
+ date:
25
+ - Fri, 23 Mar 2012 22:40:15 GMT
26
+ content-length:
27
+ - "0"
28
+ body:
29
+ encoding: US-ASCII
30
+ base64_string: ""
31
+ http_version: "1.1"
32
+ recorded_at: Fri, 23 Mar 2012 22:40:16 GMT
33
+ recorded_with: VCR 2.0.0
@@ -18,11 +18,14 @@ module MockedBrowser
18
18
  raise Airplay::Client::ServerNotFoundError
19
19
  end
20
20
  end
21
-
22
21
  end
23
22
 
24
- VCR.config do |c|
23
+ VCR.configure do |c|
25
24
  c.cassette_library_dir = 'test/fixtures/cassettes/airplay'
26
25
  c.default_cassette_options = { :record => :once }
27
- c.stub_with :fakeweb
26
+ c.hook_into :fakeweb
27
+ end
28
+
29
+ def with_cassette(name, &block)
30
+ VCR.use_cassette(name, :preserve_exact_body_bytes => true) { block.call if block }
28
31
  end
@@ -13,7 +13,7 @@ scope do
13
13
  end
14
14
 
15
15
  test "send an image to the server" do
16
- VCR.use_cassette("send image to apple tv") do
16
+ with_cassette("send image to apple tv") do
17
17
  file_path = "./test/fixtures/image2.gif"
18
18
  assert @airplay.send_image(file_path).kind_of?(String)
19
19
  assert @airplay.send_image(File.open(file_path)).kind_of?(String)
@@ -22,11 +22,10 @@ scope do
22
22
  end
23
23
 
24
24
  test "send an image to the server doing all the effects" do
25
- VCR.use_cassette("send image to apple tv with effects") do
25
+ with_cassette("send image to apple tv with effects") do
26
26
  [:none, :slide_left, :slide_right, :dissolve].each do |effect|
27
27
  assert @airplay.send_image("./test/fixtures/image.gif", effect).kind_of?(String)
28
28
  end
29
29
  end
30
30
  end
31
-
32
31
  end
@@ -15,13 +15,13 @@ scope do
15
15
  end
16
16
 
17
17
  test "send a video to the server" do
18
- VCR.use_cassette("send video to apple tv") do
18
+ with_cassette("send video to apple tv") do
19
19
  assert @airplay.send_video("http://www.yo-yo.org/mp4/yu.mp4")
20
20
  end
21
21
  end
22
22
 
23
23
  test "player capabilities" do
24
- VCR.use_cassette("control a video being played in apple tv") do
24
+ with_cassette("control a video being played in apple tv") do
25
25
  player = @airplay.send_video("http://www.yo-yo.org/mp4/yu.mp4")
26
26
 
27
27
  assert player.pause
@@ -34,7 +34,7 @@ scope do
34
34
  end
35
35
 
36
36
  test "send audio to the server" do
37
- VCR.use_cassette("send audio to apple tv") do
37
+ with_cassette("send audio to apple tv") do
38
38
  assert @airplay.send_audio("http://www.robtowns.com/music/blind_willie.mp3")
39
39
  end
40
40
  end
@@ -13,14 +13,14 @@ scope do
13
13
  end
14
14
 
15
15
  test "check scrub status" do
16
- VCR.use_cassette("get current scrub from apple tv") do
16
+ with_cassette("get current scrub from apple tv") do
17
17
  assert @airplay.scrub.has_key?("duration")
18
18
  assert @airplay.scrub.has_key?("position")
19
19
  end
20
20
  end
21
21
 
22
22
  test "move to a given position" do
23
- VCR.use_cassette("go to a given position in the video") do
23
+ with_cassette("go to a given position in the video") do
24
24
  @airplay.send_video("http://www.yo-yo.org/mp4/yu.mp4")
25
25
  duration = @airplay.scrub.fetch("duration")
26
26
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: airplay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,85 +9,85 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-13 00:00:00.000000000Z
12
+ date: 2012-03-24 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dnssd
16
- requirement: &70366161447460 !ruby/object:Gem::Requirement
16
+ requirement: &70251262606380 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ! '>='
19
+ - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: '0'
21
+ version: '2.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70366161447460
24
+ version_requirements: *70251262606380
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: net-http-persistent
27
- requirement: &70366161445920 !ruby/object:Gem::Requirement
27
+ requirement: &70251262605900 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
- - - ! '>='
30
+ - - ~>
31
31
  - !ruby/object:Gem::Version
32
- version: '0'
32
+ version: '2.5'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70366161445920
35
+ version_requirements: *70251262605900
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: net-http-digest_auth
38
- requirement: &70366161444860 !ruby/object:Gem::Requirement
38
+ requirement: &70251262605440 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
- - - ! '>='
41
+ - - ~>
42
42
  - !ruby/object:Gem::Version
43
- version: '0'
43
+ version: '1.2'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70366161444860
46
+ version_requirements: *70251262605440
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: cutest
49
- requirement: &70366161443740 !ruby/object:Gem::Requirement
49
+ requirement: &70251262604980 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
- - - ! '>='
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '1.1'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70366161443740
57
+ version_requirements: *70251262604980
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: capybara
60
- requirement: &70366161442500 !ruby/object:Gem::Requirement
60
+ requirement: &70251262604520 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
- - - ! '>='
63
+ - - ~>
64
64
  - !ruby/object:Gem::Version
65
- version: '0'
65
+ version: '1.0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70366161442500
68
+ version_requirements: *70251262604520
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: fakeweb
71
- requirement: &70366161432100 !ruby/object:Gem::Requirement
71
+ requirement: &70251262604060 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
- - - ! '>='
74
+ - - ~>
75
75
  - !ruby/object:Gem::Version
76
- version: '0'
76
+ version: '1.3'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70366161432100
79
+ version_requirements: *70251262604060
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: vcr
82
- requirement: &70366161431140 !ruby/object:Gem::Requirement
82
+ requirement: &70251262603600 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
- - - ! '>='
85
+ - - ~>
86
86
  - !ruby/object:Gem::Version
87
- version: '0'
87
+ version: '2.0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70366161431140
90
+ version_requirements: *70251262603600
91
91
  description: Send image/video to an airplay enabled device
92
92
  email:
93
93
  - yo@brunoaguirre.com
@@ -149,8 +149,24 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  version: '0'
150
150
  requirements: []
151
151
  rubyforge_project:
152
- rubygems_version: 1.8.10
152
+ rubygems_version: 1.8.15
153
153
  signing_key:
154
154
  specification_version: 3
155
155
  summary: Airplay client
156
- test_files: []
156
+ test_files:
157
+ - test/authentication.rb
158
+ - test/discovery.rb
159
+ - test/fixtures/cassettes/airplay/authenticate_all_the_things_.yml
160
+ - test/fixtures/cassettes/airplay/control_a_video_being_played_in_apple_tv.yml
161
+ - test/fixtures/cassettes/airplay/get_current_scrub_from_apple_tv.yml
162
+ - test/fixtures/cassettes/airplay/go_to_a_given_position_in_the_video.yml
163
+ - test/fixtures/cassettes/airplay/send_audio_to_apple_tv.yml
164
+ - test/fixtures/cassettes/airplay/send_image_to_apple_tv.yml
165
+ - test/fixtures/cassettes/airplay/send_image_to_apple_tv_with_effects.yml
166
+ - test/fixtures/cassettes/airplay/send_video_to_apple_tv.yml
167
+ - test/fixtures/image.gif
168
+ - test/fixtures/image2.gif
169
+ - test/helper.rb
170
+ - test/images.rb
171
+ - test/media.rb
172
+ - test/scrub.rb