vagalume 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -7
- data/Gemfile.lock +15 -8
- data/README.md +1 -1
- data/bin/vagalume +6 -3
- data/lib/vagalume.rb +2 -2
- data/spec/fixtures/vcr_cassettes/vagalume_with_no_translation_available.yml +2 -2
- data/vagalume.gemspec +6 -2
- data/vagalume.jpg +0 -0
- metadata +51 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d06acfd5b52be5d23a930c642b0829efe4802ee2
|
4
|
+
data.tar.gz: e86a3b7e30b579405225cfc5f0a7c8be189abf52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ed49516aba72eab580b89eae5cb8ce508dfaee771088f063160e923dd8393c1ebb4f2797058588b8e3cd672dafc2b894fbe9bec242e4631b7abab4dc5d0595e
|
7
|
+
data.tar.gz: 89807c874b91ac1d6cdb4d8d69cfd32903ed2a8716647b6d730fba14c5349563c3d5aa460f04eb0960b40841221dfcbc86aa625213147ec587c29ee4763d4e2c
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,11 +1,17 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
vagalume (0.1.4)
|
5
|
+
multi_json (~> 1.9.2)
|
6
|
+
|
1
7
|
GEM
|
2
8
|
remote: http://rubygems.org/
|
3
9
|
specs:
|
4
|
-
addressable (2.3.
|
10
|
+
addressable (2.3.7)
|
5
11
|
crack (0.4.2)
|
6
12
|
safe_yaml (~> 1.0.0)
|
7
13
|
diff-lcs (1.2.5)
|
8
|
-
multi_json (1.9.
|
14
|
+
multi_json (1.9.3)
|
9
15
|
rspec (2.14.1)
|
10
16
|
rspec-core (~> 2.14.0)
|
11
17
|
rspec-expectations (~> 2.14.0)
|
@@ -14,8 +20,8 @@ GEM
|
|
14
20
|
rspec-expectations (2.14.5)
|
15
21
|
diff-lcs (>= 1.1.3, < 2.0)
|
16
22
|
rspec-mocks (2.14.6)
|
17
|
-
safe_yaml (1.0.
|
18
|
-
vcr (2.9.
|
23
|
+
safe_yaml (1.0.4)
|
24
|
+
vcr (2.9.3)
|
19
25
|
webmock (1.17.4)
|
20
26
|
addressable (>= 2.2.7)
|
21
27
|
crack (>= 0.3.2)
|
@@ -24,7 +30,8 @@ PLATFORMS
|
|
24
30
|
ruby
|
25
31
|
|
26
32
|
DEPENDENCIES
|
27
|
-
|
28
|
-
rspec
|
29
|
-
|
30
|
-
|
33
|
+
bundler (~> 1.3)
|
34
|
+
rspec (~> 2.14.1)
|
35
|
+
vagalume!
|
36
|
+
vcr (~> 2.9.0)
|
37
|
+
webmock (~> 1.17.4)
|
data/README.md
CHANGED
data/bin/vagalume
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require 'rubygems'
|
4
3
|
require 'optparse'
|
5
4
|
require 'vagalume'
|
5
|
+
require 'shellwords'
|
6
6
|
|
7
7
|
if ARGV.empty?
|
8
8
|
system "vagalume -h"
|
@@ -10,7 +10,7 @@ if ARGV.empty?
|
|
10
10
|
end
|
11
11
|
|
12
12
|
options = {}
|
13
|
-
|
13
|
+
OptionParser.new do |opts|
|
14
14
|
opts.banner = "Usage: vagalume [options] [artist] - [song]"
|
15
15
|
opts.banner += "\n vagalume Metallica - Unforgiven"
|
16
16
|
opts.banner += "\n vagalume -t Metallica - Unforgiven Shows portuguese translation\n\n"
|
@@ -27,4 +27,7 @@ optparse = OptionParser.new do |opts|
|
|
27
27
|
end.parse!(ARGV)
|
28
28
|
|
29
29
|
artist, song = ARGV.join(" ").split("-")
|
30
|
-
Vagalume.
|
30
|
+
output = Vagalume.get_lyric(artist, song, options)
|
31
|
+
viewer = ENV["VAGALUME_VIEWER"] || "cat"
|
32
|
+
|
33
|
+
system "echo #{Shellwords.escape(output)} | #{viewer} -"
|
data/lib/vagalume.rb
CHANGED
@@ -20,8 +20,8 @@ module Vagalume
|
|
20
20
|
search_result = Vagalume::SearchResult.fetch(result_json)
|
21
21
|
end
|
22
22
|
|
23
|
-
def
|
23
|
+
def get_lyric(artist, song, options)
|
24
24
|
search = find(artist, song)
|
25
|
-
|
25
|
+
Vagalume::LyricFormatter.format(search, options)
|
26
26
|
end
|
27
27
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://www.vagalume.com.br/api/search.php?art=Bruce%20Springsteen&mus=Ain
|
5
|
+
uri: http://www.vagalume.com.br/api/search.php?art=Bruce%20Springsteen&mus=Ain%27t%20good%20enough%20for%20You
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -76,6 +76,6 @@ http_interactions:
|
|
76
76
|
Hey! Hey!\nNo matter what I do, girl you know it''s true\nAin''t good enough
|
77
77
|
for you\nAww no matter what I do, girl you know it''s true\nAin''t good enough
|
78
78
|
for you\nWhoaaa!"}]}'
|
79
|
-
http_version:
|
79
|
+
http_version:
|
80
80
|
recorded_at: Sat, 14 Jul 2012 20:48:29 GMT
|
81
81
|
recorded_with: VCR 2.2.2
|
data/vagalume.gemspec
CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "vagalume"
|
7
7
|
spec.executables = ["vagalume"]
|
8
|
-
spec.version = "0.1.
|
8
|
+
spec.version = "0.1.5"
|
9
9
|
spec.authors = ["Brian Thomas Storti"]
|
10
10
|
spec.email = ["btstorti@gmail.com"]
|
11
11
|
spec.description = "Ruby interface for the Vagalume API"
|
@@ -16,6 +16,10 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
17
17
|
spec.require_paths = ["lib"]
|
18
18
|
|
19
|
+
spec.add_runtime_dependency "multi_json", "~> 1.9"
|
20
|
+
|
19
21
|
spec.add_development_dependency "bundler", "~> 1.3"
|
20
|
-
spec.add_development_dependency "
|
22
|
+
spec.add_development_dependency "vcr", "~> 2.9"
|
23
|
+
spec.add_development_dependency "webmock", "~> 1.17"
|
24
|
+
spec.add_development_dependency "rspec", "~> 2.14"
|
21
25
|
end
|
data/vagalume.jpg
ADDED
Binary file
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagalume
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Thomas Storti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: multi_json
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.9'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.9'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -25,19 +39,47 @@ dependencies:
|
|
25
39
|
- !ruby/object:Gem::Version
|
26
40
|
version: '1.3'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
42
|
+
name: vcr
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.9'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.9'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: webmock
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
30
58
|
requirements:
|
31
|
-
- - "
|
59
|
+
- - "~>"
|
32
60
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
61
|
+
version: '1.17'
|
34
62
|
type: :development
|
35
63
|
prerelease: false
|
36
64
|
version_requirements: !ruby/object:Gem::Requirement
|
37
65
|
requirements:
|
38
|
-
- - "
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.17'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.14'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
39
81
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
82
|
+
version: '2.14'
|
41
83
|
description: Ruby interface for the Vagalume API
|
42
84
|
email:
|
43
85
|
- btstorti@gmail.com
|
@@ -75,6 +117,7 @@ files:
|
|
75
117
|
- spec/lyric_formatter_spec.rb
|
76
118
|
- spec/spec_helper.rb
|
77
119
|
- vagalume.gemspec
|
120
|
+
- vagalume.jpg
|
78
121
|
homepage: https://github.com/brianstorti/vagalume
|
79
122
|
licenses:
|
80
123
|
- MIT
|
@@ -95,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
138
|
version: '0'
|
96
139
|
requirements: []
|
97
140
|
rubyforge_project:
|
98
|
-
rubygems_version: 2.
|
141
|
+
rubygems_version: 2.4.6
|
99
142
|
signing_key:
|
100
143
|
specification_version: 4
|
101
144
|
summary: Ruby interface for the Vagalume API
|