federal_register 0.6.6 → 0.6.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/federal_register.gemspec +1 -1
- data/lib/federal_register/document.rb +16 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aab8aae65e677cd2231025bbf3c2b1a392a094b5
|
4
|
+
data.tar.gz: b5125490abd36ad2099e8dcb0da7f65ca38f88de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c2cbf7f689334b3787caa14dc19435005471d13583584f5b0ad3af1dc82d6c5a1d789fda5e50227c07c78d15cdc2070c19f99bc4e4afc87c3bf6fe143452391
|
7
|
+
data.tar.gz: b424d77f6a2626ab7edb4f64695aa523e3679611df428768a3a36b433e76ae948b72e4298e74a0cb89e7b6f7e601515c2b3e95a83101cc351750c3025bc64b77
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.7
|
data/federal_register.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "federal_register"
|
8
|
-
s.version = "0.6.
|
8
|
+
s.version = "0.6.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Andrew Carpenter", "Bob Burbach"]
|
@@ -26,6 +26,7 @@ class FederalRegister::Document < FederalRegister::Base
|
|
26
26
|
:images,
|
27
27
|
:json_url,
|
28
28
|
:mods_url,
|
29
|
+
:page_views,
|
29
30
|
:pdf_url,
|
30
31
|
:president,
|
31
32
|
:proclamation_number,
|
@@ -114,4 +115,19 @@ class FederalRegister::Document < FederalRegister::Base
|
|
114
115
|
[]
|
115
116
|
end
|
116
117
|
end
|
118
|
+
|
119
|
+
def page_views
|
120
|
+
if attributes["page_views"]
|
121
|
+
last_updated = begin
|
122
|
+
DateTime.parse(attributes["page_views"]["last_updated"])
|
123
|
+
rescue
|
124
|
+
nil
|
125
|
+
end
|
126
|
+
|
127
|
+
{
|
128
|
+
count: attributes["page_views"]["count"],
|
129
|
+
last_updated: last_updated
|
130
|
+
}
|
131
|
+
end
|
132
|
+
end
|
117
133
|
end
|