Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

refactoring and updated gemspec

  • Loading branch information...
commit b42504c1b3042ac23054b7a7eb6c583ff3945182 1 parent b459fac
@lhoeg authored
View
14 Gemfile
@@ -0,0 +1,14 @@
+source "http://rubygems.org"
+
+# Declare your gem's dependencies in workflows.gemspec.
+# Bundler will treat runtime dependencies like base dependencies, and
+# development dependencies will be added by default to the :development group.
+gemspec
+
+# Declare any dependencies that are still in development here instead of in
+# your gemspec. These might include edge Rails or gems from your path or
+# Git. Remember to move these dependencies to your gemspec before releasing
+# your gem to rubygems.org.
+
+# To use debugger
+# gem 'ruby-debug19', :require => 'ruby-debug'
View
14 Manifest.txt
@@ -1,14 +0,0 @@
-History.txt
-Manifest.txt
-README.txt
-Rakefile
-danske_helligdage.gemspec
-lib/danske_helligdage.rb
-lib/danske_helligdage/foerste_maj.rb
-lib/danske_helligdage/grundlovsdag.rb
-lib/danske_helligdage/juleaftensdag.rb
-lib/danske_helligdage/officielle.rb
-test/test_danske_helligdage.rb
-test/test_foerste_maj.rb
-test/test_grundlovsdag.rb
-test/test_juleaftensdag.rb
View
0  README.txt → README.rdoc
File renamed without changes
View
41 Rakefile
@@ -1,13 +1,38 @@
-# -*- ruby coding: utf-8 -*-
+#!/usr/bin/env rake
+begin
+ require 'bundler/setup'
+rescue LoadError
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
+end
+begin
+ require 'rdoc/task'
+rescue LoadError
+ require 'rdoc/rdoc'
+ require 'rake/rdoctask'
+ RDoc::Task = Rake::RDocTask
+end
+
+RDoc::Task.new(:rdoc) do |rdoc|
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = 'SharedModels'
+ rdoc.options << '--line-numbers'
+ rdoc.rdoc_files.include('README.rdoc')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+end
-require 'rubygems'
-require 'hoe'
-$:.unshift(File.dirname(__FILE__) + "/lib")
-require 'danske_helligdage'
-Hoe.new('DanskeHelligdage', DanskeHelligdage::VERSION) do |p|
- p.developer('Jørgen Orehøj Erichsen', 'joe@erichsen.net')
+
+Bundler::GemHelper.install_tasks
+
+require 'rake/testtask'
+
+Rake::TestTask.new(:test) do |t|
+ t.libs << 'lib'
+ t.libs << 'test'
+ t.pattern = 'test/**/test_*.rb'
+ t.verbose = false
end
-# vim: syntax=Ruby
+
+task :default => :test
View
23 danske_helligdage.gemspec
@@ -1,16 +1,21 @@
+# -*- ruby coding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+
+require "danske_helligdage/version"
+
Gem::Specification.new do |s|
s.name = %q{danske_helligdage}
- s.version = "1.0.2"
- s.authors = ["J\303\270rgen Oreh\303\270j Erichsen"]
+ s.version = DanskeHelligdage::VERSION
s.date = %q{2012-03-14}
- s.description = %q{Add support for public holidays in Denmark in the Date class}
+ s.authors = ["J\303\270rgen Oreh\303\270j Erichsen"]
s.email = ["joe@erichsen.net"]
- s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt"]
- s.files = ["History.txt", "Manifest.txt", "README.txt", "Rakefile", "danske_helligdage.gemspec", "lib/danske_helligdage.rb", "lib/danske_helligdage/arbejdsdag.rb", "lib/danske_helligdage/foerste_maj.rb", "lib/danske_helligdage/grundlovsdag.rb", "lib/danske_helligdage/juleaftensdag.rb", "lib/danske_helligdage/officielle.rb"]
- s.test_files = ["test/test_arbejdsdage.rb", "test/test_danske_helligdage.rb", "test/test_foerste_maj.rb", "test/test_grundlovsdag.rb", "test/test_juleaftensdag.rb"]
- s.has_rdoc = true
s.homepage = %q{http://github.com/joerichsen/danske_helligdage/}
- s.rdoc_options = ["--main", "README.txt"]
- s.require_paths = ["lib"]
+ s.description = %q{Add support for public holidays in Denmark in the Date class}
s.summary = %q{Add support for public holidays in Denmark in the Date class}
+
+ s.extra_rdoc_files = ["History.txt", "README.rdoc"]
+ s.files = Dir["{app,config,db,lib}/**/*"] + ["History.txt", "Rakefile", "README.rdoc"]
+ s.test_files = Dir["test/**/*"]
+
+ s.add_development_dependency "rake"
end
View
1  lib/danske_helligdage.rb
@@ -1,4 +1,5 @@
require 'date'
+require 'danske_helligdage/version'
require 'danske_helligdage/officielle'
Date.send(:include, DanskeHelligdage::Officielle)
View
2  lib/danske_helligdage/officielle.rb
@@ -2,8 +2,6 @@
# An extension to the Date class that provides some methods for working with public holidays in Denmark.
module DanskeHelligdage
- VERSION = '1.0.0'
-
module Officielle
def self.included(base)
View
5 lib/danske_helligdage/version.rb
@@ -0,0 +1,5 @@
+module DanskeHelligdage
+
+ VERSION = '1.0.2'
+
+end
View
1  test/test_arbejdsdage.rb
@@ -1,4 +1,5 @@
# -*- coding: UTF-8 -*-
+require 'test/unit'
require 'danske_helligdage'
require 'danske_helligdage/arbejdsdag'
View
1  test/test_danske_helligdage.rb
@@ -1,4 +1,5 @@
# -*- coding: UTF-8 -*-
+require 'test/unit'
require 'danske_helligdage'
class DanskeHelligdageTests < Test::Unit::TestCase
View
1  test/test_foerste_maj.rb
@@ -1,3 +1,4 @@
+require 'test/unit'
require 'danske_helligdage'
class FoersteMajTests < Test::Unit::TestCase
View
1  test/test_grundlovsdag.rb
@@ -1,3 +1,4 @@
+require 'test/unit'
require 'danske_helligdage'
class GrundlovsdagTests < Test::Unit::TestCase
View
1  test/test_juleaftensdag.rb
@@ -1,3 +1,4 @@
+require 'test/unit'
require 'danske_helligdage'
class JuleaftensdagTests < Test::Unit::TestCase
Please sign in to comment.
Something went wrong with that request. Please try again.