Permalink
Browse files

changed to use YKK instead KVS

  • Loading branch information...
1 parent fed4350 commit 9a8f89d0374c9a849b5714cffa700d644247d4f3 @jugyo committed Feb 3, 2010
Showing with 11 additions and 12 deletions.
  1. +1 −1 Rakefile
  2. +2 −3 lib/cilite.rb
  3. +4 −4 lib/cilite/log.rb
  4. +2 −2 lib/cilite/runner.rb
  5. +1 −1 test/cilite/test_log.rb
  6. +1 −1 test/cilite/test_runner.rb
View
@@ -12,7 +12,7 @@ begin
gem.authors = ["jugyo"]
gem.add_development_dependency "shoulda", ">= 0"
gem.add_development_dependency "rr", ">= 0"
- gem.add_dependency 'kvs'
+ gem.add_dependency 'ykk'
gem.add_dependency 'sinatra'
gem.add_dependency 'choice'
gem.add_dependency 'termcolor', '>= 1.2.0'
View
@@ -3,15 +3,14 @@
exit!
end
-require 'kvs'
-require 'singleton'
+require 'ykk'
require 'sinatra'
gem 'termcolor', '>= 1.2.0'
require 'termcolor'
work_dir = '.cilite'
Dir.mkdir(work_dir) unless File.exists?(work_dir)
-KVS.dir = work_dir
+YKK.dir = work_dir
Dir[File.join(File.dirname(__FILE__), 'cilite', '*.rb')].each do |filename|
require filename
View
@@ -2,16 +2,16 @@ module CiLite
module Log
class << self
def []=(hash, result)
- KVS['logs'] = logs << hash
- KVS[hash] = result
+ YKK['logs'] = logs << hash
+ YKK[hash] = result
end
def [](hash)
- KVS[hash]
+ YKK[hash]
end
def logs
- KVS['logs'] || []
+ YKK['logs'] || []
end
end
end
@@ -8,7 +8,7 @@ def self.start(options)
attr_accessor :started
def initialize(options)
- options = (KVS['config'] || {}).merge(options)
+ options = (YKK['config'] || {}).merge(options)
@branch = options[:branch]
@command = options[:command]
@interval = options[:interval]
@@ -32,7 +32,7 @@ def start
def test_if_updated
hash = git_update
- unless KVS[hash]
+ unless YKK.key?(hash)
test(hash)
end
end
@@ -4,7 +4,7 @@
class TestLog < Test::Unit::TestCase
context 'main' do
setup do
- KVS.dir = 'foo'
+ YKK.dir = 'foo'
end
should 'save log' do
@@ -23,7 +23,7 @@ class TestRunner < Test::Unit::TestCase
end
should 'not test if not updated' do
- KVS['foo'] = 'bar'
+ YKK['foo'] = 'bar'
stub(@runner).git_update { 'foo' }
mock(@runner).test('foo').times(0)
@runner.test_if_updated

0 comments on commit 9a8f89d

Please sign in to comment.