gosu_texture_packer 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 859d881aa99b72a958e2059726d6ca93dbdfab5a
4
- data.tar.gz: 613d17c1959e4c36e321f42f655f22be63ca380c
3
+ metadata.gz: 1f8723b6eae8b871d5f20363d5bbb33538f1efed
4
+ data.tar.gz: 544a731c41733e3388d4ebfe978fcd22fe1207d4
5
5
  SHA512:
6
- metadata.gz: c562495a09c87284d07ebb4d6923640e77ab14eaf17eef9fac2e6ef6547156d12448a319667d143718b32cd95bb731678582ca649887c6c268ac23a57c2d4f5d
7
- data.tar.gz: 27bcc8fe38d88f1489baefdf5066fa5b1698d0b74d1088e0fbdd214fca078914de4e23dd09f5385a1c755021a28c343cad3c52eeddc1bb8203a84ac555a7ee00
6
+ metadata.gz: 7e2c157d0df066b8d08829da3155f64ea8834158eb569eabf74b93628515cc29d2351c39f5d09846867beac072f68d7770d19f824f949ba32e610549ee730018
7
+ data.tar.gz: 2057f5e616b1a12b1192c1e854734ca591f5cbf77981fa25513fd5e16016dd07a6fd8e773482de31511b6ddfe35d2ce5ae39c79d416d27c500a52e1817a02e52
data/README.md CHANGED
@@ -22,7 +22,7 @@ Or install it yourself as:
22
22
  ## Usage
23
23
 
24
24
  ```ruby
25
- tileset = Gosu::TexturePacker::Tileset.load_json(gosu_window, '/path/to/tileset.json')
25
+ tileset = Gosu::TexturePacker.load_json(gosu_window, '/path/to/tileset.json')
26
26
  frame_names = tileset.frame_list
27
27
  tile = tileset.frame(frame_names.first)
28
28
  tile.draw(0, 0, 0) # tile is Gosu::Image
@@ -10,7 +10,7 @@ class GameWindow < Gosu::Window
10
10
  def initialize
11
11
  super(640, 480, false)
12
12
  self.caption = 'Click screen with mouse to draw textures'
13
- @tileset = Gosu::TexturePacker::Tileset.load_json(
13
+ @tileset = Gosu::TexturePacker.load_json(
14
14
  self, File.join(ROOT_DIR, 'spec', 'files', '_UI.json'))
15
15
  @drawing = {}
16
16
  end
@@ -4,6 +4,8 @@ require 'gosu_texture_packer/tileset'
4
4
 
5
5
  module Gosu
6
6
  module TexturePacker
7
- # Your code goes here...
7
+ def self.load_json(window, path)
8
+ Tileset.load_json(window, path)
9
+ end
8
10
  end
9
11
  end
@@ -1,5 +1,5 @@
1
1
  module Gosu
2
2
  module TexturePacker
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -12,7 +12,7 @@ RSpec.describe Gosu::TexturePacker::Tileset do
12
12
  tileset_class.load_json(game_window, tileset)
13
13
  end
14
14
 
15
- describe '#load_json' do
15
+ describe '.load_json' do
16
16
  it 'loads existing file' do
17
17
  expect { subject }.to_not raise_error
18
18
  end
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe Gosu::TexturePacker do
4
+
5
+ let(:media_dir) { File.join(File.dirname(__FILE__), 'files') }
6
+ let(:tileset) { File.join(media_dir, '_UI.json') }
7
+ let(:game_window) { Gosu::Window.new(640, 480, false) }
8
+
9
+ describe '.load_json' do
10
+ it 'loads existing file' do
11
+ expect { Gosu::TexturePacker.load_json(game_window, tileset) }.to_not raise_error
12
+ end
13
+ end
14
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gosu_texture_packer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Varaneckas
@@ -118,6 +118,7 @@ files:
118
118
  - spec/files/_UI.json
119
119
  - spec/files/_UI.png
120
120
  - spec/gosu_texture_packer/tileset_spec.rb
121
+ - spec/gosu_texture_packer_spec.rb
121
122
  - spec/spec_helper.rb
122
123
  homepage: https://github.com/spajus/gosu-texture-packer
123
124
  licenses:
@@ -148,4 +149,5 @@ test_files:
148
149
  - spec/files/_UI.json
149
150
  - spec/files/_UI.png
150
151
  - spec/gosu_texture_packer/tileset_spec.rb
152
+ - spec/gosu_texture_packer_spec.rb
151
153
  - spec/spec_helper.rb