lackie 0.1.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@ lib = File.dirname(__FILE__)
2
2
  $:.unshift(lib) unless $:.include?(lib) || $:.include?(File.expand_path(lib))
3
3
 
4
4
  module Lackie
5
- VERSION = '0.1.9'
5
+ VERSION = '0.2.0'
6
6
  end
7
7
 
8
8
  require 'lackie/remote_control'
@@ -2,7 +2,7 @@ module Lackie
2
2
  class CacheBuster
3
3
  def self.unique_string
4
4
  @@unique_number ||= 0
5
- (@@unique_number += 1).to_s
5
+ "#{@@unique_number += 1}#{Time.now.to_i}"
6
6
  end
7
7
  end
8
8
  end
@@ -3,8 +3,13 @@ require 'lackie/cache_buster'
3
3
 
4
4
  module Lackie
5
5
  describe CacheBuster do
6
- it "returns unique strings" do
6
+ it "produces unique strings" do
7
7
  (1..99).map { |i| CacheBuster.unique_string }.uniq.size.should == 99
8
8
  end
9
+
10
+ it "produces strings that include the current time" do
11
+ Time.should_receive(:now).and_return("332211")
12
+ CacheBuster.unique_string.should =~ /332211/
13
+ end
9
14
  end
10
15
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lackie
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 1
9
- - 9
10
- version: 0.1.9
8
+ - 2
9
+ - 0
10
+ version: 0.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Josh Chisholm
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-28 00:00:00 +00:00
18
+ date: 2011-02-02 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -201,7 +201,7 @@ rubyforge_project:
201
201
  rubygems_version: 1.4.1
202
202
  signing_key:
203
203
  specification_version: 3
204
- summary: lackie-0.1.9
204
+ summary: lackie-0.2.0
205
205
  test_files:
206
206
  - features/remote_control.feature
207
207
  - features/step_definitions/lackie_steps.rb