ministat 1.2.5 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +9 -13
  2. data/lib/ministat.rb +1 -1
  3. data/test/test_ministat.rb +3 -6
  4. metadata +68 -90
data/Rakefile CHANGED
@@ -1,16 +1,12 @@
1
- require 'rake/gempackagetask'
2
- require './lib/ministat.rb'
1
+ require 'rubygems'
2
+ require 'hoe'
3
3
 
4
- spec = Gem::Specification.new do |p|
5
- p.version = MiniStat::VERSION
6
- p.name = 'ministat'
7
- p.author = 'Dean Hudson'
8
- p.email = 'dean@ero.com'
9
- p.summary = 'A small and simple library to generate statistical info on single-variable datasets.'
10
- p.description = File.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
11
- p.requirements = ['An eye for data and a strong will to live']
12
- p.has_rdoc = true
13
- p.files = Dir['**/**']
4
+ Hoe.spec 'ministat' do
5
+ developer('Dean Hudson', 'dean@ero.com')
6
+
7
+ self.readme_file = 'README.rdoc'
8
+ self.history_file = 'History.rdoc'
9
+ self.extra_dev_deps << ['minitest', '~> 2.0']
14
10
  end
15
- Rake::GemPackageTask.new(spec).define
11
+
16
12
 
@@ -1,7 +1,7 @@
1
1
  require 'mathn'
2
2
 
3
3
  module MiniStat
4
- VERSION = '1.2.5'
4
+ VERSION = '1.2.6'
5
5
  class Data
6
6
  attr_reader :data
7
7
 
@@ -1,11 +1,8 @@
1
- # Code Generated by ZenTest v. 3.6.1
2
- # classname: asrt / meth = ratio%
3
- # MiniStat: 0 / 10 = 0.00%
4
-
5
- require 'test/unit' unless defined? $ZENTEST and $ZENTEST
1
+ require 'rubygems'
2
+ require 'minitest/unit'
6
3
  require 'ministat'
7
4
 
8
- class TestMiniStat < Test::Unit::TestCase
5
+ class TestMiniStat < MiniTest::Unit::TestCase
9
6
  def setup
10
7
  @data1 = [34, 47, 1, 15, 57, 24, 20, 11, 19, 50, 28, 37]
11
8
  @data2 = [60, 56, 61, 68, 51, 53, 69, 54]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 2
8
- - 5
9
- version: 1.2.5
8
+ - 6
9
+ version: 1.2.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Dean Hudson
@@ -14,106 +14,84 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-11-13 00:00:00 -08:00
17
+ date: 2010-11-23 00:00:00 -08:00
18
18
  default_executable:
19
- dependencies: []
20
-
21
- description: |
22
- = ministat
23
-
24
- * http://github.com/deanh/MiniStat
25
-
26
- == DESCRIPTION:
27
-
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: rubyforge
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 2
30
+ - 0
31
+ - 4
32
+ version: 2.0.4
33
+ type: :development
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: minitest
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ segments:
44
+ - 2
45
+ - 0
46
+ version: "2.0"
47
+ type: :development
48
+ version_requirements: *id002
49
+ - !ruby/object:Gem::Dependency
50
+ name: hoe
51
+ prerelease: false
52
+ requirement: &id003 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ segments:
58
+ - 2
59
+ - 6
60
+ - 2
61
+ version: 2.6.2
62
+ type: :development
63
+ version_requirements: *id003
64
+ description: |-
28
65
  This is a simple package that generates simple statistical info on
29
66
  numerical data sets of a single variable. It's nothing too fancy, but
30
67
  maybe just enough to coat your numbers with a thin layer of science. Or,
31
68
  at least to get you thinking about what it may take to do so.
32
-
33
- == FEATURES/PROBLEMS:
34
-
35
- * Pure Ruby
36
- * It's small and simple
37
- * It's probably good enough
38
- * I haven't profiled it against large data sets
39
- * Naive median implementation requires a sort, but it could be done in linear time. Patches welcome.
40
- * Missing tests for harmonic and geometric mean -- the stats package I was generating test data with didn't have them.
41
-
42
- == SYNOPSIS:
43
-
44
- require 'ministat'
45
-
46
- data = [1,2,3,4,5,6,7,7,6,5,4,4]
47
- d = MiniStat::Data.new(data)
48
-
49
- d.median # => 4.5
50
- d.mean # => 4.5
51
- d.mode # => 4.0
52
- d.q1 # => 3.5
53
- d.outliers # => []
54
- d.std_dev # => 1.80277563773199
55
- # and so on...
56
-
57
- puts MiniStat::Data.new(data).to_s
58
- # this outputs most everything
59
-
60
- == REQUIREMENTS:
61
-
62
- Hoe is your friend.
63
-
64
- == INSTALL:
65
-
66
- sudo gem install ministat
67
-
68
- == LICENSE:
69
-
70
- (The MIT License)
71
-
72
- Copyright (c) 2007-2010 Dean Hudson
73
-
74
- Permission is hereby granted, free of charge, to any person obtaining
75
- a copy of this software and associated documentation files (the
76
- 'Software'), to deal in the Software without restriction, including
77
- without limitation the rights to use, copy, modify, merge, publish,
78
- distribute, sublicense, and/or sell copies of the Software, and to
79
- permit persons to whom the Software is furnished to do so, subject to
80
- the following conditions:
81
-
82
- The above copyright notice and this permission notice shall be
83
- included in all copies or substantial portions of the Software.
84
-
85
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
86
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
87
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
88
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
89
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
90
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
91
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
92
-
93
- email: dean@ero.com
94
- executables: []
95
-
69
+ email:
70
+ - dean@ero.com
71
+ executables:
72
+ - ministat
96
73
  extensions: []
97
74
 
98
- extra_rdoc_files: []
99
-
75
+ extra_rdoc_files:
76
+ - Manifest.txt
100
77
  files:
101
- - bin/ministat
102
78
  - History.rdoc
103
- - lib/ministat.rb
104
79
  - Manifest.txt
105
- - Rakefile
106
80
  - README.rdoc
81
+ - Rakefile
82
+ - bin/ministat
83
+ - lib/ministat.rb
107
84
  - test/data/1.dat
108
85
  - test/data/2.dat
109
86
  - test/test_ministat.rb
110
87
  has_rdoc: true
111
- homepage:
88
+ homepage: http://github.com/deanh/MiniStat
112
89
  licenses: []
113
90
 
114
91
  post_install_message:
115
- rdoc_options: []
116
-
92
+ rdoc_options:
93
+ - --main
94
+ - README.rdoc
117
95
  require_paths:
118
96
  - lib
119
97
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -132,12 +110,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
110
  segments:
133
111
  - 0
134
112
  version: "0"
135
- requirements:
136
- - An eye for data and a strong will to live
137
- rubyforge_project:
113
+ requirements: []
114
+
115
+ rubyforge_project: ministat
138
116
  rubygems_version: 1.3.7
139
117
  signing_key:
140
118
  specification_version: 3
141
- summary: A small and simple library to generate statistical info on single-variable datasets.
142
- test_files: []
143
-
119
+ summary: This is a simple package that generates simple statistical info on numerical data sets of a single variable
120
+ test_files:
121
+ - test/test_ministat.rb