]> git.r.bdr.sh - rbdr/lyricli.rb/commitdiff
Fixes extraneous characters from lyrics results
authorBen Beltran <redacted>
Thu, 13 Nov 2014 23:39:04 +0000 (16:39 -0700)
committerBen Beltran <redacted>
Thu, 13 Nov 2014 23:39:04 +0000 (16:39 -0700)
lib/lyricli/lyrics_engine.rb
lyricli-0.0.1.gem [deleted file]
lyricli.gemspec

index 72ee4022a917685d44912f659d7f446436ddbeb7..1291d41131f497e453cba41da5862745da923777 100644 (file)
@@ -31,11 +31,15 @@ module Lyricli
         n.remove
       end
 
         n.remove
       end
 
+      node.search("script").each do |n|
+        n.remove
+      end
+
       node.search("br").each do |br|
         br.replace "\n"
       end
 
       node.search("br").each do |br|
         br.replace "\n"
       end
 
-      node.inner_text
+      node.inner_text.gsub(/\s+$/, "")
     end
   end
 end
     end
   end
 end
diff --git a/lyricli-0.0.1.gem b/lyricli-0.0.1.gem
deleted file mode 100644 (file)
index 278c000..0000000
Binary files a/lyricli-0.0.1.gem and /dev/null differ
index 584f808e0809ff6b9450f2062d4d53d0c835c0ac..0192b8eddf55c32472d20bf62a8b0941e8c029f0 100644 (file)
@@ -1,11 +1,12 @@
 Gem::Specification.new do |s|
   s.name        = 'lyricli'
 Gem::Specification.new do |s|
   s.name        = 'lyricli'
-  s.version     = '0.0.1'
+  s.version     = '0.0.2'
   s.summary     = 'Lyricli is an awesome lyric client for your Command Line'
   s.description = 'Lyricli is an awesome CLI tool to read the lyrics of your currently playing song right in the command line'
   s.authors     = ['Ben Beltran']
   s.email       = 'ben@nsovocal.com'
   s.homepage    = 'http://nsovocal.com/lyricli'
   s.summary     = 'Lyricli is an awesome lyric client for your Command Line'
   s.description = 'Lyricli is an awesome CLI tool to read the lyrics of your currently playing song right in the command line'
   s.authors     = ['Ben Beltran']
   s.email       = 'ben@nsovocal.com'
   s.homepage    = 'http://nsovocal.com/lyricli'
+  s.licenses    = ['BSD-3-Clause']
 
   s.files = Dir['lib/**/*.rb'] + Dir['bin/*']
   s.files += Dir['[A-Z]*'] + Dir['spec/**/*']
 
   s.files = Dir['lib/**/*.rb'] + Dir['bin/*']
   s.files += Dir['[A-Z]*'] + Dir['spec/**/*']
@@ -14,14 +15,14 @@ Gem::Specification.new do |s|
   s.executables << 'lrc'
 
   # Runtime Dependencies
   s.executables << 'lrc'
 
   # Runtime Dependencies
-  s.add_runtime_dependency 'nokogiri', '~> 1.5.5'
-  s.add_runtime_dependency 'multi_json', '~> 1.3.6'
-  s.add_runtime_dependency 'rdio', '~> 0.1.0'
-  s.add_runtime_dependency  'launchy', '~> 2.1.2'
+  s.add_runtime_dependency 'nokogiri', '~> 1.5'
+  s.add_runtime_dependency 'multi_json', '~> 1.3'
+  s.add_runtime_dependency 'rdio', '~> 0.1'
+  s.add_runtime_dependency  'launchy', '~> 2.1'
 
   # Development Dependencies
 
   # Development Dependencies
-  s.add_development_dependency 'ruby-debug19', '~> 0.11.6'
-  s.add_development_dependency 'yard', '~> 0.8.2.1'
-  s.add_development_dependency 'thin', '~> 1.5.0'
-  s.add_development_dependency 'rspec', '~> 2.11.0'
+  s.add_development_dependency 'ruby-debug19', '~> 0.11'
+  s.add_development_dependency 'yard', '~> 0.8'
+  s.add_development_dependency 'thin', '~> 1.5'
+  s.add_development_dependency 'rspec', '~> 2.11'
 end
 end