Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

generated gem skeleton with newgem

  • Loading branch information...
commit 1687d126035636bd48a85f9bd100d24b5eb441ba 1 parent b548a8c
Klaas Jan Wierenga authored
4  History.txt
... ...
@@ -0,0 +1,4 @@
  1
+== 0.0.1 2009-05-16
  2
+
  3
+* 1 major enhancement:
  4
+  * Initial release
18  Manifest.txt
... ...
@@ -0,0 +1,18 @@
  1
+History.txt
  2
+Manifest.txt
  3
+PostInstall.txt
  4
+README.rdoc
  5
+Rakefile
  6
+features/development.feature
  7
+features/step_definitions/common_steps.rb
  8
+features/support/common.rb
  9
+features/support/env.rb
  10
+features/support/matchers.rb
  11
+lib/ical-scheduler.rb
  12
+script/console
  13
+script/destroy
  14
+script/generate
  15
+spec/ical-scheduler_spec.rb
  16
+spec/spec.opts
  17
+spec/spec_helper.rb
  18
+tasks/rspec.rake
7  PostInstall.txt
... ...
@@ -0,0 +1,7 @@
  1
+
  2
+For more information on ical-scheduler, see http://ical-scheduler.rubyforge.org
  3
+
  4
+NOTE: Change this information in PostInstall.txt 
  5
+You can also delete it if you don't want it.
  6
+
  7
+
12  README
... ...
@@ -1,12 +0,0 @@
1  
-
2  
-This scheduler written in ruby will allow you to execute arbitrary ruby code written
3  
-in the 'description' field of an ical calendar URL feed (such as those produced
4  
-by Google Calendar).
5  
-
6  
-This project uses the following projects:
7  
-* rubyredrick-ri_cal to parse and evaluate ical files
8  
-* jmettraux-rufus-scheduler to schedule the (recurring) events and execute the ruby code
9  
-  from the calendar
10  
-
11  
-Copyright (c) Klaas Jan Wierenga 2009
12  
-
60  README.rdoc
Source Rendered
... ...
@@ -0,0 +1,60 @@
  1
+= ical-scheduler
  2
+
  3
+* http://github.com/kjwierenga/ical-scheduler
  4
+
  5
+== DESCRIPTION:
  6
+
  7
+ical-scheduler executes arbitrary ruby code embedded in the comments of
  8
+iCalendar (rfc2445) calendar events. The input can be an iCal file (.ics) or
  9
+an iCal feed (such as provided by Google Calendar).
  10
+
  11
+This project uses the following projects:
  12
+* rubyredrick-ri_cal to parse and evaluate ical files
  13
+* jmettraux-rufus-scheduler to schedule the (recurring) events and execute the ruby code
  14
+  from the calendar
  15
+
  16
+== FEATURES/PROBLEMS:
  17
+
  18
+* TODO (list of features or problems)
  19
+
  20
+== SYNOPSIS:
  21
+
  22
+  TODO (code sample of usage)
  23
+
  24
+== REQUIREMENTS:
  25
+
  26
+* rubyredrick-ri_cal
  27
+* jmettraux-rufus-scheduler
  28
+
  29
+== INSTALL:
  30
+
  31
+* TODO (sudo gem install, anything else)
  32
+
  33
+== AUTHORS
  34
+
  35
+Klaas Jan Wierenga, k.j.wierenga@gmail.com
  36
+
  37
+== LICENSE:
  38
+
  39
+(The MIT License)
  40
+
  41
+Copyright (c) 2009 Klaas Jan Wierenga
  42
+
  43
+Permission is hereby granted, free of charge, to any person obtaining
  44
+a copy of this software and associated documentation files (the
  45
+'Software'), to deal in the Software without restriction, including
  46
+without limitation the rights to use, copy, modify, merge, publish,
  47
+distribute, sublicense, and/or sell copies of the Software, and to
  48
+permit persons to whom the Software is furnished to do so, subject to
  49
+the following conditions:
  50
+
  51
+The above copyright notice and this permission notice shall be
  52
+included in all copies or substantial portions of the Software.
  53
+
  54
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
  55
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  56
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  57
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  58
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  59
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  60
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33  Rakefile
... ...
@@ -0,0 +1,33 @@
  1
+require 'rubygems' unless ENV['NO_RUBYGEMS']
  2
+%w[rake rake/clean fileutils newgem rubigen].each { |f| require f }
  3
+require File.dirname(__FILE__) + '/lib/ical-scheduler'
  4
+
  5
+# Generate all the Rake tasks
  6
+# Run 'rake -T' to see list of generated tasks (from gem root directory)
  7
+$hoe = Hoe.new('ical-scheduler', IcalScheduler::VERSION) do |p|
  8
+  p.developer('FIXME full name', 'FIXME email')
  9
+  p.changes              = p.paragraphs_of("History.txt", 0..1).join("\n\n")
  10
+  p.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
  11
+  p.rubyforge_name       = p.name # TODO this is default value
  12
+  p.extra_deps         = [
  13
+    # ['activesupport','>= 2.0.2'],
  14
+    ['ri_cal'],
  15
+    ['rufus-scheduler']
  16
+  ]
  17
+  p.extra_dev_deps = [
  18
+    ['newgem', ">= #{::Newgem::VERSION}" ],
  19
+    ['rspec' ],
  20
+    ['cucumber']
  21
+  ]
  22
+  
  23
+  p.clean_globs |= %w[**/.DS_Store tmp *.log]
  24
+  path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
  25
+  p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
  26
+  p.rsync_args = '-av --delete --ignore-errors'
  27
+end
  28
+
  29
+require 'newgem/tasks' # load /tasks/*.rake
  30
+Dir['tasks/**/*.rake'].each { |t| load t }
  31
+
  32
+# want other tests/tasks run by default? Add them to the list
  33
+task :default => [:spec, :features]
13  features/development.feature
... ...
@@ -0,0 +1,13 @@
  1
+Feature: Development processes of newgem itself (rake tasks)
  2
+
  3
+  As a Newgem maintainer or contributor
  4
+  I want rake tasks to maintain and release the gem
  5
+  So that I can spend time on the tests and code, and not excessive time on maintenance processes
  6
+    
  7
+  Scenario: Generate RubyGem
  8
+    Given this project is active project folder
  9
+    And "pkg" folder is deleted
  10
+    When I invoke task "rake gem"
  11
+    Then folder "pkg" is created
  12
+    And file with name matching "pkg/*.gem" is created else you should run "rake manifest" to fix this
  13
+    And gem spec key "rdoc_options" contains /--mainREADME.rdoc/
172  features/step_definitions/common_steps.rb
... ...
@@ -0,0 +1,172 @@
  1
+Given /^a safe folder/ do
  2
+  FileUtils.rm_rf   @tmp_root = File.dirname(__FILE__) + "/../../tmp"
  3
+  FileUtils.mkdir_p @tmp_root
  4
+  FileUtils.mkdir_p @home_path = File.expand_path(File.join(@tmp_root, "home"))
  5
+  @lib_path = File.expand_path(File.dirname(__FILE__) + '/../../lib')
  6
+  Given %Q{env variable $HOME set to "#{@home_path}"}
  7
+end
  8
+
  9
+Given /^this project is active project folder/ do
  10
+  Given "a safe folder"
  11
+  @active_project_folder = File.expand_path(File.dirname(__FILE__) + "/../..")
  12
+end
  13
+
  14
+Given /^env variable \$([\w_]+) set to "(.*)"/ do |env_var, value|
  15
+  ENV[env_var] = value
  16
+end
  17
+
  18
+Given /"(.*)" folder is deleted/ do |folder|
  19
+  in_project_folder { FileUtils.rm_rf folder }
  20
+end
  21
+
  22
+When /^I invoke "(.*)" generator with arguments "(.*)"$/ do |generator, arguments|
  23
+  @stdout = StringIO.new
  24
+  in_project_folder do
  25
+    if Object.const_defined?("APP_ROOT")
  26
+      APP_ROOT.replace(FileUtils.pwd)
  27
+    else 
  28
+      APP_ROOT = FileUtils.pwd
  29
+    end
  30
+    run_generator(generator, arguments.split(' '), SOURCES, :stdout => @stdout)
  31
+  end
  32
+  File.open(File.join(@tmp_root, "generator.out"), "w") do |f|
  33
+    @stdout.rewind
  34
+    f << @stdout.read
  35
+  end
  36
+end
  37
+
  38
+When /^I run executable "(.*)" with arguments "(.*)"/ do |executable, arguments|
  39
+  @stdout = File.expand_path(File.join(@tmp_root, "executable.out"))
  40
+  in_project_folder do
  41
+    system "#{executable} #{arguments} > #{@stdout} 2> #{@stdout}"
  42
+  end
  43
+end
  44
+
  45
+When /^I run project executable "(.*)" with arguments "(.*)"/ do |executable, arguments|
  46
+  @stdout = File.expand_path(File.join(@tmp_root, "executable.out"))
  47
+  in_project_folder do
  48
+    system "ruby #{executable} #{arguments} > #{@stdout} 2> #{@stdout}"
  49
+  end
  50
+end
  51
+
  52
+When /^I run local executable "(.*)" with arguments "(.*)"/ do |executable, arguments|
  53
+  @stdout = File.expand_path(File.join(@tmp_root, "executable.out"))
  54
+  executable = File.expand_path(File.join(File.dirname(__FILE__), "/../../bin", executable))
  55
+  in_project_folder do
  56
+    system "ruby #{executable} #{arguments} > #{@stdout} 2> #{@stdout}"
  57
+  end
  58
+end
  59
+
  60
+When /^I invoke task "rake (.*)"/ do |task|
  61
+  @stdout = File.expand_path(File.join(@tmp_root, "tests.out"))
  62
+  in_project_folder do
  63
+    system "rake #{task} --trace > #{@stdout} 2> #{@stdout}"
  64
+  end
  65
+end
  66
+
  67
+Then /^folder "(.*)" (is|is not) created/ do |folder, is|
  68
+  in_project_folder do
  69
+    File.exists?(folder).should(is == 'is' ? be_true : be_false)
  70
+  end
  71
+end
  72
+
  73
+Then /^file "(.*)" (is|is not) created/ do |file, is|
  74
+  in_project_folder do
  75
+    File.exists?(file).should(is == 'is' ? be_true : be_false)
  76
+  end
  77
+end
  78
+
  79
+Then /^file with name matching "(.*)" is created/ do |pattern|
  80
+  in_project_folder do
  81
+    Dir[pattern].should_not be_empty
  82
+  end
  83
+end
  84
+
  85
+Then /^file "(.*)" contents (does|does not) match \/(.*)\// do |file, does, regex|
  86
+  in_project_folder do
  87
+    actual_output = File.read(file)
  88
+    (does == 'does') ?
  89
+      actual_output.should(match(/#{regex}/)) :
  90
+      actual_output.should_not(match(/#{regex}/))
  91
+  end
  92
+end
  93
+
  94
+Then /gem file "(.*)" and generated file "(.*)" should be the same/ do |gem_file, project_file|
  95
+  File.exists?(gem_file).should be_true
  96
+  File.exists?(project_file).should be_true
  97
+  gem_file_contents = File.read(File.dirname(__FILE__) + "/../../#{gem_file}")
  98
+  project_file_contents = File.read(File.join(@active_project_folder, project_file))
  99
+  project_file_contents.should == gem_file_contents
  100
+end
  101
+
  102
+Then /^(does|does not) invoke generator "(.*)"$/ do |does_invoke, generator|
  103
+  actual_output = File.read(@stdout)
  104
+  does_invoke == "does" ?
  105
+    actual_output.should(match(/dependency\s+#{generator}/)) :
  106
+    actual_output.should_not(match(/dependency\s+#{generator}/))
  107
+end
  108
+
  109
+Then /help options "(.*)" and "(.*)" are displayed/ do |opt1, opt2|
  110
+  actual_output = File.read(@stdout)
  111
+  actual_output.should match(/#{opt1}/)
  112
+  actual_output.should match(/#{opt2}/)
  113
+end
  114
+
  115
+Then /^I should see$/ do |text|
  116
+  actual_output = File.read(@stdout)
  117
+  actual_output.should contain(text)
  118
+end
  119
+
  120
+Then /^I should not see$/ do |text|
  121
+  actual_output = File.read(@stdout)
  122
+  actual_output.should_not contain(text)
  123
+end
  124
+
  125
+Then /^I should see exactly$/ do |text|
  126
+  actual_output = File.read(@stdout)
  127
+  actual_output.should == text
  128
+end
  129
+
  130
+Then /^I should see all (\d+) tests pass/ do |expected_test_count|
  131
+  expected = %r{^#{expected_test_count} tests, \d+ assertions, 0 failures, 0 errors}
  132
+  actual_output = File.read(@stdout)
  133
+  actual_output.should match(expected)
  134
+end
  135
+
  136
+Then /^I should see all (\d+) examples pass/ do |expected_test_count|
  137
+  expected = %r{^#{expected_test_count} examples?, 0 failures}
  138
+  actual_output = File.read(@stdout)
  139
+  actual_output.should match(expected)
  140
+end
  141
+
  142
+Then /^yaml file "(.*)" contains (\{.*\})/ do |file, yaml|
  143
+  in_project_folder do
  144
+    yaml = eval yaml
  145
+    YAML.load(File.read(file)).should == yaml
  146
+  end
  147
+end
  148
+
  149
+Then /^Rakefile can display tasks successfully/ do
  150
+  @stdout = File.expand_path(File.join(@tmp_root, "rakefile.out"))
  151
+  in_project_folder do
  152
+    system "rake -T > #{@stdout} 2> #{@stdout}"
  153
+  end
  154
+  actual_output = File.read(@stdout)
  155
+  actual_output.should match(/^rake\s+\w+\s+#\s.*/)
  156
+end
  157
+
  158
+Then /^task "rake (.*)" is executed successfully/ do |task|
  159
+  @stdout.should_not be_nil
  160
+  actual_output = File.read(@stdout)
  161
+  actual_output.should_not match(/^Don't know how to build task '#{task}'/)
  162
+  actual_output.should_not match(/Error/i)
  163
+end
  164
+
  165
+Then /^gem spec key "(.*)" contains \/(.*)\// do |key, regex|
  166
+  in_project_folder do
  167
+    gem_file = Dir["pkg/*.gem"].first
  168
+    gem_spec = Gem::Specification.from_yaml(`gem spec #{gem_file}`)
  169
+    spec_value = gem_spec.send(key.to_sym)
  170
+    spec_value.to_s.should match(/#{regex}/)
  171
+  end
  172
+end
29  features/support/common.rb
... ...
@@ -0,0 +1,29 @@
  1
+module CommonHelpers
  2
+  def in_tmp_folder(&block)
  3
+    FileUtils.chdir(@tmp_root, &block)
  4
+  end
  5
+
  6
+  def in_project_folder(&block)
  7
+    project_folder = @active_project_folder || @tmp_root
  8
+    FileUtils.chdir(project_folder, &block)
  9
+  end
  10
+
  11
+  def in_home_folder(&block)
  12
+    FileUtils.chdir(@home_path, &block)
  13
+  end
  14
+
  15
+  def force_local_lib_override(project_name = @project_name)
  16
+    rakefile = File.read(File.join(project_name, 'Rakefile'))
  17
+    File.open(File.join(project_name, 'Rakefile'), "w+") do |f|
  18
+      f << "$:.unshift('#{@lib_path}')\n"
  19
+      f << rakefile
  20
+    end
  21
+  end
  22
+
  23
+  def setup_active_project_folder project_name
  24
+    @active_project_folder = File.join(@tmp_root, project_name)
  25
+    @project_name = project_name
  26
+  end
  27
+end
  28
+
  29
+World(CommonHelpers)
6  features/support/env.rb
... ...
@@ -0,0 +1,6 @@
  1
+require File.dirname(__FILE__) + "/../../lib/ical-scheduler"
  2
+
  3
+gem 'cucumber'
  4
+require 'cucumber'
  5
+gem 'rspec'
  6
+require 'spec'
11  features/support/matchers.rb
... ...
@@ -0,0 +1,11 @@
  1
+module Matchers
  2
+  def contain(expected)
  3
+    simple_matcher("contain #{expected.inspect}") do |given, matcher|
  4
+      matcher.failure_message = "expected #{given.inspect} to contain #{expected.inspect}"
  5
+      matcher.negative_failure_message = "expected #{given.inspect} not to contain #{expected.inspect}"
  6
+      given.index expected
  7
+    end
  8
+  end
  9
+end
  10
+
  11
+World(Matchers)
50  ical-scheduler.gemspec
... ...
@@ -0,0 +1,50 @@
  1
+# -*- encoding: utf-8 -*-
  2
+
  3
+Gem::Specification.new do |s|
  4
+  s.name = %q{ical-scheduler}
  5
+  s.version = "0.0.1"
  6
+
  7
+  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
  8
+  s.authors = ["FIXME full name"]
  9
+  s.date = %q{2009-05-17}
  10
+  s.description = %q{ical-scheduler executes arbitrary ruby code embedded in the comments of iCalendar (rfc2445) calendar events. The input can be an iCal file (.ics) or an iCal feed (such as provided by Google Calendar).  This project uses the following projects: * rubyredrick-ri_cal to parse and evaluate ical files * jmettraux-rufus-scheduler to schedule the (recurring) events and execute the ruby code from the calendar}
  11
+  s.email = ["FIXME email"]
  12
+  s.extra_rdoc_files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.rdoc"]
  13
+  s.files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.rdoc", "Rakefile", "features/development.feature", "features/step_definitions/common_steps.rb", "features/support/common.rb", "features/support/env.rb", "features/support/matchers.rb", "lib/ical-scheduler.rb", "script/console", "script/destroy", "script/generate", "spec/ical-scheduler_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "tasks/rspec.rake"]
  14
+  s.has_rdoc = true
  15
+  s.homepage = %q{http://github.com/kjwierenga/ical-scheduler}
  16
+  s.post_install_message = %q{PostInstall.txt}
  17
+  s.rdoc_options = ["--main", "README.rdoc"]
  18
+  s.require_paths = ["lib"]
  19
+  s.rubyforge_project = %q{ical-scheduler}
  20
+  s.rubygems_version = %q{1.3.1}
  21
+  s.summary = %q{ical-scheduler executes arbitrary ruby code embedded in the comments of iCalendar (rfc2445) calendar events}
  22
+
  23
+  if s.respond_to? :specification_version then
  24
+    current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
  25
+    s.specification_version = 2
  26
+
  27
+    if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
  28
+      s.add_runtime_dependency(%q<ri_cal>, [">= 0"])
  29
+      s.add_runtime_dependency(%q<rufus-scheduler>, [">= 0"])
  30
+      s.add_development_dependency(%q<newgem>, [">= 1.4.1"])
  31
+      s.add_development_dependency(%q<rspec>, [">= 0"])
  32
+      s.add_development_dependency(%q<cucumber>, [">= 0"])
  33
+      s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
  34
+    else
  35
+      s.add_dependency(%q<ri_cal>, [">= 0"])
  36
+      s.add_dependency(%q<rufus-scheduler>, [">= 0"])
  37
+      s.add_dependency(%q<newgem>, [">= 1.4.1"])
  38
+      s.add_dependency(%q<rspec>, [">= 0"])
  39
+      s.add_dependency(%q<cucumber>, [">= 0"])
  40
+      s.add_dependency(%q<hoe>, [">= 1.8.0"])
  41
+    end
  42
+  else
  43
+    s.add_dependency(%q<ri_cal>, [">= 0"])
  44
+    s.add_dependency(%q<rufus-scheduler>, [">= 0"])
  45
+    s.add_dependency(%q<newgem>, [">= 1.4.1"])
  46
+    s.add_dependency(%q<rspec>, [">= 0"])
  47
+    s.add_dependency(%q<cucumber>, [">= 0"])
  48
+    s.add_dependency(%q<hoe>, [">= 1.8.0"])
  49
+  end
  50
+end
6  lib/ical-scheduler.rb
... ...
@@ -0,0 +1,6 @@
  1
+$:.unshift(File.dirname(__FILE__)) unless
  2
+  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
  3
+
  4
+module IcalScheduler
  5
+  VERSION = '0.0.1'
  6
+end
10  script/console
... ...
@@ -0,0 +1,10 @@
  1
+#!/usr/bin/env ruby
  2
+# File: script/console
  3
+irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
  4
+
  5
+libs =  " -r irb/completion"
  6
+# Perhaps use a console_lib to store any extra methods I may want available in the cosole
  7
+# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
  8
+libs <<  " -r #{File.dirname(__FILE__) + '/../lib/ical-scheduler.rb'}"
  9
+puts "Loading ical-scheduler gem"
  10
+exec "#{irb} #{libs} --simple-prompt"
14  script/destroy
... ...
@@ -0,0 +1,14 @@
  1
+#!/usr/bin/env ruby
  2
+APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
  3
+
  4
+begin
  5
+  require 'rubigen'
  6
+rescue LoadError
  7
+  require 'rubygems'
  8
+  require 'rubigen'
  9
+end
  10
+require 'rubigen/scripts/destroy'
  11
+
  12
+ARGV.shift if ['--help', '-h'].include?(ARGV[0])
  13
+RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
  14
+RubiGen::Scripts::Destroy.new.run(ARGV)
14  script/generate
... ...
@@ -0,0 +1,14 @@
  1
+#!/usr/bin/env ruby
  2
+APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
  3
+
  4
+begin
  5
+  require 'rubigen'
  6
+rescue LoadError
  7
+  require 'rubygems'
  8
+  require 'rubigen'
  9
+end
  10
+require 'rubigen/scripts/generate'
  11
+
  12
+ARGV.shift if ['--help', '-h'].include?(ARGV[0])
  13
+RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
  14
+RubiGen::Scripts::Generate.new.run(ARGV)
11  spec/ical-scheduler_spec.rb
... ...
@@ -0,0 +1,11 @@
  1
+require File.dirname(__FILE__) + '/spec_helper.rb'
  2
+
  3
+# Time to add your specs!
  4
+# http://rspec.info/
  5
+describe "Place your specs here" do
  6
+  
  7
+  it "find this spec in spec directory" do
  8
+    # violated "Be sure to write your specs"
  9
+  end
  10
+  
  11
+end
1  spec/spec.opts
... ...
@@ -0,0 +1 @@
  1
+--colour
10  spec/spec_helper.rb
... ...
@@ -0,0 +1,10 @@
  1
+begin
  2
+  require 'spec'
  3
+rescue LoadError
  4
+  require 'rubygems' unless ENV['NO_RUBYGEMS']
  5
+  gem 'rspec'
  6
+  require 'spec'
  7
+end
  8
+
  9
+$:.unshift(File.dirname(__FILE__) + '/../lib')
  10
+require 'ical-scheduler'
21  tasks/rspec.rake
... ...
@@ -0,0 +1,21 @@
  1
+begin
  2
+  require 'spec'
  3
+rescue LoadError
  4
+  require 'rubygems' unless ENV['NO_RUBYGEMS']
  5
+  require 'spec'
  6
+end
  7
+begin
  8
+  require 'spec/rake/spectask'
  9
+rescue LoadError
  10
+  puts <<-EOS
  11
+To use rspec for testing you must install rspec gem:
  12
+    gem install rspec
  13
+EOS
  14
+  exit(0)
  15
+end
  16
+
  17
+desc "Run the specs under spec/models"
  18
+Spec::Rake::SpecTask.new do |t|
  19
+  t.spec_opts = ['--options', "spec/spec.opts"]
  20
+  t.spec_files = FileList['spec/**/*_spec.rb']
  21
+end

0 notes on commit 1687d12

Please sign in to comment.
Something went wrong with that request. Please try again.