audit_rails 1.1.2 → 1.1.3
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.
- checksums.yaml +8 -8
- data/README.rdoc +3 -0
- data/app/controllers/audit_rails/audits_controller.rb +1 -0
- data/app/models/audit_rails/audit.rb +4 -0
- data/app/views/audit_rails/audits/analytics.html.erb +29 -4
- data/lib/audit_rails/version.rb +1 -1
- data/spec/controllers/audit_rails/audits_controller_spec.rb +4 -2
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +18 -0
- data/spec/dummy/log/test.log +899 -0
- data/spec/models/audit_rails/audit_spec.rb +13 -0
- metadata +2 -2
@@ -25,4 +25,17 @@ describe AuditRails::Audit do
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
+
describe ".analysis_by_page_views" do
|
29
|
+
it "returns controller-action and count for all audits in the system" do
|
30
|
+
john = "John Smith"
|
31
|
+
fake = "Fake User"
|
32
|
+
audit = 3.times{
|
33
|
+
AuditRails::Audit.create!(:action => action = "Visit", :user_name => john)
|
34
|
+
AuditRails::Audit.create!(:action => action = "login", :user_name => fake)
|
35
|
+
}
|
36
|
+
|
37
|
+
AuditRails::Audit.analysis_by_page_views.should == {'login' => 3, 'Visit' => 3}
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
28
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: audit_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gourav Tiwari
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|