bjeanes-holidays 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. data/CHANGELOG +15 -0
  2. data/LICENSE +21 -0
  3. data/README.rdoc +77 -0
  4. data/REFERENCES +16 -0
  5. data/data/SYNTAX +111 -0
  6. data/data/au.yaml +111 -0
  7. data/data/build_defs.rb +152 -0
  8. data/data/ca.yaml +141 -0
  9. data/data/de.yaml +111 -0
  10. data/data/dk.yaml +117 -0
  11. data/data/es.yaml +161 -0
  12. data/data/fr.yaml +70 -0
  13. data/data/gb.yaml +106 -0
  14. data/data/ie.yaml +58 -0
  15. data/data/index.yaml +23 -0
  16. data/data/is.yaml +136 -0
  17. data/data/it.yaml +66 -0
  18. data/data/mx.yaml +106 -0
  19. data/data/nl.yaml +67 -0
  20. data/data/north_america_informal.yaml +49 -0
  21. data/data/nyse.yaml +63 -0
  22. data/data/pt.yaml +85 -0
  23. data/data/se.yaml +91 -0
  24. data/data/united_nations.yaml +188 -0
  25. data/data/ups.yaml +56 -0
  26. data/data/us.yaml +81 -0
  27. data/data/za.yaml +78 -0
  28. data/lib/holidays.rb +404 -0
  29. data/lib/holidays/MANIFEST +25 -0
  30. data/lib/holidays/au.rb +42 -0
  31. data/lib/holidays/ca.rb +68 -0
  32. data/lib/holidays/de.rb +50 -0
  33. data/lib/holidays/dk.rb +47 -0
  34. data/lib/holidays/es.rb +52 -0
  35. data/lib/holidays/europe.rb +214 -0
  36. data/lib/holidays/fr.rb +36 -0
  37. data/lib/holidays/gb.rb +40 -0
  38. data/lib/holidays/ie.rb +32 -0
  39. data/lib/holidays/is.rb +61 -0
  40. data/lib/holidays/it.rb +35 -0
  41. data/lib/holidays/mx.rb +51 -0
  42. data/lib/holidays/nl.rb +36 -0
  43. data/lib/holidays/north_america.rb +107 -0
  44. data/lib/holidays/nyse.rb +32 -0
  45. data/lib/holidays/pt.rb +43 -0
  46. data/lib/holidays/scandinavia.rb +114 -0
  47. data/lib/holidays/se.rb +52 -0
  48. data/lib/holidays/united_nations.rb +24 -0
  49. data/lib/holidays/ups.rb +31 -0
  50. data/lib/holidays/us.rb +48 -0
  51. data/lib/holidays/za.rb +35 -0
  52. data/rakefile.rb +150 -0
  53. data/test/defs/test_defs_au.rb +36 -0
  54. data/test/defs/test_defs_ca.rb +29 -0
  55. data/test/defs/test_defs_de.rb +49 -0
  56. data/test/defs/test_defs_dk.rb +30 -0
  57. data/test/defs/test_defs_es.rb +57 -0
  58. data/test/defs/test_defs_europe.rb +243 -0
  59. data/test/defs/test_defs_fr.rb +26 -0
  60. data/test/defs/test_defs_gb.rb +36 -0
  61. data/test/defs/test_defs_ie.rb +21 -0
  62. data/test/defs/test_defs_is.rb +33 -0
  63. data/test/defs/test_defs_it.rb +25 -0
  64. data/test/defs/test_defs_mx.rb +22 -0
  65. data/test/defs/test_defs_nl.rb +24 -0
  66. data/test/defs/test_defs_north_america.rb +54 -0
  67. data/test/defs/test_defs_nyse.rb +22 -0
  68. data/test/defs/test_defs_pt.rb +56 -0
  69. data/test/defs/test_defs_scandinavia.rb +75 -0
  70. data/test/defs/test_defs_se.rb +32 -0
  71. data/test/defs/test_defs_ups.rb +21 -0
  72. data/test/defs/test_defs_us.rb +23 -0
  73. data/test/defs/test_defs_za.rb +25 -0
  74. metadata +132 -0
@@ -0,0 +1,21 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+ require 'holidays/ups'
3
+
4
+ # This file is generated by the Ruby Holiday gem.
5
+ #
6
+ # Definitions loaded: data/ups.yaml
7
+ class UpsDefinitionTests < Test::Unit::TestCase # :nodoc:
8
+
9
+ def test_ups
10
+ {Date.civil(2008,1,1) => 'New Year\'s Day',
11
+ Date.civil(2008,5,26) => 'Memorial Day',
12
+ Date.civil(2008,7,4) => 'Independence Day',
13
+ Date.civil(2008,9,1) => 'Labor Day',
14
+ Date.civil(2008,11,27) => 'Thanksgiving',
15
+ Date.civil(2008,11,28) => 'Day After Thanksgiving',
16
+ Date.civil(2008,12,25) => 'Christmas Day',
17
+ Date.civil(2008,12,31) => 'New Year\'s Eve',}.each do |date, name|
18
+ assert_equal name, Holidays.on(date, :ups)[0][:name]
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,23 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+ require 'holidays/us'
3
+
4
+ # This file is generated by the Ruby Holiday gem.
5
+ #
6
+ # Definitions loaded: data/us.yaml, data/north_america_informal.yaml
7
+ class UsDefinitionTests < Test::Unit::TestCase # :nodoc:
8
+
9
+ def test_us
10
+ {Date.civil(2008,1,1) => 'New Year\'s Day',
11
+ Date.civil(2008,1,21) => 'Martin Luther King, Jr. Day',
12
+ Date.civil(2008,2,18) => 'Presidents\' Day',
13
+ Date.civil(2008,5,26) => 'Memorial Day',
14
+ Date.civil(2008,7,4) => 'Independence Day',
15
+ Date.civil(2008,9,1) => 'Labor Day',
16
+ Date.civil(2008,10,13) => 'Columbus Day',
17
+ Date.civil(2008,11,11) => 'Veterans Day',
18
+ Date.civil(2008,11,27) => 'Thanksgiving',
19
+ Date.civil(2008,12,25) => 'Christmas Day'}.each do |date, name|
20
+ assert_equal name, Holidays.on(date, :us)[0][:name]
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,25 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+ require 'holidays/za'
3
+
4
+ # This file is generated by the Ruby Holiday gem.
5
+ #
6
+ # Definitions loaded: data/za.yaml
7
+ class ZaDefinitionTests < Test::Unit::TestCase # :nodoc:
8
+
9
+ def test_za
10
+ {Date.civil(2007,1,1) => 'New Year\'s Day',
11
+ Date.civil(2007,3,21) => 'Human Rights Day',
12
+ Date.civil(2007,4,6) => 'Good Friday',
13
+ Date.civil(2007,4,9) => 'Family Day',
14
+ Date.civil(2007,4,27) => 'Freedom Day',
15
+ Date.civil(2007,5,1) => 'Workers Day',
16
+ Date.civil(2007,6,16) => 'Youth Day',
17
+ Date.civil(2007,8,9) => 'National Women\'s Day',
18
+ Date.civil(2007,9,24) => 'Heritage Day',
19
+ Date.civil(2007,12,16) => 'Day of Reconciliation',
20
+ Date.civil(2007,12,25) => 'Christmas Day',
21
+ Date.civil(2007,12,26) => 'Day of Goodwill'}.each do |date, name|
22
+ assert_equal name, Holidays.on(date, :za, :informal)[0][:name]
23
+ end
24
+ end
25
+ end
metadata ADDED
@@ -0,0 +1,132 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bjeanes-holidays
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.5
5
+ platform: ruby
6
+ authors:
7
+ - Alex Dunae
8
+ - Bodaniel Jeanes
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2010-01-12 00:00:00 +10:00
14
+ default_executable:
15
+ dependencies: []
16
+
17
+ description: " A collection of Ruby methods to deal with statutory and other holidays. You deserve a holiday!\n"
18
+ email:
19
+ executables: []
20
+
21
+ extensions: []
22
+
23
+ extra_rdoc_files:
24
+ - README.rdoc
25
+ - data/SYNTAX
26
+ - lib/holidays/MANIFEST
27
+ - REFERENCES
28
+ - CHANGELOG
29
+ - LICENSE
30
+ files:
31
+ - lib/holidays/au.rb
32
+ - lib/holidays/ca.rb
33
+ - lib/holidays/de.rb
34
+ - lib/holidays/dk.rb
35
+ - lib/holidays/es.rb
36
+ - lib/holidays/europe.rb
37
+ - lib/holidays/fr.rb
38
+ - lib/holidays/gb.rb
39
+ - lib/holidays/ie.rb
40
+ - lib/holidays/is.rb
41
+ - lib/holidays/it.rb
42
+ - lib/holidays/MANIFEST
43
+ - lib/holidays/mx.rb
44
+ - lib/holidays/nl.rb
45
+ - lib/holidays/north_america.rb
46
+ - lib/holidays/nyse.rb
47
+ - lib/holidays/pt.rb
48
+ - lib/holidays/scandinavia.rb
49
+ - lib/holidays/se.rb
50
+ - lib/holidays/united_nations.rb
51
+ - lib/holidays/ups.rb
52
+ - lib/holidays/us.rb
53
+ - lib/holidays/za.rb
54
+ - lib/holidays.rb
55
+ - data/au.yaml
56
+ - data/build_defs.rb
57
+ - data/ca.yaml
58
+ - data/de.yaml
59
+ - data/dk.yaml
60
+ - data/es.yaml
61
+ - data/fr.yaml
62
+ - data/gb.yaml
63
+ - data/ie.yaml
64
+ - data/index.yaml
65
+ - data/is.yaml
66
+ - data/it.yaml
67
+ - data/mx.yaml
68
+ - data/nl.yaml
69
+ - data/north_america_informal.yaml
70
+ - data/nyse.yaml
71
+ - data/pt.yaml
72
+ - data/se.yaml
73
+ - data/SYNTAX
74
+ - data/united_nations.yaml
75
+ - data/ups.yaml
76
+ - data/us.yaml
77
+ - data/za.yaml
78
+ - rakefile.rb
79
+ - README.rdoc
80
+ - REFERENCES
81
+ - CHANGELOG
82
+ - LICENSE
83
+ has_rdoc: true
84
+ homepage: http://code.dunae.ca/holidays
85
+ licenses: []
86
+
87
+ post_install_message:
88
+ rdoc_options: []
89
+
90
+ require_paths:
91
+ - lib
92
+ required_ruby_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: "0"
97
+ version:
98
+ required_rubygems_version: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: "0"
103
+ version:
104
+ requirements: []
105
+
106
+ rubyforge_project:
107
+ rubygems_version: 1.3.5
108
+ signing_key:
109
+ specification_version: 3
110
+ summary: A collection of Ruby methods to deal with statutory and other holidays. You deserve a holiday!
111
+ test_files:
112
+ - test/defs/test_defs_au.rb
113
+ - test/defs/test_defs_ca.rb
114
+ - test/defs/test_defs_de.rb
115
+ - test/defs/test_defs_dk.rb
116
+ - test/defs/test_defs_es.rb
117
+ - test/defs/test_defs_europe.rb
118
+ - test/defs/test_defs_fr.rb
119
+ - test/defs/test_defs_gb.rb
120
+ - test/defs/test_defs_ie.rb
121
+ - test/defs/test_defs_is.rb
122
+ - test/defs/test_defs_it.rb
123
+ - test/defs/test_defs_mx.rb
124
+ - test/defs/test_defs_nl.rb
125
+ - test/defs/test_defs_north_america.rb
126
+ - test/defs/test_defs_nyse.rb
127
+ - test/defs/test_defs_pt.rb
128
+ - test/defs/test_defs_scandinavia.rb
129
+ - test/defs/test_defs_se.rb
130
+ - test/defs/test_defs_ups.rb
131
+ - test/defs/test_defs_us.rb
132
+ - test/defs/test_defs_za.rb