range_math 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/range_math.rb +4 -0
  3. data/range_math.gemspec +62 -0
  4. metadata +13 -12
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
data/lib/range_math.rb CHANGED
@@ -47,4 +47,8 @@ class Range
47
47
  def average
48
48
  (self.begin + self.end) / 2.0
49
49
  end
50
+
51
+ def coerce(other)
52
+ return self, other
53
+ end
50
54
  end
@@ -0,0 +1,62 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "range_math"
8
+ s.version = "0.2.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["muflax"]
12
+ s.date = "2011-12-04"
13
+ s.description = "use ranges in math expression"
14
+ s.email = "mail@muflax.com"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ "Gemfile",
22
+ "Gemfile.lock",
23
+ "LICENSE.txt",
24
+ "README",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "lib/range_math.rb",
28
+ "range_math.gemspec",
29
+ "test/helper.rb",
30
+ "test/test_range_math.rb"
31
+ ]
32
+ s.homepage = "http://github.com/muflax/range_math"
33
+ s.licenses = ["MIT"]
34
+ s.require_paths = ["lib"]
35
+ s.rubygems_version = "1.8.11"
36
+ s.summary = "do math on ranges"
37
+
38
+ if s.respond_to? :specification_version then
39
+ s.specification_version = 3
40
+
41
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
42
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
43
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
44
+ s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
45
+ s.add_development_dependency(%q<rcov>, [">= 0"])
46
+ s.add_development_dependency(%q<rdoc>, [">= 0"])
47
+ else
48
+ s.add_dependency(%q<shoulda>, [">= 0"])
49
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
50
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
51
+ s.add_dependency(%q<rcov>, [">= 0"])
52
+ s.add_dependency(%q<rdoc>, [">= 0"])
53
+ end
54
+ else
55
+ s.add_dependency(%q<shoulda>, [">= 0"])
56
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
57
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
58
+ s.add_dependency(%q<rcov>, [">= 0"])
59
+ s.add_dependency(%q<rdoc>, [">= 0"])
60
+ end
61
+ end
62
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: range_math
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-12-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: shoulda
16
- requirement: &17974460 !ruby/object:Gem::Requirement
16
+ requirement: &9490460 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *17974460
24
+ version_requirements: *9490460
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: bundler
27
- requirement: &17972560 !ruby/object:Gem::Requirement
27
+ requirement: &9488420 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *17972560
35
+ version_requirements: *9488420
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: jeweler
38
- requirement: &17970820 !ruby/object:Gem::Requirement
38
+ requirement: &9485580 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.6.4
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *17970820
46
+ version_requirements: *9485580
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rcov
49
- requirement: &17968440 !ruby/object:Gem::Requirement
49
+ requirement: &9483160 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *17968440
57
+ version_requirements: *9483160
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rdoc
60
- requirement: &17964940 !ruby/object:Gem::Requirement
60
+ requirement: &9479460 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *17964940
68
+ version_requirements: *9479460
69
69
  description: use ranges in math expression
70
70
  email: mail@muflax.com
71
71
  executables: []
@@ -82,6 +82,7 @@ files:
82
82
  - Rakefile
83
83
  - VERSION
84
84
  - lib/range_math.rb
85
+ - range_math.gemspec
85
86
  - test/helper.rb
86
87
  - test/test_range_math.rb
87
88
  homepage: http://github.com/muflax/range_math
@@ -99,7 +100,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
99
100
  version: '0'
100
101
  segments:
101
102
  - 0
102
- hash: 3867770799657386205
103
+ hash: -3191188953004532935
103
104
  required_rubygems_version: !ruby/object:Gem::Requirement
104
105
  none: false
105
106
  requirements: