blue_conductor 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,16 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blue_conductor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Alex Williams
9
- - Craig Williams
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2012-12-29 00:00:00.000000000 Z
12
+ date: 2013-01-10 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: rspec
@@ -108,7 +107,7 @@ dependencies:
108
107
  - - ! '>='
109
108
  - !ruby/object:Gem::Version
110
109
  version: '0'
111
- description: Scrapes azLyrics.com for song lyrics
110
+ description: Scrapes songlyrics.com for song lyrics
112
111
  email:
113
112
  - alexwilliams4@me.com
114
113
  executables: []
@@ -123,17 +122,29 @@ files:
123
122
  - Rakefile
124
123
  - blue_conductor.gemspec
125
124
  - lib/blue_conductor.rb
125
+ - lib/blue_conductor/.DS_Store
126
126
  - lib/blue_conductor/band_manager.rb
127
+ - lib/blue_conductor/http/.DS_Store
128
+ - lib/blue_conductor/http/record/.DS_Store
129
+ - lib/blue_conductor/http/record/response.rb
130
+ - lib/blue_conductor/http/record/sanitizer.rb
131
+ - lib/blue_conductor/http/record/url_generator.rb
127
132
  - lib/blue_conductor/http/request.rb
128
- - lib/blue_conductor/http/response.rb
129
- - lib/blue_conductor/http/url_generator.rb
130
- - lib/blue_conductor/sanitizer.rb
133
+ - lib/blue_conductor/http/song/.DS_Store
134
+ - lib/blue_conductor/http/song/response.rb
135
+ - lib/blue_conductor/http/song/sanitizer.rb
136
+ - lib/blue_conductor/http/song/url_generator.rb
137
+ - lib/blue_conductor/producer.rb
131
138
  - lib/blue_conductor/song.rb
132
139
  - lib/blue_conductor/version.rb
133
140
  - lyric
134
141
  - spec/blue_conductor/band_manager_spec.rb
142
+ - spec/blue_conductor/producer_spec.rb
135
143
  - spec/blue_conductor_spec.rb
144
+ - spec/cassettes/blue_conductor_album.yml
136
145
  - spec/cassettes/blue_conductor_song.yml
146
+ - spec/cassettes/full_album.yml
147
+ - spec/cassettes/invalid_album.yml
137
148
  - spec/cassettes/invalid_song.yml
138
149
  - spec/cassettes/song.yml
139
150
  - spec/spec_helper.rb
@@ -160,11 +171,15 @@ rubyforge_project:
160
171
  rubygems_version: 1.8.24
161
172
  signing_key:
162
173
  specification_version: 3
163
- summary: azlyrics.com scraper
174
+ summary: songlyrics.com scraper
164
175
  test_files:
165
176
  - spec/blue_conductor/band_manager_spec.rb
177
+ - spec/blue_conductor/producer_spec.rb
166
178
  - spec/blue_conductor_spec.rb
179
+ - spec/cassettes/blue_conductor_album.yml
167
180
  - spec/cassettes/blue_conductor_song.yml
181
+ - spec/cassettes/full_album.yml
182
+ - spec/cassettes/invalid_album.yml
168
183
  - spec/cassettes/invalid_song.yml
169
184
  - spec/cassettes/song.yml
170
185
  - spec/spec_helper.rb
@@ -1,11 +0,0 @@
1
- module BlueConductor
2
- module HTTP
3
- class Response
4
-
5
- def self.parse(html)
6
- doc = Nokogiri::HTML(html)
7
- doc.css('div#main div')[3].text
8
- end
9
- end
10
- end
11
- end
@@ -1,14 +0,0 @@
1
- module BlueConductor
2
- module HTTP
3
- class UrlGenerator
4
- BASE_URI = "http://www.azlyrics.com/lyrics/"
5
-
6
- def self.generate(manager)
7
- sanitizer = BlueConductor::Sanitizer.new(manager)
8
- sanitizer.clean
9
-
10
- "#{BASE_URI}#{sanitizer.band}/#{sanitizer.song}.html"
11
- end
12
- end
13
- end
14
- end
@@ -1,21 +0,0 @@
1
- module BlueConductor
2
- class Sanitizer
3
- UNWANTED_CHARS = %r([^a-zA-Z0-9])
4
-
5
- attr_reader :band, :song
6
-
7
- def initialize(manager)
8
- @band = manager.band
9
- @song = manager.song
10
- end
11
-
12
- def clean
13
- @band = strip(@band).gsub("the", "")
14
- @song = strip(@song)
15
- end
16
-
17
- def strip(str)
18
- str.downcase.gsub(UNWANTED_CHARS, "")
19
- end
20
- end
21
- end