vagalume 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile +0 -1
- data/Gemfile.lock +17 -26
- data/README.md +4 -0
- data/bin/vagalume +0 -0
- data/lib/vagalume/lyric_formatter.rb +1 -1
- data/spec/array_spec.rb +2 -2
- data/vagalume.gemspec +17 -81
- metadata +19 -77
- data/Rakefile +0 -46
- data/VERSION +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5b30c2065b43e890469a84e577ce547dca15bb1
|
4
|
+
data.tar.gz: 48ee5bdb1cf6d46df66fc21795efb4a5c2eb8ca7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffd03794e2283805337e5f68c9ba9f548686328cfc5c0696ad9f354032785fa2b486593c0ac83277d2b97510d675e809c67a7f010060caa560846e368c390d99
|
7
|
+
data.tar.gz: f8a9eff2944fb8b8ae66e3d26adc9eb34f88de76b8372b70dc4b9342c3c3579230592f3524bbe006cac2f73a7cf1b5d7a69156f60361370e80df5c926a0352ef
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
*.gem
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,38 +1,29 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
addressable (2.
|
5
|
-
crack (0.
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
rspec-expectations (~> 2.9.0)
|
21
|
-
rspec-mocks (~> 2.9.0)
|
22
|
-
rspec-core (2.9.0)
|
23
|
-
rspec-expectations (2.9.1)
|
24
|
-
diff-lcs (~> 1.1.3)
|
25
|
-
rspec-mocks (2.9.0)
|
26
|
-
vcr (2.2.2)
|
27
|
-
webmock (1.8.7)
|
4
|
+
addressable (2.3.6)
|
5
|
+
crack (0.4.2)
|
6
|
+
safe_yaml (~> 1.0.0)
|
7
|
+
diff-lcs (1.2.5)
|
8
|
+
multi_json (1.9.2)
|
9
|
+
rspec (2.14.1)
|
10
|
+
rspec-core (~> 2.14.0)
|
11
|
+
rspec-expectations (~> 2.14.0)
|
12
|
+
rspec-mocks (~> 2.14.0)
|
13
|
+
rspec-core (2.14.8)
|
14
|
+
rspec-expectations (2.14.5)
|
15
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
16
|
+
rspec-mocks (2.14.6)
|
17
|
+
safe_yaml (1.0.2)
|
18
|
+
vcr (2.9.0)
|
19
|
+
webmock (1.17.4)
|
28
20
|
addressable (>= 2.2.7)
|
29
|
-
crack (>= 0.
|
21
|
+
crack (>= 0.3.2)
|
30
22
|
|
31
23
|
PLATFORMS
|
32
24
|
ruby
|
33
25
|
|
34
26
|
DEPENDENCIES
|
35
|
-
jeweler (~> 1.8.4)
|
36
27
|
multi_json
|
37
28
|
rspec
|
38
29
|
vcr
|
data/README.md
CHANGED
@@ -80,3 +80,7 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
80
80
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
81
81
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
82
82
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
83
|
+
|
84
|
+
|
85
|
+
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/brianstorti/vagalume/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
|
86
|
+
|
data/bin/vagalume
CHANGED
File without changes
|
@@ -7,8 +7,8 @@ class Vagalume::LyricFormatter
|
|
7
7
|
output = "\n\n"
|
8
8
|
|
9
9
|
return "No lyric found" if status == Vagalume::Status::NOT_FOUND || status == Vagalume::Status::SONG_NOT_FOUND
|
10
|
-
return "No translation found" if translated_song.nil?
|
11
10
|
return "\n\n#{song.name}\n\n#{song.lyric}" unless options[:translation]
|
11
|
+
return "No translation found" if translated_song.nil?
|
12
12
|
|
13
13
|
bigger_line = bigger_line(song.lyric)
|
14
14
|
lyric_array = [song.name, ""]
|
data/spec/array_spec.rb
CHANGED
@@ -5,10 +5,10 @@ require "spec_helper"
|
|
5
5
|
describe Array do
|
6
6
|
it "return song with selected language" do
|
7
7
|
right_song = double "Song"
|
8
|
-
right_song.stub
|
8
|
+
right_song.stub(:language).and_return(Vagalume::Language::PORTUGUESE)
|
9
9
|
|
10
10
|
wrong_song = double "Song"
|
11
|
-
wrong_song.stub
|
11
|
+
wrong_song.stub(:language).and_return(Vagalume::Language::ENGLISH)
|
12
12
|
|
13
13
|
songs = [right_song, wrong_song]
|
14
14
|
songs.with_language(Vagalume::Language::PORTUGUESE).should == right_song
|
data/vagalume.gemspec
CHANGED
@@ -1,85 +1,21 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
# -*- encoding: utf-8 -*-
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
4
|
|
6
|
-
Gem::Specification.new do |
|
7
|
-
|
8
|
-
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "vagalume"
|
7
|
+
spec.executables = ["vagalume"]
|
8
|
+
spec.version = "0.1.4"
|
9
|
+
spec.authors = ["Brian Thomas Storti"]
|
10
|
+
spec.email = ["btstorti@gmail.com"]
|
11
|
+
spec.description = "Ruby interface for the Vagalume API"
|
12
|
+
spec.summary = "Ruby interface for the Vagalume API"
|
13
|
+
spec.homepage = "https://github.com/brianstorti/vagalume"
|
14
|
+
spec.license = "MIT"
|
9
15
|
|
10
|
-
|
11
|
-
|
12
|
-
s.date = "2013-08-05"
|
13
|
-
s.description = "Ruby interface for the Vagalume API"
|
14
|
-
s.email = "btstorti@gmail.com"
|
15
|
-
s.executables = ["vagalume"]
|
16
|
-
s.extra_rdoc_files = [
|
17
|
-
"LICENSE.txt",
|
18
|
-
"README.md"
|
19
|
-
]
|
20
|
-
s.files = [
|
21
|
-
".document",
|
22
|
-
"Gemfile",
|
23
|
-
"Gemfile.lock",
|
24
|
-
"LICENSE.txt",
|
25
|
-
"README.md",
|
26
|
-
"Rakefile",
|
27
|
-
"VERSION",
|
28
|
-
"bin/vagalume",
|
29
|
-
"lib/vagalume.rb",
|
30
|
-
"lib/vagalume/artist.rb",
|
31
|
-
"lib/vagalume/core_ext/array.rb",
|
32
|
-
"lib/vagalume/language.rb",
|
33
|
-
"lib/vagalume/lyric_formatter.rb",
|
34
|
-
"lib/vagalume/search_result.rb",
|
35
|
-
"lib/vagalume/song.rb",
|
36
|
-
"lib/vagalume/status.rb",
|
37
|
-
"spec/array_spec.rb",
|
38
|
-
"spec/assets/lyric_formatter/unforgiven_lyric.txt",
|
39
|
-
"spec/assets/lyric_formatter/unforgiven_lyric_with_translation.txt",
|
40
|
-
"spec/assets/unforgiven_lyric.txt",
|
41
|
-
"spec/assets/unforgiven_lyric_translation_pt.txt",
|
42
|
-
"spec/assets/unforgiven_lyric_with_translation.txt",
|
43
|
-
"spec/base_spec.rb",
|
44
|
-
"spec/fixtures/vcr_cassettes/vagalume.yml",
|
45
|
-
"spec/fixtures/vcr_cassettes/vagalume_not_found.yml",
|
46
|
-
"spec/fixtures/vcr_cassettes/vagalume_song_not_found.yml",
|
47
|
-
"spec/fixtures/vcr_cassettes/vagalume_with_no_translation_available.yml",
|
48
|
-
"spec/lyric_formatter_spec.rb",
|
49
|
-
"spec/spec_helper.rb",
|
50
|
-
"vagalume.gemspec"
|
51
|
-
]
|
52
|
-
s.homepage = "http://github.com/brianstorti/vagalume"
|
53
|
-
s.licenses = ["MIT"]
|
54
|
-
s.require_paths = ["lib"]
|
55
|
-
s.rubygems_version = "2.0.3"
|
56
|
-
s.summary = "Ruby interface for the Vagalume API"
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.require_paths = ["lib"]
|
57
18
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
62
|
-
s.add_runtime_dependency(%q<multi_json>, [">= 0"])
|
63
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
|
64
|
-
s.add_development_dependency(%q<vcr>, [">= 0"])
|
65
|
-
s.add_development_dependency(%q<rspec>, [">= 0"])
|
66
|
-
s.add_development_dependency(%q<webmock>, [">= 0"])
|
67
|
-
s.add_runtime_dependency(%q<multi_json>, [">= 0"])
|
68
|
-
else
|
69
|
-
s.add_dependency(%q<multi_json>, [">= 0"])
|
70
|
-
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
71
|
-
s.add_dependency(%q<vcr>, [">= 0"])
|
72
|
-
s.add_dependency(%q<rspec>, [">= 0"])
|
73
|
-
s.add_dependency(%q<webmock>, [">= 0"])
|
74
|
-
s.add_dependency(%q<multi_json>, [">= 0"])
|
75
|
-
end
|
76
|
-
else
|
77
|
-
s.add_dependency(%q<multi_json>, [">= 0"])
|
78
|
-
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
79
|
-
s.add_dependency(%q<vcr>, [">= 0"])
|
80
|
-
s.add_dependency(%q<rspec>, [">= 0"])
|
81
|
-
s.add_dependency(%q<webmock>, [">= 0"])
|
82
|
-
s.add_dependency(%q<multi_json>, [">= 0"])
|
83
|
-
end
|
19
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
20
|
+
spec.add_development_dependency "rake"
|
84
21
|
end
|
85
|
-
|
metadata
CHANGED
@@ -1,115 +1,57 @@
|
|
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.4
|
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: 2014-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - '>='
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: jeweler
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ~>
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 1.8.4
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ~>
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 1.8.4
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: vcr
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - '>='
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - '>='
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rspec
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
19
|
+
version: '1.3'
|
62
20
|
type: :development
|
63
21
|
prerelease: false
|
64
22
|
version_requirements: !ruby/object:Gem::Requirement
|
65
23
|
requirements:
|
66
|
-
- -
|
24
|
+
- - "~>"
|
67
25
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
26
|
+
version: '1.3'
|
69
27
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
28
|
+
name: rake
|
71
29
|
requirement: !ruby/object:Gem::Requirement
|
72
30
|
requirements:
|
73
|
-
- -
|
31
|
+
- - ">="
|
74
32
|
- !ruby/object:Gem::Version
|
75
33
|
version: '0'
|
76
34
|
type: :development
|
77
35
|
prerelease: false
|
78
36
|
version_requirements: !ruby/object:Gem::Requirement
|
79
37
|
requirements:
|
80
|
-
- -
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: multi_json
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - '>='
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :runtime
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - '>='
|
38
|
+
- - ">="
|
95
39
|
- !ruby/object:Gem::Version
|
96
40
|
version: '0'
|
97
41
|
description: Ruby interface for the Vagalume API
|
98
|
-
email:
|
42
|
+
email:
|
43
|
+
- btstorti@gmail.com
|
99
44
|
executables:
|
100
45
|
- vagalume
|
101
46
|
extensions: []
|
102
|
-
extra_rdoc_files:
|
103
|
-
- LICENSE.txt
|
104
|
-
- README.md
|
47
|
+
extra_rdoc_files: []
|
105
48
|
files:
|
106
|
-
- .document
|
49
|
+
- ".document"
|
50
|
+
- ".gitignore"
|
107
51
|
- Gemfile
|
108
52
|
- Gemfile.lock
|
109
53
|
- LICENSE.txt
|
110
54
|
- README.md
|
111
|
-
- Rakefile
|
112
|
-
- VERSION
|
113
55
|
- bin/vagalume
|
114
56
|
- lib/vagalume.rb
|
115
57
|
- lib/vagalume/artist.rb
|
@@ -133,7 +75,7 @@ files:
|
|
133
75
|
- spec/lyric_formatter_spec.rb
|
134
76
|
- spec/spec_helper.rb
|
135
77
|
- vagalume.gemspec
|
136
|
-
homepage:
|
78
|
+
homepage: https://github.com/brianstorti/vagalume
|
137
79
|
licenses:
|
138
80
|
- MIT
|
139
81
|
metadata: {}
|
@@ -143,17 +85,17 @@ require_paths:
|
|
143
85
|
- lib
|
144
86
|
required_ruby_version: !ruby/object:Gem::Requirement
|
145
87
|
requirements:
|
146
|
-
- -
|
88
|
+
- - ">="
|
147
89
|
- !ruby/object:Gem::Version
|
148
90
|
version: '0'
|
149
91
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
150
92
|
requirements:
|
151
|
-
- -
|
93
|
+
- - ">="
|
152
94
|
- !ruby/object:Gem::Version
|
153
95
|
version: '0'
|
154
96
|
requirements: []
|
155
97
|
rubyforge_project:
|
156
|
-
rubygems_version: 2.
|
98
|
+
rubygems_version: 2.2.2
|
157
99
|
signing_key:
|
158
100
|
specification_version: 4
|
159
101
|
summary: Ruby interface for the Vagalume API
|
data/Rakefile
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require 'rubygems'
|
4
|
-
require 'bundler'
|
5
|
-
begin
|
6
|
-
Bundler.setup(:default, :development)
|
7
|
-
rescue Bundler::BundlerError => e
|
8
|
-
$stderr.puts e.message
|
9
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
-
exit e.status_code
|
11
|
-
end
|
12
|
-
require 'rake'
|
13
|
-
|
14
|
-
require 'jeweler'
|
15
|
-
Jeweler::Tasks.new do |gem|
|
16
|
-
gem.name = "vagalume"
|
17
|
-
gem.homepage = "http://github.com/brianstorti/vagalume"
|
18
|
-
gem.license = "MIT"
|
19
|
-
gem.summary = %Q{Ruby interface for the Vagalume API}
|
20
|
-
gem.description = %Q{Ruby interface for the Vagalume API}
|
21
|
-
gem.email = "btstorti@gmail.com"
|
22
|
-
gem.authors = ["Brian Thomas Storti"]
|
23
|
-
gem.executables = ["vagalume"]
|
24
|
-
gem.default_executable = "vagalume"
|
25
|
-
gem.add_dependency "multi_json"
|
26
|
-
end
|
27
|
-
Jeweler::RubygemsDotOrgTasks.new
|
28
|
-
|
29
|
-
require 'rake/testtask'
|
30
|
-
Rake::TestTask.new(:test) do |test|
|
31
|
-
test.libs << 'lib' << 'spec'
|
32
|
-
test.pattern = 'spec/**/*_spec.rb'
|
33
|
-
test.verbose = true
|
34
|
-
end
|
35
|
-
|
36
|
-
task :default => :test
|
37
|
-
|
38
|
-
require 'rdoc/task'
|
39
|
-
Rake::RDocTask.new do |rdoc|
|
40
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
41
|
-
|
42
|
-
rdoc.rdoc_dir = 'rdoc'
|
43
|
-
rdoc.title = "vagalume #{version}"
|
44
|
-
rdoc.rdoc_files.include('README*')
|
45
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
46
|
-
end
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.1.2
|