cia 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cia (0.3.2)
4
+ cia (0.3.3)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
data/Rakefile CHANGED
@@ -1,11 +1,19 @@
1
1
  require 'appraisal'
2
2
  require 'bundler/gem_tasks'
3
3
 
4
- task :default do
5
- sh "bundle exec rake appraisal:install && bundle exec rake appraisal spec"
4
+ task :fast_force_install_appraisals => "appraisal:gemfiles" do
5
+ Appraisal::File.each do |appraisal|
6
+ gemfile = appraisal.gemfile_path
7
+ options = "--gemfile='#{gemfile}'"
8
+ sh "bundle check #{options} || bundle install #{options} || (rm #{gemfile}.lock && bundle install #{options})"
9
+ end
6
10
  end
7
11
 
8
- task :spec do
12
+ task :default => :fast_force_install_appraisals do
13
+ sh "bundle exec rake appraisal spec"
14
+ end
15
+
16
+ task :spec do
9
17
  sh "rspec spec/"
10
18
  end
11
19
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/mgrosser/code/tools/cia
3
3
  specs:
4
- cia (0.2.3)
4
+ cia (0.3.2)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/mgrosser/code/tools/cia
3
3
  specs:
4
- cia (0.2.3)
4
+ cia (0.3.2)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -9,7 +9,7 @@ module CIA
9
9
  validates_presence_of :source, :action
10
10
 
11
11
  def self.previous
12
- scoped(:order => "id desc")
12
+ scoped(:order => "created_at desc")
13
13
  end
14
14
 
15
15
  def attribute_change_hash
@@ -1,3 +1,3 @@
1
1
  module CIA
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
@@ -20,7 +20,7 @@ describe CIA::Event do
20
20
 
21
21
  context ".previous" do
22
22
  it "is sorted id desc" do
23
- events = [create_event, create_event, create_event].map(&:id)
23
+ events = [create_event(:created_at => 3.days.ago), create_event(:created_at => 2.days.ago), create_event(:created_at => 1.day.ago)].map(&:id)
24
24
  CIA::Event.previous.map(&:id).should == events.reverse
25
25
  end
26
26
  end
@@ -60,8 +60,8 @@ class CarWithIf < ActiveRecord::Base
60
60
  end
61
61
  end
62
62
 
63
- def create_event
64
- CIA::Event.create!(:source => Car.create!, :actor => User.create!, :action => "update")
63
+ def create_event(options={})
64
+ CIA::Event.create!({:source => Car.create!, :actor => User.create!, :action => "update"}.merge(options))
65
65
  end
66
66
 
67
67
  def create_change(options={})
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
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-26 00:00:00.000000000 Z
12
+ date: 2012-06-27 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: michael@grosser.it
@@ -53,7 +53,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
53
53
  version: '0'
54
54
  segments:
55
55
  - 0
56
- hash: 516757827358886270
56
+ hash: -2562495638846707522
57
57
  required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  none: false
59
59
  requirements:
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  version: '0'
63
63
  segments:
64
64
  - 0
65
- hash: 516757827358886270
65
+ hash: -2562495638846707522
66
66
  requirements: []
67
67
  rubyforge_project:
68
68
  rubygems_version: 1.8.24