descriptive-statistics 2.1.0 → 2.1.1

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDY1MGYxYzViMzFiNjE2ZjQwZGIyODJiNWRhYzQ5OGNmNzdiMDIxMQ==
4
+ N2RjNGEwZGM1MjczNmE5NmQ2NDE4OGE0Nzk3MDI5MzAwMDhlNTZlZQ==
5
5
  data.tar.gz: !binary |-
6
- MDk2OWI0ZTkyYjdlNWU4MDNmZDI3ZWQyMzFlNjk0MGE1MzczYWM0Ng==
7
- !binary "U0hBNTEy":
6
+ ZmQxYWM0YTFkYTkyMDAwZjI3YmU4NTkzMTMxMDE3NTdhYzIzMGQwMQ==
7
+ SHA512:
8
8
  metadata.gz: !binary |-
9
- ZWMzOTEwZjQ1NTViODRiODE1ODNiNjhhYWFlN2VlODQxZGM1ZThjOWY4M2Fk
10
- OGRkNjMyZjk1MWQwOTg1Y2E1OGM5ZDNjMmI1MjdmZmMwZGNhOWQyOGUwYTY1
11
- YTMzYTAyZGMzYjBmOWFkY2YwYjA3MTMzZDIyMjg2NmY1MGQyODE=
9
+ MWM0YmM1OGNlMmY2ZTk1Njg5ZmQ0ODU4YTk4ZTljNmUwZjk4YmY3MjRkYjg3
10
+ OWFhNmJkNTg5YWVhYmYwYTM5ODBjZmRhNDEyMGE0NTIyY2MxNTU4N2I0YTcx
11
+ YjVlY2FjN2E4ZjBlMGRmMjEzZWQ5N2E1MThlNjdmNzVjNzk1NzM=
12
12
  data.tar.gz: !binary |-
13
- MDIzZjA0MTA5OGFlNTc5N2E1ZGM2ZGFmNDJlYmM2NDVhZTJmYjNhZWY3ZDY4
14
- ZDM4NTU0MTBlYjc5NGY2OTI5NDEzZGU3NzMzZmNjNjg2NGFiODA0MjdhYjZm
15
- OTYzOWU4YjdiMWJkNjk1YmI3YWMwNzdlNGI5M2Q2ODdjYmYzYTI=
13
+ YTZkNzNjZTkxODk0YzY5NWYxNGI3NDkxZWMyNTAyMjE4MTI1MmM4NmU2NDZm
14
+ ZmIyMzRlOGViMzg3MTU4NjZhYTcwYWY0MjE4ODAwNTdiNDQxYWI3OTgwNzlj
15
+ NzMzZDViMWRkYzI0OGMzYmUzMmYxNjJmNjAzZTZlNTEyZmE5MjE=
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -3,15 +3,19 @@ rvm:
3
3
  - jruby-18mode
4
4
  - jruby-19mode
5
5
  - jruby-head
6
+ - rbx-2.2.1
7
+ - rbx-2.2.0
8
+ - rbx-2.1.1
9
+ - ruby-head
10
+ - 2.1.0
6
11
  - 2.0.0
7
12
  - 1.9.3
8
13
  - 1.9.2
9
- - rbx-18mode
10
- - rbx-19mode
11
- - ruby-head
12
14
  - 1.8.7
13
15
  - ree
14
16
 
15
17
  matrix:
16
18
  allow_failures:
17
- - rvm: ruby-head
19
+ - rvm: rbx-2.2.1
20
+ - rvm: rbx-2.2.0
21
+ - rvm: rbx-2.1.1
data/README.md CHANGED
@@ -3,8 +3,8 @@
3
3
  This gem calculates descriptive statistics including measures of central tendency (e.g. mean, median mode), dispersion
4
4
  (e.g. range, and quartiles), and spread (e.g variance and standard deviation).
5
5
 
6
- Tested against ruby 1.8.7, 1.9.2, 1.9.3, 2.0.0, ruby-head, jruby-18mode, jruby-19mode, jruby-head, rbx-18mode,
7
- rbx-19mode, and ree
6
+ Tested against ruby 1.8.7, 1.9.2, 1.9.3, 2.0.0, 2.1.0, ruby-head, jruby-18mode, jruby-19mode, jruby-head, rbx-2.1.1,
7
+ rbx-2.2.0, rbx-2.2.1 and ree
8
8
 
9
9
  [![Build Status](https://secure.travis-ci.org/jtescher/descriptive-statistics.png)]
10
10
  (http://travis-ci.org/jtescher/descriptive-statistics)
@@ -21,10 +21,10 @@ Gem::Specification.new do |gem|
21
21
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
22
22
  gem.require_paths = ["lib"]
23
23
 
24
- gem.add_development_dependency "rspec", "~> 2.14.1"
25
- gem.add_development_dependency "rake", "~> 10.1.0"
24
+ gem.add_development_dependency "rspec", "~> 2.14"
25
+ gem.add_development_dependency "rake", "~> 10.1"
26
26
  if RUBY_VERSION > "1.9"
27
- gem.add_development_dependency "simplecov", "~> 0.7.1"
28
- gem.add_development_dependency "coveralls", "~> 0.6.8"
27
+ gem.add_development_dependency "simplecov", "~> 0.7"
28
+ gem.add_development_dependency "coveralls", "~> 0.6"
29
29
  end
30
30
  end
@@ -23,8 +23,8 @@ module DescriptiveStatistics
23
23
  end
24
24
 
25
25
  def population_standard_deviation
26
- return if length < 2
26
+ return if length < 1
27
27
  Math.sqrt(population_variance)
28
28
  end
29
29
  end
30
- end
30
+ end
@@ -1,3 +1,3 @@
1
1
  module DescriptiveStatistics
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  end
@@ -26,6 +26,10 @@ describe DescriptiveStatistics::Spread do
26
26
  DescriptiveStatistics::Stats.new([1,2,6]).standard_deviation.should == 2.6457513110645907
27
27
  end
28
28
 
29
+ it 'returns nil for single element arrays' do
30
+ DescriptiveStatistics::Stats.new([1]).standard_deviation.should be_nil
31
+ end
32
+
29
33
  it 'returns nil if empty' do
30
34
  DescriptiveStatistics::Stats.new([]).standard_deviation.should be_nil
31
35
  end
@@ -51,6 +55,10 @@ describe DescriptiveStatistics::Spread do
51
55
  DescriptiveStatistics::Stats.new([1,2,6]).population_standard_deviation.should == 2.160246899469287
52
56
  end
53
57
 
58
+ it 'returns 0 for single element arrays' do
59
+ DescriptiveStatistics::Stats.new([1]).population_standard_deviation.should == 0
60
+ end
61
+
54
62
  it 'returns nil if empty' do
55
63
  DescriptiveStatistics::Stats.new([]).population_standard_deviation.should be_nil
56
64
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: descriptive-statistics
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Tescher
@@ -35,7 +35,7 @@ cert_chain:
35
35
  V3NaK2F3dzJpU05DNVhGaEEvOHhzSzBCbHRZUkY5blAKSEE0MVV0RHhySmtI
36
36
  TDNOMXo4Z1BNWFNyRlQ0MUZSMndnazgrbDE0UCs3ZzFVVFBpZDJFSXdmdDJ4
37
37
  T2JGZUE9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
38
- date: 2013-09-12 00:00:00.000000000 Z
38
+ date: 2014-02-04 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: rspec
@@ -43,56 +43,56 @@ dependencies:
43
43
  requirements:
44
44
  - - ~>
45
45
  - !ruby/object:Gem::Version
46
- version: 2.14.1
46
+ version: '2.14'
47
47
  type: :development
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - ~>
52
52
  - !ruby/object:Gem::Version
53
- version: 2.14.1
53
+ version: '2.14'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: rake
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - ~>
59
59
  - !ruby/object:Gem::Version
60
- version: 10.1.0
60
+ version: '10.1'
61
61
  type: :development
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ~>
66
66
  - !ruby/object:Gem::Version
67
- version: 10.1.0
67
+ version: '10.1'
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: simplecov
70
70
  requirement: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - ~>
73
73
  - !ruby/object:Gem::Version
74
- version: 0.7.1
74
+ version: '0.7'
75
75
  type: :development
76
76
  prerelease: false
77
77
  version_requirements: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - ~>
80
80
  - !ruby/object:Gem::Version
81
- version: 0.7.1
81
+ version: '0.7'
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: coveralls
84
84
  requirement: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - ~>
87
87
  - !ruby/object:Gem::Version
88
- version: 0.6.8
88
+ version: '0.6'
89
89
  type: :development
90
90
  prerelease: false
91
91
  version_requirements: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - ~>
94
94
  - !ruby/object:Gem::Version
95
- version: 0.6.8
95
+ version: '0.6'
96
96
  description: Descriptive Statistics Calculator
97
97
  email:
98
98
  - virulent@gmail.com
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  version: '0'
145
145
  requirements: []
146
146
  rubyforge_project:
147
- rubygems_version: 2.0.7
147
+ rubygems_version: 2.2.0
148
148
  signing_key:
149
149
  specification_version: 4
150
150
  summary: Simply calculate descriptive statistics such as measures of central tendency
metadata.gz.sig CHANGED
Binary file