ruby-units 1.2.0.a → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source "http://rubygems.org"
2
+
3
+ group :development do
4
+ gem 'bundler', '~> 1.0'
5
+ gem 'rcov'
6
+ gem 'jeweler'
7
+ end
data/RakeFile ADDED
@@ -0,0 +1,40 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+ require 'rake/testtask'
4
+ require './lib/ruby-units'
5
+
6
+ begin
7
+ require 'jeweler'
8
+ Jeweler::Tasks.new do |gem|
9
+ gem.name = "ruby-units"
10
+ gem.summary = %Q{A class that performs unit conversions and unit math}
11
+ gem.description = %Q{Provides classes and methods to perform unit math and conversions}
12
+ gem.authors = ["Kevin Olbrich, Ph.D."]
13
+ gem.email = ["kevin.olbrich+ruby_units@gmail.com"]
14
+ gem.homepage = "https://github.com/olbrich/ruby-units"
15
+ gem.has_rdoc = true
16
+ gem.files.exclude(".autotest")
17
+ end
18
+ Jeweler::GemcutterTasks.new
19
+ rescue LoadError
20
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
21
+ end
22
+
23
+ begin
24
+ require 'rcov/rcovtask'
25
+ desc "Generate code coverage"
26
+ Rcov::RcovTask.new do |t|
27
+ t.test_files = FileList['test/test*.rb']
28
+ #t.verbose = true # uncomment to see the executed command
29
+ end
30
+ rescue
31
+ end
32
+
33
+ desc "Run unit tests"
34
+ Rake::TestTask.new do |t|
35
+ t.libs << "test"
36
+ t.test_files = FileList['test/test*.rb']
37
+ # t.verbose = true
38
+ end
39
+
40
+ task :default => :test
data/TODO ADDED
@@ -0,0 +1,3 @@
1
+ 2010-03-05 update for ruby 1.9
2
+ 2010-03-05 update tests to use specs or cucumber stories
3
+ 2006-10-02 Currency handling remains to be implemented well
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.2.0
data/lib/ruby-units.rb CHANGED
@@ -1,3 +1,5 @@
1
+ $LOAD_PATH << File.dirname(__FILE__)
2
+ require "ruby_units/version"
1
3
  require 'ruby_units/array'
2
4
  require 'ruby_units/date'
3
5
  require 'ruby_units/time'
data/lib/ruby_units.rb CHANGED
@@ -1,3 +1,5 @@
1
+ $LOAD_PATH << File.dirname(__FILE__)
2
+ require "ruby_units/version"
1
3
  require 'ruby_units/array'
2
4
  require 'ruby_units/date'
3
5
  require 'ruby_units/time'
@@ -0,0 +1,2 @@
1
+ module CMath
2
+ end
@@ -40,7 +40,7 @@ end
40
40
  # Unit.setup
41
41
  class Unit < Numeric
42
42
  # pre-generate hashes from unit definitions for performance.
43
- VERSION = '1.2.0.a'
43
+ VERSION = Unit::Version::STRING
44
44
  @@USER_DEFINITIONS = {}
45
45
  @@PREFIX_VALUES = {}
46
46
  @@PREFIX_MAP = {}
@@ -1,5 +1,3 @@
1
-
2
-
3
1
  class Unit < Numeric
4
2
  UNIT_DEFINITIONS = {
5
3
  # prefixes
@@ -0,0 +1,5 @@
1
+ class Unit < Numeric
2
+ module Version
3
+ STRING = File.read(File.dirname(__FILE__) + "/../../VERSION")
4
+ end
5
+ end
@@ -0,0 +1,73 @@
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 = %q{ruby-units}
8
+ s.version = "1.2.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Kevin Olbrich, Ph.D."]
12
+ s.date = %q{2011-04-01}
13
+ s.description = %q{Provides classes and methods to perform unit math and conversions}
14
+ s.email = ["kevin.olbrich+ruby_units@gmail.com"]
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.md",
18
+ "TODO"
19
+ ]
20
+ s.files = [
21
+ "CHANGELOG.txt",
22
+ "Gemfile",
23
+ "LICENSE.txt",
24
+ "Manifest.txt",
25
+ "README.md",
26
+ "RakeFile",
27
+ "TODO",
28
+ "VERSION",
29
+ "lib/ruby-units.rb",
30
+ "lib/ruby_units.rb",
31
+ "lib/ruby_units/array.rb",
32
+ "lib/ruby_units/cmath.rb",
33
+ "lib/ruby_units/complex.rb",
34
+ "lib/ruby_units/date.rb",
35
+ "lib/ruby_units/math.rb",
36
+ "lib/ruby_units/numeric.rb",
37
+ "lib/ruby_units/object.rb",
38
+ "lib/ruby_units/ruby-units.rb",
39
+ "lib/ruby_units/string.rb",
40
+ "lib/ruby_units/time.rb",
41
+ "lib/ruby_units/units.rb",
42
+ "lib/ruby_units/version.rb",
43
+ "ruby-units.gemspec",
44
+ "test/test_ruby-units.rb"
45
+ ]
46
+ s.homepage = %q{https://github.com/olbrich/ruby-units}
47
+ s.require_paths = ["lib"]
48
+ s.rubygems_version = %q{1.3.7}
49
+ s.summary = %q{A class that performs unit conversions and unit math}
50
+ s.test_files = [
51
+ "test/test_ruby-units.rb"
52
+ ]
53
+
54
+ if s.respond_to? :specification_version then
55
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
56
+ s.specification_version = 3
57
+
58
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
59
+ s.add_development_dependency(%q<bundler>, ["~> 1.0"])
60
+ s.add_development_dependency(%q<rcov>, [">= 0"])
61
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
62
+ else
63
+ s.add_dependency(%q<bundler>, ["~> 1.0"])
64
+ s.add_dependency(%q<rcov>, [">= 0"])
65
+ s.add_dependency(%q<jeweler>, [">= 0"])
66
+ end
67
+ else
68
+ s.add_dependency(%q<bundler>, ["~> 1.0"])
69
+ s.add_dependency(%q<rcov>, [">= 0"])
70
+ s.add_dependency(%q<jeweler>, [">= 0"])
71
+ end
72
+ end
73
+
@@ -958,7 +958,7 @@ class TestRubyUnits < Test::Unit::TestCase
958
958
  end
959
959
 
960
960
  def test_version
961
- assert_equal('1.2.0.a', Unit::VERSION)
961
+ assert_equal('1.2.0.b', Unit::VERSION)
962
962
  end
963
963
 
964
964
  def test_negation
metadata CHANGED
@@ -1,108 +1,109 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-units
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: true
4
+ hash: 31
5
+ prerelease: false
5
6
  segments:
6
7
  - 1
7
8
  - 2
8
9
  - 0
9
- - a
10
- version: 1.2.0.a
10
+ version: 1.2.0
11
11
  platform: ruby
12
12
  authors:
13
- - Kevin Olbrich, Ph.D
13
+ - Kevin Olbrich, Ph.D.
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-07 01:00:00 -04:00
18
+ date: 2011-04-01 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- name: rubyforge
22
+ type: :development
23
23
  prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
24
+ name: bundler
25
+ version_requirements: &id001 !ruby/object:Gem::Requirement
25
26
  none: false
26
27
  requirements:
27
- - - ">="
28
+ - - ~>
28
29
  - !ruby/object:Gem::Version
30
+ hash: 15
29
31
  segments:
30
- - 2
32
+ - 1
31
33
  - 0
32
- - 4
33
- version: 2.0.4
34
- type: :development
35
- version_requirements: *id001
34
+ version: "1.0"
35
+ requirement: *id001
36
36
  - !ruby/object:Gem::Dependency
37
- name: hoe-yard
37
+ type: :development
38
38
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
39
+ name: rcov
40
+ version_requirements: &id002 !ruby/object:Gem::Requirement
40
41
  none: false
41
42
  requirements:
42
43
  - - ">="
43
44
  - !ruby/object:Gem::Version
45
+ hash: 3
44
46
  segments:
45
47
  - 0
46
- - 1
47
- - 2
48
- version: 0.1.2
49
- type: :development
50
- version_requirements: *id002
48
+ version: "0"
49
+ requirement: *id002
51
50
  - !ruby/object:Gem::Dependency
52
- name: hoe
51
+ type: :development
53
52
  prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
53
+ name: jeweler
54
+ version_requirements: &id003 !ruby/object:Gem::Requirement
55
55
  none: false
56
56
  requirements:
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
+ hash: 3
59
60
  segments:
60
- - 2
61
- - 6
62
- - 1
63
- version: 2.6.1
64
- type: :development
65
- version_requirements: *id003
66
- description: This library handles unit conversions and unit math
67
- email: kevin.olbrich+ruby_units@gmail.com
61
+ - 0
62
+ version: "0"
63
+ requirement: *id003
64
+ description: Provides classes and methods to perform unit math and conversions
65
+ email:
66
+ - kevin.olbrich+ruby_units@gmail.com
68
67
  executables: []
69
68
 
70
69
  extensions: []
71
70
 
72
71
  extra_rdoc_files:
73
- - CHANGELOG.txt
74
- - Manifest.txt
75
72
  - LICENSE.txt
73
+ - README.md
74
+ - TODO
76
75
  files:
77
76
  - CHANGELOG.txt
77
+ - Gemfile
78
+ - LICENSE.txt
78
79
  - Manifest.txt
79
80
  - README.md
80
- - LICENSE.txt
81
- - Rakefile
81
+ - RakeFile
82
+ - TODO
83
+ - VERSION
82
84
  - lib/ruby-units.rb
83
85
  - lib/ruby_units.rb
84
- - lib/ruby_units/units.rb
85
- - lib/ruby_units/math.rb
86
- - lib/ruby_units/date.rb
87
- - lib/ruby_units/time.rb
88
- - lib/ruby_units/string.rb
89
86
  - lib/ruby_units/array.rb
87
+ - lib/ruby_units/cmath.rb
88
+ - lib/ruby_units/complex.rb
89
+ - lib/ruby_units/date.rb
90
+ - lib/ruby_units/math.rb
90
91
  - lib/ruby_units/numeric.rb
91
92
  - lib/ruby_units/object.rb
92
- - lib/ruby_units/complex.rb
93
93
  - lib/ruby_units/ruby-units.rb
94
+ - lib/ruby_units/string.rb
95
+ - lib/ruby_units/time.rb
96
+ - lib/ruby_units/units.rb
97
+ - lib/ruby_units/version.rb
98
+ - ruby-units.gemspec
94
99
  - test/test_ruby-units.rb
95
- has_rdoc: yard
96
- homepage: http://github.com/olbrich/ruby-units
100
+ has_rdoc: true
101
+ homepage: https://github.com/olbrich/ruby-units
97
102
  licenses: []
98
103
 
99
104
  post_install_message:
100
- rdoc_options:
101
- - --title
102
- - Ruby-Units
103
- - --markup
104
- - markdown
105
- - --quiet
105
+ rdoc_options: []
106
+
106
107
  require_paths:
107
108
  - lib
108
109
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -110,22 +111,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
111
  requirements:
111
112
  - - ">="
112
113
  - !ruby/object:Gem::Version
114
+ hash: 3
113
115
  segments:
114
116
  - 0
115
117
  version: "0"
116
118
  required_rubygems_version: !ruby/object:Gem::Requirement
117
119
  none: false
118
120
  requirements:
119
- - - ">"
121
+ - - ">="
120
122
  - !ruby/object:Gem::Version
123
+ hash: 3
121
124
  segments:
122
- - 1
123
- - 3
124
- - 1
125
- version: 1.3.1
125
+ - 0
126
+ version: "0"
126
127
  requirements: []
127
128
 
128
- rubyforge_project: ruby-units
129
+ rubyforge_project:
129
130
  rubygems_version: 1.3.7
130
131
  signing_key:
131
132
  specification_version: 3
data/Rakefile DELETED
@@ -1,29 +0,0 @@
1
- require 'rubygems'
2
- require 'hoe'
3
-
4
- Hoe.plugin :yard
5
-
6
- require './lib/ruby_units/units'
7
- require './lib/ruby_units/ruby-units'
8
-
9
- begin
10
- require 'rcov/rcovtask'
11
- Rcov::RcovTask.new do |t|
12
- t.test_files = FileList['test/test*.rb']
13
- #t.verbose = true # uncomment to see the executed command
14
- end
15
- rescue
16
- end
17
-
18
- Hoe.spec('ruby-units') do |p|
19
- p.yard_title = "Ruby-Units"
20
- p.yard_markup = "markdown"
21
- p.version = Unit::VERSION
22
- p.rubyforge_name = 'ruby-units'
23
- p.summary = %q{A class that performs unit conversions and unit math}
24
- p.email = 'kevin.olbrich+ruby_units@gmail.com'
25
- p.url = 'http://github.com/olbrich/ruby-units'
26
- p.description = "This library handles unit conversions and unit math"
27
- p.changes = p.paragraphs_of('CHANGELOG.txt', 0..1).join("\n\n")
28
- p.author = 'Kevin Olbrich, Ph.D'
29
- end