sphinx_tv 0.9.1 → 0.9.2
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.
- data/README.rdoc +15 -10
- data/lib/modules/shepherd.rb +22 -3
- data/lib/sphinx_tv/cpan.rb +4 -4
- data/lib/sphinx_tv/download.rb +0 -2
- data/lib/sphinx_tv/version.rb +2 -2
- data/sphinx_tv.gemspec +1 -0
- metadata +17 -1
data/README.rdoc
CHANGED
@@ -12,43 +12,48 @@ for me at this point.)
|
|
12
12
|
The goal is to have a website up and running in the coming months that will help detail the setup of a very functional
|
13
13
|
home entertainment system using Mac Mini hardware.
|
14
14
|
|
15
|
-
== Gem Installation
|
15
|
+
== Gem Installation
|
16
16
|
|
17
17
|
Easy:
|
18
18
|
|
19
19
|
gem install sphinx_tv
|
20
20
|
|
21
|
-
== Using SphinxTV
|
21
|
+
== Using SphinxTV
|
22
22
|
|
23
|
-
===
|
23
|
+
=== Prerequisites
|
24
|
+
|
25
|
+
You must have the Xcode command line tools installed to use SphinxTV. Xcode is freely available on the Mac App Store.
|
26
|
+
The command line tools can be installed from the preferences in Xcode under the downloads tab.
|
27
|
+
|
28
|
+
=== Setup
|
24
29
|
|
25
30
|
sphinx_tv setup
|
26
31
|
|
27
32
|
Turn on the modules that you wish to install and configure.
|
28
33
|
|
29
|
-
=== Download
|
34
|
+
=== Download
|
30
35
|
|
31
36
|
sphinx_tv download
|
32
37
|
|
33
38
|
Option step but will just do all the necessary downloading for the modules that have been configured in the setup stage.
|
34
39
|
|
35
|
-
=== Installation
|
40
|
+
=== Installation
|
36
41
|
|
37
42
|
sphinx_tv install
|
38
43
|
|
39
44
|
This runs through the install of each module. If the download wasn't run seperately, then the downloads will be done
|
40
45
|
on-demand at ths start of the module install.
|
41
46
|
|
42
|
-
=== Configuration
|
47
|
+
=== Configuration
|
43
48
|
|
44
49
|
sphinx_tv configure
|
45
50
|
|
46
51
|
Post installation configuration.
|
47
52
|
|
48
|
-
== Modules
|
53
|
+
== Modules
|
49
54
|
|
50
|
-
=== MySQL
|
55
|
+
=== MySQL
|
51
56
|
|
52
|
-
=== MythTV
|
57
|
+
=== MythTV
|
53
58
|
|
54
|
-
=== Shepherd
|
59
|
+
=== Shepherd
|
data/lib/modules/shepherd.rb
CHANGED
@@ -23,6 +23,27 @@ class Shepherd < SphinxModule
|
|
23
23
|
result
|
24
24
|
end
|
25
25
|
|
26
|
+
def configure
|
27
|
+
shepherd = File.join(Etc.getpwuid.dir, ".shepherd", "shepherd")
|
28
|
+
shepherd_download = SphinxTv::download_path("shepherd")
|
29
|
+
exit = false
|
30
|
+
until exit do
|
31
|
+
choose do |menu|
|
32
|
+
menu.header = "\nShepherd Configuration".cyan
|
33
|
+
menu.prompt = "Select an option: "
|
34
|
+
if File.exists? shepherd
|
35
|
+
menu.choice("Setup database") { system("perl #{shepherd} --configure") }
|
36
|
+
elsif File.exists? shepherd_download
|
37
|
+
puts "Running shepherd for the first time...".cyan
|
38
|
+
system("perl #{shepherd_download} --configure")
|
39
|
+
end
|
40
|
+
menu.choice("Done") {
|
41
|
+
exit = true
|
42
|
+
}
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
26
47
|
def download
|
27
48
|
doc = Nokogiri::HTML(open('http://sourceforge.net/projects/xmltv/files/xmltv/0.5.63/'))
|
28
49
|
|
@@ -55,8 +76,6 @@ class Shepherd < SphinxModule
|
|
55
76
|
home_dir = Etc.getpwuid.dir
|
56
77
|
%x[sudo #{SphinxTv::SUDO_PROMPT} ln -s #{home_dir}/.shepherd/references/Shepherd /Library/Perl/5.12]
|
57
78
|
end
|
58
|
-
puts "Installing Shepherd".cyan
|
59
|
-
system("perl #{SphinxTv::download_path("shepherd")} --configure")
|
60
79
|
end
|
61
80
|
end
|
62
81
|
|
@@ -84,7 +103,7 @@ class Shepherd < SphinxModule
|
|
84
103
|
%x[tar -jxf #{SphinxTv::download_path("xmltv.tar.bz2")} -C #{SphinxTv::cache_path}]
|
85
104
|
puts "Compiling XMLTV...".cyan
|
86
105
|
commands = Array.new.tap do |c|
|
87
|
-
c << "cd #{
|
106
|
+
c << "cd #{SphinxTv::cache_path}/xmltv*"
|
88
107
|
c << "perl Makefile.PL"
|
89
108
|
c << "make"
|
90
109
|
c << "make test"
|
data/lib/sphinx_tv/cpan.rb
CHANGED
@@ -9,17 +9,17 @@ class Cpan
|
|
9
9
|
puts "Module '#{m}' is installed".green
|
10
10
|
else
|
11
11
|
puts "Installing perl module: #{m}".cyan
|
12
|
-
system("sudo #{
|
12
|
+
system("sudo #{SphinxTv::SUDO_PROMPT} cpan -j #{SphinxTv::cache_path("MyConfig.pm")} -f -i #{m}")
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
17
|
def self.create_config_file
|
18
|
-
unless File.exists?
|
18
|
+
unless File.exists? SphinxTv::cache_path("MyConfig.pm")
|
19
19
|
puts "Creating cpan config...".cyan
|
20
20
|
|
21
|
-
@cache_dir =
|
22
|
-
|
21
|
+
@cache_dir = SphinxTv::cache_path
|
22
|
+
SphinxTv::copy_template(SphinxTv::resources_path("MyConfig.pm.erb"), SphinxTv::cache_path("MyConfig.pm"), binding)
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
data/lib/sphinx_tv/download.rb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
module Download
|
2
2
|
def self.url file_url, filename
|
3
|
-
Dir::mkdir("cache") unless FileTest::directory?("cache")
|
4
|
-
|
5
3
|
z_option = (File.exists?(filename) ? " -z #{filename}" : "")
|
6
4
|
result = %x[curl -L -w "%{http_code} %{url_effective}"#{z_option} -o #{filename}.download #{file_url}]
|
7
5
|
if /304/.match(result)
|
data/lib/sphinx_tv/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
VERSION = "0.9.
|
1
|
+
class SphinxTv
|
2
|
+
VERSION = "0.9.2"
|
3
3
|
end
|
data/sphinx_tv.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sphinx_tv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -59,6 +59,22 @@ dependencies:
|
|
59
59
|
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: version
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
62
78
|
description: SphinxTV is an installer/configurator for MythTV (and others) for OSX
|
63
79
|
email:
|
64
80
|
- david.monagle@intrica.com.au
|