holidays 1.0.6 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +77 -0
  3. data/Gemfile +2 -6
  4. data/{README.rdoc → README.md} +46 -39
  5. data/Rakefile +62 -0
  6. data/data/au.yaml +11 -1
  7. data/data/cl.yaml +92 -0
  8. data/data/de.yaml +24 -0
  9. data/data/dk.yaml +3 -1
  10. data/data/ecb_target.yaml +42 -0
  11. data/data/es.yaml +44 -16
  12. data/data/fr.yaml +15 -10
  13. data/data/gb.yaml +14 -1
  14. data/data/index.yaml +7 -1
  15. data/data/lt.yaml +88 -0
  16. data/data/nl.yaml +10 -10
  17. data/data/se.yaml +26 -3
  18. data/data/sg.yaml +55 -0
  19. data/data/si.yaml +84 -0
  20. data/data/vi.yaml +29 -0
  21. data/holidays.gemspec +17 -187
  22. data/lib/holidays.rb +24 -14
  23. data/lib/holidays/MANIFEST +7 -0
  24. data/lib/holidays/au.rb +9 -9
  25. data/lib/holidays/cl.rb +43 -0
  26. data/lib/holidays/de.rb +1 -1
  27. data/lib/holidays/dk.rb +2 -2
  28. data/lib/holidays/ecb_target.rb +34 -0
  29. data/lib/holidays/es.rb +27 -27
  30. data/lib/holidays/europe.rb +72 -44
  31. data/lib/holidays/fr.rb +2 -2
  32. data/lib/holidays/gb.rb +3 -2
  33. data/lib/holidays/lt.rb +41 -0
  34. data/lib/holidays/nl.rb +1 -1
  35. data/lib/holidays/scandinavia.rb +6 -2
  36. data/lib/holidays/se.rb +7 -3
  37. data/lib/holidays/sg.rb +35 -0
  38. data/lib/holidays/si.rb +42 -0
  39. data/lib/holidays/version.rb +3 -0
  40. data/lib/holidays/vi.rb +32 -0
  41. data/test/defs/test_defs_au.rb +3 -0
  42. data/test/defs/test_defs_cl.rb +39 -0
  43. data/test/defs/test_defs_de.rb +24 -0
  44. data/test/defs/test_defs_dk.rb +1 -0
  45. data/test/defs/test_defs_ecb_target.rb +23 -0
  46. data/test/defs/test_defs_es.rb +7 -2
  47. data/test/defs/test_defs_europe.rb +84 -9
  48. data/test/defs/test_defs_fr.rb +7 -3
  49. data/test/defs/test_defs_gb.rb +7 -0
  50. data/test/defs/test_defs_lt.rb +42 -0
  51. data/test/defs/test_defs_nl.rb +3 -3
  52. data/test/defs/test_defs_scandinavia.rb +10 -2
  53. data/test/defs/test_defs_se.rb +9 -2
  54. data/test/defs/test_defs_sg.rb +20 -0
  55. data/test/defs/test_defs_si.rb +36 -0
  56. data/test/defs/test_defs_vi.rb +18 -0
  57. data/test/test_all_regions.rb +17 -9
  58. metadata +123 -105
  59. data/.travis.yml +0 -15
  60. data/CHANGELOG.rdoc +0 -57
  61. data/rakefile.rb +0 -107
@@ -1,15 +0,0 @@
1
- notifications:
2
- disabled: true
3
- rvm:
4
- - 1.8.7
5
- - 1.9.2
6
- - 1.9.3
7
- - 2.0.0
8
- - 2.1.0
9
- - jruby
10
- - ree
11
- before_install:
12
- - gem update bundler
13
- - bundle --version
14
- - gem update --system 2.1.11
15
- - gem --version
@@ -1,57 +0,0 @@
1
- = Ruby Holidays Gem CHANGELOG
2
-
3
- == 1.0.6
4
- * Added `Holidays.regions` method (@sonnym)
5
- * Added Slovakian definitions (@mirelon)
6
- * Added Venezuelan definitions (@Chelo)
7
- * Updated Canadian definitions (@sdavies)
8
- * Updated Argentinian definitions (@popox)
9
- * Updated Australian definitions (@ghiculescu)
10
- * Updated Portuguese definitions (@MiPereira)
11
- * Added Swiss definitions (@samzurcher, @jg)
12
- * Added Romanian definitions (@mtarnovan)
13
- * Added Belgian definitions (@jak78)
14
- * Added Moroccan definitions (@jak78)
15
- * Fixes for New Year's and Boxing Day (@iterion, @andyw8)
16
- * Fixes for Father's Day, Mother's Day and Armed Forces Day (@eheikes)
17
- * Typos (@gregoriokusowski, @popox)
18
- * Added Croatian definitions (@lecterror)
19
- * Added US Federal Reserve holidays (@willbarrett)
20
- * Added NERC holidays (@adamstrickland)
21
- * Updated Irish holidays (@xlcrs)
22
-
23
- == 1.0.5
24
- * Added `full_week?` method (@dceddia)
25
- * Added Portuguese definitions (@pmor)
26
- * Added Hungarian definitions (@spap)
27
- * Typos (@DenisKnauf)
28
-
29
- == 1.0.4
30
- * Add Liechtenstein holiday defs (mercy vielmal Bernhard Furtmueller)
31
-
32
- == 1.0.3
33
- * Add Austrian holiday definitions (thanks to Vogel Siegfried)
34
-
35
- == 1.0.2
36
- * Add `orthodox_easter` method and Greek holiday definitions (thanks https://github.com/ddimitriadis)
37
-
38
- == 1.0.0
39
- * Support calculating mday from negative weeks other than -1 (thanks http://github.com/bjeanes)
40
- * Use class method to check leap years and fixed bug in Date.calculate_mday
41
- (thanks http://github.com/dgrambow)
42
- * Added Czech (thanks http://github.com/boblin), Brazilian (http://github.com/fabiokr), Norwegian (thanks to Peter Skeide) and Australia/Brisbane (http://github.com/bjeanes) definitions
43
- * Cleaned up rake and gemspec
44
-
45
- == 0.9.3
46
- * Added New York Stock Exchange holidays (thank you Alan Larkin).
47
- * Added UPS holidays (thank you Tim Anglade).
48
- * Fixed rakefile to force lower case definition file names.
49
-
50
- == 0.9.2
51
- * Included rakefile in Gem (thank you James Herdman).
52
-
53
- == 0.9.1
54
- * au.yaml was being included incorrectly in US holiday definitions. Thanks to Glenn Vanderburg (http://vanderburg.org/) for the fix.
55
-
56
- == 0.9.0
57
- * Initial release.
@@ -1,107 +0,0 @@
1
- $:.unshift File.expand_path('../lib', __FILE__)
2
- require 'rake'
3
- require 'rake/testtask'
4
- require 'rdoc/task'
5
- require 'yaml'
6
- require 'fileutils'
7
- require 'holidays'
8
- require File.expand_path('data/build_defs')
9
-
10
- task :default => :test
11
-
12
- desc 'Run all tests'
13
- task :test => ["test:lib", "test:defs"]
14
-
15
- namespace :test do
16
- desc 'Run the unit tests.'
17
- Rake::TestTask.new(:defs) do |t|
18
- t.libs << 'lib'
19
- t.test_files = FileList['test/defs/test*.rb'].exclude('test_helper.rb')
20
- t.verbose = false
21
- end
22
-
23
- desc 'Run the definition tests.'
24
- Rake::TestTask.new(:lib) do |t|
25
- t.libs << 'lib'
26
- t.test_files = FileList['test/test*.rb'].exclude('test_helper.rb')
27
- t.verbose = false
28
- end
29
- end
30
-
31
- task :doc => ["defs:manifest", :rdoc]
32
-
33
- desc 'Generate documentation.'
34
- RDoc::Task.new do |rdoc|
35
- rdoc.rdoc_dir = 'doc'
36
- rdoc.title = 'Ruby Holidays Gem'
37
- rdoc.options << '--all' << '--inline-source' << '--line-numbers'
38
- rdoc.options << '--charset' << 'utf-8'
39
- rdoc.rdoc_files.include('README.rdoc')
40
- rdoc.rdoc_files.include('data/SYNTAX.rdoc')
41
- rdoc.rdoc_files.include('lib/holidays/MANIFEST')
42
- rdoc.rdoc_files.include('REFERENCES')
43
- rdoc.rdoc_files.include('CHANGELOG.rdoc')
44
- rdoc.rdoc_files.include('LICENSE')
45
- rdoc.rdoc_files.include('lib/*.rb')
46
- end
47
-
48
- desc 'Definition file tasks'
49
- namespace :defs do
50
- DATA_PATH = 'data'
51
-
52
- desc 'Build holiday definition files'
53
- task :build_all do
54
- # load the index
55
- def_index = YAML.load_file("#{DATA_PATH}/index.yaml")
56
-
57
- # create a dir for the generated tests
58
- FileUtils.mkdir_p('test/defs')
59
-
60
- def_index['defs'].each do |region, files|
61
- puts "Building #{region} definition module:"
62
- files = files.collect { |f| "#{DATA_PATH}/#{f}" }
63
- files.uniq!
64
-
65
- module_src, test_src = parse_holiday_defs(region, files)
66
- File.open("lib/holidays/#{region.downcase.to_s}.rb","w") do |file|
67
- file.puts module_src
68
- end
69
- unless test_src.empty?
70
- File.open("test/defs/test_defs_#{region.downcase.to_s}.rb","w") do |file|
71
- file.puts test_src
72
- end
73
- end
74
- puts "Done.\n\n"
75
- end
76
- end
77
-
78
- desc 'Build the definition manifest.'
79
- task :manifest do
80
- File.open("lib/holidays/MANIFEST","w") do |file|
81
- file.puts <<-EOH
82
- ==== Regional definitions
83
- The following definition files are included in this installation:
84
-
85
- EOH
86
- FileList.new('lib/holidays/*.rb').each do |str|
87
- file.puts('* ' + str.gsub(/^lib\/|\.rb$/, ''))
88
- end
89
- end
90
- end
91
- end
92
-
93
- begin
94
- require 'jeweler'
95
- Jeweler::Tasks.new do |gemspec|
96
- gemspec.name = "holidays"
97
- gemspec.summary = "A collection of Ruby methods to deal with statutory and other holidays. You deserve a holiday!"
98
- gemspec.description = "A collection of Ruby methods to deal with statutory and other holidays. You deserve a holiday!"
99
- gemspec.email = "code@dunae.ca"
100
- gemspec.homepage = "https://github.com/alexdunae/holidays"
101
- gemspec.version = Holidays::VERSION
102
- gemspec.authors = ["Alex Dunae"]
103
- gemspec.add_development_dependency 'rdoc', '>= 2.4.2'
104
- end
105
- rescue LoadError
106
- puts "Jeweler not available. Install it with: gem install jeweler"
107
- end