astromapper 1.0.9 → 1.0.10

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 77f2484e0499ad8e34daa87a443cfc8040c6fde3
4
- data.tar.gz: a71aabeaa776a7ae3c5d001a43dade72ec542f44
3
+ metadata.gz: d42ddb86d452bccf252df72a4e3419eabbda1e04
4
+ data.tar.gz: 7b9005d55094f0501748524d13bfb735527f133f
5
5
  SHA512:
6
- metadata.gz: 4faba1554cfb505e4803538d85707c470c654e2817f4574367564bd70ec87150a50a790a08fb2bcc9f4159151d0bf238687dcbd3b4f2a3cb72b8c81b2bba9089
7
- data.tar.gz: ed4a0e2f19d65f1692663e60d790c3a94709460ca91aa5a1e42169a70b347901ef422f61ec66195f50b0c147373477c47c24d643c6e2b1b020f85bcef9d6434b
6
+ metadata.gz: 6ce4be5b6326a7109a2025b9d8ab3d8f2ccd319d31fcfd545c65a08ae25d780bffdbc4335b5838c6984f14cb1c0d59ea80724764378f94b2afc6cbda28ab5e33
7
+ data.tar.gz: 8ded5a1c91c8cd2bc5347686f688bfc4b3ad0557d33c67718a9cd5b3d3b9eeff55de53495b7b838264c00567cc2e58612536b98c2719bc371e2cd96709dbc1af
@@ -56,7 +56,6 @@ module Astromapper
56
56
  svg {
57
57
  fill: #FFF;
58
58
  }
59
- file: #FFF;
60
59
  text {
61
60
  text-anchor: middle;
62
61
  fill: #567;
@@ -152,11 +151,11 @@ module Astromapper
152
151
  output = "<!-- Volume: #{volume.strip.gsub(/\t/,' // ')} -->\n"
153
152
  output += (size == '0') ? draw_belt(c) : draw_planet(c,uwp)
154
153
  output += " <text class='spaceport' x='#{c[0]}' y='#{(c[1] + @side / 2).tweak}'>#{spaceport.strip}</text>\n"
155
- output += " <text x='#{c[0]}' y='#{(c[1]+(@side/1.3)).tweak}'>#{uwp.strip}</text>\n"
156
- output += " <text x='#{c[0]}' y='#{(c[1]-(@side/2.1)).tweak}'>#{name.strip}</text>\n"
154
+ output += " <text x='#{c[0].to_i}' y='#{(c[1]+(@side/1.3)).tweak}'>#{uwp.strip}</text>\n"
155
+ output += " <text x='#{c[0].to_i}' y='#{(c[1]-(@side/2.1)).tweak}'>#{name.strip}</text>\n"
157
156
  unless zone == '..'
158
157
  style = zone + '_zone'
159
- output += " <path d='M #{c[0] - curve/2;} #{c[1] - (curve/1.4)} a #{curve} #{curve} 0 1 0 20 0' />\n"
158
+ output += " <path d='M #{(c[0] - curve/2).to_i} #{(c[1] - (curve/1.4)).to_i} a #{curve} #{curve} 0 1 0 20 0' />\n"
160
159
  end
161
160
  output += navy_base(c) if nsg.include?('N')
162
161
  output += scout_base(c) if nsg.include?('S')
@@ -173,7 +172,7 @@ module Astromapper
173
172
  x = (c[0]+(@side/1.8)).tweak + 2
174
173
  y = (c[1]-(@side/3)).tweak + 3
175
174
  stars.split('/').each do |star|
176
- output += " <text x='#{x}' y='#{y}'>#{star[0..1].strip}</text>\n"
175
+ output += " <text x='#{x.to_i}' y='#{y.to_i}'>#{star[0..1].strip}</text>\n"
177
176
  x += 3
178
177
  y += 7
179
178
  end
@@ -181,14 +180,14 @@ module Astromapper
181
180
  end
182
181
  def draw_planet(c,w)
183
182
  k = (w[3] == '0') ? 'Desert' : 'Planet'
184
- " <circle class='planet' cx='#{c[0]}' cy='#{c[1]}' r='#{@side/7}' />\n"
183
+ " <circle class='planet' cx='#{c[0].to_i}' cy='#{c[1].to_i}' r='#{(@side/7).to_i}' />\n"
185
184
  end
186
185
  def draw_belt(c)
187
- output = " <g stroke='none' fill='none'>\n"
186
+ output = " <g class='belt'>\n"
188
187
  7.times do
189
188
  x = c[0] + Random.rand(@side/3) - @side/6
190
189
  y = c[1] + Random.rand(@side/3) - @side/6
191
- output += " <circle class='belt' cx='#{x.tweak}' cy='#{y.tweak}' r='#{(@side/15).tweak}' />\n"
190
+ output += " <circle class='belt' cx='#{x.tweak.to_i}' cy='#{y.tweak.to_i}' r='#{(@side/15).tweak}' />\n"
192
191
  end
193
192
  output + " </g>\n"
194
193
  end
@@ -223,7 +222,7 @@ module Astromapper
223
222
  (@columns+1).times do |c|
224
223
  x = @side + ((c-1) * @side * 1.5)
225
224
  y = (c % 2 == 1) ? (r-1) * @side * @factor + (0.2 * @side) : (r-1) * @side * @factor + @hex[:side_h]+ (0.2 * @side)
226
- output += "<text x='#{x.tweak}' y='#{y.tweak}'>%02d%02d</text>\n" % [c,r]
225
+ output += "<text x='#{x.tweak.to_i}' y='#{y.tweak.to_i}'>%02d%02d</text>\n" % [c,r]
227
226
  end
228
227
  end
229
228
  output += "</g>"
@@ -1,3 +1,3 @@
1
1
  module Astromapper
2
- VERSION = "1.0.9"
2
+ VERSION = "1.0.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: astromapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Merovex