yoon-view_trail 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/features/step_definitions/view_trail_steps.rb +9 -0
- data/features/view_trail.feature +6 -1
- data/lib/view_trail/activity.rb +1 -1
- data/lib/view_trail.rb +1 -1
- data/view_trail.gemspec +2 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
@@ -18,3 +18,12 @@ Then /^the last activity should have "([^\"]*)" ([^ ]*)$/ do |value, key|
|
|
18
18
|
Activity.last.send(key.to_sym).to_s.should == value
|
19
19
|
end
|
20
20
|
|
21
|
+
Given /^I ([^ ]*) the ([^ ]*) page with params$/ do |method, page|
|
22
|
+
visit(page, method.to_sym, {:check => "yourself"})
|
23
|
+
end
|
24
|
+
|
25
|
+
Then /^the last activity should have params$/ do
|
26
|
+
Activity.last.params.should == HashWithIndifferentAccess.new({:check => "yourself"})
|
27
|
+
end
|
28
|
+
|
29
|
+
|
data/features/view_trail.feature
CHANGED
@@ -12,7 +12,7 @@ Feature: ViewTrail
|
|
12
12
|
And the last activity should have "312" whodunnit
|
13
13
|
And the last activity should have "foo" action
|
14
14
|
And the last activity should have "foo" controller
|
15
|
-
And the last activity should have "
|
15
|
+
And the last activity should have "" params
|
16
16
|
|
17
17
|
Scenario: POST request
|
18
18
|
When I post the foo page
|
@@ -32,6 +32,11 @@ Feature: ViewTrail
|
|
32
32
|
And the last activity should have "312" whodunnit
|
33
33
|
And the last activity should have "foo" action
|
34
34
|
|
35
|
+
Scenario: GET request
|
36
|
+
Given I get the foo page with params
|
37
|
+
Then I should have 5 activities
|
38
|
+
And the last activity should have params
|
39
|
+
|
35
40
|
Scenario: GET request on excepted path
|
36
41
|
Given I have 0 activities
|
37
42
|
When I get the bar page
|
data/lib/view_trail/activity.rb
CHANGED
data/lib/view_trail.rb
CHANGED
@@ -44,7 +44,7 @@ module ViewTrail
|
|
44
44
|
module InstanceMethods
|
45
45
|
def record_activity
|
46
46
|
if self.class.view_trail_active
|
47
|
-
Activity.create(:whodunnit => ViewTrail.whodunnit, :controller => params.delete(:controller), :action => params.delete(:action), :params => params
|
47
|
+
Activity.create(:whodunnit => ViewTrail.whodunnit, :controller => params.delete(:controller), :action => params.delete(:action), :params => params)
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
data/view_trail.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{view_trail}
|
5
|
-
s.version = "0.2.
|
5
|
+
s.version = "0.2.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Mark Yoon"]
|
9
|
-
s.date = %q{2009-07-
|
9
|
+
s.date = %q{2009-07-17}
|
10
10
|
s.description = %q{View trail tracks controller actions in Rails.}
|
11
11
|
s.email = %q{yoon@northwestern.edu}
|
12
12
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yoon-view_trail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Yoon
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-07-
|
12
|
+
date: 2009-07-17 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|