richunits 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
data/.ruby ADDED
@@ -0,0 +1,59 @@
1
+ ---
2
+ source:
3
+ - meta
4
+ authors:
5
+ - name: Thomas Sawyer
6
+ email: transfire@gmail.com
7
+ - name: Rich Kilmer
8
+ - name: Dave Hoover
9
+ - name: Ryan Platte
10
+ - name: George Moschovitis
11
+ copyrights:
12
+ - holder: Thomas Sawyer
13
+ year: '2008'
14
+ license: MIT
15
+ - holder: Rich Kilmer
16
+ year: '2005'
17
+ license: Ruby
18
+ replacements: []
19
+ alternatives: []
20
+ requirements:
21
+ - name: detroit
22
+ groups:
23
+ - build
24
+ development: true
25
+ - name: rspec
26
+ groups:
27
+ - test
28
+ development: true
29
+ dependencies: []
30
+ conflicts: []
31
+ repositories:
32
+ - uri: git://github.com/rubyworks/richunits.git
33
+ scm: git
34
+ name: upstream
35
+ resources:
36
+ home: http://rubyworks.github.com/richunits
37
+ code: http://github.com/rubyworks/richunits
38
+ mail: http://groups.google.com/groups/rubyworks-mailinglist
39
+ extra: {}
40
+ load_path:
41
+ - lib
42
+ revision: 0
43
+ created: '2008-02-21'
44
+ summary: Simple LCD Unit System
45
+ title: RichUnits
46
+ version: 0.6.2
47
+ name: richunits
48
+ description: ! 'A Unit system, based on Rich Kilmer''s original time.rb work, which
49
+ provides
50
+
51
+ english-esque methods for working with common units, such as days and bytes
52
+
53
+ and multiplers like kilo, or mega. It does so by reducing basic measures to
54
+
55
+ a lower common denominator, such as seconds for time measures and bits for
56
+
57
+ byte measures.'
58
+ organization: Rubyworks
59
+ date: '2011-10-24'
@@ -1,5 +1,15 @@
1
1
  = Release History
2
2
 
3
+ == 0.6.2 / 2011-10-24
4
+
5
+ A simple maintenance release to bring the project's build configuration
6
+ up to date with more modern tools.
7
+
8
+ Changes:
9
+
10
+ * Modernize build configuration.
11
+
12
+
3
13
  == 0.6.1 / 2010-10-04
4
14
 
5
15
  Minor release simply add #to_int method to Duration so Time#+
@@ -14,7 +24,7 @@ Changes:
14
24
  == 0.6.0 / 2009-10-31
15
25
 
16
26
  This release tightens up the Duration interface a bit and fixed the
17
- `Duration#*` method which was accidently named `#+`.
27
+ `Duration#*` method which was accidentally named `#+`.
18
28
 
19
29
  Changes:
20
30
 
@@ -49,20 +59,37 @@ Changes:
49
59
 
50
60
  == 0.4.0 / 2008-09-09
51
61
 
52
- * Rewrote Duration class and integrated into rest of system.
62
+ This release includes a completely rewritten Duration class and integrates
63
+ into the rest of the system.
64
+
65
+ Changes:
66
+
67
+ * Wrote new Duration class.
53
68
 
54
69
 
55
70
  == 0.3.0 / 2008-09-08
56
71
 
72
+ This release adds RichUnits toplevel namespace.
73
+
74
+ Changes:
75
+
57
76
  * Encapsulated entire library in RichUnits module.
58
77
 
59
78
 
60
79
  == 0.2.0 / 2008-08-01
61
80
 
81
+ Continued work on RichUnits.
82
+
83
+ Changes:
84
+
62
85
  * Reorganized repository.
63
86
 
64
87
 
65
88
  == 0.1.0 / 2008-03-27
66
89
 
90
+ First release of RichUnits.
91
+
92
+ Changes:
93
+
67
94
  * Initial version.
68
95
 
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) <year> <copyright holders>
3
+ Copyright (c) 2008 Thomas Sawyer
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -3,10 +3,11 @@
3
3
  Easy Units for Ruby
4
4
 
5
5
  * http://rubyworks.github.com/richunits
6
- * http://richunits.rubyforge.org/ (old site)
7
6
 
7
+ {<img src="http://travis-ci.org/rubyworks/richunits.png" />}[http://travis-ci.org/rubyworks/richunits]
8
8
 
9
- == DESCRIPTION:
9
+
10
+ == DESCRIPTION
10
11
 
11
12
  RichUnits is simple units system based on Rich Kilmer's original
12
13
  time.rb script, in which different measures of time are represented
@@ -22,7 +23,7 @@ as an attribute and adds an optional segements property which can be used to
22
23
  select exactly how to segment up the time period (years, week, days, etc.).
23
24
 
24
25
 
25
- == SYNOPSIS:
26
+ == SYNOPSIS
26
27
 
27
28
  You only need to require 'richunits' and all of RichUnit's functionality
28
29
  becomes available.
@@ -34,7 +35,7 @@ becomes available.
34
35
  See RDocs for complete API documentation.
35
36
 
36
37
 
37
- == DEVELOPMENT:
38
+ == DEVELOPMENT
38
39
 
39
40
  RichUnits utilizes GitHub for development. You will find the git
40
41
  repo under the rubyworks account.
@@ -44,7 +45,7 @@ repo under the rubyworks account.
44
45
  RichUnits utilizes the Syckle build system.
45
46
 
46
47
 
47
- == COPYRIGHTS:
48
+ == COPYRIGHTS
48
49
 
49
50
  Copyright (c) 2008 Thomas Sawyer
50
51
  Copyright (c) 2006 Matthew Harris
@@ -60,5 +61,4 @@ to him.
60
61
 
61
62
  RichUnits is distributed under the terms of the MIT license.
62
63
 
63
- See COPYING file.
64
-
64
+ See COPYING.txt file.
@@ -1,3 +1,4 @@
1
+ require 'richunits/version'
1
2
  require 'richunits/multipliers'
2
3
  require 'richunits/bytes'
3
4
  require 'richunits/times'
@@ -1,59 +1,20 @@
1
- # TITLE:
2
- #
3
- # Bytes
4
- #
5
- # DESCRIPTION:
6
- #
7
- # Additional methods for Numeric class to make working with
8
- # bits and bytes easier.
9
- #
10
- # COPYRIGHT:
11
- #
12
- # Copyright (c) 2005 Rich Kilmer
13
- #
14
- # LICENSE:
15
- #
16
- # Ruby License
17
- #
18
- # This module is free software. You may use, modify, and/or redistribute this
19
- # software under the same terms as Ruby.
20
- #
21
- # This program is distributed in the hope that it will be useful, but WITHOUT
22
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
23
- # FOR A PARTICULAR PURPOSE.
24
- #
25
- # HISTORY:
26
- #
27
- # Special thanks to Richard Kilmer for the orignal work.
28
- # This library is based on the original library bytes.rb
29
- # Copyright (c) 2004 by Rich Kilmer.
30
- #
31
- # Also thanks to Alexander Kellett for suggesting it be
32
- # included in Facets.
33
- #
34
- # AUTHORS:
35
- #
36
- # - Rich Kilmer
37
- # - Thomas Sawyer
38
- #
39
- # NOTES:
40
- #
41
- # - This library is not compatible with STICK's units.rb (an spin-off
42
- # of Facets old units.rb library). Do not attempt to use both at the same time.
43
- #
44
- # TODOs:
45
- #
46
- # - Currently kilo, mega, etc. are all powers of two and not ten,
47
- # which technically isn't corrent even though it is common usage.
48
- #
49
- # - The in_* notation is weak. If a better nomentclature is thought
50
- # of then consider changing this.
51
-
52
- #
53
1
  module RichUnits
54
2
 
3
+ # TODO: Currently kilo, mega, etc. are all powers of two and not ten,
4
+ # which technically isn't corrent even though it is common usage.
5
+ #
6
+ # TODO: The in_* notation is weak. If a better nomentclature is thought
7
+ # of then consider changing this.
8
+
55
9
  # = Binary Multipliers
56
10
  #
11
+ # Additional methods for Numeric class to make working with
12
+ # bits and bytes easier.
13
+ #
14
+ # Special thanks to Richard Kilmer for the orignal work.
15
+ # This library is based on the original library bytes.rb
16
+ # Copyright (c) 2004 by Rich Kilmer.
17
+ #
57
18
  module Bytes
58
19
 
59
20
  # = Binary Multipliers for Numeric
@@ -175,4 +136,3 @@ end#module RichUnits
175
136
  class Numeric #:nodoc:
176
137
  include RichUnits::Bytes::Numeric
177
138
  end
178
-
@@ -1,5 +1,7 @@
1
1
  module RichUnits
2
2
 
3
+ # Durations
4
+ #
3
5
  class Duration
4
6
  include Comparable
5
7
 
@@ -1,46 +1,10 @@
1
- # TITLE:
2
- #
3
- # Multipliers
4
- #
5
- # DESCRIPTION:
6
- #
7
- # Adds methods to Numeric to make working with
8
- # magnitudes (kilo, mega, giga, milli, micro, etc.)
9
- # as well as bits and bytes easier.
10
- #
11
- # COPYRIGHT:
12
- #
13
- # Copyright (c) 2005 Thomas Sawyer
14
- #
15
- # LICENSE:
16
- #
17
- # Ruby License
18
- #
19
- # This module is free software. You may use, modify, and/or redistribute this
20
- # software under the same terms as Ruby.
21
- #
22
- # This program is distributed in the hope that it will be useful, but WITHOUT
23
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
24
- # FOR A PARTICULAR PURPOSE.
25
- #
26
- # HISTORY:
27
- #
28
- # Thanks to Rich Kilmer and bytes.rb which inspired this library.
29
- #
30
- # AUTHORS:
31
- #
32
- # - Thomas Sawyer
33
- #
34
- # NOTES:
35
- #
36
- # - This library is not compatible with STICK's units.rb (an spin-off
37
- # of Facets old units.rb library). Do not attempt to use both at the same time.
38
-
39
- #
40
1
  module RichUnits
41
2
 
42
3
  # = Multipliers
43
4
  #
5
+ # Adds methods to Numeric to make working with magnitudes
6
+ # such as (kilo, mega, giga, milli, micro, etc.).
7
+ #
44
8
  module Multiplers
45
9
 
46
10
  # = Numeric Multipliers
@@ -110,4 +74,3 @@ end#module RichUnits
110
74
  class Numeric #:nodoc:
111
75
  include RichUnits::Multiplers::Numeric
112
76
  end
113
-
@@ -1,47 +1,15 @@
1
- # Copyright (c) 2005 Rich Kilmer, Thomas Sawyer
2
- #
3
- # Ruby License
4
- #
5
- # This module is free software. You may use, modify, and/or redistribute this
6
- # software under the same terms as Ruby.
7
- #
8
- # This program is distributed in the hope that it will be useful, but WITHOUT
9
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
- # FITNESS FOR A PARTICULAR PURPOSE.
11
- #
12
- # HISTORY:
13
- #
14
- # Thanks to Richard Kilmer for the orignal work and Alexander Kellett
15
- # for suggesting it for Facets.
16
- #
17
- # Thanks to Dave Hoover and Ryan Platte for the Weekdays implementation.
18
- #
19
- # AUTHORS:
20
- #
21
- # - Rich Kilmer
22
- # - Thomas Sawyer
23
- # - Dave Hoover
24
- # - Ryan Platte
25
- # - George Moschovitis
26
- #
27
- # NOTES:
28
- #
29
- # - This library is not compatible with STICK's units.rb (an spin-off
30
- # of Facets old units.rb library). Do not attempt to use both at the same time.
31
- #
32
- # TODOs:
33
- #
34
- # TODO Extra Add in_* methods, like in_days, in_hours, etc. ?
35
-
36
- #
37
1
  module RichUnits
38
2
  require 'richunits/weekdays'
39
3
  require 'richunits/duration'
40
4
 
5
+ # TODO: Extra Add in_* methods, like in_days, in_hours, etc. ?
6
+
41
7
  # = Times
42
8
  #
43
9
  # Plain-English convenience methods for dealing with dates and times.
44
10
  #
11
+ # Thanks to Richard Kilmer for the orignal work version this work is based upon.
12
+ #
45
13
  module Times
46
14
 
47
15
  NEVER = ::Time.mktime(2038)
@@ -0,0 +1,4 @@
1
+ module RichUnits
2
+ VERSION = "0.6.1"
3
+ end
4
+
@@ -3,7 +3,9 @@ module RichUnits
3
3
  # = Weekdays
4
4
  #
5
5
  # The Weekdays class provides useful weekday terminology.
6
-
6
+ #
7
+ # Thanks to Dave Hoover and Ryan Platte for the Weekdays implementation.
8
+ #
7
9
  class Weekdays
8
10
 
9
11
  WEEKDAYS = 1..5 # Monday is wday 1
metadata CHANGED
@@ -1,115 +1,105 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: richunits
3
- version: !ruby/object:Gem::Version
4
- hash: 5
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 6
9
- - 1
10
- version: 0.6.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.6.2
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Thomas Sawyer
14
9
  - Rich Kilmer
10
+ - Dave Hoover
11
+ - Ryan Platte
12
+ - George Moschovitis
15
13
  autorequire:
16
14
  bindir: bin
17
15
  cert_chain: []
18
-
19
- date: 2010-11-04 00:00:00 -04:00
20
- default_executable:
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
23
- name: syckle
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ date: 2011-10-25 00:00:00.000000000 Z
17
+ dependencies:
18
+ - !ruby/object:Gem::Dependency
19
+ name: detroit
20
+ requirement: &25208480 !ruby/object:Gem::Requirement
26
21
  none: false
27
- requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- hash: 3
31
- segments:
32
- - 0
33
- version: "0"
22
+ requirements:
23
+ - - ! '>='
24
+ - !ruby/object:Gem::Version
25
+ version: '0'
34
26
  type: :development
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: rspec
38
27
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
28
+ version_requirements: *25208480
29
+ - !ruby/object:Gem::Dependency
30
+ name: rspec
31
+ requirement: &25207660 !ruby/object:Gem::Requirement
40
32
  none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 3
45
- segments:
46
- - 0
47
- version: "0"
33
+ requirements:
34
+ - - ! '>='
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
48
37
  type: :development
49
- version_requirements: *id002
50
- description: A Unit system, based on Rich Kilmer's original time.rb work, which provides english-esque methods for working with common units, such as days and bytes and multiplers like kilo, or mega. It does so by reducing basic measures to a lower common denominator, such as seconds for time measures and bits for byte measures.
51
- email: transfire@gmail.com
52
- executables: []
38
+ prerelease: false
39
+ version_requirements: *25207660
40
+ description: ! 'A Unit system, based on Rich Kilmer''s original time.rb work, which
41
+ provides
53
42
 
54
- extensions: []
43
+ english-esque methods for working with common units, such as days and bytes
44
+
45
+ and multiplers like kilo, or mega. It does so by reducing basic measures to
46
+
47
+ a lower common denominator, such as seconds for time measures and bits for
55
48
 
56
- extra_rdoc_files:
49
+ byte measures.'
50
+ email:
51
+ - transfire@gmail.com
52
+ executables: []
53
+ extensions: []
54
+ extra_rdoc_files:
55
+ - LICENSE.txt
56
+ - HISTORY.rdoc
57
57
  - README.rdoc
58
- files:
58
+ files:
59
+ - .ruby
59
60
  - lib/rich_units.rb
60
61
  - lib/richunits/bytes.rb
61
62
  - lib/richunits/duration.rb
62
63
  - lib/richunits/multipliers.rb
63
64
  - lib/richunits/times.rb
64
- - lib/richunits/version.yml
65
+ - lib/richunits/version.rb
65
66
  - lib/richunits/weekdays.rb
66
67
  - lib/richunits.rb
67
68
  - spec/bytes_spec.rb
68
69
  - spec/duration_spec.rb
69
70
  - spec/multipliers_spec.rb
70
71
  - spec/times_spec.rb
71
- - Rakefile
72
72
  - HISTORY.rdoc
73
- - PROFILE
73
+ - LICENSE.txt
74
74
  - README.rdoc
75
- - VERSION
76
- - COPYING
77
- has_rdoc: true
78
75
  homepage: http://rubyworks.github.com/richunits
79
- licenses:
76
+ licenses:
80
77
  - MIT
78
+ - Ruby
81
79
  post_install_message:
82
- rdoc_options:
83
- - --title
84
- - RichUnits API
85
- - --main
86
- - README.rdoc
87
- require_paths:
80
+ rdoc_options: []
81
+ require_paths:
88
82
  - lib
89
- required_ruby_version: !ruby/object:Gem::Requirement
83
+ required_ruby_version: !ruby/object:Gem::Requirement
90
84
  none: false
91
- requirements:
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- hash: 3
95
- segments:
96
- - 0
97
- version: "0"
98
- required_rubygems_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ! '>='
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
99
90
  none: false
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- hash: 3
104
- segments:
105
- - 0
106
- version: "0"
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
107
95
  requirements: []
108
-
109
- rubyforge_project: richunits
110
- rubygems_version: 1.3.7
96
+ rubyforge_project:
97
+ rubygems_version: 1.8.10
111
98
  signing_key:
112
99
  specification_version: 3
113
100
  summary: Simple LCD Unit System
114
- test_files: []
115
-
101
+ test_files:
102
+ - spec/bytes_spec.rb
103
+ - spec/times_spec.rb
104
+ - spec/duration_spec.rb
105
+ - spec/multipliers_spec.rb
data/PROFILE DELETED
@@ -1,26 +0,0 @@
1
- ---
2
- title : RichUnits
3
- suite : rubyworks
4
- summary: Simple LCD Unit System
5
- contact: Trans <transfire@gmail.com>
6
- license: MIT
7
- created: 2008-02-21
8
- authors:
9
- - Thomas Sawyer
10
- - Rich Kilmer
11
-
12
- description:
13
- A Unit system, based on Rich Kilmer's original time.rb work,
14
- which provides english-esque methods for working with common
15
- units, such as days and bytes and multiplers like kilo, or mega.
16
- It does so by reducing basic measures to a lower common denominator,
17
- such as seconds for time measures and bits for byte measures.
18
-
19
- resources:
20
- home: http://rubyworks.github.com/richunits
21
- code: http://github.com/rubyworks/richunits
22
- repo: git://github.com/rubyworks/richunits.git
23
-
24
- copyright:
25
- Copyright (c) 2008 Thomas Sawyer
26
-
data/Rakefile DELETED
@@ -1,12 +0,0 @@
1
- # -*- ruby -*-
2
-
3
- desc "run unit tests"
4
- task :test do
5
- $:.unshift('./lib')
6
- Dir['test/*.rb'].each do |file|
7
- load file
8
- end
9
- end
10
-
11
- # vim: syntax=Ruby
12
-
data/VERSION DELETED
@@ -1,7 +0,0 @@
1
- name : richunits
2
- date : 2010-10-04
3
- version : 0.6.1
4
-
5
- requires:
6
- - syckle (build)
7
- - rspec (test)
@@ -1,7 +0,0 @@
1
- name : richunits
2
- date : 2010-10-04
3
- version : 0.6.1
4
-
5
- requires:
6
- - syckle (build)
7
- - rspec (test)