flex_array 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZDViNzhjODQyODZmYzZlZWQyOTY2YjZkN2IyOTc0MzQ1NmViNGI1MA==
5
- data.tar.gz: !binary |-
6
- N2YzN2EzYTA4MzAwNzZlMjY3NDM2NDA5NzBmNGE3ZjRmYjI1ODhmOA==
2
+ SHA1:
3
+ metadata.gz: cb0e2598e518e574d21b0a5e5de9dea1189f735b
4
+ data.tar.gz: e606ee6ff4d0534806f2e3cc7fe2c856165ced56
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NWYxNzgyYzUzM2ZhNzBjYjRjOTE2ZDEzOWI2NmIyNzhkZjhkMmNkYjBlNWY4
10
- ZmY1MzQxOTM2MjE0MTg0NjdlNDE4MDAxZGE1Y2FjNGZjZDdhY2E2MjEzZGM5
11
- Y2EyMWU0ZDY2ZjI1MTY0OGIxOTJjYjU3YWI3OTYyMTRmMzY3OWI=
12
- data.tar.gz: !binary |-
13
- NWY4YjZmOTQ1MTUxODE0YTdmODNlMDVhY2U5NGM1MTkxNmI3ZDgzOGFmYTI3
14
- YjJhNGFkYzY3YzdhM2JhYTAzZTg3OTMyNDM3NjVhMDhkZmU0ZGE4NzhiNjFm
15
- YTRlYWQzMWM3YjRjMGEwYTM4OGM4M2Y0Njk2Y2Y4NGU2ZTU2NDE=
6
+ metadata.gz: 1681e59f906deebb217eadd4e71b3c1c5f07654e60a3a015a5a15e294b4e048b1e54df2ab2d3c9206604151c2d01991499e8837ed38b3b7db82ffbea37754129
7
+ data.tar.gz: dc833e48d0c0695d3c94135491bc99f0fbe7d5ce9c35767472b2249262f52b993e25cfcd35ea3b64a2cdd7aa0ae427a0f75d45752b732e708a33b87bda17893d
data/.gitignore CHANGED
@@ -1,4 +1,20 @@
1
- rdoc/
2
- *.gem
1
+ *.bat
3
2
  *.zip
4
3
  *.tmp
4
+ *.gem
5
+ *.rbc
6
+ .bundle
7
+ .config
8
+ .yardoc
9
+ Gemfile.lock
10
+ InstalledFiles
11
+ _yardoc
12
+ coverage
13
+ doc/
14
+ lib/bundler/man
15
+ pkg
16
+ rdoc
17
+ spec/reports
18
+ test/tmp
19
+ test/version_tmp
20
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in flex_array.gemspec
4
+ gemspec
@@ -22,6 +22,7 @@ Gem::Specification.new do |s|
22
22
  s.add_development_dependency 'reek', "~> 1.3.8"
23
23
  s.add_development_dependency 'minitest', "~> 4.7.5"
24
24
  s.add_development_dependency 'rdoc', "~> 4.0.1"
25
+ s.add_development_dependency 'minitest_visible', ">= 0.1.0"
25
26
 
26
27
  s.add_runtime_dependency 'in_array'
27
28
 
@@ -0,0 +1,7 @@
1
+ # coding: utf-8
2
+
3
+ #* version.rb - The version string for flex array.
4
+ class FlexArray
5
+ #The version string for flex array.
6
+ VERSION = "0.3.2"
7
+ end
@@ -1,18 +1,12 @@
1
1
  require_relative '../lib/flex_array'
2
+ gem 'minitest'
2
3
  require 'minitest/autorun'
4
+ require 'minitest_visible'
3
5
 
4
- class ArrayTester < MiniTest::Unit::TestCase
5
- $do_this_only_one_time = "" unless defined? $do_this_only_one_time
6
+ class ArrayTester < Minitest::Test
6
7
 
7
- def initialize(*all)
8
- if $do_this_only_one_time != __FILE__
9
- puts
10
- puts "Running test file: #{File.split(__FILE__)[1]}"
11
- $do_this_only_one_time = __FILE__
12
- end
13
-
14
- super(*all)
15
- end
8
+ #Track mini-test progress.
9
+ include MinitestVisible
16
10
 
17
11
  def test_the_limits_method
18
12
  test = [1,2,3,4,5,6]
@@ -1,18 +1,12 @@
1
1
  require_relative '../lib/flex_array'
2
+ gem 'minitest'
2
3
  require 'minitest/autorun'
4
+ require 'minitest_visible'
3
5
 
4
- class FlexArrayAppendTester < MiniTest::Unit::TestCase
5
- $do_this_only_one_time = "" unless defined? $do_this_only_one_time
6
+ class FlexArrayAppendTester < Minitest::Test
6
7
 
7
- def initialize(*all)
8
- if $do_this_only_one_time != __FILE__
9
- puts
10
- puts "Running test file: #{File.split(__FILE__)[1]}"
11
- $do_this_only_one_time = __FILE__
12
- end
13
-
14
- super(*all)
15
- end
8
+ #Track mini-test progress.
9
+ include MinitestVisible
16
10
 
17
11
  def test_append_onto_an_existing_array
18
12
  f = FlexArray.new([1,3], "Title")
@@ -1,18 +1,12 @@
1
1
  require_relative '../lib/flex_array'
2
+ gem 'minitest'
2
3
  require 'minitest/autorun'
4
+ require 'minitest_visible'
3
5
 
4
- class FlexArrayEachTester < MiniTest::Unit::TestCase
5
- $do_this_only_one_time = "" unless defined? $do_this_only_one_time
6
+ class FlexArrayEachTester < Minitest::Test
6
7
 
7
- def initialize(*all)
8
- if $do_this_only_one_time != __FILE__
9
- puts
10
- puts "Running test file: #{File.split(__FILE__)[1]}"
11
- $do_this_only_one_time = __FILE__
12
- end
13
-
14
- super(*all)
15
- end
8
+ #Track mini-test progress.
9
+ include MinitestVisible
16
10
 
17
11
  def test_each
18
12
  d = [0,1,2,3,4,5,6,7,8]
@@ -1,18 +1,12 @@
1
1
  require_relative '../lib/flex_array'
2
+ gem 'minitest'
2
3
  require 'minitest/autorun'
4
+ require 'minitest_visible'
3
5
 
4
- class FlexArrayIndexTester < MiniTest::Unit::TestCase
5
- $do_this_only_one_time = "" unless defined? $do_this_only_one_time
6
+ class FlexArrayIndexTester < Minitest::Test
6
7
 
7
- def initialize(*all)
8
- if $do_this_only_one_time != __FILE__
9
- puts
10
- puts "Running test file: #{File.split(__FILE__)[1]}"
11
- $do_this_only_one_time = __FILE__
12
- end
13
-
14
- super(*all)
15
- end
8
+ #Track mini-test progress.
9
+ include MinitestVisible
16
10
 
17
11
  def test_that_it_indexes_correctly
18
12
  q1 = FlexArray.new([3, 3, 3]) {|i| i.dup}
@@ -1,18 +1,12 @@
1
1
  require_relative '../lib/flex_array'
2
+ gem 'minitest'
2
3
  require 'minitest/autorun'
4
+ require 'minitest_visible'
3
5
 
4
- class FlexArrayNewTester < MiniTest::Unit::TestCase
5
- $do_this_only_one_time = "" unless defined? $do_this_only_one_time
6
+ class FlexArrayNewTester < Minitest::Test
6
7
 
7
- def initialize(*all)
8
- if $do_this_only_one_time != __FILE__
9
- puts
10
- puts "Running test file: #{File.split(__FILE__)[1]}"
11
- $do_this_only_one_time = __FILE__
12
- end
13
-
14
- super(*all)
15
- end
8
+ #Track mini-test progress.
9
+ include MinitestVisible
16
10
 
17
11
  def test_the_new_method
18
12
  q1 = FlexArray.new(10, 0)
@@ -1,18 +1,12 @@
1
1
  require_relative '../lib/flex_array'
2
+ gem 'minitest'
2
3
  require 'minitest/autorun'
4
+ require 'minitest_visible'
3
5
 
4
- class FlexArrayReshapeTester < MiniTest::Unit::TestCase
5
- $do_this_only_one_time = "" unless defined? $do_this_only_one_time
6
+ class FlexArrayReshapeTester < Minitest::Test
6
7
 
7
- def initialize(*all)
8
- if $do_this_only_one_time != __FILE__
9
- puts
10
- puts "Running test file: #{File.split(__FILE__)[1]}"
11
- $do_this_only_one_time = __FILE__
12
- end
13
-
14
- super(*all)
15
- end
8
+ #Track mini-test progress.
9
+ include MinitestVisible
16
10
 
17
11
  def test_the_reshape_method
18
12
  ba1 = [[0,0], [0,1], [0,2], [0,3],
@@ -1,18 +1,12 @@
1
1
  require_relative '../lib/flex_array'
2
+ gem 'minitest'
2
3
  require 'minitest/autorun'
4
+ require 'minitest_visible'
3
5
 
4
- class FlexArrayTester < MiniTest::Unit::TestCase
5
- $do_this_only_one_time = "" unless defined? $do_this_only_one_time
6
+ class FlexArrayTester < Minitest::Test
6
7
 
7
- def initialize(*all)
8
- if $do_this_only_one_time != __FILE__
9
- puts
10
- puts "Running test file: #{File.split(__FILE__)[1]}"
11
- $do_this_only_one_time = __FILE__
12
- end
13
-
14
- super(*all)
15
- end
8
+ #Track mini-test progress.
9
+ include MinitestVisible
16
10
 
17
11
  def test_version_reporting
18
12
  f = FlexArray.new([3,3], 'test')
@@ -1,18 +1,12 @@
1
1
  require_relative '../lib/flex_array'
2
+ gem 'minitest'
2
3
  require 'minitest/autorun'
4
+ require 'minitest_visible'
3
5
 
4
- class FlexArrayTransposeTester < MiniTest::Unit::TestCase
5
- $do_this_only_one_time = "" unless defined? $do_this_only_one_time
6
+ class FlexArrayTransposeTester < Minitest::Test
6
7
 
7
- def initialize(*all)
8
- if $do_this_only_one_time != __FILE__
9
- puts
10
- puts "Running test file: #{File.split(__FILE__)[1]}"
11
- $do_this_only_one_time = __FILE__
12
- end
13
-
14
- super(*all)
15
- end
8
+ #Track mini-test progress.
9
+ include MinitestVisible
16
10
 
17
11
  def test_the_transpose_em_method
18
12
  f = FlexArray.new([3,3]) { |i| i[0]*3 + i[1] }
@@ -1,18 +1,12 @@
1
1
  require_relative '../lib/flex_array'
2
+ gem 'minitest'
2
3
  require 'minitest/autorun'
4
+ require 'minitest_visible'
3
5
 
4
- class FlexArrayValidateTester < MiniTest::Unit::TestCase
5
- $do_this_only_one_time = "" unless defined? $do_this_only_one_time
6
-
7
- def initialize(*all)
8
- if $do_this_only_one_time != __FILE__
9
- puts
10
- puts "Running test file: #{File.split(__FILE__)[1]}"
11
- $do_this_only_one_time = __FILE__
12
- end
13
-
14
- super(*all)
15
- end
6
+ class FlexArrayValidateTester < Minitest::Test
7
+
8
+ #Track mini-test progress.
9
+ include MinitestVisible
16
10
 
17
11
  def test_the_compatible_method
18
12
  f = FlexArray.new([3,3], 'f')
@@ -20,7 +14,7 @@ class FlexArrayValidateTester < MiniTest::Unit::TestCase
20
14
  h = FlexArray.new([1..3,1..3], 'h')
21
15
  i = FlexArray.new([3,3,3], 'i')
22
16
  j = FlexArray.new([3], 'j')
23
-
17
+
24
18
  assert(f.compatible?(g))
25
19
  refute(f.compatible?(h))
26
20
  refute(f.compatible?(i))
@@ -1,24 +1,18 @@
1
1
  require_relative '../lib/flex_array'
2
+ gem 'minitest'
2
3
  require 'minitest/autorun'
4
+ require 'minitest_visible'
3
5
 
4
- class IntegerTester < MiniTest::Unit::TestCase
5
- $do_this_only_one_time = "" unless defined? $do_this_only_one_time
6
-
7
- def initialize(*all)
8
- if $do_this_only_one_time != __FILE__
9
- puts
10
- puts "Running test file: #{File.split(__FILE__)[1]}"
11
- $do_this_only_one_time = __FILE__
12
- end
13
-
14
- super(*all)
15
- end
6
+ class IntegerTester < Minitest::Test
7
+
8
+ #Track mini-test progress.
9
+ include MinitestVisible
16
10
 
17
11
  def test_that_to_spec_component_works
18
12
  lc = (10).to_spec_component(3)
19
13
  assert_equal(0...10, lc.range)
20
14
  assert_equal(3, lc.stride)
21
-
15
+
22
16
  lc = (0).to_spec_component(3)
23
17
  assert_equal(0...0, lc.range)
24
18
  end
@@ -26,15 +20,15 @@ class IntegerTester < MiniTest::Unit::TestCase
26
20
  def test_that_to_spec_component_rejects_bad
27
21
  assert_raises(ArgumentError) { (-100).to_spec_component(3) }
28
22
  end
29
-
23
+
30
24
  def test_the_to_index_range_method
31
25
  lc = SpecComponent.new(0...10, 1)
32
26
  assert_equal(0..0, (0).to_index_range(lc))
33
27
  assert_equal(1..1, (1).to_index_range(lc))
34
- assert_equal(9..9, (-1).to_index_range(lc))
35
-
28
+ assert_equal(9..9, (-1).to_index_range(lc))
29
+
36
30
  assert_raises(IndexError) { (10).to_index_range(lc) }
37
31
  assert_raises(IndexError) { (-12).to_index_range(lc) }
38
32
  end
39
-
33
+
40
34
  end
@@ -1,18 +1,12 @@
1
1
  require_relative '../lib/flex_array'
2
+ gem 'minitest'
2
3
  require 'minitest/autorun'
4
+ require 'minitest_visible'
3
5
 
4
- class ObjectTester < MiniTest::Unit::TestCase
5
- $do_this_only_one_time = "" unless defined? $do_this_only_one_time
6
+ class ObjectTester < Minitest::Test
6
7
 
7
- def initialize(*all)
8
- if $do_this_only_one_time != __FILE__
9
- puts
10
- puts "Running test file: #{File.split(__FILE__)[1]}"
11
- $do_this_only_one_time = __FILE__
12
- end
13
-
14
- super(*all)
15
- end
8
+ #Track mini-test progress.
9
+ include MinitestVisible
16
10
 
17
11
  def test_that_to_spec_component_fails
18
12
  obj = Object.new
@@ -1,18 +1,12 @@
1
1
  require_relative '../lib/flex_array'
2
+ gem 'minitest'
2
3
  require 'minitest/autorun'
4
+ require 'minitest_visible'
3
5
 
4
- class RangeTester < MiniTest::Unit::TestCase
5
- $do_this_only_one_time = "" unless defined? $do_this_only_one_time
6
+ class RangeTester < Minitest::Test
6
7
 
7
- def initialize(*all)
8
- if $do_this_only_one_time != __FILE__
9
- puts
10
- puts "Running test file: #{File.split(__FILE__)[1]}"
11
- $do_this_only_one_time = __FILE__
12
- end
13
-
14
- super(*all)
15
- end
8
+ #Track mini-test progress.
9
+ include MinitestVisible
16
10
 
17
11
  def test_that_to_spec_component_works
18
12
  lc = (0...10).to_spec_component(3)
@@ -1,18 +1,12 @@
1
1
  require_relative '../lib/flex_array'
2
+ gem 'minitest'
2
3
  require 'minitest/autorun'
4
+ require 'minitest_visible'
3
5
 
4
- class SpecArrayTester < MiniTest::Unit::TestCase
5
- $do_this_only_one_time = "" unless defined? $do_this_only_one_time
6
+ class SpecArrayTester < Minitest::Test
6
7
 
7
- def initialize(*all)
8
- if $do_this_only_one_time != __FILE__
9
- puts
10
- puts "Running test file: #{File.split(__FILE__)[1]}"
11
- $do_this_only_one_time = __FILE__
12
- end
13
-
14
- super(*all)
15
- end
8
+ #Track mini-test progress.
9
+ include MinitestVisible
16
10
 
17
11
  def test_that_it_builds_specs
18
12
  spec = SpecArray.new([0...10, 0...8])
@@ -1,18 +1,12 @@
1
1
  require_relative '../lib/flex_array'
2
+ gem 'minitest'
2
3
  require 'minitest/autorun'
4
+ require 'minitest_visible'
3
5
 
4
- class SpecComponentTester < MiniTest::Unit::TestCase
5
- $do_this_only_one_time = "" unless defined? $do_this_only_one_time
6
+ class SpecComponentTester < Minitest::Test
6
7
 
7
- def initialize(*all)
8
- if $do_this_only_one_time != __FILE__
9
- puts
10
- puts "Running test file: #{File.split(__FILE__)[1]}"
11
- $do_this_only_one_time = __FILE__
12
- end
13
-
14
- super(*all)
15
- end
8
+ #Track mini-test progress.
9
+ include MinitestVisible
16
10
 
17
11
  def setup
18
12
  @lc = SpecComponent.new(1..5, 10)
metadata CHANGED
@@ -1,107 +1,122 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flex_array
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Camilleri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-04 00:00:00.000000000 Z
11
+ date: 2016-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: reek
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 1.3.8
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.3.8
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: minitest
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 4.7.5
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 4.7.5
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rdoc
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: 4.0.1
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 4.0.1
83
+ - !ruby/object:Gem::Dependency
84
+ name: minitest_visible
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 0.1.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 0.1.0
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: in_array
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
- - - ! '>='
101
+ - - ">="
88
102
  - !ruby/object:Gem::Version
89
103
  version: '0'
90
104
  type: :runtime
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
- - - ! '>='
108
+ - - ">="
95
109
  - !ruby/object:Gem::Version
96
110
  version: '0'
97
- description: ! 'A flexible, multidimensional array class for Ruby. '
111
+ description: 'A flexible, multidimensional array class for Ruby. '
98
112
  email: peter.c.camilleri@gmail.com
99
113
  executables: []
100
114
  extensions: []
101
115
  extra_rdoc_files:
102
116
  - license.txt
103
117
  files:
104
- - .gitignore
118
+ - ".gitignore"
119
+ - Gemfile
105
120
  - docs/Flex_Array_UG.odt
106
121
  - docs/Flex_Array_UG_Version_0_3_0.pdf
107
122
  - flex_array
@@ -123,6 +138,7 @@ files:
123
138
  - lib/flex_array/range.rb
124
139
  - lib/flex_array/spec_array.rb
125
140
  - lib/flex_array/spec_component.rb
141
+ - lib/flex_array/version.rb
126
142
  - license.txt
127
143
  - rakefile.rb
128
144
  - readme.txt
@@ -152,17 +168,17 @@ require_paths:
152
168
  - lib
153
169
  required_ruby_version: !ruby/object:Gem::Requirement
154
170
  requirements:
155
- - - ! '>='
171
+ - - ">="
156
172
  - !ruby/object:Gem::Version
157
173
  version: 1.9.3
158
174
  required_rubygems_version: !ruby/object:Gem::Requirement
159
175
  requirements:
160
- - - ! '>='
176
+ - - ">="
161
177
  - !ruby/object:Gem::Version
162
178
  version: '0'
163
179
  requirements: []
164
180
  rubyforge_project:
165
- rubygems_version: 2.1.4
181
+ rubygems_version: 2.2.2
166
182
  signing_key:
167
183
  specification_version: 4
168
184
  summary: A flexible array class.