sashite-pan 0.0.2 → 0.1.0

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: 54eb039472c953fe47d1301a02d37843f1695c69
4
- data.tar.gz: 2811407830cf1f4387b252bb21223853c391fdf2
3
+ metadata.gz: b34d7729fc0d82a1d1c2c86159962a4833440f7b
4
+ data.tar.gz: 20f7db3f64d3300f646ebb4c1abcf1cc0f911c9a
5
5
  SHA512:
6
- metadata.gz: 69aa6996ee0432f347ace90340aa1334a053e03d65372f618af480d1bd0e1f1192318c310bf67786177449c70209f36b5e2fcd2b9deeae1bf37a58423bea04b7
7
- data.tar.gz: 5034ed8b40429cf82976f8c575724ee7e7794b215adf1da0a2a976012b6d405956dd38962ef91ed5ad302fd3177931704903e7785155604baaa4c2e9a927129f
6
+ metadata.gz: 44bf0808b56d9905d7c28b5e8045bba47938d280cf3c8822261a9c334719f1e59f1d971081f0543fe59dc94013364161d3e691a6cbef578808daf2bccae4c7ec
7
+ data.tar.gz: 7c3593b2d96924d43477a612096d9d6438b0198caf97747d809f47d685f00f863edcd039cadc60a325ffcb90b3e542a0c0c656b7aca7f73aca56546824306ec5
data/README.md CHANGED
@@ -24,10 +24,12 @@ Or install it yourself as:
24
24
 
25
25
  ## Example
26
26
 
27
- require 'sashite-pan'
27
+ ```ruby
28
+ require 'sashite-pan'
28
29
 
29
- action = Sashite::PAN.load :shift, 42, 43
30
- action.src_square # => 42
30
+ action = Sashite::PAN.load :shift, 42, 43
31
+ action.src_square # => 42
32
+ ```
31
33
 
32
34
  ## Contributing
33
35
 
data/VERSION.semver CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.1.0
@@ -3,7 +3,7 @@ module Sashite
3
3
  class Drop
4
4
  attr_reader :actor, :dst_square
5
5
 
6
- def initialize actor, dst_square
6
+ def initialize dst_square, actor
7
7
  raise TypeError unless actor.is_a? Symbol
8
8
  raise TypeError unless dst_square.is_a? Fixnum
9
9
 
@@ -14,8 +14,8 @@ module Sashite
14
14
  def to_a
15
15
  [
16
16
  self.class.name.split('::').last.downcase.to_sym,
17
- @actor,
18
- @dst_square
17
+ @dst_square,
18
+ @actor
19
19
  ]
20
20
  end
21
21
  end
data/test/_test_helper.rb CHANGED
@@ -1,2 +1,2 @@
1
- require 'sashite/pan'
2
1
  require 'minitest/autorun'
2
+ require 'sashite/pan'
data/test/test_drop.rb CHANGED
@@ -4,25 +4,25 @@ describe Sashite::PAN do
4
4
  describe 'drops' do
5
5
  describe 'errors' do
6
6
  it 'raises a type error from the actor' do
7
- -> { Sashite::PAN.load :drop, 'foobar', 42 }.must_raise TypeError
7
+ -> { Sashite::PAN.load :drop, 42, 'foobar' }.must_raise TypeError
8
8
  end
9
9
 
10
10
  it 'raises a type error from the destination square' do
11
- -> { Sashite::PAN.load :drop, :foobar, '42' }.must_raise TypeError
11
+ -> { Sashite::PAN.load :drop, '42', :foobar }.must_raise TypeError
12
12
  end
13
13
  end
14
14
 
15
15
  describe 'instances' do
16
16
  before do
17
- @action = Sashite::PAN.load :drop, :foobar, 42
17
+ @action = Sashite::PAN.load :drop, 42, :foobar
18
18
  end
19
19
 
20
20
  it 'returns the action' do
21
- @action.to_a.must_equal [ :drop, :foobar, 42 ]
21
+ @action.to_a.must_equal [ :drop, 42, :foobar ]
22
22
  end
23
23
 
24
24
  it 'returns the action (once again)' do
25
- @action.to_a.must_equal Sashite::PAN::Drop.new(:foobar, 42).to_a
25
+ @action.to_a.must_equal Sashite::PAN::Drop.new(42, :foobar).to_a
26
26
  end
27
27
 
28
28
  it 'returns the actor of the action' do
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sashite-pan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Wack
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-29 00:00:00.000000000 Z
11
+ date: 2014-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -81,7 +81,7 @@ files:
81
81
  - test/_test_helper.rb
82
82
  - test/test_capture.rb
83
83
  - test/test_drop.rb
84
- - test/test_movement.rb.rb
84
+ - test/test_movement.rb
85
85
  - test/test_pan.rb
86
86
  - test/test_promote.rb
87
87
  - test/test_remove.rb
@@ -114,7 +114,7 @@ test_files:
114
114
  - test/_test_helper.rb
115
115
  - test/test_capture.rb
116
116
  - test/test_drop.rb
117
- - test/test_movement.rb.rb
117
+ - test/test_movement.rb
118
118
  - test/test_pan.rb
119
119
  - test/test_promote.rb
120
120
  - test/test_remove.rb