rivendell-api 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +19 -0
- data/Gemfile +4 -0
- data/Guardfile +9 -0
- data/LICENSE +22 -0
- data/README.md +29 -0
- data/Rakefile +4 -0
- data/lib/rivendell-api.rb +7 -0
- data/lib/rivendell-api/version.rb +5 -0
- data/lib/rivendell/api.rb +19 -0
- data/lib/rivendell/api/cart.rb +26 -0
- data/lib/rivendell/api/cut.rb +30 -0
- data/lib/rivendell/api/version.rb +5 -0
- data/lib/rivendell/api/xport.rb +89 -0
- data/rivendell-api.gemspec +28 -0
- data/spec/fixtures/empty.wav +0 -0
- data/spec/fixtures/rdxport_add_cart.xml +31 -0
- data/spec/fixtures/rdxport_add_cut.xml +48 -0
- data/spec/fixtures/rdxport_import.xml +1 -0
- data/spec/fixtures/rdxport_list_groups.xml +31 -0
- data/spec/rivendell/api/xport_spec.rb +97 -0
- data/spec/spec_helper.rb +17 -0
- data/spec/support/fakeweb.rb +2 -0
- data/tasks/rdoc.rake +9 -0
- data/tasks/rspec.rake +2 -0
- metadata +228 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Guardfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Alban Peignier
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# Rivendell::Api
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'rivendell-api'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install rivendell-api
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require "rivendell/api/version"
|
2
|
+
|
3
|
+
require "null_logger"
|
4
|
+
require "active_support/core_ext/module/attribute_accessors"
|
5
|
+
|
6
|
+
module Rivendell
|
7
|
+
module API
|
8
|
+
|
9
|
+
@@logger = NullLogger.instance
|
10
|
+
mattr_accessor :logger
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
require 'httmultiparty'
|
16
|
+
|
17
|
+
require "rivendell/api/cart"
|
18
|
+
require "rivendell/api/cut"
|
19
|
+
require "rivendell/api/xport"
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'active_support/core_ext/string/inflections'
|
2
|
+
|
3
|
+
module Rivendell::API
|
4
|
+
class Cart
|
5
|
+
|
6
|
+
attr_accessor :number, :type, :group_name, :title, :artist, :album, :year, :label, :client, :agency, :publisher, :composer, :user_defined, :usage_code, :forced_length, :average_length, :length_deviation, :average_segue_lenth, :average_hook_length, :cut_quantity, :last_cut_played, :validity, :enforce_length, :asyncronous, :owner, :metadata_datetime
|
7
|
+
|
8
|
+
def initialize(attributes = {})
|
9
|
+
attributes.each { |k,v| send "#{k}=", v }
|
10
|
+
end
|
11
|
+
|
12
|
+
def number=(number)
|
13
|
+
@number = (number ? number.to_i : nil)
|
14
|
+
end
|
15
|
+
|
16
|
+
def method_missing(name, arguments)
|
17
|
+
underscored_name = name.to_s.underscore
|
18
|
+
if respond_to?(underscored_name)
|
19
|
+
send underscored_name, arguments
|
20
|
+
else
|
21
|
+
super
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'active_support/core_ext/string/inflections'
|
2
|
+
|
3
|
+
module Rivendell::API
|
4
|
+
class Cut
|
5
|
+
|
6
|
+
attr_accessor :name, :number, :cart_number, :evergreen, :description, :outcue, :isrc, :isci, :length, :origin_datetime, :start_datetime, :end_datetime, :sun, :mon, :tue, :wed, :thu, :fri, :sat, :start_daypart, :end_daypart, :origin_name, :weight, :last_play_datetime, :play_counter, :local_counter, :validity, :coding_format, :sample_rate, :bit_rate, :channels, :play_gain, :start_point, :end_point, :fadeup_point, :fadedown_point, :segue_start_point, :segue_end_point, :segue_gain, :hook_start_point, :hook_end_point, :talk_start_point, :talk_end_point
|
7
|
+
|
8
|
+
def initialize(attributes = {})
|
9
|
+
attributes.each { |k,v| send "#{k}=", v }
|
10
|
+
end
|
11
|
+
|
12
|
+
def number=(number)
|
13
|
+
@number = (number ? number.to_i : nil)
|
14
|
+
end
|
15
|
+
|
16
|
+
alias_method :cut_name=, :name=
|
17
|
+
alias_method :cut_number=, :number=
|
18
|
+
|
19
|
+
def method_missing(name, arguments)
|
20
|
+
underscored_name = name.to_s.underscore
|
21
|
+
if respond_to?(underscored_name)
|
22
|
+
send underscored_name, arguments
|
23
|
+
else
|
24
|
+
super
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
@@ -0,0 +1,89 @@
|
|
1
|
+
module Rivendell::API
|
2
|
+
class Xport
|
3
|
+
include HTTMultiParty
|
4
|
+
base_uri 'http://localhost/rd-bin/rdxport.cgi'
|
5
|
+
# debug_output $stderr
|
6
|
+
format :xml
|
7
|
+
|
8
|
+
COMMAND_EXPORT = 1
|
9
|
+
COMMAND_IMPORT = 2
|
10
|
+
COMMAND_DELETEAUDIO = 3
|
11
|
+
COMMAND_LISTGROUPS = 4
|
12
|
+
COMMAND_LISTGROUP = 5
|
13
|
+
COMMAND_LISTCARTS = 6
|
14
|
+
COMMAND_LISTCART = 7
|
15
|
+
COMMAND_LISTCUT = 8
|
16
|
+
COMMAND_LISTCUTS = 9
|
17
|
+
COMMAND_ADDCUT = 10
|
18
|
+
COMMAND_REMOVECUT = 11
|
19
|
+
COMMAND_ADDCART = 12
|
20
|
+
COMMAND_REMOVECART = 13
|
21
|
+
COMMAND_EDITCART = 14
|
22
|
+
COMMAND_EDITCUT = 15
|
23
|
+
COMMAND_EXPORT_PEAKS = 16
|
24
|
+
|
25
|
+
def logger
|
26
|
+
Rivendell::API.logger
|
27
|
+
end
|
28
|
+
|
29
|
+
def query(command, attributes = {})
|
30
|
+
attributes = {
|
31
|
+
:command => command,
|
32
|
+
:login_name => "user",
|
33
|
+
:password => ""
|
34
|
+
}.merge(attributes)
|
35
|
+
|
36
|
+
attributes.inject({}) do |map, (key, value)|
|
37
|
+
map[key.to_s.upcase] = value
|
38
|
+
map
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def post(command, attributes = {}, options = {})
|
43
|
+
logger.debug "Post #{command} #{attributes.inspect}"
|
44
|
+
self.class.post '', :query => query(command, attributes)
|
45
|
+
end
|
46
|
+
|
47
|
+
def list_groups
|
48
|
+
post COMMAND_LISTGROUPS
|
49
|
+
end
|
50
|
+
|
51
|
+
def add_cart(attributes = {})
|
52
|
+
attributes = { :type => "audio" }.merge(attributes)
|
53
|
+
attributes[:group_name] ||= attributes.delete(:group)
|
54
|
+
|
55
|
+
response = post COMMAND_ADDCART, attributes
|
56
|
+
Rivendell::API::Cart.new(response["cartAdd"]["cart"])
|
57
|
+
end
|
58
|
+
|
59
|
+
def list_carts(options = {})
|
60
|
+
# accents in carts create invalid UTF-8 response
|
61
|
+
post COMMAND_LISTCARTS, options
|
62
|
+
end
|
63
|
+
|
64
|
+
def remove_cart(cart_number)
|
65
|
+
post COMMAND_REMOVECART, :cart_number => cart_number
|
66
|
+
end
|
67
|
+
|
68
|
+
def import(cart_number, cut_number, file, options = {})
|
69
|
+
arguments = {
|
70
|
+
:channels => 2,
|
71
|
+
:normalization_level => -13,
|
72
|
+
:autotrim_level => -30,
|
73
|
+
:use_metadata => true,
|
74
|
+
}.merge(options)
|
75
|
+
|
76
|
+
arguments = arguments.merge(:cart_number => cart_number, :cut_number => cut_number, :filename => File.new(file))
|
77
|
+
|
78
|
+
arguments[:use_metadata] = 1 if arguments[:use_metadata]
|
79
|
+
|
80
|
+
post COMMAND_IMPORT, arguments, :timeout => 10*60
|
81
|
+
end
|
82
|
+
|
83
|
+
def add_cut(cart_number)
|
84
|
+
response = post COMMAND_ADDCUT, :cart_number => cart_number
|
85
|
+
Rivendell::API::Cut.new(response["cutAdd"]["cut"])
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/rivendell/api/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Alban Peignier"]
|
6
|
+
gem.email = ["alban@tryphon.eu"]
|
7
|
+
gem.description = %q{Use the rdxport interface to retrieve Groups, create/edit/retrieve Carts and Cuts, import Cut sound.}
|
8
|
+
gem.summary = %q{Pilots Rivendell via http/xml API}
|
9
|
+
gem.homepage = "http://projects.tryphon.eu/rivendell-api"
|
10
|
+
|
11
|
+
gem.files = `git ls-files`.split($\)
|
12
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
|
+
gem.name = "rivendell-api"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = Rivendell::Api::VERSION
|
17
|
+
|
18
|
+
gem.add_runtime_dependency 'httmultiparty'
|
19
|
+
gem.add_runtime_dependency 'active_support'
|
20
|
+
gem.add_runtime_dependency 'null_logger'
|
21
|
+
|
22
|
+
gem.add_development_dependency "simplecov"
|
23
|
+
gem.add_development_dependency "rspec"
|
24
|
+
gem.add_development_dependency "guard"
|
25
|
+
gem.add_development_dependency "guard-rspec"
|
26
|
+
gem.add_development_dependency "rake"
|
27
|
+
gem.add_development_dependency "fakeweb"
|
28
|
+
end
|
Binary file
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
2
|
+
<cartAdd>
|
3
|
+
<cart>
|
4
|
+
<number>1005</number>
|
5
|
+
<type>audio</type>
|
6
|
+
<groupName>TEST</groupName>
|
7
|
+
<title>[new cart]</title>
|
8
|
+
<artist></artist>
|
9
|
+
<album></album>
|
10
|
+
<year></year>
|
11
|
+
<label></label>
|
12
|
+
<client></client>
|
13
|
+
<agency></agency>
|
14
|
+
<publisher></publisher>
|
15
|
+
<composer></composer>
|
16
|
+
<userDefined></userDefined>
|
17
|
+
<usageCode>0</usageCode>
|
18
|
+
<forcedLength>0:00:00.0</forcedLength>
|
19
|
+
<averageLength>0:00:00.0</averageLength>
|
20
|
+
<lengthDeviation>0:00:00.0</lengthDeviation>
|
21
|
+
<averageSegueLenth>0:00:00.0</averageSegueLenth>
|
22
|
+
<averageHookLength>0:00:00.0</averageHookLength>
|
23
|
+
<cutQuantity>0</cutQuantity>
|
24
|
+
<lastCutPlayed>0</lastCutPlayed>
|
25
|
+
<validity>2</validity>
|
26
|
+
<enforceLength>false</enforceLength>
|
27
|
+
<asyncronous>false</asyncronous>
|
28
|
+
<owner></owner>
|
29
|
+
<metadataDatetime></metadataDatetime>
|
30
|
+
</cart>
|
31
|
+
</cartAdd>
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
2
|
+
<cutAdd>
|
3
|
+
<cut>
|
4
|
+
<cutName>001005_001</cutName>
|
5
|
+
<cartNumber>1005</cartNumber>
|
6
|
+
<cutNumber>1</cutNumber>
|
7
|
+
<evergreen>false</evergreen>
|
8
|
+
<description>Cut 001</description>
|
9
|
+
<outcue></outcue>
|
10
|
+
<isrc></isrc>
|
11
|
+
<isci></isci>
|
12
|
+
<length>0</length>
|
13
|
+
<originDatetime></originDatetime>
|
14
|
+
<startDatetime></startDatetime>
|
15
|
+
<endDatetime></endDatetime>
|
16
|
+
<sun>true</sun>
|
17
|
+
<mon>true</mon>
|
18
|
+
<tue>true</tue>
|
19
|
+
<wed>true</wed>
|
20
|
+
<thu>true</thu>
|
21
|
+
<fri>true</fri>
|
22
|
+
<sat>true</sat>
|
23
|
+
<startDaypart></startDaypart>
|
24
|
+
<endDaypart></endDaypart>
|
25
|
+
<originName></originName>
|
26
|
+
<weight>1</weight>
|
27
|
+
<lastPlayDatetime></lastPlayDatetime>
|
28
|
+
<playCounter>0</playCounter>
|
29
|
+
<localCounter>0</localCounter>
|
30
|
+
<validity>0</validity>
|
31
|
+
<codingFormat>0</codingFormat>
|
32
|
+
<sampleRate>0</sampleRate>
|
33
|
+
<bitRate>0</bitRate>
|
34
|
+
<channels>2</channels>
|
35
|
+
<playGain>0</playGain>
|
36
|
+
<startPoint>-1</startPoint>
|
37
|
+
<endPoint>-1</endPoint>
|
38
|
+
<fadeupPoint>-1</fadeupPoint>
|
39
|
+
<fadedownPoint>-1</fadedownPoint>
|
40
|
+
<segueStartPoint>-1</segueStartPoint>
|
41
|
+
<segueEndPoint>-1</segueEndPoint>
|
42
|
+
<segueGain>-3000</segueGain>
|
43
|
+
<hookStartPoint>-1</hookStartPoint>
|
44
|
+
<hookEndPoint>-1</hookEndPoint>
|
45
|
+
<talkStartPoint>-1</talkStartPoint>
|
46
|
+
<talkEndPoint>0</talkEndPoint>
|
47
|
+
</cut>
|
48
|
+
</cutAdd>
|
@@ -0,0 +1 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
2
|
+
<groupList>
|
3
|
+
<group>
|
4
|
+
<name>BNS</name>
|
5
|
+
<description></description>
|
6
|
+
<defaultCartType>audio</defaultCartType>
|
7
|
+
<defaultLowCart>100000</defaultLowCart>
|
8
|
+
<defaultHighCart>100100</defaultHighCart>
|
9
|
+
<cutShelfLife>-1</cutShelfLife>
|
10
|
+
<defaultTitle>Imported from %f.%e</defaultTitle>
|
11
|
+
<enforceCartRange>false</enforceCartRange>
|
12
|
+
<reportTfc>true</reportTfc>
|
13
|
+
<reportMus>true</reportMus>
|
14
|
+
<enableNowNext>false</enableNowNext>
|
15
|
+
<color>#000000</color>
|
16
|
+
</group>
|
17
|
+
<group>
|
18
|
+
<name>PAD</name>
|
19
|
+
<description></description>
|
20
|
+
<defaultCartType>audio</defaultCartType>
|
21
|
+
<defaultLowCart>70000</defaultLowCart>
|
22
|
+
<defaultHighCart>75000</defaultHighCart>
|
23
|
+
<cutShelfLife>-1</cutShelfLife>
|
24
|
+
<defaultTitle>Imported from %f.%e</defaultTitle>
|
25
|
+
<enforceCartRange>false</enforceCartRange>
|
26
|
+
<reportTfc>true</reportTfc>
|
27
|
+
<reportMus>true</reportMus>
|
28
|
+
<enableNowNext>false</enableNowNext>
|
29
|
+
<color>#000000</color>
|
30
|
+
</group>
|
31
|
+
</groupList>
|
@@ -0,0 +1,97 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Rivendell::API::Xport do
|
4
|
+
|
5
|
+
def xml_response(response_code = 200, error_string = "OK")
|
6
|
+
"<RDWebResult><ResponseCode>#{response_code}</ResponseCode><ErrorString>#{error_string}</ErrorString></RDWebResult>"
|
7
|
+
end
|
8
|
+
|
9
|
+
def fixture_file(file)
|
10
|
+
File.expand_path("../../../fixtures/#{file}", __FILE__)
|
11
|
+
end
|
12
|
+
|
13
|
+
def fixture_content(file)
|
14
|
+
File.read fixture_file(file)
|
15
|
+
end
|
16
|
+
|
17
|
+
describe "#list_groups" do
|
18
|
+
|
19
|
+
before(:each) do
|
20
|
+
FakeWeb.register_uri(:post, "http://localhost/rd-bin/rdxport.cgi", :body => fixture_content("rdxport_list_groups.xml"))
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should use COMMAND 4" do
|
24
|
+
subject.list_groups
|
25
|
+
FakeWeb.last_request["COMMAND"] == "4"
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
describe "#import" do
|
31
|
+
|
32
|
+
before(:each) do
|
33
|
+
FakeWeb.register_uri(:post, "http://localhost/rd-bin/rdxport.cgi", :body => xml_response)
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should use COMMAND 2" do
|
37
|
+
subject.import 123, 001, fixture_file("empty.wav")
|
38
|
+
FakeWeb.last_request["COMMAND"] == "2"
|
39
|
+
end
|
40
|
+
|
41
|
+
it "should use 2 as default channels" do
|
42
|
+
subject.import 123, 001, fixture_file("empty.wav")
|
43
|
+
FakeWeb.last_request["CHANNELS"] == "2"
|
44
|
+
end
|
45
|
+
|
46
|
+
it "should use -13 as default normalization level" do
|
47
|
+
subject.import 123, 001, fixture_file("empty.wav")
|
48
|
+
FakeWeb.last_request["NORMALIZATION_LEVEL"] == "-13"
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
|
53
|
+
describe "add_cart" do
|
54
|
+
|
55
|
+
before(:each) do
|
56
|
+
FakeWeb.register_uri(:post, "http://localhost/rd-bin/rdxport.cgi", :body => fixture_content("rdxport_add_cart.xml"))
|
57
|
+
end
|
58
|
+
|
59
|
+
it "should use COMMAND 12" do
|
60
|
+
subject.add_cart
|
61
|
+
FakeWeb.last_request["COMMAND"] == "12"
|
62
|
+
end
|
63
|
+
|
64
|
+
it "should use audio as default type" do
|
65
|
+
subject.add_cart
|
66
|
+
FakeWeb.last_request["TYPE"] == "audio"
|
67
|
+
end
|
68
|
+
|
69
|
+
it "should use group as group_name" do
|
70
|
+
subject.add_cart :group => "TEST"
|
71
|
+
FakeWeb.last_request["GROUP_NAME"] == "TEST"
|
72
|
+
end
|
73
|
+
|
74
|
+
it "should return Cast number" do
|
75
|
+
subject.add_cart(:group => "TEST").number.should == 1005
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
79
|
+
|
80
|
+
describe "add_cut" do
|
81
|
+
|
82
|
+
before(:each) do
|
83
|
+
FakeWeb.register_uri(:post, "http://localhost/rd-bin/rdxport.cgi", :body => fixture_content("rdxport_add_cut.xml"))
|
84
|
+
end
|
85
|
+
|
86
|
+
it "should use COMMAND 10" do
|
87
|
+
subject.add_cut(123)
|
88
|
+
FakeWeb.last_request["COMMAND"] == "10"
|
89
|
+
end
|
90
|
+
|
91
|
+
it "should return Cut info with number" do
|
92
|
+
subject.add_cut(123).number.should == 1
|
93
|
+
end
|
94
|
+
|
95
|
+
end
|
96
|
+
|
97
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
|
3
|
+
SimpleCov.start do
|
4
|
+
add_filter "/spec/"
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rivendell/api'
|
8
|
+
|
9
|
+
Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}
|
10
|
+
|
11
|
+
require "logger"
|
12
|
+
Rivendell::API.logger = Logger.new("log/test.log")
|
13
|
+
|
14
|
+
RSpec.configure do |config|
|
15
|
+
|
16
|
+
|
17
|
+
end
|
data/tasks/rdoc.rake
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
require 'rdoc/task'
|
2
|
+
Rake::RDocTask.new do |rdoc|
|
3
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
4
|
+
|
5
|
+
rdoc.rdoc_dir = 'rdoc'
|
6
|
+
rdoc.title = "rivendellrb #{version}"
|
7
|
+
rdoc.rdoc_files.include('README*')
|
8
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
9
|
+
end
|
data/tasks/rspec.rake
ADDED
metadata
ADDED
@@ -0,0 +1,228 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rivendell-api
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Alban Peignier
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-09-14 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: httmultiparty
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: active_support
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: null_logger
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: simplecov
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: rspec
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: guard
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: guard-rspec
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: rake
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: fakeweb
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ! '>='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
150
|
+
type: :development
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ! '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
description: Use the rdxport interface to retrieve Groups, create/edit/retrieve Carts
|
159
|
+
and Cuts, import Cut sound.
|
160
|
+
email:
|
161
|
+
- alban@tryphon.eu
|
162
|
+
executables: []
|
163
|
+
extensions: []
|
164
|
+
extra_rdoc_files: []
|
165
|
+
files:
|
166
|
+
- .gitignore
|
167
|
+
- Gemfile
|
168
|
+
- Guardfile
|
169
|
+
- LICENSE
|
170
|
+
- README.md
|
171
|
+
- Rakefile
|
172
|
+
- lib/rivendell-api.rb
|
173
|
+
- lib/rivendell-api/version.rb
|
174
|
+
- lib/rivendell/api.rb
|
175
|
+
- lib/rivendell/api/cart.rb
|
176
|
+
- lib/rivendell/api/cut.rb
|
177
|
+
- lib/rivendell/api/version.rb
|
178
|
+
- lib/rivendell/api/xport.rb
|
179
|
+
- rivendell-api.gemspec
|
180
|
+
- spec/fixtures/empty.wav
|
181
|
+
- spec/fixtures/rdxport_add_cart.xml
|
182
|
+
- spec/fixtures/rdxport_add_cut.xml
|
183
|
+
- spec/fixtures/rdxport_import.xml
|
184
|
+
- spec/fixtures/rdxport_list_groups.xml
|
185
|
+
- spec/rivendell/api/xport_spec.rb
|
186
|
+
- spec/spec_helper.rb
|
187
|
+
- spec/support/fakeweb.rb
|
188
|
+
- tasks/rdoc.rake
|
189
|
+
- tasks/rspec.rake
|
190
|
+
homepage: http://projects.tryphon.eu/rivendell-api
|
191
|
+
licenses: []
|
192
|
+
post_install_message:
|
193
|
+
rdoc_options: []
|
194
|
+
require_paths:
|
195
|
+
- lib
|
196
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
197
|
+
none: false
|
198
|
+
requirements:
|
199
|
+
- - ! '>='
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
segments:
|
203
|
+
- 0
|
204
|
+
hash: -1014058537179393572
|
205
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
206
|
+
none: false
|
207
|
+
requirements:
|
208
|
+
- - ! '>='
|
209
|
+
- !ruby/object:Gem::Version
|
210
|
+
version: '0'
|
211
|
+
segments:
|
212
|
+
- 0
|
213
|
+
hash: -1014058537179393572
|
214
|
+
requirements: []
|
215
|
+
rubyforge_project:
|
216
|
+
rubygems_version: 1.8.23
|
217
|
+
signing_key:
|
218
|
+
specification_version: 3
|
219
|
+
summary: Pilots Rivendell via http/xml API
|
220
|
+
test_files:
|
221
|
+
- spec/fixtures/empty.wav
|
222
|
+
- spec/fixtures/rdxport_add_cart.xml
|
223
|
+
- spec/fixtures/rdxport_add_cut.xml
|
224
|
+
- spec/fixtures/rdxport_import.xml
|
225
|
+
- spec/fixtures/rdxport_list_groups.xml
|
226
|
+
- spec/rivendell/api/xport_spec.rb
|
227
|
+
- spec/spec_helper.rb
|
228
|
+
- spec/support/fakeweb.rb
|