ruby-ampache 0.0.3 → 0.0.4
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/Rakefile +10 -20
- data/VERSION +1 -1
- data/bin/ruby-ampache +5 -4
- data/lib/lib-ampache.rb +0 -19
- metadata +8 -10
- data/.document +0 -5
- data/.gitignore +0 -21
    
        data/Rakefile
    CHANGED
    
    | @@ -5,17 +5,20 @@ begin | |
| 5 5 | 
             
              require 'jeweler'
         | 
| 6 6 | 
             
              Jeweler::Tasks.new do |gem|
         | 
| 7 7 | 
             
                gem.name = "ruby-ampache"
         | 
| 8 | 
            -
                gem.summary = %Q{ | 
| 9 | 
            -
                gem.description = %Q{ | 
| 8 | 
            +
                gem.summary = %Q{Ruby ampache command line client}
         | 
| 9 | 
            +
                gem.description = %Q{ruby ampache command line client}
         | 
| 10 10 | 
             
                gem.email = "thamayor@gmail.com"
         | 
| 11 11 | 
             
                gem.homepage = "http://github.com/ghedamat/ruby-ampache"
         | 
| 12 | 
            -
                gem.authors = [" | 
| 13 | 
            -
                gem. | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 12 | 
            +
                gem.authors = ["ghedmat"]
         | 
| 13 | 
            +
                #gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
         | 
| 14 | 
            +
            	gem.files =  FileList["[A-Z]*", "{bin,generators,lib,test}/**/*", ]
         | 
| 15 | 
            +
            	gem.add_dependency 'nokogiri'
         | 
| 16 | 
            +
            	gem.add_dependency 'highline'
         | 
| 17 | 
            +
            	gem.add_dependency 'parseconfig'
         | 
| 18 | 
            +
            	gem.add_dependency 'open4'
         | 
| 17 19 | 
             
                # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
         | 
| 18 20 | 
             
              end
         | 
| 21 | 
            +
             | 
| 19 22 | 
             
              Jeweler::GemcutterTasks.new
         | 
| 20 23 | 
             
            rescue LoadError
         | 
| 21 24 | 
             
              puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
         | 
| @@ -41,16 +44,3 @@ rescue LoadError | |
| 41 44 | 
             
              end
         | 
| 42 45 | 
             
            end
         | 
| 43 46 |  | 
| 44 | 
            -
            task :test => :check_dependencies
         | 
| 45 | 
            -
             | 
| 46 | 
            -
            task :default => :test
         | 
| 47 | 
            -
             | 
| 48 | 
            -
            require 'rake/rdoctask'
         | 
| 49 | 
            -
            Rake::RDocTask.new do |rdoc|
         | 
| 50 | 
            -
              version = File.exist?('VERSION') ? File.read('VERSION') : ""
         | 
| 51 | 
            -
             | 
| 52 | 
            -
              rdoc.rdoc_dir = 'rdoc'
         | 
| 53 | 
            -
              rdoc.title = "ruby-ampache #{version}"
         | 
| 54 | 
            -
              rdoc.rdoc_files.include('README*')
         | 
| 55 | 
            -
              rdoc.rdoc_files.include('lib/**/*.rb')
         | 
| 56 | 
            -
            end
         | 
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.0. | 
| 1 | 
            +
            0.0.4
         | 
    
        data/bin/ruby-ampache
    CHANGED
    
    | @@ -1,4 +1,5 @@ | |
| 1 1 | 
             
            #!/usr/bin/env ruby
         | 
| 2 | 
            +
            # encoding:  UTF-8
         | 
| 2 3 |  | 
| 3 4 | 
             
            def secure_require(name)
         | 
| 4 5 | 
             
                begin 
         | 
| @@ -27,15 +28,15 @@ rescue | |
| 27 28 | 
             
            end
         | 
| 28 29 |  | 
| 29 30 | 
             
            # ruby-ampache highline version
         | 
| 30 | 
            -
             | 
| 31 | 
            -
             | 
| 31 | 
            +
            #$terminal.wrap_at = 80
         | 
| 32 | 
            +
            #$terminal.page_at = 22
         | 
| 32 33 |  | 
| 33 34 | 
             
            def print_albums(albums)
         | 
| 34 35 | 
             
                 choose do |menu|
         | 
| 35 36 | 
             
                    menu.prompt = "Choose an album or abort (1) "
         | 
| 36 37 | 
             
                    menu.choice(HighLine.new.color "ABORT", :red)   
         | 
| 37 38 | 
             
                    albums.each do |a|
         | 
| 38 | 
            -
                        menu.choice(a.name) { a.addToPlaylist(@pl)}  
         | 
| 39 | 
            +
                        menu.choice(a.name.encode("utf-8")) { a.addToPlaylist(@pl)}  
         | 
| 39 40 | 
             
                    end
         | 
| 40 41 | 
             
                end   
         | 
| 41 42 | 
             
            end
         | 
| @@ -45,7 +46,7 @@ def print_artists(artists) | |
| 45 46 | 
             
                    menu.prompt = "Choose an artists or abort (1)"
         | 
| 46 47 | 
             
                    menu.choice(HighLine.new.color "ABORT", :red)  
         | 
| 47 48 | 
             
                    artists.each do |a|
         | 
| 48 | 
            -
                        menu.choice(a.name) { print_albums(a.albums) }  
         | 
| 49 | 
            +
                        menu.choice(a.name.encode("utf-8")) { print_albums(a.albums.encode("utf-8")) }  
         | 
| 49 50 | 
             
                    end
         | 
| 50 51 | 
             
                end
         | 
| 51 52 | 
             
            end
         | 
    
        data/lib/lib-ampache.rb
    CHANGED
    
    | @@ -74,22 +74,3 @@ class AmpacheRuby | |
| 74 74 |  | 
| 75 75 | 
             
            end
         | 
| 76 76 |  | 
| 77 | 
            -
            if __FILE__ == $0 
         | 
| 78 | 
            -
                ar =AmpacheRuby.new('ks35824.kimsufi.com', '/graspafm', 'admin', 'potetemorire')
         | 
| 79 | 
            -
                    @artists = ar.getArtists()
         | 
| 80 | 
            -
                    @artists[20].albums[0].songs[0].url
         | 
| 81 | 
            -
                    @artists[20].albums[0].songs[0].addToPlaylist(ar.playlist)
         | 
| 82 | 
            -
                    @artists[21].albums[0].addToPlaylist(ar.playlist)
         | 
| 83 | 
            -
             | 
| 84 | 
            -
             | 
| 85 | 
            -
                    ar.playlist.play
         | 
| 86 | 
            -
                    sleep 10
         | 
| 87 | 
            -
                    ar.playlist.next
         | 
| 88 | 
            -
             | 
| 89 | 
            -
                    gets
         | 
| 90 | 
            -
             | 
| 91 | 
            -
                #TODO add album class.. add album parsing.. add get album songs method ,
         | 
| 92 | 
            -
                #reneame in getArtistAlbums
         | 
| 93 | 
            -
                
         | 
| 94 | 
            -
             | 
| 95 | 
            -
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,16 +1,16 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: ruby-ampache
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              hash:  | 
| 4 | 
            +
              hash: 23
         | 
| 5 5 | 
             
              prerelease: false
         | 
| 6 6 | 
             
              segments: 
         | 
| 7 7 | 
             
              - 0
         | 
| 8 8 | 
             
              - 0
         | 
| 9 | 
            -
              -  | 
| 10 | 
            -
              version: 0.0. | 
| 9 | 
            +
              - 4
         | 
| 10 | 
            +
              version: 0.0.4
         | 
| 11 11 | 
             
            platform: ruby
         | 
| 12 12 | 
             
            authors: 
         | 
| 13 | 
            -
            -  | 
| 13 | 
            +
            - ghedmat
         | 
| 14 14 | 
             
            autorequire: 
         | 
| 15 15 | 
             
            bindir: bin
         | 
| 16 16 | 
             
            cert_chain: []
         | 
| @@ -19,7 +19,7 @@ date: 2010-09-26 00:00:00 +02:00 | |
| 19 19 | 
             
            default_executable: ruby-ampache
         | 
| 20 20 | 
             
            dependencies: 
         | 
| 21 21 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 22 | 
            -
              name:  | 
| 22 | 
            +
              name: nokogiri
         | 
| 23 23 | 
             
              prerelease: false
         | 
| 24 24 | 
             
              requirement: &id001 !ruby/object:Gem::Requirement 
         | 
| 25 25 | 
             
                none: false
         | 
| @@ -33,7 +33,7 @@ dependencies: | |
| 33 33 | 
             
              type: :runtime
         | 
| 34 34 | 
             
              version_requirements: *id001
         | 
| 35 35 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 36 | 
            -
              name:  | 
| 36 | 
            +
              name: highline
         | 
| 37 37 | 
             
              prerelease: false
         | 
| 38 38 | 
             
              requirement: &id002 !ruby/object:Gem::Requirement 
         | 
| 39 39 | 
             
                none: false
         | 
| @@ -74,7 +74,7 @@ dependencies: | |
| 74 74 | 
             
                    version: "0"
         | 
| 75 75 | 
             
              type: :runtime
         | 
| 76 76 | 
             
              version_requirements: *id004
         | 
| 77 | 
            -
            description:  | 
| 77 | 
            +
            description: ruby ampache command line client
         | 
| 78 78 | 
             
            email: thamayor@gmail.com
         | 
| 79 79 | 
             
            executables: 
         | 
| 80 80 | 
             
            - ruby-ampache
         | 
| @@ -84,8 +84,6 @@ extra_rdoc_files: | |
| 84 84 | 
             
            - LICENSE
         | 
| 85 85 | 
             
            - README.rdoc
         | 
| 86 86 | 
             
            files: 
         | 
| 87 | 
            -
            - .document
         | 
| 88 | 
            -
            - .gitignore
         | 
| 89 87 | 
             
            - LICENSE
         | 
| 90 88 | 
             
            - README.rdoc
         | 
| 91 89 | 
             
            - Rakefile
         | 
| @@ -128,7 +126,7 @@ rubyforge_project: | |
| 128 126 | 
             
            rubygems_version: 1.3.7
         | 
| 129 127 | 
             
            signing_key: 
         | 
| 130 128 | 
             
            specification_version: 3
         | 
| 131 | 
            -
            summary:  | 
| 129 | 
            +
            summary: Ruby ampache command line client
         | 
| 132 130 | 
             
            test_files: 
         | 
| 133 131 | 
             
            - test/test_ruby-ampache.rb
         | 
| 134 132 | 
             
            - test/helper.rb
         | 
    
        data/.document
    DELETED