lafcadio 0.7.3 → 0.7.4

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.1
2
+ rubygems_version: 0.8.6
3
3
  specification_version: 1
4
4
  name: lafcadio
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.7.3
7
- date: 2005-03-01
6
+ version: 0.7.4
7
+ date: 2005-07-17
8
8
  summary: Lafcadio is an object-relational mapping layer
9
9
  require_paths:
10
10
  - lib
11
- author: Francis Hwang
12
11
  email: sera@fhwang.net
13
12
  homepage: http://lafcadio.rubyforge.org/
14
13
  rubyforge_project:
@@ -29,13 +28,15 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
29
28
  version: 0.0.0
30
29
  version:
31
30
  platform: ruby
31
+ authors:
32
+ - Francis Hwang
32
33
  files:
33
34
  - lib/lafcadio
34
35
  - lib/lafcadio.rb
35
36
  - lib/lafcadio.rb~
36
- - lib/lafcadio/dateTime.rb
37
37
  - lib/lafcadio/dateTime.rb~
38
38
  - lib/lafcadio/depend.rb
39
+ - lib/lafcadio/depend.rb~
39
40
  - lib/lafcadio/domain.rb
40
41
  - lib/lafcadio/domain.rb~
41
42
  - lib/lafcadio/mock.rb
@@ -48,6 +49,7 @@ files:
48
49
  - lib/lafcadio/query.rb
49
50
  - lib/lafcadio/query.rb~
50
51
  - lib/lafcadio/schema.rb
52
+ - lib/lafcadio/schema.rb~
51
53
  - lib/lafcadio/test
52
54
  - lib/lafcadio/test.rb
53
55
  - lib/lafcadio/test.rb~
@@ -64,7 +66,7 @@ extensions: []
64
66
  requirements: []
65
67
  dependencies:
66
68
  - !ruby/object:Gem::Dependency
67
- name: log4r
69
+ name: englishext
68
70
  version_requirement:
69
71
  version_requirements: !ruby/object:Gem::Version::Requirement
70
72
  requirements:
@@ -76,6 +78,46 @@ dependencies:
76
78
  - !ruby/object:Gem::Dependency
77
79
  name: extensions
78
80
  version_requirement:
81
+ version_requirements: !ruby/object:Gem::Version::Requirement
82
+ requirements:
83
+ -
84
+ - ">"
85
+ - !ruby/object:Gem::Version
86
+ version: 0.0.0
87
+ version:
88
+ - !ruby/object:Gem::Dependency
89
+ name: log4r
90
+ version_requirement:
91
+ version_requirements: !ruby/object:Gem::Version::Requirement
92
+ requirements:
93
+ -
94
+ - ">"
95
+ - !ruby/object:Gem::Version
96
+ version: 0.0.0
97
+ version:
98
+ - !ruby/object:Gem::Dependency
99
+ name: month
100
+ version_requirement:
101
+ version_requirements: !ruby/object:Gem::Version::Requirement
102
+ requirements:
103
+ -
104
+ - ">"
105
+ - !ruby/object:Gem::Version
106
+ version: 0.0.0
107
+ version:
108
+ - !ruby/object:Gem::Dependency
109
+ name: queuehash
110
+ version_requirement:
111
+ version_requirements: !ruby/object:Gem::Version::Requirement
112
+ requirements:
113
+ -
114
+ - ">"
115
+ - !ruby/object:Gem::Version
116
+ version: 0.0.0
117
+ version:
118
+ - !ruby/object:Gem::Dependency
119
+ name: uscommerce
120
+ version_requirement:
79
121
  version_requirements: !ruby/object:Gem::Version::Requirement
80
122
  requirements:
81
123
  -
@@ -1,93 +0,0 @@
1
- module Lafcadio
2
- # Represents a specific month in time. With the exception of
3
- # Month.month_names (which returns a zero-based array), every usage of the
4
- # month value assumes that 1 equals January and 12 equals December.
5
- class Month
6
- # Returns an array of the full names of months (in English). Note that
7
- # "January" is the 0th element, and "December" is the 11th element.
8
- def Month.month_names
9
- [ "January", "February", "March", "April", "May", "June", "July",
10
- "August", "September", "October", "November", "December" ]
11
- end
12
-
13
- include Comparable
14
-
15
- attr_reader :month, :year
16
-
17
- # A new month can be set to a specific +month+ and +year+, or you can call
18
- # Month.new with no arguments to receive the current month.
19
- def initialize( year = nil, month = nil )
20
- require 'date'
21
- if month.nil? || year.nil?
22
- date = Date.today
23
- month = date.mon unless month
24
- year = date.year unless year
25
- end
26
- fail "invalid month" if month < 1 || month > 12
27
- @month = month
28
- @year = year
29
- end
30
-
31
- # Returns a new Month that is +amountToAdd+ months later.
32
- def +( amountToAdd )
33
- ( fullYears, remainingMonths ) = amountToAdd.divmod( 12 )
34
- resultYear = @year + fullYears
35
- resultMonth = @month + remainingMonths
36
- if resultMonth > 12
37
- resultMonth -= 12
38
- resultYear += 1
39
- end
40
- Month.new( resultYear, resultMonth )
41
- end
42
-
43
- # Returns a new Month that is +amountToSubtract+ months earlier.
44
- def -(amountToSubtract)
45
- self + (-amountToSubtract)
46
- end
47
-
48
- # Compare this Month to another Month.
49
- def <=>(anOther)
50
- if @year == anOther.year
51
- @month <=> anOther.month
52
- else
53
- @year <=> anOther.year
54
- end
55
- end
56
-
57
- # Returns the last Date of the month.
58
- def end_date
59
- self.next.start_date - 1
60
- end
61
-
62
- # Is this Month equal to +anOther+? +anOther+ must be another Month of the
63
- # same value.
64
- def eql?(anOther)
65
- self == anOther
66
- end
67
-
68
- # Calculate a hash value for this Month.
69
- def hash
70
- "#{@year}#{@month}".to_i
71
- end
72
-
73
- # Returns the next Month.
74
- def next
75
- self + 1
76
- end
77
-
78
- # Returns the previous Month.
79
- def prev
80
- self - 1
81
- end
82
-
83
- # Returns the first Date of the month.
84
- def start_date
85
- Date.new( @year, @month, 1 )
86
- end
87
-
88
- # Returns a string of the format "January 2001".
89
- def to_s
90
- Month.month_names[@month-1][0..2] + " " + @year.to_s
91
- end
92
- end
93
- end