claudiob-radiotagmap 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/README.md CHANGED
@@ -19,6 +19,9 @@ Ruby gem to map by U.S. state the music played on FM radios
19
19
 
20
20
  ## History ##
21
21
 
22
+ v0.0.4 2009/09/17
23
+ Added a parameter to specify the path to the KML file to create
24
+
22
25
  v0.0.3 2009/09/17
23
26
  Moved state coords from an external YAML file to the same ruby file
24
27
  in order to avoid calling YAML.load which did not find the right path
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
data/lib/radiotagmap.rb CHANGED
@@ -9,8 +9,6 @@ require 'scrobbler'
9
9
 
10
10
  module Radiotagmap
11
11
 
12
- RADIOTAGMAP_KML = "overlay.kml"
13
-
14
12
  @log = Logger.new(STDERR)
15
13
  @log.level = Logger::WARN
16
14
  @log.level = Logger::DEBUG ### Only for debug purpose ###
@@ -117,18 +115,18 @@ module Radiotagmap
117
115
  # == Examples
118
116
  # update_kml
119
117
  #--
120
- def self.update_kml(among = [['Rock'], ['Country']], forever = false)
118
+ def self.update_kml(kml_path = "./overlay.xml", among = [['Rock'], ['Country']], forever = false)
121
119
  begin
122
120
  STATES_COORDS.each do |state, coords|
123
121
  color = get_map_color(get_tags_weight(state, among))
124
122
  @log.debug "#{state} | The new color is #{color}"
125
123
 
126
- if File.exists?(RADIOTAGMAP_KML)
127
- kml_file = File.open(RADIOTAGMAP_KML, 'r+')
124
+ if File.exists?(kml_path)
125
+ kml_file = File.open(kml_path, 'r+')
128
126
  xml = Nokogiri::XML(kml_file)
129
127
  @log.debug "#{state} | KML map created"
130
128
  else
131
- kml_file = File.new(RADIOTAGMAP_KML, 'w')
129
+ kml_file = File.new(kml_path, 'w') # TODO: create ancestor folders
132
130
  xml = create_kml
133
131
  @log.debug "#{state} | KML map loaded"
134
132
  end
data/radiotagmap.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{radiotagmap}
8
- s.version = "0.0.3"
8
+ s.version = "0.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Claudio Baccigalupo"]
@@ -30,11 +30,10 @@ Gem::Specification.new do |s|
30
30
  "test/radiotagmap_test.rb",
31
31
  "test/test_helper.rb"
32
32
  ]
33
- s.has_rdoc = true
34
33
  s.homepage = %q{http://github.com/claudiob/radiotagmap}
35
34
  s.rdoc_options = ["--charset=UTF-8"]
36
35
  s.require_paths = ["lib"]
37
- s.rubygems_version = %q{1.3.1}
36
+ s.rubygems_version = %q{1.3.3}
38
37
  s.summary = %q{Ruby gem to map by U.S. state the music played on FM radios}
39
38
  s.test_files = [
40
39
  "test/radiotagmap_test.rb",
@@ -43,7 +42,7 @@ Gem::Specification.new do |s|
43
42
 
44
43
  if s.respond_to? :specification_version then
45
44
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
46
- s.specification_version = 2
45
+ s.specification_version = 3
47
46
 
48
47
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
49
48
  s.add_development_dependency(%q<cucumber>, [">= 0"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: claudiob-radiotagmap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Baccigalupo
@@ -74,7 +74,7 @@ files:
74
74
  - radiotagmap.gemspec
75
75
  - test/radiotagmap_test.rb
76
76
  - test/test_helper.rb
77
- has_rdoc: true
77
+ has_rdoc: false
78
78
  homepage: http://github.com/claudiob/radiotagmap
79
79
  licenses:
80
80
  post_install_message:
@@ -99,7 +99,7 @@ requirements: []
99
99
  rubyforge_project:
100
100
  rubygems_version: 1.3.5
101
101
  signing_key:
102
- specification_version: 2
102
+ specification_version: 3
103
103
  summary: Ruby gem to map by U.S. state the music played on FM radios
104
104
  test_files:
105
105
  - test/radiotagmap_test.rb