cia 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/Rakefile +11 -3
- data/gemfiles/rails2.gemfile.lock +1 -1
- data/gemfiles/rails3.gemfile.lock +1 -1
- data/lib/cia/event.rb +1 -1
- data/lib/cia/version.rb +1 -1
- data/spec/cia/event_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -2
- metadata +4 -4
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
@@ -1,11 +1,19 @@
|
|
1
1
|
require 'appraisal'
|
2
2
|
require 'bundler/gem_tasks'
|
3
3
|
|
4
|
-
task :
|
5
|
-
|
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 :
|
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
|
|
data/lib/cia/event.rb
CHANGED
data/lib/cia/version.rb
CHANGED
data/spec/cia/event_spec.rb
CHANGED
@@ -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
|
data/spec/spec_helper.rb
CHANGED
@@ -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.
|
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-
|
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:
|
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:
|
65
|
+
hash: -2562495638846707522
|
66
66
|
requirements: []
|
67
67
|
rubyforge_project:
|
68
68
|
rubygems_version: 1.8.24
|