icecast 0.0.1
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/.gitignore +18 -0
- data/Gemfile +9 -0
- data/Guardfile +9 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +3 -0
- data/icecast.gemspec +35 -0
- data/lib/icecast.rb +14 -0
- data/lib/icecast/server.rb +99 -0
- data/lib/icecast/version.rb +3 -0
- data/spec/fixtures/icecast_admin_stats.xml +100 -0
- data/spec/icecast/server_spec.rb +32 -0
- data/spec/spec_helper.rb +18 -0
- data/spec/support/fakeweb.rb +2 -0
- data/tasks/rdoc.rake +16 -0
- data/tasks/rspec.rake +2 -0
- metadata +250 -0
    
        data/.gitignore
    ADDED
    
    
    
        data/Gemfile
    ADDED
    
    
    
        data/Guardfile
    ADDED
    
    
    
        data/LICENSE.txt
    ADDED
    
    | @@ -0,0 +1,22 @@ | |
| 1 | 
            +
            Copyright (c) 2013 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 | 
            +
            # Icecast
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            TODO: Write a gem description
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            ## Installation
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            Add this line to your application's Gemfile:
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                gem 'icecast'
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            And then execute:
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                $ bundle
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            Or install it yourself as:
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                $ gem install icecast
         | 
| 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 'Add some feature'`)
         | 
| 28 | 
            +
            4. Push to the branch (`git push origin my-new-feature`)
         | 
| 29 | 
            +
            5. Create new Pull Request
         | 
    
        data/Rakefile
    ADDED
    
    
    
        data/icecast.gemspec
    ADDED
    
    | @@ -0,0 +1,35 @@ | |
| 1 | 
            +
            # coding: utf-8
         | 
| 2 | 
            +
            lib = File.expand_path('../lib', __FILE__)
         | 
| 3 | 
            +
            $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
         | 
| 4 | 
            +
            require 'icecast/version'
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            Gem::Specification.new do |spec|
         | 
| 7 | 
            +
              spec.name          = "icecast"
         | 
| 8 | 
            +
              spec.version       = Icecast::VERSION
         | 
| 9 | 
            +
              spec.authors       = ["Alban Peignier", "Florent Peyraud"]
         | 
| 10 | 
            +
              spec.email         = ["alban@tryphon.eu", "florent@tryphon.eu"]
         | 
| 11 | 
            +
              spec.description   = %q{A ruby interface to Icecast API}
         | 
| 12 | 
            +
              spec.summary       = %q{Connect to icecast admin interface to manage resources}
         | 
| 13 | 
            +
              spec.homepage      = "http://projects.tryphon.eu/projects/ruby-icecast"
         | 
| 14 | 
            +
              spec.license       = "MIT"
         | 
| 15 | 
            +
             | 
| 16 | 
            +
              spec.files         = `git ls-files`.split($/)
         | 
| 17 | 
            +
              spec.executables   = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
         | 
| 18 | 
            +
              spec.test_files    = spec.files.grep(%r{^(test|spec|features)/})
         | 
| 19 | 
            +
              spec.require_paths = ["lib"]
         | 
| 20 | 
            +
             | 
| 21 | 
            +
              spec.add_runtime_dependency "httparty"
         | 
| 22 | 
            +
              spec.add_runtime_dependency 'activesupport'
         | 
| 23 | 
            +
              spec.add_runtime_dependency 'null_logger'
         | 
| 24 | 
            +
             | 
| 25 | 
            +
              spec.add_development_dependency "bundler", "~> 1.3"
         | 
| 26 | 
            +
             | 
| 27 | 
            +
              spec.add_development_dependency 'rake'
         | 
| 28 | 
            +
              spec.add_development_dependency "simplecov"
         | 
| 29 | 
            +
              spec.add_development_dependency "rspec"
         | 
| 30 | 
            +
              spec.add_development_dependency "guard"
         | 
| 31 | 
            +
              spec.add_development_dependency "guard-rspec"
         | 
| 32 | 
            +
              spec.add_development_dependency "rdoc"
         | 
| 33 | 
            +
              spec.add_development_dependency "fakeweb"
         | 
| 34 | 
            +
             | 
| 35 | 
            +
            end
         | 
    
        data/lib/icecast.rb
    ADDED
    
    | @@ -0,0 +1,14 @@ | |
| 1 | 
            +
            require "icecast/version"
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            require "null_logger"
         | 
| 4 | 
            +
            require "active_support/core_ext/module/attribute_accessors"
         | 
| 5 | 
            +
            require "active_support/core_ext/class/attribute_accessors"
         | 
| 6 | 
            +
            require "active_support/core_ext/object/blank"
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            module Icecast
         | 
| 9 | 
            +
              @@logger = NullLogger.instance
         | 
| 10 | 
            +
              mattr_accessor :logger
         | 
| 11 | 
            +
            end
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            require 'icecast/server'
         | 
| 14 | 
            +
             | 
| @@ -0,0 +1,99 @@ | |
| 1 | 
            +
            require 'httparty'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            module Icecast
         | 
| 4 | 
            +
              class Server
         | 
| 5 | 
            +
                include HTTParty
         | 
| 6 | 
            +
                format :xml
         | 
| 7 | 
            +
                
         | 
| 8 | 
            +
                attr_accessor :host, :port, :admin_password
         | 
| 9 | 
            +
             | 
| 10 | 
            +
                def initialize(attributes = {})
         | 
| 11 | 
            +
                  attributes.each do |k,v|
         | 
| 12 | 
            +
                    send "#{k}=", v
         | 
| 13 | 
            +
                  end
         | 
| 14 | 
            +
                end
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                def url_for(path)
         | 
| 17 | 
            +
                  "http://#{host}:8000/#{path}"
         | 
| 18 | 
            +
                end
         | 
| 19 | 
            +
             | 
| 20 | 
            +
                def authentification
         | 
| 21 | 
            +
                  { :username => 'admin', :password => admin_password }
         | 
| 22 | 
            +
                end
         | 
| 23 | 
            +
             | 
| 24 | 
            +
                class NullCache
         | 
| 25 | 
            +
             | 
| 26 | 
            +
                  def fetch(*arguments, &block)
         | 
| 27 | 
            +
                    yield
         | 
| 28 | 
            +
                  end
         | 
| 29 | 
            +
             | 
| 30 | 
            +
                end
         | 
| 31 | 
            +
             | 
| 32 | 
            +
                def self.default_cache
         | 
| 33 | 
            +
                  defined?(Rails) ? Rails.cache : NullCache.new
         | 
| 34 | 
            +
                end
         | 
| 35 | 
            +
             | 
| 36 | 
            +
                @@cache = default_cache
         | 
| 37 | 
            +
                cattr_accessor :cache
         | 
| 38 | 
            +
             | 
| 39 | 
            +
                def xml_status
         | 
| 40 | 
            +
                  cache.fetch("Icecast::Status::#{host}_#{port}", :expires_in => 60, :race_condition_ttl => 5) do
         | 
| 41 | 
            +
                    Icecast.logger.info "Retrieve Icecast status from #{host}"
         | 
| 42 | 
            +
                    self.class.get url_for("admin/stats"), :basic_auth => authentification
         | 
| 43 | 
            +
                  end
         | 
| 44 | 
            +
                end
         | 
| 45 | 
            +
             | 
| 46 | 
            +
                def status
         | 
| 47 | 
            +
                  Status.new xml_status
         | 
| 48 | 
            +
                end
         | 
| 49 | 
            +
             | 
| 50 | 
            +
                class Status
         | 
| 51 | 
            +
             | 
| 52 | 
            +
                  attr_accessor :parsed_status, :created_at
         | 
| 53 | 
            +
             | 
| 54 | 
            +
                  def initialize(parsed_status)
         | 
| 55 | 
            +
                    @created_at = Time.now
         | 
| 56 | 
            +
                    @parsed_status = parsed_status
         | 
| 57 | 
            +
                    @stream_statuses = {}
         | 
| 58 | 
            +
                  end
         | 
| 59 | 
            +
             | 
| 60 | 
            +
                  def parsed_source_statuses
         | 
| 61 | 
            +
                    sources = parsed_status["icestats"]["source"]
         | 
| 62 | 
            +
                    Hash === sources ? [sources] : Array(sources)
         | 
| 63 | 
            +
                  end
         | 
| 64 | 
            +
             | 
| 65 | 
            +
                  def stream(mount_point)
         | 
| 66 | 
            +
                    mount_point = "/#{mount_point}" unless mount_point.start_with?("/")
         | 
| 67 | 
            +
                    @stream_statuses[mount_point] ||= 
         | 
| 68 | 
            +
                      begin
         | 
| 69 | 
            +
                        parsed_source_status = parsed_source_statuses.find { |s| s["mount"] == mount_point }
         | 
| 70 | 
            +
                        StreamStatus.new(parsed_source_status)
         | 
| 71 | 
            +
                      end
         | 
| 72 | 
            +
                  end
         | 
| 73 | 
            +
             | 
| 74 | 
            +
                  def location
         | 
| 75 | 
            +
                    parsed_status["icestats"]["location"]
         | 
| 76 | 
            +
                  end
         | 
| 77 | 
            +
             | 
| 78 | 
            +
                end
         | 
| 79 | 
            +
             | 
| 80 | 
            +
                class StreamStatus
         | 
| 81 | 
            +
             | 
| 82 | 
            +
                  attr_accessor :parsed_status
         | 
| 83 | 
            +
             | 
| 84 | 
            +
                  def initialize(parsed_status)
         | 
| 85 | 
            +
                    @parsed_status = parsed_status
         | 
| 86 | 
            +
                  end
         | 
| 87 | 
            +
             | 
| 88 | 
            +
                  def started?
         | 
| 89 | 
            +
                    parsed_status.present?
         | 
| 90 | 
            +
                  end
         | 
| 91 | 
            +
             | 
| 92 | 
            +
                  def listeners
         | 
| 93 | 
            +
                    started? ? parsed_status["listeners"].to_i : 0
         | 
| 94 | 
            +
                  end
         | 
| 95 | 
            +
                  
         | 
| 96 | 
            +
                end
         | 
| 97 | 
            +
             | 
| 98 | 
            +
              end
         | 
| 99 | 
            +
            end
         | 
| @@ -0,0 +1,100 @@ | |
| 1 | 
            +
            <?xml version="1.0"?>
         | 
| 2 | 
            +
            <icestats>
         | 
| 3 | 
            +
              <admin>icemaster@localhost</admin>
         | 
| 4 | 
            +
              <client_connections>9484848</client_connections>
         | 
| 5 | 
            +
              <clients>9</clients>
         | 
| 6 | 
            +
              <connections>9512560</connections>
         | 
| 7 | 
            +
              <file_connections>356</file_connections>
         | 
| 8 | 
            +
              <host>stream.tryphon.eu</host>
         | 
| 9 | 
            +
              <listener_connections>60236</listener_connections>
         | 
| 10 | 
            +
              <listeners>5</listeners>
         | 
| 11 | 
            +
              <location>RSpec</location>
         | 
| 12 | 
            +
              <server_id>Icecast 2.3.2</server_id>
         | 
| 13 | 
            +
              <server_start>Tue, 14 Feb 2012 17:45:48 +0100</server_start>
         | 
| 14 | 
            +
              <source_client_connections>4356</source_client_connections>
         | 
| 15 | 
            +
              <source_relay_connections>0</source_relay_connections>
         | 
| 16 | 
            +
              <source_total_connections>4356</source_total_connections>
         | 
| 17 | 
            +
              <sources>3</sources>
         | 
| 18 | 
            +
              <stats>0</stats>
         | 
| 19 | 
            +
              <stats_connections>0</stats_connections>
         | 
| 20 | 
            +
              <source mount="/48FM.mp3">
         | 
| 21 | 
            +
                <audio_info>
         | 
| 22 | 
            +
                ice-samplerate=44100;ice-bitrate=192;ice-channels=2</audio_info>
         | 
| 23 | 
            +
                <bitrate>192</bitrate>
         | 
| 24 | 
            +
                <genre>Rock</genre>
         | 
| 25 | 
            +
                <ice-bitrate>192</ice-bitrate>
         | 
| 26 | 
            +
                <ice-channels>2</ice-channels>
         | 
| 27 | 
            +
                <ice-samplerate>44100</ice-samplerate>
         | 
| 28 | 
            +
                <listener_peak>9</listener_peak>
         | 
| 29 | 
            +
                <listeners>4</listeners>
         | 
| 30 | 
            +
                <listenurl>http://stream.tryphon.eu:8000/48FM.mp3</listenurl>
         | 
| 31 | 
            +
                <max_listeners>40</max_listeners>
         | 
| 32 | 
            +
                <public>1</public>
         | 
| 33 | 
            +
                <server_description>48FM Liege</server_description>
         | 
| 34 | 
            +
                <server_name>48fm</server_name>
         | 
| 35 | 
            +
                <server_type>audio/mpeg</server_type>
         | 
| 36 | 
            +
                <server_url>http://www.48fm.com/</server_url>
         | 
| 37 | 
            +
                <slow_listeners>19</slow_listeners>
         | 
| 38 | 
            +
                <source_ip>139.165.3.181</source_ip>
         | 
| 39 | 
            +
                <stream_start>Sun, 22 Apr 2012 02:04:32 +0200</stream_start>
         | 
| 40 | 
            +
                <title>48FM - Fair Play</title>
         | 
| 41 | 
            +
                <total_bytes_read>840749000</total_bytes_read>
         | 
| 42 | 
            +
                <total_bytes_sent>2866499355</total_bytes_sent>
         | 
| 43 | 
            +
                <yp_currently_playing>48FM - Fair Play</yp_currently_playing>
         | 
| 44 | 
            +
              </source>
         | 
| 45 | 
            +
              <source mount="/live.mp3">
         | 
| 46 | 
            +
                <audio_info>
         | 
| 47 | 
            +
                ice-samplerate=44100;ice-bitrate=160;ice-channels=2</audio_info>
         | 
| 48 | 
            +
                <bitrate>160</bitrate>
         | 
| 49 | 
            +
                <genre>Rock</genre>
         | 
| 50 | 
            +
                <ice-bitrate>160</ice-bitrate>
         | 
| 51 | 
            +
                <ice-channels>2</ice-channels>
         | 
| 52 | 
            +
                <ice-samplerate>44100</ice-samplerate>
         | 
| 53 | 
            +
                <listener_peak>0</listener_peak>
         | 
| 54 | 
            +
                <listeners>7</listeners>
         | 
| 55 | 
            +
                <listenurl>http://stream.tryphon.eu:8000/live.mp3</listenurl>
         | 
| 56 | 
            +
                <max_listeners>unlimited</max_listeners>
         | 
| 57 | 
            +
                <public>1</public>
         | 
| 58 | 
            +
                <server_description>This is my server
         | 
| 59 | 
            +
                description</server_description>
         | 
| 60 | 
            +
                <server_name>This is my server name</server_name>
         | 
| 61 | 
            +
                <server_type>audio/mpeg</server_type>
         | 
| 62 | 
            +
                <server_url>http://www.oddsock.org</server_url>
         | 
| 63 | 
            +
                <slow_listeners>0</slow_listeners>
         | 
| 64 | 
            +
                <source_ip>88.190.240.65</source_ip>
         | 
| 65 | 
            +
                <stream_start>Sun, 22 Apr 2012 11:48:11 +0200</stream_start>
         | 
| 66 | 
            +
                <total_bytes_read>204848</total_bytes_read>
         | 
| 67 | 
            +
                <total_bytes_sent>0</total_bytes_sent>
         | 
| 68 | 
            +
              </source>
         | 
| 69 | 
            +
              <source mount="/live.ogg">
         | 
| 70 | 
            +
                <audio_bitrate>88000</audio_bitrate>
         | 
| 71 | 
            +
                <audio_channels>2</audio_channels>
         | 
| 72 | 
            +
                <audio_info>
         | 
| 73 | 
            +
                bitrate=88;channels=2;samplerate=44100;quality=1%2e5</audio_info>
         | 
| 74 | 
            +
                <audio_samplerate>44100</audio_samplerate>
         | 
| 75 | 
            +
                <bitrate>88</bitrate>
         | 
| 76 | 
            +
                <channels>2</channels>
         | 
| 77 | 
            +
                <genre>RockNRoll</genre>
         | 
| 78 | 
            +
                <ice-bitrate>88</ice-bitrate>
         | 
| 79 | 
            +
                <listener_peak>1</listener_peak>
         | 
| 80 | 
            +
                <listeners>14</listeners>
         | 
| 81 | 
            +
                <listenurl>http://stream.tryphon.eu:8000/live.ogg</listenurl>
         | 
| 82 | 
            +
                <max_listeners>unlimited</max_listeners>
         | 
| 83 | 
            +
                <public>0</public>
         | 
| 84 | 
            +
                <quality>1.5</quality>
         | 
| 85 | 
            +
                <samplerate>44100</samplerate>
         | 
| 86 | 
            +
                <server_description>This is a stream
         | 
| 87 | 
            +
                description</server_description>
         | 
| 88 | 
            +
                <server_name>My Stream</server_name>
         | 
| 89 | 
            +
                <server_type>application/ogg</server_type>
         | 
| 90 | 
            +
                <server_url>http://www.oddsock.org</server_url>
         | 
| 91 | 
            +
                <slow_listeners>0</slow_listeners>
         | 
| 92 | 
            +
                <source_ip>172.20.4.6</source_ip>
         | 
| 93 | 
            +
                <stream_start>Sun, 22 Apr 2012 11:47:50 +0200</stream_start>
         | 
| 94 | 
            +
                <subtype>Vorbis</subtype>
         | 
| 95 | 
            +
                <title>Pel de Noz - O Pindo</title>
         | 
| 96 | 
            +
                <total_bytes_read>319501</total_bytes_read>
         | 
| 97 | 
            +
                <total_bytes_sent>302645</total_bytes_sent>
         | 
| 98 | 
            +
                <user_agent>libshout/2.2.2</user_agent>
         | 
| 99 | 
            +
              </source>
         | 
| 100 | 
            +
            </icestats>
         | 
| @@ -0,0 +1,32 @@ | |
| 1 | 
            +
            require 'spec_helper'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe Icecast::Server do
         | 
| 4 | 
            +
              
         | 
| 5 | 
            +
              before(:each) do
         | 
| 6 | 
            +
                FakeWeb.allow_net_connect = false
         | 
| 7 | 
            +
              end
         | 
| 8 | 
            +
             | 
| 9 | 
            +
              let(:host) { "stream.tryphon.priv" }
         | 
| 10 | 
            +
              subject { Icecast::Server.new :host => host, :admin_password => "dummy" }
         | 
| 11 | 
            +
             | 
| 12 | 
            +
              describe "status" do
         | 
| 13 | 
            +
             | 
| 14 | 
            +
                let(:stats_body) { IO.read "spec/fixtures/icecast_admin_stats.xml" }
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                before(:each) do
         | 
| 17 | 
            +
                  FakeWeb.register_uri :get, "http://admin:dummy@#{host}:8000/admin/stats", :body => stats_body
         | 
| 18 | 
            +
                end
         | 
| 19 | 
            +
                
         | 
| 20 | 
            +
                it "should use xml information retrieved in admin/stats" do
         | 
| 21 | 
            +
                  subject.status.location.should == "RSpec"
         | 
| 22 | 
            +
                end
         | 
| 23 | 
            +
             | 
| 24 | 
            +
                it "should find stream statuses for each mount point" do
         | 
| 25 | 
            +
                  subject.status.stream("48FM.mp3").listeners.should == 4
         | 
| 26 | 
            +
                  subject.status.stream("live.mp3").listeners.should == 7
         | 
| 27 | 
            +
                  subject.status.stream("live.ogg").listeners.should == 14
         | 
| 28 | 
            +
                end
         | 
| 29 | 
            +
             | 
| 30 | 
            +
              end
         | 
| 31 | 
            +
             | 
| 32 | 
            +
            end
         | 
    
        data/spec/spec_helper.rb
    ADDED
    
    | @@ -0,0 +1,18 @@ | |
| 1 | 
            +
            require 'rubygems'
         | 
| 2 | 
            +
             | 
| 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 | 
            +
             | 
| 11 | 
            +
            require 'simplecov'
         | 
| 12 | 
            +
            SimpleCov.start do
         | 
| 13 | 
            +
              add_filter "/spec/"
         | 
| 14 | 
            +
            end
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            require 'icecast'
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}
         | 
    
        data/tasks/rdoc.rake
    ADDED
    
    | @@ -0,0 +1,16 @@ | |
| 1 | 
            +
            begin
         | 
| 2 | 
            +
              require 'rdoc/task'
         | 
| 3 | 
            +
            rescue LoadError
         | 
| 4 | 
            +
              require 'rdoc/rdoc'
         | 
| 5 | 
            +
              require 'rake/rdoctask'
         | 
| 6 | 
            +
              RDoc::Task = Rake::RDocTask
         | 
| 7 | 
            +
            end
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            Rake::RDocTask.new do |rdoc|
         | 
| 10 | 
            +
              version = File.exist?('VERSION') ? File.read('VERSION') : ""
         | 
| 11 | 
            +
             | 
| 12 | 
            +
              rdoc.rdoc_dir = 'rdoc'
         | 
| 13 | 
            +
              rdoc.title = "rivendellrb #{version}"
         | 
| 14 | 
            +
              rdoc.rdoc_files.include('README*')
         | 
| 15 | 
            +
              rdoc.rdoc_files.include('lib/**/*.rb')
         | 
| 16 | 
            +
            end
         | 
    
        data/tasks/rspec.rake
    ADDED
    
    
    
        metadata
    ADDED
    
    | @@ -0,0 +1,250 @@ | |
| 1 | 
            +
            --- !ruby/object:Gem::Specification
         | 
| 2 | 
            +
            name: icecast
         | 
| 3 | 
            +
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            +
              version: 0.0.1
         | 
| 5 | 
            +
              prerelease: 
         | 
| 6 | 
            +
            platform: ruby
         | 
| 7 | 
            +
            authors:
         | 
| 8 | 
            +
            - Alban Peignier
         | 
| 9 | 
            +
            - Florent Peyraud
         | 
| 10 | 
            +
            autorequire: 
         | 
| 11 | 
            +
            bindir: bin
         | 
| 12 | 
            +
            cert_chain: []
         | 
| 13 | 
            +
            date: 2013-04-13 00:00:00.000000000 Z
         | 
| 14 | 
            +
            dependencies:
         | 
| 15 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 16 | 
            +
              name: httparty
         | 
| 17 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 18 | 
            +
                none: false
         | 
| 19 | 
            +
                requirements:
         | 
| 20 | 
            +
                - - ! '>='
         | 
| 21 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 22 | 
            +
                    version: '0'
         | 
| 23 | 
            +
              type: :runtime
         | 
| 24 | 
            +
              prerelease: false
         | 
| 25 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 26 | 
            +
                none: false
         | 
| 27 | 
            +
                requirements:
         | 
| 28 | 
            +
                - - ! '>='
         | 
| 29 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 30 | 
            +
                    version: '0'
         | 
| 31 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 32 | 
            +
              name: activesupport
         | 
| 33 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 34 | 
            +
                none: false
         | 
| 35 | 
            +
                requirements:
         | 
| 36 | 
            +
                - - ! '>='
         | 
| 37 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 38 | 
            +
                    version: '0'
         | 
| 39 | 
            +
              type: :runtime
         | 
| 40 | 
            +
              prerelease: false
         | 
| 41 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 42 | 
            +
                none: false
         | 
| 43 | 
            +
                requirements:
         | 
| 44 | 
            +
                - - ! '>='
         | 
| 45 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 46 | 
            +
                    version: '0'
         | 
| 47 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 48 | 
            +
              name: null_logger
         | 
| 49 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 50 | 
            +
                none: false
         | 
| 51 | 
            +
                requirements:
         | 
| 52 | 
            +
                - - ! '>='
         | 
| 53 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 54 | 
            +
                    version: '0'
         | 
| 55 | 
            +
              type: :runtime
         | 
| 56 | 
            +
              prerelease: false
         | 
| 57 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 58 | 
            +
                none: false
         | 
| 59 | 
            +
                requirements:
         | 
| 60 | 
            +
                - - ! '>='
         | 
| 61 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 62 | 
            +
                    version: '0'
         | 
| 63 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 64 | 
            +
              name: bundler
         | 
| 65 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 66 | 
            +
                none: false
         | 
| 67 | 
            +
                requirements:
         | 
| 68 | 
            +
                - - ~>
         | 
| 69 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 70 | 
            +
                    version: '1.3'
         | 
| 71 | 
            +
              type: :development
         | 
| 72 | 
            +
              prerelease: false
         | 
| 73 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 74 | 
            +
                none: false
         | 
| 75 | 
            +
                requirements:
         | 
| 76 | 
            +
                - - ~>
         | 
| 77 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 78 | 
            +
                    version: '1.3'
         | 
| 79 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 80 | 
            +
              name: rake
         | 
| 81 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 82 | 
            +
                none: false
         | 
| 83 | 
            +
                requirements:
         | 
| 84 | 
            +
                - - ! '>='
         | 
| 85 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 86 | 
            +
                    version: '0'
         | 
| 87 | 
            +
              type: :development
         | 
| 88 | 
            +
              prerelease: false
         | 
| 89 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 90 | 
            +
                none: false
         | 
| 91 | 
            +
                requirements:
         | 
| 92 | 
            +
                - - ! '>='
         | 
| 93 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 94 | 
            +
                    version: '0'
         | 
| 95 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 96 | 
            +
              name: simplecov
         | 
| 97 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 98 | 
            +
                none: false
         | 
| 99 | 
            +
                requirements:
         | 
| 100 | 
            +
                - - ! '>='
         | 
| 101 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 102 | 
            +
                    version: '0'
         | 
| 103 | 
            +
              type: :development
         | 
| 104 | 
            +
              prerelease: false
         | 
| 105 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 106 | 
            +
                none: false
         | 
| 107 | 
            +
                requirements:
         | 
| 108 | 
            +
                - - ! '>='
         | 
| 109 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 110 | 
            +
                    version: '0'
         | 
| 111 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 112 | 
            +
              name: rspec
         | 
| 113 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 114 | 
            +
                none: false
         | 
| 115 | 
            +
                requirements:
         | 
| 116 | 
            +
                - - ! '>='
         | 
| 117 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 118 | 
            +
                    version: '0'
         | 
| 119 | 
            +
              type: :development
         | 
| 120 | 
            +
              prerelease: false
         | 
| 121 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 122 | 
            +
                none: false
         | 
| 123 | 
            +
                requirements:
         | 
| 124 | 
            +
                - - ! '>='
         | 
| 125 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 126 | 
            +
                    version: '0'
         | 
| 127 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 128 | 
            +
              name: guard
         | 
| 129 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 130 | 
            +
                none: false
         | 
| 131 | 
            +
                requirements:
         | 
| 132 | 
            +
                - - ! '>='
         | 
| 133 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 134 | 
            +
                    version: '0'
         | 
| 135 | 
            +
              type: :development
         | 
| 136 | 
            +
              prerelease: false
         | 
| 137 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 138 | 
            +
                none: false
         | 
| 139 | 
            +
                requirements:
         | 
| 140 | 
            +
                - - ! '>='
         | 
| 141 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 142 | 
            +
                    version: '0'
         | 
| 143 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 144 | 
            +
              name: guard-rspec
         | 
| 145 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 146 | 
            +
                none: false
         | 
| 147 | 
            +
                requirements:
         | 
| 148 | 
            +
                - - ! '>='
         | 
| 149 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 150 | 
            +
                    version: '0'
         | 
| 151 | 
            +
              type: :development
         | 
| 152 | 
            +
              prerelease: false
         | 
| 153 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 154 | 
            +
                none: false
         | 
| 155 | 
            +
                requirements:
         | 
| 156 | 
            +
                - - ! '>='
         | 
| 157 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 158 | 
            +
                    version: '0'
         | 
| 159 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 160 | 
            +
              name: rdoc
         | 
| 161 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 162 | 
            +
                none: false
         | 
| 163 | 
            +
                requirements:
         | 
| 164 | 
            +
                - - ! '>='
         | 
| 165 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 166 | 
            +
                    version: '0'
         | 
| 167 | 
            +
              type: :development
         | 
| 168 | 
            +
              prerelease: false
         | 
| 169 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 170 | 
            +
                none: false
         | 
| 171 | 
            +
                requirements:
         | 
| 172 | 
            +
                - - ! '>='
         | 
| 173 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 174 | 
            +
                    version: '0'
         | 
| 175 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 176 | 
            +
              name: fakeweb
         | 
| 177 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 178 | 
            +
                none: false
         | 
| 179 | 
            +
                requirements:
         | 
| 180 | 
            +
                - - ! '>='
         | 
| 181 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 182 | 
            +
                    version: '0'
         | 
| 183 | 
            +
              type: :development
         | 
| 184 | 
            +
              prerelease: false
         | 
| 185 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 186 | 
            +
                none: false
         | 
| 187 | 
            +
                requirements:
         | 
| 188 | 
            +
                - - ! '>='
         | 
| 189 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 190 | 
            +
                    version: '0'
         | 
| 191 | 
            +
            description: A ruby interface to Icecast API
         | 
| 192 | 
            +
            email:
         | 
| 193 | 
            +
            - alban@tryphon.eu
         | 
| 194 | 
            +
            - florent@tryphon.eu
         | 
| 195 | 
            +
            executables: []
         | 
| 196 | 
            +
            extensions: []
         | 
| 197 | 
            +
            extra_rdoc_files: []
         | 
| 198 | 
            +
            files:
         | 
| 199 | 
            +
            - .gitignore
         | 
| 200 | 
            +
            - Gemfile
         | 
| 201 | 
            +
            - Guardfile
         | 
| 202 | 
            +
            - LICENSE.txt
         | 
| 203 | 
            +
            - README.md
         | 
| 204 | 
            +
            - Rakefile
         | 
| 205 | 
            +
            - icecast.gemspec
         | 
| 206 | 
            +
            - lib/icecast.rb
         | 
| 207 | 
            +
            - lib/icecast/server.rb
         | 
| 208 | 
            +
            - lib/icecast/version.rb
         | 
| 209 | 
            +
            - spec/fixtures/icecast_admin_stats.xml
         | 
| 210 | 
            +
            - spec/icecast/server_spec.rb
         | 
| 211 | 
            +
            - spec/spec_helper.rb
         | 
| 212 | 
            +
            - spec/support/fakeweb.rb
         | 
| 213 | 
            +
            - tasks/rdoc.rake
         | 
| 214 | 
            +
            - tasks/rspec.rake
         | 
| 215 | 
            +
            homepage: http://projects.tryphon.eu/projects/ruby-icecast
         | 
| 216 | 
            +
            licenses:
         | 
| 217 | 
            +
            - MIT
         | 
| 218 | 
            +
            post_install_message: 
         | 
| 219 | 
            +
            rdoc_options: []
         | 
| 220 | 
            +
            require_paths:
         | 
| 221 | 
            +
            - lib
         | 
| 222 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 223 | 
            +
              none: false
         | 
| 224 | 
            +
              requirements:
         | 
| 225 | 
            +
              - - ! '>='
         | 
| 226 | 
            +
                - !ruby/object:Gem::Version
         | 
| 227 | 
            +
                  version: '0'
         | 
| 228 | 
            +
                  segments:
         | 
| 229 | 
            +
                  - 0
         | 
| 230 | 
            +
                  hash: 3889302906906724986
         | 
| 231 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 232 | 
            +
              none: false
         | 
| 233 | 
            +
              requirements:
         | 
| 234 | 
            +
              - - ! '>='
         | 
| 235 | 
            +
                - !ruby/object:Gem::Version
         | 
| 236 | 
            +
                  version: '0'
         | 
| 237 | 
            +
                  segments:
         | 
| 238 | 
            +
                  - 0
         | 
| 239 | 
            +
                  hash: 3889302906906724986
         | 
| 240 | 
            +
            requirements: []
         | 
| 241 | 
            +
            rubyforge_project: 
         | 
| 242 | 
            +
            rubygems_version: 1.8.23
         | 
| 243 | 
            +
            signing_key: 
         | 
| 244 | 
            +
            specification_version: 3
         | 
| 245 | 
            +
            summary: Connect to icecast admin interface to manage resources
         | 
| 246 | 
            +
            test_files:
         | 
| 247 | 
            +
            - spec/fixtures/icecast_admin_stats.xml
         | 
| 248 | 
            +
            - spec/icecast/server_spec.rb
         | 
| 249 | 
            +
            - spec/spec_helper.rb
         | 
| 250 | 
            +
            - spec/support/fakeweb.rb
         |