deputy 0.1.38 → 0.1.39

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -11,6 +11,7 @@ begin
11
11
  gem.email = "mirko@dawanda.com"
12
12
  gem.homepage = "http://github.com/dawanda/#{project_name}"
13
13
  gem.authors = ["Michael Grosser"]
14
+ gem.add_dependency 'system_timer'
14
15
  end
15
16
 
16
17
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.38
1
+ 0.1.39
data/deputy.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{deputy}
8
- s.version = "0.1.38"
8
+ s.version = "0.1.39"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Grosser"]
@@ -38,9 +38,12 @@ Gem::Specification.new do |s|
38
38
  s.specification_version = 3
39
39
 
40
40
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
41
+ s.add_runtime_dependency(%q<system_timer>, [">= 0"])
41
42
  else
43
+ s.add_dependency(%q<system_timer>, [">= 0"])
42
44
  end
43
45
  else
46
+ s.add_dependency(%q<system_timer>, [">= 0"])
44
47
  end
45
48
  end
46
49
 
data/lib/deputy.rb CHANGED
@@ -39,7 +39,8 @@ class Scout
39
39
  complete_memory[key]
40
40
  end
41
41
 
42
- def remember(data)
42
+ def remember(*args)
43
+ data = (args.size == 1 ? args[0] : {args[0] => args[1]})
43
44
  all = complete_memory.merge(data)
44
45
  File.open(memory_file, 'w'){|f| f.write all.to_yaml }
45
46
  end
data/spec/deputy_spec.rb CHANGED
@@ -132,6 +132,11 @@ describe Deputy do
132
132
  FooPlugin::NestedPlugin.new.send(:memory, :asdsa).should == nil
133
133
  FooPlugin.new.send(:memory, :asdsa).should == nil
134
134
  end
135
+
136
+ it "remembers key and value" do
137
+ FooPlugin::NestedPlugin.new.send(:remember, :foo, 1)
138
+ FooPlugin::NestedPlugin.new.send(:memory, :foo).should == 1
139
+ end
135
140
  end
136
141
 
137
142
  describe :needs do
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 38
9
- version: 0.1.38
8
+ - 39
9
+ version: 0.1.39
10
10
  platform: ruby
11
11
  authors:
12
12
  - Michael Grosser
@@ -16,8 +16,19 @@ cert_chain: []
16
16
 
17
17
  date: 2010-07-16 00:00:00 +02:00
18
18
  default_executable: deputy
19
- dependencies: []
20
-
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: system_timer
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ version: "0"
30
+ type: :runtime
31
+ version_requirements: *id001
21
32
  description:
22
33
  email: mirko@dawanda.com
23
34
  executables: