texp 0.0.7 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5223d32588031196ea21492a3fce641684d11da0
4
+ data.tar.gz: 480b9d1fa88afa4d6b5d6b95a077508f0475b352
5
+ SHA512:
6
+ metadata.gz: 4bc05a23f818507ace79eeaba0435f3b73d127ddfdfebe40128e2084d24f9e12d08d87fccce6fbdfcf7ff7fcc2c6c1f88f474935cb3a9aa0ed1491f30cd2b65b
7
+ data.tar.gz: 6361c2984f700d13b85dcf4690c15e4d757c8f2865bf21b557a548cafc0d2d631e1377e5219633b366e27e419bb488c5207985b7d19ff775655861f3fe49ee7e
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ 2008-03-10 Jim Weirich <jim@tardis.local>
2
+
3
+ * lib/texp/version.rb (TExp): Bumped to version 0.0.8.
4
+
1
5
  2008-03-08 Jim Weirich <jim@tardis.local>
2
6
 
3
7
  * lib/texp/dsl.rb (TExp::DSL): Added DSL like methods to TExp and
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rake', "~> 10.0"
4
+
5
+ group 'testing' do
6
+ gem 'minitest', "~> 5.0"
7
+ end
@@ -0,0 +1,12 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ minitest (5.0.4)
5
+ rake (10.0.4)
6
+
7
+ PLATFORMS
8
+ ruby
9
+
10
+ DEPENDENCIES
11
+ minitest (~> 5.0)
12
+ rake (~> 10.0)
@@ -25,7 +25,7 @@ can combine them into a single holiday expression thusly:
25
25
  * Day of Week (see DayOfWeek)
26
26
  * Day of Month (see DayOfMonth)
27
27
  * Week of Month (See Week)
28
- * Speicifc Month (See Month)
28
+ * Specific Month (See Month)
29
29
  * Specific Year (See Year)
30
30
 
31
31
  * Composite Expressions for:
@@ -67,7 +67,7 @@ can combine them into a single holiday expression thusly:
67
67
 
68
68
  te.include?(Date.parse("Feb 14, 2008")) # => true
69
69
  te.include?(Date.parse("Feb 14, 2007")) # => true
70
-
70
+
71
71
 
72
72
  === Match Valentine's day in 2008
73
73
 
@@ -92,3 +92,8 @@ can combine them into a single holiday expression thusly:
92
92
  te.include?(Date.parse("Apr 7, 2008")) # => false
93
93
 
94
94
 
95
+ == Links
96
+
97
+ Documents :: http://github.com/jimweirich/texp
98
+ Git Clone :: git://github.com/jimweirich/texp.git
99
+ Issues/Bugs :: https://github.com/jimweirich/texp/issues
data/Rakefile CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  require 'rake/clean'
4
4
  require 'rake/testtask'
5
- require 'rake/rdoctask'
6
- require 'rake/gempackagetask'
5
+ require 'rdoc/task'
6
+ require 'rubygems/package_task'
7
7
 
8
8
  $:.unshift 'lib'
9
9
  require 'texp/version'
@@ -21,6 +21,7 @@ end
21
21
  namespace "test" do
22
22
  Rake::TestTask.new(:units) do |t|
23
23
  t.verbose = true
24
+ t.libs << "." << "test"
24
25
  t.test_files = FileList['test/**/*_test.rb']
25
26
  end
26
27
  end
@@ -42,31 +43,15 @@ end
42
43
  desc "Generate the TAGS file"
43
44
  task :tags => ["tags:emacs"]
44
45
 
45
- begin
46
- require 'rcov/rcovtask'
47
-
48
- Rcov::RcovTask.new do |t|
49
- t.libs << "test"
50
- t.rcov_opts = [
51
- '-xRakefile', '-xrakefile', '-xpublish.rf', '--text-report',
52
- ]
53
- t.test_files = FileList['test/**/*_test.rb']
54
- t.output_dir = 'coverage'
55
- t.verbose = true
56
- end
57
- rescue LoadError
58
- puts "RCov is not available"
59
- end
60
-
61
46
  # RDoc Task
62
47
  rd = Rake::RDocTask.new("rdoc") { |rdoc|
63
48
  rdoc.rdoc_dir = 'html'
64
49
  rdoc.template = 'doc/jamis.rb'
65
50
  rdoc.title = "TExp - Temporal Expression Library for Ruby"
66
51
  rdoc.options << '--line-numbers' << '--inline-source' <<
67
- '--main' << 'README' <<
68
- '--title' << 'TExp - Temporal Expressions'
69
- rdoc.rdoc_files.include('README', 'MIT-LICENSE', 'ChangeLog')
52
+ '--main' << 'README.rdoc' <<
53
+ '--title' << 'TExp - Temporal Expressions'
54
+ rdoc.rdoc_files.include('README.rdoc', 'MIT-LICENSE', 'ChangeLog')
70
55
  rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc')
71
56
  }
72
57
 
@@ -76,7 +61,7 @@ rd = Rake::RDocTask.new("rdoc") { |rdoc|
76
61
 
77
62
  PKG_FILES = FileList[
78
63
  '[A-Z]*',
79
- 'lib/**/*.rb',
64
+ 'lib/**/*.rb',
80
65
  'test/**/*.rb',
81
66
  'doc/**/*'
82
67
  ]
@@ -89,7 +74,7 @@ else
89
74
  s.version = PACKAGE_VERSION
90
75
  s.summary = "Temporal Expressions for Ruby."
91
76
  s.description = <<-EOF
92
- TExp is a temporal expression library for Ruby with a modular,
77
+ TExp is a temporal expression library for Ruby with a modular,
93
78
  extensible expression serialization language.
94
79
  EOF
95
80
  s.files = PKG_FILES.to_a
@@ -103,9 +88,8 @@ else
103
88
  s.rubyforge_project = "texp"
104
89
  end
105
90
 
106
- package_task = Rake::GemPackageTask.new(spec) do |pkg|
91
+ package_task = Gem::PackageTask.new(spec) do |pkg|
107
92
  pkg.need_zip = true
108
93
  pkg.need_tar = true
109
94
  end
110
95
  end
111
-
data/TAGS CHANGED
@@ -1,369 +1,446 @@
1
1
 
2
- doc/jamis.rb,43
2
+ Rakefile,128
3
+ PACKAGE_VERSION =PACKAGE_VERSION10,154
4
+ module TagsTags30,539
5
+ RUBY_FILES =RUBY_FILES31,551
6
+ PKG_FILES =PKG_FILES62,1496
7
+
8
+ doc/jamis.rb,491
3
9
  module RDocRDoc1,0
4
10
  module PagePage2,12
5
-
6
- lib/texp.rb,0
7
-
8
- lib/texp/base.rb,1465
11
+ FONTS =FONTS4,25
12
+ STYLE =STYLE6,99
13
+ XHTML_PREAMBLE =XHTML_PREAMBLE185,2567
14
+ HEADER =HEADER191,2765
15
+ FILE_PAGE =FILE_PAGE242,4015
16
+ CLASS_PAGE =CLASS_PAGE270,4810
17
+ METHOD_LIST =METHOD_LIST308,5593
18
+ FOOTER =FOOTER456,8372
19
+ BODY =BODY461,8422
20
+ SRC_PAGE =SRC_PAGE473,8626
21
+ FR_INDEX_BODY =FR_INDEX_BODY501,9493
22
+ FILE_INDEX =FILE_INDEX505,9532
23
+ CLASS_INDEX =CLASS_INDEX552,10328
24
+ METHOD_INDEX =METHOD_INDEX553,10353
25
+ INDEX =INDEX555,10380
26
+
27
+ lib/texp/base.rb,1325
9
28
  module TExpTExp1,0
10
- class BaseBase5,143
11
- def to_sto_s10,287
12
- def reanchor(date)reanchor17,430
13
- def first_day_of_window(date)first_day_of_window24,664
14
- def last_day_of_window(date)last_day_of_window31,931
15
- def each() # :yield: temporal_expressioneach37,1094
16
- def window(*args)window77,2628
17
- def listize(arg)listize86,2886
18
- def encode_date(codes, date)encode_date96,3046
19
- def encode_list(codes, list)encode_list101,3185
20
- def ordinal_list(list, connector='or')ordinal_list121,3720
21
- def humanize_list(list, connector='or', &block)humanize_list128,3979
22
- def humanize_date(date)humanize_date143,4444
23
- def ordinal(n)ordinal166,4945
24
- def suffix(n)suffix180,5259
25
- def encoding_tokenencoding_token185,5391
26
- def build_hashbuild_hash190,5511
27
- def register_parse_callback(token, callback=self)register_parse_callback202,5851
28
- def parse_callback(stack)parse_callback209,6158
29
- class SingleTermBase < BaseSingleTermBase218,6436
30
- def initialize(term)initialize220,6514
31
- def reanchor(date)reanchor225,6630
32
- def each() # :yield: temporal_expressioneach232,6846
33
- class MultiTermBase < BaseMultiTermBase241,7140
34
- def initialize(*terms)initialize244,7218
35
- def reanchor(date)reanchor249,7338
36
- def each() # :yield: temporal_expressioneach260,7618
37
- def parse_callback(stack)parse_callback269,7953
38
-
39
- lib/texp/day_interval.rb,369
29
+ class TExpErrorTExpError3,15
30
+ class TExpIncludeErrorTExpIncludeError6,58
31
+ class BaseBase11,232
32
+ def to_sto_s16,376
33
+ def include?include?22,456
34
+ def reanchorreanchor27,619
35
+ def first_day_of_windowfirst_day_of_window34,853
36
+ def last_day_of_windowlast_day_of_window41,1120
37
+ def eacheach47,1283
38
+ def windowwindow87,2817
39
+ def listizelistize96,3075
40
+ def encode_dateencode_date106,3235
41
+ def encode_listencode_list111,3374
42
+ def ordinal_listordinal_list131,3909
43
+ def humanize_listhumanize_list138,4168
44
+ def humanize_datehumanize_date153,4633
45
+ SUFFIX =SUFFIX158,4756
46
+ def ordinalordinal176,5134
47
+ def suffixsuffix190,5448
48
+ def encoding_tokenencoding_token195,5580
49
+ def build_hashbuild_hash200,5700
50
+ attr_reader :encoding_tokenencoding_token208,5917
51
+ def register_parse_callbackregister_parse_callback212,6040
52
+ def parse_callbackparse_callback219,6347
53
+ class SingleTermBaseSingleTermBase228,6625
54
+ def initializeinitialize230,6703
55
+ def reanchorreanchor235,6819
56
+ def eacheach242,7035
57
+ class MultiTermBaseMultiTermBase251,7329
58
+ def initializeinitialize254,7407
59
+ def reanchorreanchor259,7527
60
+ def eacheach270,7807
61
+ def parse_callbackparse_callback279,8142
62
+
63
+ lib/texp/day_interval.rb,534
40
64
  module TExpTExp1,0
41
- class DayInterval < BaseDayInterval2,12
42
- def initialize(base_date, interval)initialize7,101
43
- def includes?(date)includes?13,292
44
- def reanchor(new_anchor_date)reanchor22,518
45
- def inspectinspect27,667
46
- def encode(codes)encode36,932
47
- def base_mjdbase_mjd47,1125
48
- def parse_callback(stack)parse_callback52,1190
49
-
50
- lib/texp/day_of_month.rb,212
65
+ class DayIntervalDayInterval2,12
66
+ attr_reader :base_date, :intervalbase_date5,73
67
+ attr_reader :base_date, :intervalinterval5,73
68
+ def day_multiplierday_multiplier7,112
69
+ def interval_unitinterval_unit11,156
70
+ def initializeinitialize15,203
71
+ def includes?includes?21,394
72
+ def reanchorreanchor30,639
73
+ def inspectinspect35,788
74
+ def encodeencode46,1065
75
+ def pluralizepluralize57,1258
76
+ def base_mjdbase_mjd61,1308
77
+ def parse_callbackparse_callback66,1373
78
+
79
+ lib/texp/day_of_month.rb,186
51
80
  module TExpTExp1,0
52
- class DayOfMonth < BaseDayOfMonth2,12
53
- def initialize(days)initialize5,72
54
- def includes?(date)includes?10,187
81
+ class DayOfMonthDayOfMonth2,12
82
+ def initializeinitialize5,72
83
+ def includes?includes?10,187
55
84
  def inspectinspect15,308
56
- def encode(codes)encode21,451
85
+ def encodeencode21,451
57
86
 
58
- lib/texp/day_of_week.rb,210
87
+ lib/texp/day_of_week.rb,216
59
88
  module TExpTExp1,0
60
- class DayOfWeek < BaseDayOfWeek2,12
61
- def initialize(days)initialize5,71
62
- def includes?(date)includes?10,186
63
- def inspectinspect15,308
64
- def encode(codes)encode21,473
65
-
66
- lib/texp/dsl.rb,1112
89
+ class DayOfWeekDayOfWeek2,12
90
+ attr_reader :daysdays3,37
91
+ def initializeinitialize7,98
92
+ def includes?includes?12,213
93
+ def inspectinspect17,335
94
+ def encodeencode23,487
95
+
96
+ lib/texp/day_of_week_interval.rb,245
97
+ module TExpTExp3,91
98
+ class DayOfWeekIntervalDayOfWeekInterval4,103
99
+ def initializeinitialize6,168
100
+ def find_day_of_week_on_or_afterfind_day_of_week_on_or_after21,628
101
+ def reanchorreanchor30,892
102
+ def inspectinspect34,991
103
+
104
+ lib/texp/dsl.rb,1171
67
105
  module TExpTExp1,0
68
- module DSLDSL7,216
69
- class EvalEnvironmentEvalEnvironment9,230
70
- def initialize(containing_env)initialize12,275
71
- def method_missing(sym, *args, &block)method_missing16,372
72
- def expression(&block)expression21,480
73
- def day(*days_of_month)day33,895
74
- def week(*weeks)week55,1870
75
- def month(*month)month70,2364
76
- def year(*years)year81,2688
77
- def on(*args)on130,4191
78
- def dow(*dow)dow173,5431
79
- def every(n, unit, start_date=Date.today)every177,5505
80
- def normalize_units(args) # :nodoc:normalize_units182,5642
81
- def apply_units(unit, value)apply_units210,6359
82
- def try_parsing(string)try_parsing214,6438
83
- def dm_args(args)dm_args220,6554
84
- def dmy_args(args)dmy_args227,6709
85
- def check_valid_day_month(day, month)check_valid_day_month234,6877
86
- def normalize_months(months)normalize_months245,7139
87
- def normalize_month(month_thing)normalize_month249,7229
88
- def normalize_dows(dow_list)normalize_dows258,7415
89
- def normalize_dow(dow_thing)normalize_dow262,7509
90
- def TExp(&block)TExp277,7709
91
-
92
- lib/texp/errors.rb,166
106
+ module DSLDSL6,215
107
+ def dayday15,537
108
+ def weekweek37,1512
109
+ def monthmonth52,2023
110
+ def yearyear63,2347
111
+ def onon112,3850
112
+ def dowdow155,5090
113
+ def everyevery159,5164
114
+ def evaluate_expression_in_environmentevaluate_expression_in_environment166,5430
115
+ def normalize_unitsnormalize_units171,5579
116
+ WEEKNAMES =WEEKNAMES189,5973
117
+ MONTHNAMES =MONTHNAMES197,6099
118
+ DAYNAMES =DAYNAMES198,6178
119
+ UNIT_MULTIPLIERS =UNIT_MULTIPLIERS200,6247
120
+ def apply_unitsapply_units207,6422
121
+ def try_parsingtry_parsing211,6501
122
+ def dm_argsdm_args217,6617
123
+ def dmy_argsdmy_args224,6772
124
+ def check_valid_day_monthcheck_valid_day_month231,6940
125
+ def normalize_weeksnormalize_weeks242,7202
126
+ def normalize_weeknormalize_week246,7288
127
+ def normalize_monthsnormalize_months255,7438
128
+ def normalize_monthnormalize_month259,7528
129
+ def normalize_dowsnormalize_dows268,7714
130
+ def normalize_downormalize_dow272,7808
131
+ class EvalEnvironmentEvalEnvironment308,9185
132
+ def initializeinitialize314,9380
133
+ def method_missingmethod_missing320,9600
134
+ def texptexp336,9996
135
+
136
+ lib/texp/errors.rb,134
93
137
  module TExpTExp1,0
94
- class Error < StandardErrorError4,58
95
- class DateArgumentError < ErrorDateArgumentError11,236
96
- class ParseError < ErrorParseError16,364
138
+ class ErrorError4,58
139
+ class DateArgumentErrorDateArgumentError11,236
140
+ class ParseErrorParseError16,364
97
141
 
98
- lib/texp/every_day.rb,220
142
+ lib/texp/every_day.rb,193
99
143
  module TExpTExp1,0
100
- class EveryDay < BaseEveryDay2,12
101
- def includes?(date)includes?6,123
144
+ class EveryDayEveryDay2,12
145
+ def includes?includes?6,123
102
146
  def inspectinspect11,224
103
- def encode(codes)encode16,318
104
- def parse_callback(stack)parse_callback21,397
147
+ def encodeencode16,318
148
+ def parse_callbackparse_callback21,397
105
149
 
106
150
  lib/texp/ext.rb,57
107
151
  module TExpTExp1,0
108
152
  module ExtensionsExtensions2,12
109
153
 
110
- lib/texp/logic.rb,467
154
+ lib/texp/logic.rb,379
111
155
  module TExpTExp1,0
112
- class And < MultiTermBaseAnd6,212
113
- def includes?(date)includes?10,327
156
+ class AndAnd6,212
157
+ def includes?includes?10,327
114
158
  def inspectinspect15,463
115
- def encode(codes)encode20,598
116
- class Or < MultiTermBaseOr29,903
117
- def includes?(date)includes?33,1017
159
+ def encodeencode20,598
160
+ class OrOr29,903
161
+ def includes?includes?33,1017
118
162
  def inspectinspect38,1153
119
- def encode(codes)encode43,1281
120
- class Not < SingleTermBaseNot52,1576
121
- def includes?(date)includes?56,1690
163
+ def encodeencode43,1281
164
+ class NotNot52,1576
165
+ def includes?includes?56,1690
122
166
  def inspectinspect61,1810
123
- def encode(codes)encode66,1935
167
+ def encodeencode66,1935
124
168
 
125
- lib/texp/month.rb,204
169
+ lib/texp/month.rb,176
126
170
  module TExpTExp1,0
127
- class Month < BaseMonth2,12
128
- def initialize(months)initialize5,67
129
- def includes?(date)includes?10,188
171
+ class MonthMonth2,12
172
+ def initializeinitialize5,67
173
+ def includes?includes?10,188
130
174
  def inspectinspect15,313
131
- def encode(codes)encode21,472
175
+ def encodeencode21,472
176
+
177
+ lib/texp/month_interval.rb,178
178
+ module TExpTExp1,0
179
+ class MonthIntervalMonthInterval2,12
180
+ def day_multiplierday_multiplier5,82
181
+ def interval_unitinterval_unit9,127
182
+ def inspectinspect13,176
132
183
 
133
- lib/texp/operators.rb,143
184
+ lib/texp/operators.rb,44
134
185
  module TExpTExp1,0
135
186
  class BaseBase2,12
136
- def +(texp)+12,303
137
- def *(texp)*24,634
138
- def -(texp)-36,983
139
- def -@()-@49,1373
140
187
 
141
- lib/texp/parse.rb,316
188
+ lib/texp/parse.rb,459
142
189
  module TExpTExp1,0
143
- def register_parse_callback(token, callback)register_parse_callback26,799
144
- def parse(string)parse31,955
145
- def compile(tok)compile43,1221
146
- class ParseCallbackParseCallback62,1669
147
- def initialize(&block)initialize63,1691
148
- def parse_callback(stack)parse_callback66,1750
190
+ PARSE_CALLBACKS =PARSE_CALLBACKS7,123
191
+ TOKEN_PATTERNS =TOKEN_PATTERNS10,192
192
+ TOKEN_RE =TOKEN_RE21,545
193
+ def register_parse_callbackregister_parse_callback26,799
194
+ def parseparse31,955
195
+ def parse_callbacksparse_callbacks40,1155
196
+ def compilecompile47,1280
197
+ class ParseCallbackParseCallback66,1728
198
+ def initializeinitialize67,1750
199
+ def parse_callbackparse_callback70,1809
200
+ MARK =MARK78,1943
149
201
 
150
202
  lib/texp/time_ext.rb,49
151
203
  class TimeTime1,0
152
204
  def to_dateto_date3,51
153
205
 
154
- lib/texp/version.rb,21
206
+ lib/texp/version.rb,46
155
207
  module TExpTExp1,0
208
+ VERSION =VERSION2,12
156
209
 
157
- lib/texp/week.rb,419
210
+ lib/texp/week.rb,461
158
211
  module TExpTExp3,16
159
- class Week < BaseWeek4,28
160
- def initialize(weeks)initialize7,82
161
- def includes?(date)includes?12,200
162
- def encode(codes)encode18,378
212
+ class WeekWeek4,28
213
+ def initializeinitialize7,82
214
+ def includes?includes?12,200
215
+ def encodeencode18,378
163
216
  def inspectinspect24,529
164
- def week_from_front(date)week_from_front30,632
165
- def week_from_back(date)week_from_back34,707
166
- def self.days_in_month(month)days_in_month39,827
167
- def last_day_of_month(date)last_day_of_month50,1046
217
+ def week_from_frontweek_from_front30,632
218
+ def week_from_backweek_from_back34,707
219
+ def self.days_in_monthdays_in_month39,827
220
+ def self.days_in_monthself.days_in_month39,827
221
+ DAYS_IN_MONTH =DAYS_IN_MONTH47,970
222
+ def last_day_of_monthlast_day_of_month50,1046
223
+
224
+ lib/texp/week_interval.rb,145
225
+ module TExpTExp1,0
226
+ class WeekIntervalWeekInterval2,12
227
+ def day_multiplierday_multiplier5,81
228
+ def interval_unitinterval_unit9,125
168
229
 
169
- lib/texp/window.rb,496
230
+ lib/texp/window.rb,399
170
231
  module TExpTExp1,0
171
- class Window < SingleTermBaseWindow2,12
172
- def initialize(texp, prewindow_days, postwindow_days)initialize5,78
173
- def includes?(date)includes?12,302
174
- def first_day_of_window(date)first_day_of_window18,474
175
- def last_day_of_window(date)last_day_of_window25,701
176
- def find_pivot(date)find_pivot31,864
232
+ class WindowWindow2,12
233
+ def initializeinitialize5,78
234
+ def includes?includes?12,302
235
+ def first_day_of_windowfirst_day_of_window18,474
236
+ def last_day_of_windowlast_day_of_window25,701
237
+ def find_pivotfind_pivot31,864
177
238
  def inspectinspect41,1110
178
- def encode(codes)encode48,1320
179
- def days(n)days55,1455
180
- def parse_callback(stack)parse_callback61,1596
239
+ def encodeencode48,1320
240
+ def daysdays55,1455
241
+ def parse_callbackparse_callback61,1596
181
242
 
182
- lib/texp/year.rb,201
243
+ lib/texp/year.rb,174
183
244
  module TExpTExp1,0
184
- class Year < BaseYear2,12
185
- def initialize(years)initialize5,66
186
- def includes?(date)includes?10,184
245
+ class YearYear2,12
246
+ def initializeinitialize5,66
247
+ def includes?includes?10,184
187
248
  def inspectinspect15,307
188
- def encode(codes)encode20,428
189
-
190
- test/texp_tests.rb,230
191
- def d(date_string)d5,76
192
- module TExpAssertionsTExpAssertions9,126
193
- def assert_includes(te, *dates)assert_includes10,148
194
- def assert_not_includes(te, *dates)assert_not_includes17,341
195
- class Test::Unit::TestCaseTest25,548
196
-
197
- test/texp/base_test.rb,733
198
- class BaseEachTest < Test::Unit::TestCaseBaseEachTest4,36
199
- def test_each_on_basetest_each_on_base5,78
200
- def test_each_on_single_termtest_each_on_single_term10,173
201
- def test_each_on_multi_termtest_each_on_multi_term15,294
202
- def basic_texpbasic_texp22,423
203
- def single_term_texpsingle_term_texp26,484
204
- def multi_term_texpmulti_term_texp30,554
205
- class BaseAnchorTest < Test::Unit::TestCaseBaseAnchorTest36,627
206
- def test_setting_anchor_datetest_setting_anchor_date37,671
207
- def assert_cycle(te, start_date, n)assert_cycle48,948
208
- def test_that_complex_expression_propagate_anchor_datetest_that_complex_expression_propagate_anchor_date58,1160
209
- def assert_complex_cycle(te, start_date)assert_complex_cycle75,1687
210
-
211
- test/texp/day_interval_test.rb,305
212
- class DayIntervalTest < Test::Unit::TestCaseDayIntervalTest5,48
213
- def test_day_intervaltest_day_interval7,94
214
- def test_day_interval_without_start_datetest_day_interval_without_start_date20,667
215
- def test_day_interval_excludes_dates_before_starttest_day_interval_excludes_dates_before_start27,890
216
-
217
- test/texp/day_of_month_test.rb,223
218
- class DayOfMonthTest < Test::Unit::TestCaseDayOfMonthTest7,72
219
- def test_day_of_month_with_single_argtest_day_of_month_with_single_arg9,117
220
- def test_day_of_include_with_one_daytest_day_of_include_with_one_day16,356
221
-
222
- test/texp/day_of_week_test.rb,249
223
- class DayOfWeekTest < Test::Unit::TestCaseDayOfWeekTest7,72
224
- def test_day_of_week_include_with_one_daytest_day_of_week_include_with_one_day9,116
225
- def test_day_of_week_include_with_several_daystest_day_of_week_include_with_several_days20,577
226
-
227
- test/texp/dsl_test.rb,2445
228
- class BuilderTest < Test::Unit::TestCaseBuilderTest4,42
229
- def test_day_buildertest_day_builder5,83
230
- def test_day_builder_with_liststest_day_builder_with_lists13,256
231
- def test_week_buildertest_week_builder21,471
232
- def test_week_builder_with_liststest_week_builder_with_lists29,634
233
- def test_month_buildertest_month_builder37,830
234
- def test_month_builder_with_liststest_month_builder_with_lists45,988
235
- def test_month_builder_with_string_monthstest_month_builder_with_string_months53,1168
236
- def test_year_buildertest_year_builder61,1367
237
- def test_year_builder_with_listtest_year_builder_with_list69,1527
238
- def test_on_builder_with_day_monthtest_on_builder_with_day_month77,1727
239
- def test_on_builder_with_day_and_string_monthtest_on_builder_with_day_and_string_month85,1916
240
- def test_on_builder_with_string_datetest_on_builder_with_string_date93,2120
241
- def test_on_builder_with_datetest_on_builder_with_date101,2320
242
- def test_on_builder_with_day_month_yeartest_on_builder_with_day_month_year109,2503
243
- def test_on_builder_with_day_string_month_and_yeartest_on_builder_with_day_string_month_and_year117,2703
244
- def test_on_builder_with_timetest_on_builder_with_time125,2920
245
- def test_on_builder_arbitrary_to_stringtest_on_builder_arbitrary_to_string133,3100
246
- def obj.to_sto_s135,3163
247
- def test_on_builder_with_invalid_argumentstest_on_builder_with_invalid_arguments146,3360
248
- def test_dow_buildertest_dow_builder162,4147
249
- def test_dow_builder_with_liststest_dow_builder_with_lists174,4389
250
- def test_interval_builder_with_daystest_interval_builder_with_days186,4695
251
- def test_interval_builder_with_weekstest_interval_builder_with_weeks194,4934
252
- def test_interval_builder_with_monthstest_interval_builder_with_months203,5244
253
- def test_interval_builder_with_yearstest_interval_builder_with_years212,5561
254
- def test_window_buildertest_window_builder221,5881
255
- def test_window_builder_with_symetrical_sidestest_window_builder_with_symetrical_sides229,6069
256
- def test_window_builder_with_unitstest_window_builder_with_units237,6285
257
- def test_window_builder_with_asymetrical_unitstest_window_builder_with_asymetrical_units245,6513
258
- def test_window_builder_with_bad_unitstest_window_builder_with_bad_units253,6763
259
- def test_evaltest_eval259,6899
260
- def test_eval_with_eternal_referencestest_eval_with_eternal_references268,7074
261
- def favorite_monthfavorite_month277,7283
262
-
263
- test/texp/every_day_test.rb,103
264
- class EveryDayTest < Test::Unit::TestCaseEveryDayTest8,73
265
- def test_every_daytest_every_day10,116
266
-
267
- test/texp/ext_test.rb,486
268
- module TExpTExp7,72
269
- module ExtensionsExtensions10,144
270
- module MyExtMyExt14,302
271
- class Never < BaseNever23,635
272
- def includes?(date)includes?32,995
273
- def encode(codes)encode42,1407
274
- def parse_callback(stack)parse_callback56,1948
275
- class ExtensionsTest < Test::Unit::TestCaseExtensionsTest67,2117
276
- def test_nevertest_never68,2161
277
- def test_parse_nevertest_parse_never73,2267
278
- def test_parsing_round_triptest_parsing_round_trip78,2373
279
-
280
- test/texp/inspect_test.rb,156
281
- class InspectTest < Test::Unit::TestCaseInspectTest9,172
282
- def test_inspecttest_inspect10,213
283
- def assert_inspect(texp, string)assert_inspect62,2711
284
-
285
- test/texp/logic_test.rb,188
286
- class LogicTest < Test::Unit::TestCaseLogicTest7,72
287
- def test_constantstest_constants17,284
288
- def test_andtest_and28,564
289
- def test_ortest_or36,753
290
- def test_nottest_not44,936
291
-
292
- test/texp/month_test.rb,139
293
- class MonthTest < Test::Unit::TestCaseMonthTest7,72
294
- def setupsetup9,112
295
- def test_initial_conditionstest_initial_conditions13,170
296
-
297
- test/texp/operators_test.rb,253
298
- class OperatorsTest < Test::Unit::TestCaseOperatorsTest6,57
299
- def setupsetup7,100
300
- def test_uniontest_union15,334
301
- def test_intersectiontest_intersection25,585
302
- def test_differencetest_difference33,774
303
- def test_negatetest_negate43,1034
304
-
305
- test/texp/parse_test.rb,2161
306
- class TExpParseLexicalTest < Test::Unit::TestCaseTExpParseLexicalTest9,172
307
- def setupsetup10,222
308
- def test_letterstest_letters16,355
309
- def test_numberstest_numbers20,417
310
- def test_positive_numberstest_positive_numbers24,483
311
- def test_negative_numberstest_negative_numbers28,562
312
- def test_punctuationtest_punctuation32,641
313
- def test_datestest_dates36,731
314
- def test_bad_datestest_bad_dates40,797
315
- def test_extension_tokenstest_extension_tokens44,873
316
- def test_mixedtest_mixed53,1092
317
- def test_mixed_with_spacestest_mixed_with_spaces57,1184
318
- def assert_lex(string, *tokens)assert_lex63,1305
319
- class ParseTest < Test::Unit::TestCaseParseTest71,1478
320
- def setupsetup72,1517
321
- def test_bad_parse_stringtest_bad_parse_string76,1575
322
- def test_unbalanced_listtest_unbalanced_list82,1682
323
- def test_unbalanced_list2test_unbalanced_list288,1784
324
- def test_parse_datetest_parse_date94,1887
325
- def test_parse_intervaltest_parse_interval98,1986
326
- def test_parse_day_of_monthtest_parse_day_of_month105,2155
327
- def test_parse_listtest_parse_list110,2243
328
- def test_parse_day_of_month_with_multiple_argstest_parse_day_of_month_with_multiple_args115,2332
329
- def test_parse_day_of_week_with_single_argtest_parse_day_of_week_with_single_arg122,2519
330
- def test_parse_day_of_week_with_multiple_argstest_parse_day_of_week_with_multiple_args128,2663
331
- def test_parse_month_with_single_argtest_parse_month_with_single_arg135,2847
332
- def test_parse_month_with_multiple_argstest_parse_month_with_multiple_args141,2988
333
- def test_parse_year_with_single_argtest_parse_year_with_single_arg148,3172
334
- def test_parse_year_with_multiple_argstest_parse_year_with_multiple_args154,3316
335
- def test_parse_windowtest_parse_window161,3507
336
- def test_parse_nottest_parse_not171,3886
337
- def test_parse_andtest_parse_and177,4010
338
- def test_parse_ortest_parse_or186,4256
339
- def test_parse_every_daytest_parse_every_day193,4421
340
- class ParseReverseTest < Test::Unit::TestCaseParseReverseTest200,4591
341
- def setupsetup201,4637
342
- def test_round_triptest_round_trip205,4695
343
- def assert_round_trip(string)assert_round_trip228,5310
344
-
345
- test/texp/time_ext_test.rb,105
346
- class TimeExtTest < Test::Unit::TestCaseTimeExtTest4,42
347
- def test_time_to_datetest_time_to_date5,83
348
-
349
- test/texp/week_test.rb,411
350
- class WeekTest < Test::Unit::TestCaseWeekTest7,72
351
- def test_week_include_with_one_weektest_week_include_with_one_week9,111
352
- def test_week_include_with_several_weekstest_week_include_with_several_weeks20,544
353
- def test_week_with_last_week_of_monthtest_week_with_last_week_of_month32,1054
354
- def test_week_from_backtest_week_from_back42,1379
355
- def test_last_day_of_monthtest_last_day_of_month49,1663
356
-
357
- test/texp/window_test.rb,408
358
- class WindowTest < Test::Unit::TestCaseWindowTest7,72
359
- def test_windowtest_window9,113
360
- def test_narrow_windowtest_narrow_window20,520
361
- def test_window_reportingtest_window_reporting31,934
362
- def test_window_reporting_when_outside_windowtest_window_reporting_when_outside_window40,1178
363
- def test_windows_on_non_window_temporal_expressionstest_windows_on_non_window_temporal_expressions49,1422
364
-
365
- test/texp/year_test.rb,166
366
- class YearTest < Test::Unit::TestCaseYearTest7,72
367
- def setupsetup9,111
368
- def test_single_argtest_single_arg13,169
369
- def test_single_argtest_single_arg20,334
249
+ def encodeencode20,428
250
+
251
+ test/texp/base_test.rb,723
252
+ class BaseEachTestBaseEachTest3,23
253
+ def test_each_on_basetest_each_on_base4,59
254
+ def test_each_on_single_termtest_each_on_single_term9,154
255
+ def test_each_on_multi_termtest_each_on_multi_term14,275
256
+ def test_complains_about_includetest_complains_about_include19,393
257
+ def basic_texpbasic_texp27,550
258
+ def single_term_texpsingle_term_texp31,611
259
+ def multi_term_texpmulti_term_texp35,681
260
+ class BaseAnchorTestBaseAnchorTest41,754
261
+ def test_setting_anchor_datetest_setting_anchor_date42,792
262
+ def assert_cycleassert_cycle53,1069
263
+ def test_that_complex_expression_propagate_anchor_datetest_that_complex_expression_propagate_anchor_date63,1281
264
+ def assert_complex_cycleassert_complex_cycle80,1808
265
+
266
+ test/texp/day_interval_test.rb,282
267
+ class DayIntervalTestDayIntervalTest3,23
268
+ def test_day_intervaltest_day_interval5,63
269
+ def test_day_interval_without_start_datetest_day_interval_without_start_date18,636
270
+ def test_day_interval_excludes_dates_before_starttest_day_interval_excludes_dates_before_start25,859
271
+
272
+ test/texp/day_of_month_test.rb,199
273
+ class DayOfMonthTestDayOfMonthTest3,23
274
+ def test_day_of_month_with_single_argtest_day_of_month_with_single_arg5,62
275
+ def test_day_of_include_with_one_daytest_day_of_include_with_one_day12,301
276
+
277
+ test/texp/day_of_week_test.rb,225
278
+ class DayOfWeekTestDayOfWeekTest3,23
279
+ def test_day_of_week_include_with_one_daytest_day_of_week_include_with_one_day5,61
280
+ def test_day_of_week_include_with_several_daystest_day_of_week_include_with_several_days16,522
281
+
282
+ test/texp/dsl_test.rb,2504
283
+ class BuilderTestBuilderTest3,23
284
+ def test_day_buildertest_day_builder4,58
285
+ def test_day_builder_with_liststest_day_builder_with_lists12,231
286
+ def test_week_buildertest_week_builder20,446
287
+ def test_week_builder_with_liststest_week_builder_with_lists28,609
288
+ def test_week_builder_with_symbol_weekstest_week_builder_with_symbol_weeks36,805
289
+ def test_month_buildertest_month_builder44,1019
290
+ def test_month_builder_with_liststest_month_builder_with_lists52,1177
291
+ def test_month_builder_with_string_monthstest_month_builder_with_string_months60,1357
292
+ def test_year_buildertest_year_builder68,1556
293
+ def test_year_builder_with_listtest_year_builder_with_list76,1716
294
+ def test_on_builder_with_day_monthtest_on_builder_with_day_month84,1916
295
+ def test_on_builder_with_day_and_string_monthtest_on_builder_with_day_and_string_month92,2105
296
+ def test_on_builder_with_string_datetest_on_builder_with_string_date100,2309
297
+ def test_on_builder_with_datetest_on_builder_with_date108,2509
298
+ def test_on_builder_with_day_month_yeartest_on_builder_with_day_month_year116,2692
299
+ def test_on_builder_with_day_string_month_and_yeartest_on_builder_with_day_string_month_and_year124,2892
300
+ def test_on_builder_with_timetest_on_builder_with_time132,3109
301
+ def test_on_builder_arbitrary_to_stringtest_on_builder_arbitrary_to_string140,3289
302
+ def objobj142,3352
303
+ def test_on_builder_with_invalid_argumentstest_on_builder_with_invalid_arguments153,3549
304
+ def test_dow_buildertest_dow_builder169,4349
305
+ def test_dow_builder_with_liststest_dow_builder_with_lists181,4591
306
+ def test_interval_builder_with_daystest_interval_builder_with_days193,4897
307
+ def test_interval_builder_with_weekstest_interval_builder_with_weeks201,5136
308
+ def test_interval_builder_with_monthstest_interval_builder_with_months210,5446
309
+ def test_interval_builder_with_yearstest_interval_builder_with_years219,5763
310
+ def test_window_buildertest_window_builder228,6083
311
+ def test_window_builder_with_symetrical_sidestest_window_builder_with_symetrical_sides236,6271
312
+ def test_window_builder_with_unitstest_window_builder_with_units244,6487
313
+ def test_window_builder_with_asymetrical_unitstest_window_builder_with_asymetrical_units252,6715
314
+ def test_window_builder_with_bad_unitstest_window_builder_with_bad_units260,6965
315
+ def test_evaltest_eval266,7102
316
+ def test_eval_with_eternal_referencestest_eval_with_eternal_references275,7277
317
+ def favorite_monthfavorite_month284,7486
318
+
319
+ test/texp/every_day_test.rb,78
320
+ class EveryDayTestEveryDayTest3,23
321
+ def test_every_daytest_every_day4,59
322
+
323
+ test/texp/ext_test.rb,434
324
+ module TExpTExp3,23
325
+ module ExtensionsExtensions6,95
326
+ module MyExtMyExt10,253
327
+ class NeverNever19,586
328
+ def includes?includes?28,946
329
+ def encodeencode38,1358
330
+ def parse_callbackparse_callback52,1899
331
+ class ExtensionsTestExtensionsTest63,2068
332
+ def test_nevertest_never64,2106
333
+ def test_parse_nevertest_parse_never69,2212
334
+ def test_parsing_round_triptest_parsing_round_trip74,2318
335
+
336
+ test/texp/inspect_test.rb,117
337
+ class InspectTestInspectTest4,94
338
+ def test_inspecttest_inspect5,129
339
+ def assert_inspectassert_inspect57,2488
340
+
341
+ test/texp/logic_test.rb,291
342
+ class LogicTestLogicTest3,23
343
+ DATE =DATE5,57
344
+ LEFT =LEFT6,93
345
+ RIGHT =RIGHT7,133
346
+ TT =TT8,174
347
+ TF =TF9,186
348
+ FT =FT10,200
349
+ FF =FF11,214
350
+ def test_constantstest_constants13,229
351
+ def test_andtest_and24,509
352
+ def test_ortest_or32,698
353
+ def test_nottest_not40,881
354
+
355
+ test/texp/month_test.rb,114
356
+ class MonthTestMonthTest3,23
357
+ def setupsetup5,57
358
+ def test_initial_conditionstest_initial_conditions9,115
359
+
360
+ test/texp/operators_test.rb,228
361
+ class OperatorsTestOperatorsTest3,23
362
+ def setupsetup4,60
363
+ def test_uniontest_union12,294
364
+ def test_intersectiontest_intersection22,545
365
+ def test_differencetest_difference30,734
366
+ def test_negatetest_negate40,994
367
+
368
+ test/texp/parse_test.rb,2094
369
+ class TExpParseLexicalTestTExpParseLexicalTest4,94
370
+ def setupsetup5,138
371
+ def test_letterstest_letters11,271
372
+ def test_numberstest_numbers15,333
373
+ def test_positive_numberstest_positive_numbers19,399
374
+ def test_negative_numberstest_negative_numbers23,478
375
+ def test_punctuationtest_punctuation27,557
376
+ def test_datestest_dates31,647
377
+ def test_bad_datestest_bad_dates35,713
378
+ def test_extension_tokenstest_extension_tokens39,789
379
+ EXPECTED =EXPECTED43,854
380
+ def test_mixedtest_mixed48,1006
381
+ def test_mixed_with_spacestest_mixed_with_spaces52,1098
382
+ def assert_lexassert_lex58,1219
383
+ class ParseTestParseTest66,1392
384
+ def setupsetup67,1425
385
+ def test_bad_parse_stringtest_bad_parse_string71,1483
386
+ def test_unbalanced_listtest_unbalanced_list77,1591
387
+ def test_unbalanced_list2test_unbalanced_list283,1694
388
+ def test_parse_datetest_parse_date89,1798
389
+ def test_parse_intervaltest_parse_interval93,1897
390
+ def test_parse_day_of_monthtest_parse_day_of_month100,2066
391
+ def test_parse_listtest_parse_list105,2154
392
+ def test_parse_day_of_month_with_multiple_argstest_parse_day_of_month_with_multiple_args110,2243
393
+ def test_parse_day_of_week_with_single_argtest_parse_day_of_week_with_single_arg117,2430
394
+ def test_parse_day_of_week_with_multiple_argstest_parse_day_of_week_with_multiple_args123,2574
395
+ def test_parse_month_with_single_argtest_parse_month_with_single_arg130,2758
396
+ def test_parse_month_with_multiple_argstest_parse_month_with_multiple_args136,2899
397
+ def test_parse_year_with_single_argtest_parse_year_with_single_arg143,3083
398
+ def test_parse_year_with_multiple_argstest_parse_year_with_multiple_args149,3227
399
+ def test_parse_windowtest_parse_window156,3418
400
+ def test_parse_nottest_parse_not166,3797
401
+ def test_parse_andtest_parse_and172,3921
402
+ def test_parse_ortest_parse_or181,4167
403
+ def test_parse_every_daytest_parse_every_day188,4332
404
+ class ParseReverseTestParseReverseTest195,4502
405
+ def setupsetup196,4542
406
+ def test_round_triptest_round_trip200,4600
407
+ def assert_round_tripassert_round_trip223,5215
408
+
409
+ test/texp/time_ext_test.rb,82
410
+ class TimeExtTestTimeExtTest3,23
411
+ def test_time_to_datetest_time_to_date4,58
412
+
413
+ test/texp/week_interval_test.rb,286
414
+ class WeekIntervalTestWeekIntervalTest3,23
415
+ def test_week_intervaltest_week_interval5,64
416
+ def test_day_interval_without_start_datetest_day_interval_without_start_date19,692
417
+ def test_day_interval_excludes_dates_before_starttest_day_interval_excludes_dates_before_start26,915
418
+
419
+ test/texp/week_test.rb,386
420
+ class WeekTestWeekTest3,23
421
+ def test_week_include_with_one_weektest_week_include_with_one_week5,56
422
+ def test_week_include_with_several_weekstest_week_include_with_several_weeks16,489
423
+ def test_week_with_last_week_of_monthtest_week_with_last_week_of_month28,999
424
+ def test_week_from_backtest_week_from_back38,1324
425
+ def test_last_day_of_monthtest_last_day_of_month45,1608
426
+
427
+ test/texp/window_test.rb,384
428
+ class WindowTestWindowTest3,23
429
+ def test_windowtest_window5,58
430
+ def test_narrow_windowtest_narrow_window16,465
431
+ def test_window_reportingtest_window_reporting27,879
432
+ def test_window_reporting_when_outside_windowtest_window_reporting_when_outside_window36,1123
433
+ def test_windows_on_non_window_temporal_expressionstest_windows_on_non_window_temporal_expressions45,1367
434
+
435
+ test/texp/year_test.rb,137
436
+ class YearTestYearTest3,23
437
+ def setupsetup5,56
438
+ def test_single_argtest_single_arg9,114
439
+ def test_two_argstest_two_args16,279
440
+
441
+ test/texp_tests.rb,187
442
+ def dd5,83
443
+ module TExpAssertionsTExpAssertions9,133
444
+ def assert_includesassert_includes10,155
445
+ def assert_not_includesassert_not_includes17,348
446
+ class Minitest::TestTest25,555