rivendell 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/Gemfile ADDED
@@ -0,0 +1,17 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem 'inifile'
4
+ gem 'dm-core'
5
+ gem 'dm-types'
6
+ gem 'dm-mysql-adapter'
7
+ gem 'dm-validations'
8
+ gem 'trollop'
9
+ gem 'bundler'
10
+
11
+ # Add dependencies to develop your gem here.
12
+ # Include everything needed to run rake, tests, features, etc.
13
+ group :development do
14
+ gem "shoulda", ">= 0"
15
+ gem "jeweler", "~> 1.5.2"
16
+ gem "rcov", ">= 0"
17
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 James Harrison
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,34 @@
1
+ = rivendell-rb
2
+
3
+ Rivendell-rb is a Ruby+Datamapper interface to the Rivendell broadcast automation system- specifically the logs and libraries.
4
+
5
+ == Installation
6
+
7
+ Should be a straightforward
8
+
9
+ gem install rivendell
10
+
11
+
12
+ == Tools
13
+
14
+ Rivendell-rb gives you a command-line utility, 'rivendell'. It can currently be used for basic operations. For example:
15
+
16
+ rivendell log -s Production -n MyNewLog -a create
17
+
18
+ Will create the log MyNewLog under the Production service. It will do nothing if the log already exists.
19
+
20
+
21
+ == Contributing to rivendell-rb
22
+
23
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
24
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
25
+ * Fork the project
26
+ * Start a feature/bugfix branch
27
+ * Commit and push until you are happy with your contribution
28
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
29
+
30
+ == Copyright
31
+
32
+ Copyright (c) 2011 James Harrison. See LICENSE.txt for further details.
33
+ Rivendell is (c) 2007 Paravel Systems.
34
+
data/Rakefile ADDED
@@ -0,0 +1,58 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'rake'
11
+
12
+ require 'jeweler'
13
+ Jeweler::Tasks.new do |gem|
14
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
15
+ gem.name = "rivendell"
16
+ gem.homepage = "http://github.com/JamesHarrison/rivendell-rb"
17
+ gem.license = "MIT"
18
+ gem.summary = %Q{Ruby and Datamapper interface to Rivendell's MySQL database, with utilities and tools}
19
+ gem.description = %Q{This is a set of wrappers and tools for working with the Rivendell broadcast automation system to automatically create logs and work with the library}
20
+ gem.email = "james@talkunafraid.co.uk"
21
+ gem.authors = ["James Harrison"]
22
+ # Include your dependencies below. Runtime dependencies are required when using your gem,
23
+ # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
24
+ gem.add_runtime_dependency 'dm-core', '~> 1.1.0'
25
+ gem.add_runtime_dependency 'dm-types'
26
+ gem.add_runtime_dependency 'dm-mysql-adapter'
27
+ gem.add_runtime_dependency 'dm-validations'
28
+ gem.add_runtime_dependency 'trollop'
29
+ gem.add_runtime_dependency 'inifile'
30
+ # gem.add_development_dependency 'rspec', '> 1.2.3'
31
+ end
32
+ Jeweler::RubygemsDotOrgTasks.new
33
+
34
+ require 'rake/testtask'
35
+ Rake::TestTask.new(:test) do |test|
36
+ test.libs << 'lib' << 'test'
37
+ test.pattern = 'test/**/test_*.rb'
38
+ test.verbose = true
39
+ end
40
+
41
+ require 'rcov/rcovtask'
42
+ Rcov::RcovTask.new do |test|
43
+ test.libs << 'test'
44
+ test.pattern = 'test/**/test_*.rb'
45
+ test.verbose = true
46
+ end
47
+
48
+ task :default => :test
49
+
50
+ require 'rake/rdoctask'
51
+ Rake::RDocTask.new do |rdoc|
52
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
53
+
54
+ rdoc.rdoc_dir = 'rdoc'
55
+ rdoc.title = "rivendellrb #{version}"
56
+ rdoc.rdoc_files.include('README*')
57
+ rdoc.rdoc_files.include('lib/**/*.rb')
58
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
data/bin/rivendell ADDED
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env ruby
2
+ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
3
+ require 'rivendell'
4
+ require 'trollop'
5
+ SUB_COMMANDS = %w(log cart)
6
+ opts = Trollop::options do
7
+ banner <<-EOS
8
+ This is a Ruby interface to Rivendell's log and cart databases,
9
+ allowing simple log automation tasks not possible in Rivendell itself.
10
+
11
+ Usage:
12
+ rivendell subcommand [options]
13
+
14
+ The subcommands available are: #{SUB_COMMANDS.join(", ")}
15
+
16
+ Use rivendell subcommand --help to see options for that subcommand.
17
+
18
+ EOS
19
+ opt :user, "User that is performing the tasks in Rivendell", :type=>String, :default=>'user'
20
+ stop_on SUB_COMMANDS
21
+ end
22
+ cmd = ARGV.shift
23
+ cmd_opts = case cmd
24
+ when "log"
25
+ Trollop::options do
26
+ opt :name, "Log name to work with", :type => String
27
+ opt :service, "Service to work with", :type => String
28
+ opt :action, "Action to perform on the given log. Can be one of delete, create.", :default => 'create', :type => String
29
+ end
30
+ when "cart"
31
+ Trollop::options do
32
+ opt :number, :type => Integer
33
+ end
34
+ else
35
+ Trollop::die "unknown subcommand #{cmd.inspect} - must be one of #{SUB_COMMANDS.join(", ")}"
36
+ end
37
+ Trollop::die "no subcommand specified" unless cmd
38
+ Trollop::die "no user specified" unless opts[:user]
39
+ Trollop::die "log name must be specified" if cmd == 'log' and not cmd_opts[:name_given]
40
+ Trollop::die "service name must be specified" if cmd == 'log' and not cmd_opts[:service_given]
41
+ Trollop::die "cart number must be specified" if cmd == 'cart' and cmd_opts[:number].to_i < 0
42
+ Rivendell::Tools.run(opts, cmd, cmd_opts)
data/lib/rivendell.rb ADDED
@@ -0,0 +1,19 @@
1
+ require "rubygems"
2
+ require "bundler/setup"
3
+ Bundler.require(:default)
4
+ module Rivendell
5
+ # DataMapper::Model.raise_on_save_failure = true
6
+ if File.exists?("/etc/rc.conf")
7
+ # If we can, pull the config from Rivendell's own configuration.
8
+ rdconf = IniFile.load("/etc/rd.conf")
9
+ mysql = rdconf['mySQL']
10
+ DataMapper.setup(:default, "mysql://#{mysql['Loginname']}:#{mysql['Password']}@#{mysql['Hostname']}/#{mysql['Database']}")
11
+ else
12
+ # Rivendell's default for most setups
13
+ DataMapper.setup(:default, 'mysql://rduser:letmein@localhost/Rivendell')
14
+ end
15
+ end
16
+ require 'rivendell/log_item'
17
+ require 'rivendell/log'
18
+ require 'rivendell/cart'
19
+ require 'rivendell/tools'
@@ -0,0 +1,11 @@
1
+ class Rivendell::Cart
2
+ include DataMapper::Resource
3
+ storage_names[:default] = 'CART'
4
+ property :NUMBER, Integer, :key=>true
5
+ property :TYPE, Integer
6
+ property :GROUP_NAME, String, :length=>10
7
+ property :TITLE, String
8
+ property :ARTIST, String
9
+ property :ALBUM, String
10
+ property :YEAR, Date
11
+ end
@@ -0,0 +1,66 @@
1
+ class Rivendell::Log
2
+ include DataMapper::Resource
3
+ storage_names[:default] = 'LOGS'
4
+ property :NAME, String, :key => true
5
+ property :LOG_EXISTS, Enum['Y', 'N'], :default => 'Y'
6
+ property :TYPE, Integer, :default => 0, :required => true
7
+ property :SERVICE, String, :length => 10, :required => true
8
+ property :DESCRIPTION, String, :length => 64
9
+ property :ORIGIN_USER, String, :required => true
10
+ property :ORIGIN_DATETIME, DateTime, :required => true
11
+ property :LINK_DATETIME, DateTime, :required => true
12
+ property :MODIFIED_DATETIME, DateTime, :required => true
13
+ property :AUTO_REFRESH, Enum['Y', 'N'], :default => 'N'
14
+ property :START_DATE, String, :required => true, :default => '0000-00-00'
15
+ property :END_DATE, String, :required => true, :default => '0000-00-00'
16
+ property :PURGE_DATE, String, :default => '0000-00-00'
17
+ property :IMPORT_DATE, Date
18
+ property :SCHEDULED_TRACKS, Integer, :default => 0
19
+ property :COMPLETED_TRACKS, Integer, :default => 0
20
+ property :MUSIC_LINKS, Integer, :default => 0
21
+ property :MUSIC_LINKED, Enum['Y', 'N'], :default => 'N'
22
+ property :TRAFFIC_LINKS, Integer, :default => 0
23
+ property :TRAFFIC_LINKED, Enum['Y', 'N'], :default => 'N'
24
+ property :NEXT_ID, Integer, :default => 0
25
+ def items
26
+ return @items if @items
27
+ classname = "LogItem"+self.NAME.strip
28
+ Object.const_set(classname, Class.new(Rivendell::LogItem))
29
+ Object.const_get(classname).class_exec(self.NAME) do |name|
30
+ storage_names[:default] = name+"_LOG"
31
+ end
32
+ @items = Object.const_get(classname)
33
+ return @items
34
+ end
35
+
36
+ before :save, :ensure_name_valid
37
+ # Scrubs out invalid stuff.
38
+ def ensure_name_valid
39
+ self.NAME = self.NAME.gsub(" ", "_").gsub(/[^A-Za-z0-9_]/,'')
40
+ return true
41
+ end
42
+
43
+ before :save, :set_sql_session
44
+ def set_sql_session
45
+ repository.adapter.execute("SET SESSION sql_mode=ALLOW_INVALID_DATES;")
46
+ end
47
+
48
+ after :destroy, :delete_log_table
49
+ def delete_log_table
50
+ sql = "DROP TABLE #{self.NAME+"_LOG"};"
51
+ repository.adapter.execute(sql)
52
+ end
53
+
54
+ before :create, :make_log_table
55
+ # Makes the table for a given log if it doesn't exist already.
56
+ def make_log_table
57
+ ensure_name_valid
58
+ sql = "CREATE TABLE IF NOT EXISTS #{self.NAME+"_LOG"} (ID INT NOT NULL PRIMARY KEY,COUNT INT NOT NULL,TYPE INT DEFAULT 0,SOURCE INT NOT NULL,START_TIME int,GRACE_TIME int default 0,CART_NUMBER INT UNSIGNED NOT NULL,TIME_TYPE INT NOT NULL,POST_POINT enum('N','Y') default 'N',TRANS_TYPE INT NOT NULL,START_POINT INT NOT NULL DEFAULT -1,END_POINT INT NOT NULL DEFAULT -1,FADEUP_POINT int default -1,FADEUP_GAIN int default -3000,FADEDOWN_POINT int default -1,FADEDOWN_GAIN int default -3000,SEGUE_START_POINT INT NOT NULL DEFAULT -1,SEGUE_END_POINT INT NOT NULL DEFAULT -1,SEGUE_GAIN int default -3000,DUCK_UP_GAIN int default 0,DUCK_DOWN_GAIN int default 0,COMMENT CHAR(255),LABEL CHAR(64),ORIGIN_USER char(255),ORIGIN_DATETIME datetime,LINK_EVENT_NAME char(64),LINK_START_TIME int,LINK_LENGTH int default 0,LINK_START_SLOP int default 0,LINK_END_SLOP int default 0,LINK_ID int default -1,LINK_EMBEDDED enum('N','Y') default 'N',EXT_START_TIME time,EXT_LENGTH int,EXT_CART_NAME char(32),EXT_DATA char(32),EXT_EVENT_ID char(32),EXT_ANNC_TYPE char(8),INDEX COUNT_IDX (COUNT),INDEX CART_NUMBER_IDX (CART_NUMBER),INDEX LABEL_IDX (LABEL));"
59
+ repository.adapter.execute(sql)
60
+ return true
61
+ end
62
+ end
63
+
64
+
65
+
66
+
@@ -0,0 +1,52 @@
1
+ class Rivendell::LogItem
2
+ include DataMapper::Resource
3
+ property :ID, Serial
4
+ property :COUNT, Integer, :required => true
5
+ property :TYPE, Integer, :default => 0, :required => true
6
+ property :SOURCE, Integer, :required => true, :default => 0
7
+ property :START_TIME, Integer, :default => 0
8
+ property :GRACE_TIME, Integer, :required => true, :default => -1
9
+ property :CART_NUMBER, Integer, :required => true, :default => 0
10
+ property :TIME_TYPE, Integer, :required => true, :default => 0
11
+ property :POST_POINT, Enum['Y','N'], :required => true, :default => 'N'
12
+ property :TRANS_TYPE, Integer, :required => true, :default => 1
13
+ property :START_POINT, Integer, :required => true, :default => -1
14
+ property :END_POINT, Integer, :required => true, :default => -1
15
+ property :FADEUP_POINT, Integer, :default => -1
16
+ property :FADEUP_GAIN, Integer, :default => -3000
17
+ property :FADEDOWN_POINT, Integer, :default => -1
18
+ property :FADEDOWN_GAIN, Integer, :default => -3000
19
+ property :SEGUE_START_POINT,Integer, :required => true, :default => -1
20
+ property :SEGUE_END_POINT, Integer, :required => true, :default => -1
21
+ property :SEGUE_GAIN, Integer, :default => -3000
22
+ property :DUCK_UP_GAIN, Integer, :default => 0
23
+ property :DUCK_DOWN_GAIN, Integer, :default => 0
24
+ property :COMMENT, String, :length => 255
25
+ property :LABEL, String, :length => 64
26
+ property :ORIGIN_USER, String, :length => 255, :default => 'admin'
27
+ property :ORIGIN_DATETIME, DateTime
28
+ property :LINK_EVENT_NAME, String, :length => 64
29
+ property :LINK_START_TIME, Integer
30
+ property :LINK_LENGTH, Integer, :default => 0
31
+ property :LINK_START_SLOP, Integer, :default => 0
32
+ property :LINK_END_SLOP, Integer, :default => 0
33
+ property :LINK_ID, Integer, :default => -1
34
+ property :LINK_EMBEDDED, Enum['Y','N'], :default => 'N'
35
+ property :EXT_START_TIME, Time
36
+ property :EXT_LENGTH, Integer
37
+ property :EXT_CART_NAME, String, :length => 32
38
+ property :EXT_DATA, String, :length => 32
39
+ property :EXT_EVENT_ID, String, :length => 32
40
+ property :EXT_ANNC_TYPE, String, :length => 8
41
+ START_TIME_TYPE = {:imported => 0, :logged => 1, :predicted => 2, :actual => 3, :initial => 4}
42
+ TIME_TYPE = {:relative => 0, :hard => 1}
43
+ TRANS_TYPE = {:play => 0, :segue => 1, :stop => 2, :no_trans => 255}
44
+ TRANS_EDGE = {:all_trans => 0, :leading_trans => 1, :trailing_trans => 2}
45
+ SOURCE = {:manual => 0, :traffic => 1, :music => 2, :template => 3, :tracker => 4}
46
+ STATUS = {:scheduled => 1, :playing => 2, :auditioning => 3, :finished => 4, :finishing => 5, :paused => 6}
47
+ STATE = {:ok => 0, :no_cart => 1, :no_cut => 2}
48
+ TYPE = {:cart => 0, :marker => 1, :macro => 2, :open_bracket => 3, :close_bracket => 4, :chain => 5, :track => 6, :music_link => 7, :traffic_link => 8, :unknown => 9}
49
+ START_SOURCE = {:unknown => 0, :manual => 1, :play => 2, :segue => 3, :time => 4, :panel => 5, :macro => 6}
50
+ PLAY_SOURCE = {:unknown => 0, :main_log => 1, :aux_log_1 => 2, :aux_log_2 => 3, :panel => 4}
51
+ POINTER_SOURCE = {:cart => 0, :log => 1, :auto => 2}
52
+ end
@@ -0,0 +1,23 @@
1
+ class Rivendell::Tools
2
+ # Runs all the command-line stuff, gets passed global options, the subcommand and the subcommand's options
3
+ def self.run(opts, cmd, cmd_opts)
4
+ puts opts
5
+ puts cmd
6
+ puts cmd_opts
7
+ if cmd == 'log'
8
+ self.log(cmd_opts, opts)
9
+ end
10
+ end
11
+ # Handles the log subcommand
12
+ def self.log(opts, global_opts)
13
+ log_name = opts[:name]
14
+ if opts[:action] == 'create'
15
+ log = Rivendell::Log.new(:NAME=>opts[:name], :ORIGIN_USER=>global_opts[:user], :ORIGIN_DATETIME=>Time.now, :SERVICE=>opts[:service], :LINK_DATETIME=>Time.now, :MODIFIED_DATETIME=>Time.now)
16
+ if log.save
17
+ puts "Log created: "+log.inspect
18
+ else
19
+ puts "Log not saved: "+log.errors.map{|e|e.to_s}.join(", ")
20
+ end
21
+ end
22
+ end
23
+ end
data/rivendell.gemspec ADDED
@@ -0,0 +1,106 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{rivendell}
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["James Harrison"]
12
+ s.date = %q{2011-03-23}
13
+ s.default_executable = %q{rivendell}
14
+ s.description = %q{This is a set of wrappers and tools for working with the Rivendell broadcast automation system to automatically create logs and work with the library}
15
+ s.email = %q{james@talkunafraid.co.uk}
16
+ s.executables = ["rivendell"]
17
+ s.extra_rdoc_files = [
18
+ "LICENSE.txt",
19
+ "README.rdoc"
20
+ ]
21
+ s.files = [
22
+ ".document",
23
+ "Gemfile",
24
+ "LICENSE.txt",
25
+ "README.rdoc",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "bin/rivendell",
29
+ "lib/rivendell.rb",
30
+ "lib/rivendell/cart.rb",
31
+ "lib/rivendell/log.rb",
32
+ "lib/rivendell/log_item.rb",
33
+ "lib/rivendell/tools.rb",
34
+ "rivendell.gemspec",
35
+ "test/helper.rb",
36
+ "test/test_rivendellrb.rb"
37
+ ]
38
+ s.homepage = %q{http://github.com/JamesHarrison/rivendell-rb}
39
+ s.licenses = ["MIT"]
40
+ s.require_paths = ["lib"]
41
+ s.rubygems_version = %q{1.3.7}
42
+ s.summary = %q{Ruby and Datamapper interface to Rivendell's MySQL database, with utilities and tools}
43
+ s.test_files = [
44
+ "test/helper.rb",
45
+ "test/test_rivendellrb.rb"
46
+ ]
47
+
48
+ if s.respond_to? :specification_version then
49
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
50
+ s.specification_version = 3
51
+
52
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
53
+ s.add_runtime_dependency(%q<inifile>, [">= 0"])
54
+ s.add_runtime_dependency(%q<dm-core>, [">= 0"])
55
+ s.add_runtime_dependency(%q<dm-types>, [">= 0"])
56
+ s.add_runtime_dependency(%q<dm-mysql-adapter>, [">= 0"])
57
+ s.add_runtime_dependency(%q<dm-validations>, [">= 0"])
58
+ s.add_runtime_dependency(%q<trollop>, [">= 0"])
59
+ s.add_runtime_dependency(%q<bundler>, [">= 0"])
60
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
61
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
62
+ s.add_development_dependency(%q<rcov>, [">= 0"])
63
+ s.add_runtime_dependency(%q<dm-core>, ["~> 1.1.0"])
64
+ s.add_runtime_dependency(%q<dm-types>, [">= 0"])
65
+ s.add_runtime_dependency(%q<dm-mysql-adapter>, [">= 0"])
66
+ s.add_runtime_dependency(%q<dm-validations>, [">= 0"])
67
+ s.add_runtime_dependency(%q<trollop>, [">= 0"])
68
+ s.add_runtime_dependency(%q<inifile>, [">= 0"])
69
+ else
70
+ s.add_dependency(%q<inifile>, [">= 0"])
71
+ s.add_dependency(%q<dm-core>, [">= 0"])
72
+ s.add_dependency(%q<dm-types>, [">= 0"])
73
+ s.add_dependency(%q<dm-mysql-adapter>, [">= 0"])
74
+ s.add_dependency(%q<dm-validations>, [">= 0"])
75
+ s.add_dependency(%q<trollop>, [">= 0"])
76
+ s.add_dependency(%q<bundler>, [">= 0"])
77
+ s.add_dependency(%q<shoulda>, [">= 0"])
78
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
79
+ s.add_dependency(%q<rcov>, [">= 0"])
80
+ s.add_dependency(%q<dm-core>, ["~> 1.1.0"])
81
+ s.add_dependency(%q<dm-types>, [">= 0"])
82
+ s.add_dependency(%q<dm-mysql-adapter>, [">= 0"])
83
+ s.add_dependency(%q<dm-validations>, [">= 0"])
84
+ s.add_dependency(%q<trollop>, [">= 0"])
85
+ s.add_dependency(%q<inifile>, [">= 0"])
86
+ end
87
+ else
88
+ s.add_dependency(%q<inifile>, [">= 0"])
89
+ s.add_dependency(%q<dm-core>, [">= 0"])
90
+ s.add_dependency(%q<dm-types>, [">= 0"])
91
+ s.add_dependency(%q<dm-mysql-adapter>, [">= 0"])
92
+ s.add_dependency(%q<dm-validations>, [">= 0"])
93
+ s.add_dependency(%q<trollop>, [">= 0"])
94
+ s.add_dependency(%q<bundler>, [">= 0"])
95
+ s.add_dependency(%q<shoulda>, [">= 0"])
96
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
97
+ s.add_dependency(%q<rcov>, [">= 0"])
98
+ s.add_dependency(%q<dm-core>, ["~> 1.1.0"])
99
+ s.add_dependency(%q<dm-types>, [">= 0"])
100
+ s.add_dependency(%q<dm-mysql-adapter>, [">= 0"])
101
+ s.add_dependency(%q<dm-validations>, [">= 0"])
102
+ s.add_dependency(%q<trollop>, [">= 0"])
103
+ s.add_dependency(%q<inifile>, [">= 0"])
104
+ end
105
+ end
106
+
data/test/helper.rb ADDED
@@ -0,0 +1,18 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'test/unit'
11
+ require 'shoulda'
12
+
13
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
15
+ require 'rivendellrb'
16
+
17
+ class Test::Unit::TestCase
18
+ end
@@ -0,0 +1,7 @@
1
+ require 'helper'
2
+
3
+ class TestRivendell < 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"
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,292 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rivendell
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 0
9
+ version: 0.1.0
10
+ platform: ruby
11
+ authors:
12
+ - James Harrison
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2011-03-23 00:00:00 +00:00
18
+ default_executable: rivendell
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: inifile
22
+ requirement: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ version: "0"
30
+ type: :runtime
31
+ prerelease: false
32
+ version_requirements: *id001
33
+ - !ruby/object:Gem::Dependency
34
+ name: dm-core
35
+ requirement: &id002 !ruby/object:Gem::Requirement
36
+ none: false
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ segments:
41
+ - 0
42
+ version: "0"
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: *id002
46
+ - !ruby/object:Gem::Dependency
47
+ name: dm-types
48
+ requirement: &id003 !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ segments:
54
+ - 0
55
+ version: "0"
56
+ type: :runtime
57
+ prerelease: false
58
+ version_requirements: *id003
59
+ - !ruby/object:Gem::Dependency
60
+ name: dm-mysql-adapter
61
+ requirement: &id004 !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ segments:
67
+ - 0
68
+ version: "0"
69
+ type: :runtime
70
+ prerelease: false
71
+ version_requirements: *id004
72
+ - !ruby/object:Gem::Dependency
73
+ name: dm-validations
74
+ requirement: &id005 !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ segments:
80
+ - 0
81
+ version: "0"
82
+ type: :runtime
83
+ prerelease: false
84
+ version_requirements: *id005
85
+ - !ruby/object:Gem::Dependency
86
+ name: trollop
87
+ requirement: &id006 !ruby/object:Gem::Requirement
88
+ none: false
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ segments:
93
+ - 0
94
+ version: "0"
95
+ type: :runtime
96
+ prerelease: false
97
+ version_requirements: *id006
98
+ - !ruby/object:Gem::Dependency
99
+ name: bundler
100
+ requirement: &id007 !ruby/object:Gem::Requirement
101
+ none: false
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ segments:
106
+ - 0
107
+ version: "0"
108
+ type: :runtime
109
+ prerelease: false
110
+ version_requirements: *id007
111
+ - !ruby/object:Gem::Dependency
112
+ name: shoulda
113
+ requirement: &id008 !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ segments:
119
+ - 0
120
+ version: "0"
121
+ type: :development
122
+ prerelease: false
123
+ version_requirements: *id008
124
+ - !ruby/object:Gem::Dependency
125
+ name: jeweler
126
+ requirement: &id009 !ruby/object:Gem::Requirement
127
+ none: false
128
+ requirements:
129
+ - - ~>
130
+ - !ruby/object:Gem::Version
131
+ segments:
132
+ - 1
133
+ - 5
134
+ - 2
135
+ version: 1.5.2
136
+ type: :development
137
+ prerelease: false
138
+ version_requirements: *id009
139
+ - !ruby/object:Gem::Dependency
140
+ name: rcov
141
+ requirement: &id010 !ruby/object:Gem::Requirement
142
+ none: false
143
+ requirements:
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ segments:
147
+ - 0
148
+ version: "0"
149
+ type: :development
150
+ prerelease: false
151
+ version_requirements: *id010
152
+ - !ruby/object:Gem::Dependency
153
+ name: dm-core
154
+ requirement: &id011 !ruby/object:Gem::Requirement
155
+ none: false
156
+ requirements:
157
+ - - ~>
158
+ - !ruby/object:Gem::Version
159
+ segments:
160
+ - 1
161
+ - 1
162
+ - 0
163
+ version: 1.1.0
164
+ type: :runtime
165
+ prerelease: false
166
+ version_requirements: *id011
167
+ - !ruby/object:Gem::Dependency
168
+ name: dm-types
169
+ requirement: &id012 !ruby/object:Gem::Requirement
170
+ none: false
171
+ requirements:
172
+ - - ">="
173
+ - !ruby/object:Gem::Version
174
+ segments:
175
+ - 0
176
+ version: "0"
177
+ type: :runtime
178
+ prerelease: false
179
+ version_requirements: *id012
180
+ - !ruby/object:Gem::Dependency
181
+ name: dm-mysql-adapter
182
+ requirement: &id013 !ruby/object:Gem::Requirement
183
+ none: false
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ segments:
188
+ - 0
189
+ version: "0"
190
+ type: :runtime
191
+ prerelease: false
192
+ version_requirements: *id013
193
+ - !ruby/object:Gem::Dependency
194
+ name: dm-validations
195
+ requirement: &id014 !ruby/object:Gem::Requirement
196
+ none: false
197
+ requirements:
198
+ - - ">="
199
+ - !ruby/object:Gem::Version
200
+ segments:
201
+ - 0
202
+ version: "0"
203
+ type: :runtime
204
+ prerelease: false
205
+ version_requirements: *id014
206
+ - !ruby/object:Gem::Dependency
207
+ name: trollop
208
+ requirement: &id015 !ruby/object:Gem::Requirement
209
+ none: false
210
+ requirements:
211
+ - - ">="
212
+ - !ruby/object:Gem::Version
213
+ segments:
214
+ - 0
215
+ version: "0"
216
+ type: :runtime
217
+ prerelease: false
218
+ version_requirements: *id015
219
+ - !ruby/object:Gem::Dependency
220
+ name: inifile
221
+ requirement: &id016 !ruby/object:Gem::Requirement
222
+ none: false
223
+ requirements:
224
+ - - ">="
225
+ - !ruby/object:Gem::Version
226
+ segments:
227
+ - 0
228
+ version: "0"
229
+ type: :runtime
230
+ prerelease: false
231
+ version_requirements: *id016
232
+ description: This is a set of wrappers and tools for working with the Rivendell broadcast automation system to automatically create logs and work with the library
233
+ email: james@talkunafraid.co.uk
234
+ executables:
235
+ - rivendell
236
+ extensions: []
237
+
238
+ extra_rdoc_files:
239
+ - LICENSE.txt
240
+ - README.rdoc
241
+ files:
242
+ - .document
243
+ - Gemfile
244
+ - LICENSE.txt
245
+ - README.rdoc
246
+ - Rakefile
247
+ - VERSION
248
+ - bin/rivendell
249
+ - lib/rivendell.rb
250
+ - lib/rivendell/cart.rb
251
+ - lib/rivendell/log.rb
252
+ - lib/rivendell/log_item.rb
253
+ - lib/rivendell/tools.rb
254
+ - rivendell.gemspec
255
+ - test/helper.rb
256
+ - test/test_rivendellrb.rb
257
+ has_rdoc: true
258
+ homepage: http://github.com/JamesHarrison/rivendell-rb
259
+ licenses:
260
+ - MIT
261
+ post_install_message:
262
+ rdoc_options: []
263
+
264
+ require_paths:
265
+ - lib
266
+ required_ruby_version: !ruby/object:Gem::Requirement
267
+ none: false
268
+ requirements:
269
+ - - ">="
270
+ - !ruby/object:Gem::Version
271
+ hash: -490846253
272
+ segments:
273
+ - 0
274
+ version: "0"
275
+ required_rubygems_version: !ruby/object:Gem::Requirement
276
+ none: false
277
+ requirements:
278
+ - - ">="
279
+ - !ruby/object:Gem::Version
280
+ segments:
281
+ - 0
282
+ version: "0"
283
+ requirements: []
284
+
285
+ rubyforge_project:
286
+ rubygems_version: 1.3.7
287
+ signing_key:
288
+ specification_version: 3
289
+ summary: Ruby and Datamapper interface to Rivendell's MySQL database, with utilities and tools
290
+ test_files:
291
+ - test/helper.rb
292
+ - test/test_rivendellrb.rb