twilio_recordings 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/twilio_recordings.rb +15 -1
  3. metadata +8 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8033bae6057d03b97e9b48a9c1ef77c5a1f6405c
4
- data.tar.gz: cdad125449613cf7daa2d6f17841dbea0e1d3a13
3
+ metadata.gz: cbc58182b8c48d47a5093648eb788f7b62868ab1
4
+ data.tar.gz: 25d24631058c81e71d404e4d87579024f5f7c405
5
5
  SHA512:
6
- metadata.gz: b2d7c6c5a3563262504ca0959bf697c5a6b3c7d084556670a727307849a5e4c0c24485ff025ea5350ef8e06f7b2ffbbb9424084432a8c4a106154567c977985f
7
- data.tar.gz: 999c7b8fbf38e64e599a66721349ad4728727a4ab39dbe4eb248bbad427f8949281879bd70b9bf631a3f9148e0d25a25ee660b873500dcc008c8d1bbb655df00
6
+ metadata.gz: c202b497433591a2c93ee2d59dc43d3bc993c74762f9287fe64931dcc5ef52a6ae7a59bf9c7ab1d5b7da61a14eeabb8e3c054ad6ab9f290b08e143b57b5bccdc
7
+ data.tar.gz: 1587e09775e3a76af41869629bbc4fcae113ac11a9550b18d1143f846466e9877b2b25cd2dbf6f5fb2c27960ec47f84893c6f77b9ab7eb10fcfe71440b89199e
@@ -69,7 +69,7 @@ class TwilioRecordings
69
69
  def download
70
70
  recording_downloads = {}
71
71
  # download the recordings
72
- connection.in_parallel do
72
+ in_parallel do
73
73
  twilio_urls.zip(@recording_sids).each do |url, sid|
74
74
  recording_downloads[sid] = connection.get(url)
75
75
  end
@@ -86,6 +86,20 @@ class TwilioRecordings
86
86
  self
87
87
  end
88
88
 
89
+
90
+ ##
91
+ # Runs a block with parallel connection if there's several recordings
92
+ #
93
+ # Returns whatever the block returns
94
+ #
95
+ def in_parallel(&block)
96
+ if @recording_sids.count > 1
97
+ connection.in_parallel(&block)
98
+ else
99
+ block.call
100
+ end
101
+ end
102
+
89
103
  ##
90
104
  # Join the recordings together into a single file. Returns the output filename.
91
105
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twilio_recordings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Boxley
@@ -14,28 +14,28 @@ dependencies:
14
14
  name: typhoeus
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.5.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.5.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faraday
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: Utility for downloading and joining recordings from Twilio.
@@ -54,17 +54,17 @@ require_paths:
54
54
  - lib
55
55
  required_ruby_version: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - '>='
57
+ - - ">="
58
58
  - !ruby/object:Gem::Version
59
59
  version: '0'
60
60
  required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  requirements:
62
- - - '>='
62
+ - - ">="
63
63
  - !ruby/object:Gem::Version
64
64
  version: '0'
65
65
  requirements: []
66
66
  rubyforge_project:
67
- rubygems_version: 2.0.14
67
+ rubygems_version: 2.2.2
68
68
  signing_key:
69
69
  specification_version: 4
70
70
  summary: TwilioRecordings