Skip to content

Commit

Permalink
Add gemspec and rake tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
brentvatne committed Jan 20, 2012
1 parent e8058c7 commit 69d7679
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 28 deletions.
9 changes: 1 addition & 8 deletions Gemfile
@@ -1,10 +1,3 @@
source "http://rubygems.org"

gem "rake", "~> 0.9.2"
gem "mail", "~> 2.3.0"
gem "dm-sqlite-adapter"
gem "data_mapper"

group :development, :test do
gem "rspec", "~> 2.8.0"
end
gemspec
12 changes: 9 additions & 3 deletions Gemfile.lock
@@ -1,3 +1,11 @@
PATH
remote: .
specs:
jester (0.1)
data_mapper (~> 1.2.0)
dm-sqlite-adapter (~> 1.2.0)
mail (~> 2.3.0)

GEM
remote: http://rubygems.org/
specs:
Expand Down Expand Up @@ -82,8 +90,6 @@ PLATFORMS
ruby

DEPENDENCIES
data_mapper
dm-sqlite-adapter
mail (~> 2.3.0)
jester!
rake (~> 0.9.2)
rspec (~> 2.8.0)
29 changes: 18 additions & 11 deletions Rakefile
@@ -1,22 +1,29 @@
require 'rspec/core/rake_task'
require 'bundler/gem_tasks'

RSpec::Core::RakeTask.new(:spec)

task :default => :spec
task :test => :spec

desc 'sets up the project to be played with by other students or reviewers'
task :sample do
require_relative "lib/jester"
require_relative 'lib/jester'

Jester::Story.create!(:title => "Why do programmers always get Christmas and Halloween mixed up?",
:body => "Because DEC 25 = OCT 31",
:type => "funny")
stories = [
{ :title => "Why do programmers always confuse Christmas and Halloween?",
:body => "Because DEC 25 = OCT 31",
:type => "funny" },

Jester::Story.create!(:title => "How do you keep a programmer in the shower all day?",
:body => "Give him a bottle of shampoo which says 'lather, rinse, repeat.'",
:type => "funny")
{ :title => "How do you keep a programmer in the shower all day?",
:body => "Give him a bottle of shampoo which says 'lather, rinse, repeat.'",
:type => "funny" },

Jester::Story.create!(:title => "What the Bagel Man Saw",
:body => "The bagels had begun as a casual gesture: a boss treating his employees whenever they won a new research contract. Then he made it a habit. Every Friday, he would bring half a dozen bagels, a serrated knife, some cream cheese. When employees from neighboring floors heard about the bagels, they wanted some, too. Eventually he was bringing in 15 dozen bagels a week. He set out a cash basket to recoup his costs. His collection rate was about 95 percent; he attributed the underpayment to oversight.",
:type => "interesting")
{ :title => "What the Bagel Man Saw",
:body => "Half a dozen bagels, a serrated knife, some cream cheese.",
:type => "interesting" }
]

stories.each do |story|
Jester::Story.create(story)
end
end
29 changes: 29 additions & 0 deletions jester.gemspec
@@ -0,0 +1,29 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "jester/version"

Gem::Specification.new do |s|
s.name = "jester"
s.version = Jester::VERSION
s.authors = ["Brent Vatne"]
s.email = ["brentvatne@gmail.com"]
s.homepage = "http://www.mendicantuniversity.org/"
s.summary = %q{Jester is a mail friendly mail daemon that saves a bunch
of great stories and jokes and is willing to tell them to
anyone who asks.}
s.description = %q{An exercise for Mendicant University's January 2012 semester.}

s.rubyforge_project = "jester"

s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]

s.add_development_dependency "rspec", "~> 2.8.0"
s.add_development_dependency "rake", "~> 0.9.2"

s.add_runtime_dependency "mail", "~> 2.3.0"
s.add_runtime_dependency "data_mapper", "~> 1.2.0"
s.add_runtime_dependency "dm-sqlite-adapter", "~> 1.2.0"
end
1 change: 1 addition & 0 deletions lib/jester.rb
@@ -1 +1,2 @@
require_relative 'jester/base'
require_relative 'jester/version'
5 changes: 0 additions & 5 deletions lib/jester/base.rb
@@ -1,9 +1,4 @@
require_relative 'jester'
require_relative 'mail_server/mail_server'
require_relative 'incoming_mail_daemon'
require_relative 'models'
require_relative 'requests'

module Jester
ROOT_PATH = File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
end
2 changes: 1 addition & 1 deletion lib/jester/version.rb
@@ -1,3 +1,3 @@
module Jester
VERSION = "0.5"
VERSION = "0.1"
end

0 comments on commit 69d7679

Please sign in to comment.