sarah 0.0.2 → 0.0.3

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/.yardopts ADDED
@@ -0,0 +1,4 @@
1
+ --tag copyright:Copyright
2
+ --tag license:License
3
+ -
4
+ HISTORY.txt
data/HISTORY.txt CHANGED
@@ -1,3 +1,6 @@
1
+ 2013-07-13 Version 0.0.3
2
+ Added << alias for push.
3
+
1
4
  2013-07-08 Version 0.0.2
2
5
  Packaging fixes and some documentation cleanup.
3
6
 
data/lib/sarah.rb CHANGED
@@ -276,6 +276,8 @@ class Sarah
276
276
  self
277
277
  end
278
278
 
279
+ alias_method :<<, :push
280
+
279
281
  # Delete by sequential or random-access key, returning any existing value
280
282
  # (or the default or block value, otherwise).
281
283
  #
data/sarah.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "sarah"
3
- s.version = "0.0.2"
4
- s.date = "2013-07-08"
3
+ s.version = "0.0.3"
4
+ s.date = "2013-07-13"
5
5
  s.authors = ["Brian Katzung"]
6
6
  s.email = ["briank@kappacs.com"]
7
7
  s.homepage = "http://rubygems.org/gems/sarah"
@@ -9,7 +9,8 @@ Gem::Specification.new do |s|
9
9
  s.description = "Implements a hybrid data structure composed of a sequential array and random-access hash"
10
10
  s.license = "MIT"
11
11
 
12
- s.files = Dir.glob("lib/**/*") + %w{sarah.gemspec HISTORY.txt}
12
+ s.files = Dir.glob("lib/**/*") +
13
+ %w{sarah.gemspec HISTORY.txt .yardopts}
13
14
  s.test_files = Dir.glob("test/**/*.rb")
14
15
  s.require_path = 'lib'
15
16
  end
data/test/00class.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'minitest/autorun'
2
2
  require 'sarah'
3
3
 
4
- class TestSarah < MiniTest::Unit::TestCase
4
+ class TestSarah_00 < MiniTest::Unit::TestCase
5
5
 
6
6
  def test_cmethod_new
7
7
  assert_respond_to Sarah, :new
data/test/01instance.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'minitest/autorun'
2
2
  require 'sarah'
3
3
 
4
- class TestSarah < MiniTest::Unit::TestCase
4
+ class TestSarah_01 < MiniTest::Unit::TestCase
5
5
 
6
6
  def setup
7
7
  @s = Sarah.new
data/test/02new.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'minitest/autorun'
2
2
  require 'sarah'
3
3
 
4
- class TestSarah < MiniTest::Unit::TestCase
4
+ class TestSarah_02 < MiniTest::Unit::TestCase
5
5
 
6
6
  def test_new_array
7
7
  s = Sarah.new(:array => [1, 2])
data/test/03set_get.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'minitest/autorun'
2
2
  require 'sarah'
3
3
 
4
- class TestSarah < MiniTest::Unit::TestCase
4
+ class TestSarah_03 < MiniTest::Unit::TestCase
5
5
 
6
6
  def setup
7
7
  @s = Sarah.new(:array => [1, 2], :hash => { :a => 3, :b => 4 })
data/test/04stack.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'minitest/autorun'
2
2
  require 'sarah'
3
3
 
4
- class TestSarah < MiniTest::Unit::TestCase
4
+ class TestSarah_04 < MiniTest::Unit::TestCase
5
5
 
6
6
  def test_stack
7
7
  s = Sarah.new
@@ -13,6 +13,12 @@ class TestSarah < MiniTest::Unit::TestCase
13
13
  assert_equal([5, 6, 1, 2], s.seq, "after shift, pop")
14
14
  end
15
15
 
16
+ def test_left_shift
17
+ s = Sarah.new
18
+ s << 1 << 2 << 3
19
+ assert_equal([1, 2, 3], s.seq, "<<")
20
+ end
21
+
16
22
  def test_append
17
23
  s = Sarah.new
18
24
  s.append! [1], { :one => 1 }, [2], [3]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Brian Katzung
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2013-07-08 00:00:00 -05:00
17
+ date: 2013-07-13 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies: []
20
20
 
@@ -31,6 +31,7 @@ files:
31
31
  - lib/sarah.rb
32
32
  - sarah.gemspec
33
33
  - HISTORY.txt
34
+ - .yardopts
34
35
  - test/02new.rb
35
36
  - test/00class.rb
36
37
  - test/04stack.rb