runt19 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. data/.gitignore +17 -0
  2. data/Gemfile +4 -0
  3. data/History.txt +153 -0
  4. data/LICENSE +22 -0
  5. data/LICENSE.txt +44 -0
  6. data/Manifest.txt +112 -0
  7. data/README.md +29 -0
  8. data/README.txt +106 -0
  9. data/Rakefile +2 -0
  10. data/TODO +13 -0
  11. data/examples/payment_report.rb +59 -0
  12. data/examples/payment_reporttest.rb +49 -0
  13. data/examples/reminder.rb +63 -0
  14. data/examples/schedule_tutorial.rb +59 -0
  15. data/examples/schedule_tutorialtest.rb +52 -0
  16. data/lib/runt.rb +249 -0
  17. data/lib/runt/daterange.rb +74 -0
  18. data/lib/runt/dprecision.rb +150 -0
  19. data/lib/runt/expressionbuilder.rb +65 -0
  20. data/lib/runt/pdate.rb +165 -0
  21. data/lib/runt/schedule.rb +88 -0
  22. data/lib/runt/sugar.rb +171 -0
  23. data/lib/runt/temporalexpression.rb +795 -0
  24. data/lib/runt/version.rb +3 -0
  25. data/lib/runt19.rb +1 -0
  26. data/runt19.gemspec +17 -0
  27. data/setup.rb +1331 -0
  28. data/site/blue-robot3.css +132 -0
  29. data/site/dcl-small.gif +0 -0
  30. data/site/index.html +72 -0
  31. data/site/logohover.png +0 -0
  32. data/site/runt-logo.gif +0 -0
  33. data/site/runt-logo.psd +0 -0
  34. data/test/aftertetest.rb +31 -0
  35. data/test/baseexpressiontest.rb +110 -0
  36. data/test/beforetetest.rb +31 -0
  37. data/test/collectiontest.rb +63 -0
  38. data/test/combinedexpressionstest.rb +158 -0
  39. data/test/daterangetest.rb +89 -0
  40. data/test/dayintervaltetest.rb +37 -0
  41. data/test/difftest.rb +37 -0
  42. data/test/dimonthtest.rb +59 -0
  43. data/test/diweektest.rb +32 -0
  44. data/test/dprecisiontest.rb +58 -0
  45. data/test/everytetest.rb +36 -0
  46. data/test/expressionbuildertest.rb +64 -0
  47. data/test/icalendartest.rb +1104 -0
  48. data/test/intersecttest.rb +34 -0
  49. data/test/pdatetest.rb +147 -0
  50. data/test/redaytest.rb +40 -0
  51. data/test/remonthtest.rb +37 -0
  52. data/test/reweektest.rb +51 -0
  53. data/test/reyeartest.rb +99 -0
  54. data/test/rspectest.rb +25 -0
  55. data/test/runttest.rb +98 -0
  56. data/test/scheduletest.rb +148 -0
  57. data/test/spectest.rb +36 -0
  58. data/test/sugartest.rb +104 -0
  59. data/test/temporalexpressiontest.rb +76 -0
  60. data/test/uniontest.rb +36 -0
  61. data/test/wimonthtest.rb +54 -0
  62. data/test/yeartetest.rb +22 -0
  63. metadata +137 -0
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'baseexpressiontest'
4
+
5
+ # Unit tests for YearTE class
6
+ # Author:: Matthew Lipper
7
+
8
+ class YearTETest < BaseExpressionTest
9
+
10
+ def test_2006
11
+ expr = YearTE.new(2006)
12
+ assert expr.include?(@pdate_20060914), "Expression #{expr.to_s} should include #{@pdate_20060914}"
13
+ assert !expr.include?(@pdate_20071008), "Expression #{expr.to_s} should include #{@pdate_20071008}"
14
+ assert expr.include?(@date_20060504), "Expression #{expr.to_s} should include #{@date_20060504}"
15
+ assert !expr.include?(@date_20051231), "Expression #{expr.to_s} should include #{@date_20051231}"
16
+ end
17
+
18
+ def test_to_s
19
+ assert_equal 'during the year 1934', YearTE.new(1934).to_s
20
+ end
21
+
22
+ end
metadata ADDED
@@ -0,0 +1,137 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: runt19
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.7.6
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Craig R Webster
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-10-20 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Runt is a Ruby[http://www.ruby-lang.org/en/] implementation of select
15
+ Martin Fowler patterns[http://www.martinfowler.com] specifically recurring events[http://martinfowler.com/apsupp/recurring.pdf].
16
+ email:
17
+ - craig@barkingiguana.com
18
+ executables: []
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - .gitignore
23
+ - Gemfile
24
+ - History.txt
25
+ - LICENSE
26
+ - LICENSE.txt
27
+ - Manifest.txt
28
+ - README.md
29
+ - README.txt
30
+ - Rakefile
31
+ - TODO
32
+ - examples/payment_report.rb
33
+ - examples/payment_reporttest.rb
34
+ - examples/reminder.rb
35
+ - examples/schedule_tutorial.rb
36
+ - examples/schedule_tutorialtest.rb
37
+ - lib/runt.rb
38
+ - lib/runt/daterange.rb
39
+ - lib/runt/dprecision.rb
40
+ - lib/runt/expressionbuilder.rb
41
+ - lib/runt/pdate.rb
42
+ - lib/runt/schedule.rb
43
+ - lib/runt/sugar.rb
44
+ - lib/runt/temporalexpression.rb
45
+ - lib/runt/version.rb
46
+ - lib/runt19.rb
47
+ - runt19.gemspec
48
+ - setup.rb
49
+ - site/blue-robot3.css
50
+ - site/dcl-small.gif
51
+ - site/index.html
52
+ - site/logohover.png
53
+ - site/runt-logo.gif
54
+ - site/runt-logo.psd
55
+ - test/aftertetest.rb
56
+ - test/baseexpressiontest.rb
57
+ - test/beforetetest.rb
58
+ - test/collectiontest.rb
59
+ - test/combinedexpressionstest.rb
60
+ - test/daterangetest.rb
61
+ - test/dayintervaltetest.rb
62
+ - test/difftest.rb
63
+ - test/dimonthtest.rb
64
+ - test/diweektest.rb
65
+ - test/dprecisiontest.rb
66
+ - test/everytetest.rb
67
+ - test/expressionbuildertest.rb
68
+ - test/icalendartest.rb
69
+ - test/intersecttest.rb
70
+ - test/pdatetest.rb
71
+ - test/redaytest.rb
72
+ - test/remonthtest.rb
73
+ - test/reweektest.rb
74
+ - test/reyeartest.rb
75
+ - test/rspectest.rb
76
+ - test/runttest.rb
77
+ - test/scheduletest.rb
78
+ - test/spectest.rb
79
+ - test/sugartest.rb
80
+ - test/temporalexpressiontest.rb
81
+ - test/uniontest.rb
82
+ - test/wimonthtest.rb
83
+ - test/yeartetest.rb
84
+ homepage: http://runt.rubyforge.org/
85
+ licenses: []
86
+ post_install_message:
87
+ rdoc_options: []
88
+ require_paths:
89
+ - lib
90
+ required_ruby_version: !ruby/object:Gem::Requirement
91
+ none: false
92
+ requirements:
93
+ - - ! '>='
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ required_rubygems_version: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ requirements: []
103
+ rubyforge_project:
104
+ rubygems_version: 1.8.24
105
+ signing_key:
106
+ specification_version: 3
107
+ summary: Ruby Temporal Expressions
108
+ test_files:
109
+ - test/aftertetest.rb
110
+ - test/baseexpressiontest.rb
111
+ - test/beforetetest.rb
112
+ - test/collectiontest.rb
113
+ - test/combinedexpressionstest.rb
114
+ - test/daterangetest.rb
115
+ - test/dayintervaltetest.rb
116
+ - test/difftest.rb
117
+ - test/dimonthtest.rb
118
+ - test/diweektest.rb
119
+ - test/dprecisiontest.rb
120
+ - test/everytetest.rb
121
+ - test/expressionbuildertest.rb
122
+ - test/icalendartest.rb
123
+ - test/intersecttest.rb
124
+ - test/pdatetest.rb
125
+ - test/redaytest.rb
126
+ - test/remonthtest.rb
127
+ - test/reweektest.rb
128
+ - test/reyeartest.rb
129
+ - test/rspectest.rb
130
+ - test/runttest.rb
131
+ - test/scheduletest.rb
132
+ - test/spectest.rb
133
+ - test/sugartest.rb
134
+ - test/temporalexpressiontest.rb
135
+ - test/uniontest.rb
136
+ - test/wimonthtest.rb
137
+ - test/yeartetest.rb