weekdays 1.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +21 -0
- data/Rakefile +52 -0
- data/VERSION +1 -0
- data/lib/weekdays.rb +16 -0
- data/spec/spec_helper.rb +1 -1
- data/weekdays.gemspec +48 -18
- metadata +27 -14
    
        data/.gitignore
    ADDED
    
    
    
        data/Rakefile
    ADDED
    
    | @@ -0,0 +1,52 @@ | |
| 1 | 
            +
            require 'rubygems'
         | 
| 2 | 
            +
            require 'rake'
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            begin
         | 
| 5 | 
            +
              require 'jeweler'
         | 
| 6 | 
            +
              Jeweler::Tasks.new do |gem|
         | 
| 7 | 
            +
                gem.name = "weekdays"
         | 
| 8 | 
            +
                gem.summary = %Q{Provides methods to work with 'weekdays' (ie. 5.weekdays_ago)}
         | 
| 9 | 
            +
                gem.description = %Q{Provides methods to work with 'weekdays' (ie. 5.weekdays_ago)}
         | 
| 10 | 
            +
                gem.email = "matt@matt-darby.com"
         | 
| 11 | 
            +
                gem.homepage = "http://github.com/mdarby/weekdays"
         | 
| 12 | 
            +
                gem.authors = ["Matt Darby"]
         | 
| 13 | 
            +
                # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
         | 
| 14 | 
            +
              end
         | 
| 15 | 
            +
              Jeweler::GemcutterTasks.new
         | 
| 16 | 
            +
            rescue LoadError
         | 
| 17 | 
            +
              puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
         | 
| 18 | 
            +
            end
         | 
| 19 | 
            +
             | 
| 20 | 
            +
            require 'rake/testtask'
         | 
| 21 | 
            +
            Rake::TestTask.new(:test) do |test|
         | 
| 22 | 
            +
              test.libs << 'lib' << 'test'
         | 
| 23 | 
            +
              test.pattern = 'test/**/test_*.rb'
         | 
| 24 | 
            +
              test.verbose = true
         | 
| 25 | 
            +
            end
         | 
| 26 | 
            +
             | 
| 27 | 
            +
            begin
         | 
| 28 | 
            +
              require 'rcov/rcovtask'
         | 
| 29 | 
            +
              Rcov::RcovTask.new do |test|
         | 
| 30 | 
            +
                test.libs << 'test'
         | 
| 31 | 
            +
                test.pattern = 'test/**/test_*.rb'
         | 
| 32 | 
            +
                test.verbose = true
         | 
| 33 | 
            +
              end
         | 
| 34 | 
            +
            rescue LoadError
         | 
| 35 | 
            +
              task :rcov do
         | 
| 36 | 
            +
                abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
         | 
| 37 | 
            +
              end
         | 
| 38 | 
            +
            end
         | 
| 39 | 
            +
             | 
| 40 | 
            +
            task :test => :check_dependencies
         | 
| 41 | 
            +
             | 
| 42 | 
            +
            task :default => :test
         | 
| 43 | 
            +
             | 
| 44 | 
            +
            require 'rake/rdoctask'
         | 
| 45 | 
            +
            Rake::RDocTask.new do |rdoc|
         | 
| 46 | 
            +
              version = File.exist?('VERSION') ? File.read('VERSION') : ""
         | 
| 47 | 
            +
             | 
| 48 | 
            +
              rdoc.rdoc_dir = 'rdoc'
         | 
| 49 | 
            +
              rdoc.title = "weekdays #{version}"
         | 
| 50 | 
            +
              rdoc.rdoc_files.include('README*')
         | 
| 51 | 
            +
              rdoc.rdoc_files.include('lib/**/*.rb')
         | 
| 52 | 
            +
            end
         | 
    
        data/VERSION
    ADDED
    
    | @@ -0,0 +1 @@ | |
| 1 | 
            +
            1.0.2
         | 
    
        data/lib/weekdays.rb
    CHANGED
    
    | @@ -18,6 +18,10 @@ module ActiveSupport #:nodoc: | |
| 18 18 | 
             
              end
         | 
| 19 19 | 
             
            end
         | 
| 20 20 |  | 
| 21 | 
            +
            class Date
         | 
| 22 | 
            +
              include ActiveSupport::CoreExtensions::Date::Calculations
         | 
| 23 | 
            +
            end
         | 
| 24 | 
            +
             | 
| 21 25 | 
             
            module ActiveSupport #:nodoc:
         | 
| 22 26 | 
             
              module CoreExtensions #:nodoc:
         | 
| 23 27 | 
             
                module Time #:nodoc:
         | 
| @@ -36,6 +40,10 @@ module ActiveSupport #:nodoc: | |
| 36 40 | 
             
              end
         | 
| 37 41 | 
             
            end
         | 
| 38 42 |  | 
| 43 | 
            +
            class Time
         | 
| 44 | 
            +
              include ActiveSupport::CoreExtensions::Time::Calculations
         | 
| 45 | 
            +
            end
         | 
| 46 | 
            +
             | 
| 39 47 | 
             
            module ActiveSupport #:nodoc:
         | 
| 40 48 | 
             
              module CoreExtensions #:nodoc:
         | 
| 41 49 | 
             
                module DateTime #:nodoc:
         | 
| @@ -50,6 +58,10 @@ module ActiveSupport #:nodoc: | |
| 50 58 | 
             
              end
         | 
| 51 59 | 
             
            end
         | 
| 52 60 |  | 
| 61 | 
            +
            class Time
         | 
| 62 | 
            +
              include ActiveSupport::CoreExtensions::DateTime::Calculations
         | 
| 63 | 
            +
            end
         | 
| 64 | 
            +
             | 
| 53 65 | 
             
            module ActiveSupport #:nodoc:
         | 
| 54 66 | 
             
              module CoreExtensions
         | 
| 55 67 | 
             
                module Numeric
         | 
| @@ -89,4 +101,8 @@ module ActiveSupport #:nodoc: | |
| 89 101 | 
             
                  end
         | 
| 90 102 | 
             
                end
         | 
| 91 103 | 
             
              end
         | 
| 104 | 
            +
            end
         | 
| 105 | 
            +
             | 
| 106 | 
            +
            class Numeric
         | 
| 107 | 
            +
              include ActiveSupport::CoreExtensions::Numeric::Time
         | 
| 92 108 | 
             
            end
         | 
    
        data/spec/spec_helper.rb
    CHANGED
    
    
    
        data/weekdays.gemspec
    CHANGED
    
    | @@ -1,20 +1,50 @@ | |
| 1 | 
            +
            # Generated by jeweler
         | 
| 2 | 
            +
            # DO NOT EDIT THIS FILE DIRECTLY
         | 
| 3 | 
            +
            # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
         | 
| 4 | 
            +
            # -*- encoding: utf-8 -*-
         | 
| 5 | 
            +
             | 
| 1 6 | 
             
            Gem::Specification.new do |s|
         | 
| 2 | 
            -
              s.name | 
| 3 | 
            -
              s.version | 
| 4 | 
            -
             | 
| 5 | 
            -
              s. | 
| 6 | 
            -
              s. | 
| 7 | 
            -
              s. | 
| 8 | 
            -
              s.description =  | 
| 9 | 
            -
              s. | 
| 10 | 
            -
              s. | 
| 11 | 
            -
             | 
| 12 | 
            -
                'MIT-LICENSE',
         | 
| 13 | 
            -
                'README.textile',
         | 
| 14 | 
            -
                'init.rb',
         | 
| 15 | 
            -
                'lib/weekdays.rb',
         | 
| 16 | 
            -
                'spec/weekdays_spec.rb',
         | 
| 17 | 
            -
                'spec/spec_helper.rb',
         | 
| 18 | 
            -
                'weekdays.gemspec',
         | 
| 7 | 
            +
              s.name = %q{weekdays}
         | 
| 8 | 
            +
              s.version = "1.0.2"
         | 
| 9 | 
            +
             | 
| 10 | 
            +
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         | 
| 11 | 
            +
              s.authors = ["Matt Darby"]
         | 
| 12 | 
            +
              s.date = %q{2010-09-16}
         | 
| 13 | 
            +
              s.description = %q{Provides methods to work with 'weekdays' (ie. 5.weekdays_ago)}
         | 
| 14 | 
            +
              s.email = %q{matt@matt-darby.com}
         | 
| 15 | 
            +
              s.extra_rdoc_files = [
         | 
| 16 | 
            +
                "README.textile"
         | 
| 19 17 | 
             
              ]
         | 
| 20 | 
            -
             | 
| 18 | 
            +
              s.files = [
         | 
| 19 | 
            +
                ".gitignore",
         | 
| 20 | 
            +
                 "MIT-LICENSE",
         | 
| 21 | 
            +
                 "README.textile",
         | 
| 22 | 
            +
                 "Rakefile",
         | 
| 23 | 
            +
                 "VERSION",
         | 
| 24 | 
            +
                 "init.rb",
         | 
| 25 | 
            +
                 "lib/weekdays.rb",
         | 
| 26 | 
            +
                 "spec/spec_helper.rb",
         | 
| 27 | 
            +
                 "spec/weekdays_spec.rb",
         | 
| 28 | 
            +
                 "weekdays.gemspec"
         | 
| 29 | 
            +
              ]
         | 
| 30 | 
            +
              s.homepage = %q{http://github.com/mdarby/weekdays}
         | 
| 31 | 
            +
              s.rdoc_options = ["--charset=UTF-8"]
         | 
| 32 | 
            +
              s.require_paths = ["lib"]
         | 
| 33 | 
            +
              s.rubygems_version = %q{1.3.7}
         | 
| 34 | 
            +
              s.summary = %q{Provides methods to work with 'weekdays' (ie. 5.weekdays_ago)}
         | 
| 35 | 
            +
              s.test_files = [
         | 
| 36 | 
            +
                "spec/spec_helper.rb",
         | 
| 37 | 
            +
                 "spec/weekdays_spec.rb"
         | 
| 38 | 
            +
              ]
         | 
| 39 | 
            +
             | 
| 40 | 
            +
              if s.respond_to? :specification_version then
         | 
| 41 | 
            +
                current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
         | 
| 42 | 
            +
                s.specification_version = 3
         | 
| 43 | 
            +
             | 
| 44 | 
            +
                if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
         | 
| 45 | 
            +
                else
         | 
| 46 | 
            +
                end
         | 
| 47 | 
            +
              else
         | 
| 48 | 
            +
              end
         | 
| 49 | 
            +
            end
         | 
| 50 | 
            +
             | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,12 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: weekdays
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
               | 
| 4 | 
            +
              prerelease: false
         | 
| 5 | 
            +
              segments: 
         | 
| 6 | 
            +
              - 1
         | 
| 7 | 
            +
              - 0
         | 
| 8 | 
            +
              - 2
         | 
| 9 | 
            +
              version: 1.0.2
         | 
| 5 10 | 
             
            platform: ruby
         | 
| 6 11 | 
             
            authors: 
         | 
| 7 12 | 
             
            - Matt Darby
         | 
| @@ -9,7 +14,7 @@ autorequire: | |
| 9 14 | 
             
            bindir: bin
         | 
| 10 15 | 
             
            cert_chain: []
         | 
| 11 16 |  | 
| 12 | 
            -
            date:  | 
| 17 | 
            +
            date: 2010-09-16 00:00:00 -04:00
         | 
| 13 18 | 
             
            default_executable: 
         | 
| 14 19 | 
             
            dependencies: []
         | 
| 15 20 |  | 
| @@ -19,43 +24,51 @@ executables: [] | |
| 19 24 |  | 
| 20 25 | 
             
            extensions: []
         | 
| 21 26 |  | 
| 22 | 
            -
            extra_rdoc_files:  | 
| 23 | 
            -
             | 
| 27 | 
            +
            extra_rdoc_files: 
         | 
| 28 | 
            +
            - README.textile
         | 
| 24 29 | 
             
            files: 
         | 
| 30 | 
            +
            - .gitignore
         | 
| 25 31 | 
             
            - MIT-LICENSE
         | 
| 26 32 | 
             
            - README.textile
         | 
| 33 | 
            +
            - Rakefile
         | 
| 34 | 
            +
            - VERSION
         | 
| 27 35 | 
             
            - init.rb
         | 
| 28 36 | 
             
            - lib/weekdays.rb
         | 
| 29 | 
            -
            - spec/weekdays_spec.rb
         | 
| 30 37 | 
             
            - spec/spec_helper.rb
         | 
| 38 | 
            +
            - spec/weekdays_spec.rb
         | 
| 31 39 | 
             
            - weekdays.gemspec
         | 
| 32 40 | 
             
            has_rdoc: true
         | 
| 33 | 
            -
            homepage: http://github.com/mdarby/weekdays | 
| 41 | 
            +
            homepage: http://github.com/mdarby/weekdays
         | 
| 34 42 | 
             
            licenses: []
         | 
| 35 43 |  | 
| 36 44 | 
             
            post_install_message: 
         | 
| 37 | 
            -
            rdoc_options:  | 
| 38 | 
            -
             | 
| 45 | 
            +
            rdoc_options: 
         | 
| 46 | 
            +
            - --charset=UTF-8
         | 
| 39 47 | 
             
            require_paths: 
         | 
| 40 48 | 
             
            - lib
         | 
| 41 49 | 
             
            required_ruby_version: !ruby/object:Gem::Requirement 
         | 
| 50 | 
            +
              none: false
         | 
| 42 51 | 
             
              requirements: 
         | 
| 43 52 | 
             
              - - ">="
         | 
| 44 53 | 
             
                - !ruby/object:Gem::Version 
         | 
| 54 | 
            +
                  segments: 
         | 
| 55 | 
            +
                  - 0
         | 
| 45 56 | 
             
                  version: "0"
         | 
| 46 | 
            -
              version: 
         | 
| 47 57 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement 
         | 
| 58 | 
            +
              none: false
         | 
| 48 59 | 
             
              requirements: 
         | 
| 49 60 | 
             
              - - ">="
         | 
| 50 61 | 
             
                - !ruby/object:Gem::Version 
         | 
| 62 | 
            +
                  segments: 
         | 
| 63 | 
            +
                  - 0
         | 
| 51 64 | 
             
                  version: "0"
         | 
| 52 | 
            -
              version: 
         | 
| 53 65 | 
             
            requirements: []
         | 
| 54 66 |  | 
| 55 67 | 
             
            rubyforge_project: 
         | 
| 56 | 
            -
            rubygems_version: 1.3. | 
| 68 | 
            +
            rubygems_version: 1.3.7
         | 
| 57 69 | 
             
            signing_key: 
         | 
| 58 70 | 
             
            specification_version: 3
         | 
| 59 | 
            -
            summary: Provides methods to work with 'weekdays'
         | 
| 60 | 
            -
            test_files:  | 
| 61 | 
            -
             | 
| 71 | 
            +
            summary: Provides methods to work with 'weekdays' (ie. 5.weekdays_ago)
         | 
| 72 | 
            +
            test_files: 
         | 
| 73 | 
            +
            - spec/spec_helper.rb
         | 
| 74 | 
            +
            - spec/weekdays_spec.rb
         |