fixturease 0.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/bin/fixturease.rb +6 -5
  3. metadata +2 -2
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'rake/gempackagetask'
2
2
  require 'rubygems'
3
3
 
4
- PKG_VERSION="0.2"
4
+ PKG_VERSION="0.2.1"
5
5
  PKG_FILES=["bin/fixturease.rb","Rakefile"]
6
6
 
7
7
  spec = Gem::Specification.new do |s|
data/bin/fixturease.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #! /usr/bin/env ruby
2
- unless $0.match /^irb$/
2
+ unless $0.match /^irb(\.bat|\.cmd)?$/
3
3
  exec "irb -I #{File.dirname(__FILE__)} -r fixturease --simple-prompt"
4
4
  else
5
5
  ENV['RAILS_ENV'] ||= 'test'
@@ -12,11 +12,12 @@ else
12
12
  alias_method :save_orig, :save
13
13
  @@fixtures = {}
14
14
  def save
15
- save_orig
16
- @@fixtures[self.class] ||= {}
17
- @@fixtures[self.class][self.id] = self
15
+ returning result=save_orig do
16
+ @@fixtures[self.class] ||= {}
17
+ @@fixtures[self.class][self.id] = self unless self.new_record?
18
+ end
18
19
  end
19
-
20
+
20
21
  def self.fixturease_fixtures
21
22
  @@fixtures
22
23
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: fixturease
5
5
  version: !ruby/object:Gem::Version
6
- version: "0.2"
7
- date: 2007-01-18 00:00:00 +02:00
6
+ version: 0.2.1
7
+ date: 2007-01-19 00:00:00 +02:00
8
8
  summary: Easy fixture creation tool
9
9
  require_paths:
10
10
  - lib