0

I've already made this YAML file, but i don't know what to do nect.

months:
  1: 
  - name: Ra's Essana
    regions: ["islam"]
    mday: 1
  

  
tests: |

    { Date.civil(1531,1,1) => 'Ra's Essana',
     }.each do |date, name|
       assert_equal name, (Holidays.on(date, :no, :informal)[0] || {})[:name]
     end

Any Ideas? It's just a short example, but I have no Idea how to add it...

Community
  • 1
  • 1
Saggex
  • 3,390
  • 3
  • 22
  • 37

1 Answers1

1

The instructions on how to contribute to(extend) the holidays gem are on its github page

How to contribute

To make changes to any of the definitions, edit the YAML files only.

Tests are also added at the end of the YAML files. Please add tests, it makes the pull requests go around.

After you're satisfied with the YAML file, edit the index.yaml file, run rake generate, which will generate the Ruby files that make up the actual code as well as the tests. Then run rake test.

It is also very appreciated if documentation is attached to the pull request. A simple Wikipedia or government link referencing the change would be perfect.

bjhaid
  • 9,592
  • 2
  • 37
  • 47
  • Thank you very much, but I allready tried this. It won't work, because everytime I try {rake generate}, I get C:\Users\patolla>rake generate rake aborted! No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb) (See full trace by running task with --trace) – Saggex Mar 11 '14 at 07:39
  • @user3383458 you need to be in the holidays gem folder, you probably want to clone the project and before following the instructions – bjhaid Mar 11 '14 at 23:48