spreader 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/spreader.rb +1 -4
  2. metadata +2 -2
data/lib/spreader.rb CHANGED
@@ -54,10 +54,7 @@ class Spreader
54
54
  end
55
55
 
56
56
  def load(seeds)
57
- empty = File.zero?('db/seeds.rb')
58
- File.open('db/seeds.rb', 'a') {|f| f.write("\n" + seeds.chop)} if !empty
59
- File.open('db/seeds.rb', 'a') {|f| f.write(seeds.chop)} if empty
60
- # File.open('../test/fixtures/things.yml', 'w') {|f| f.write(seeds.chop.chop)}
57
+ File.file?('db/seeds.rb') && File.stat('db/seeds.rb').size > 0 ? File.open('db/seeds.rb', 'a') {|f| f.write("\n" + seeds.chop)} : File.open('db/seeds.rb', 'a') {|f| f.write(seeds.chop)}
61
58
  system('rake db:seed')
62
59
  end
63
60
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spreader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-30 00:00:00.000000000 Z
12
+ date: 2012-07-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: libxml-ruby