schema_dot_org 1.5.2 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/schema_dot_org.rb +8 -1
- data/schema_dot_org.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd1688fe2c05954777862ee6727412e86f56f91eb8383336a030fd5b78b944bd
|
4
|
+
data.tar.gz: d0dc0588f96446bae7b871ba526170e310fb9d4b07e4169efa36de3b5c600afa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '052544928aaa4d5834b4d8e172d1a774fc2f1ae15c8f71d96c76f74f3f562f22e1e7c9239e09aa321cdbc78eba2ad5aa7d771f34e5c0fd63efd6801f9af6121b'
|
7
|
+
data.tar.gz: 34dbf599ececf0079537134688de5cb92d362e7c9bb473016da708f764d6818b5eeffc4350b7d67d647e633425741045b26297660ae5e31d96f7f8b7fe763dbf
|
data/Gemfile.lock
CHANGED
data/lib/schema_dot_org.rb
CHANGED
@@ -13,7 +13,7 @@ module SchemaDotOrg
|
|
13
13
|
|
14
14
|
|
15
15
|
def to_s
|
16
|
-
json_string = to_json_ld(pretty:
|
16
|
+
json_string = to_json_ld(pretty: (!rails_production? && !ENV['SCHEMA_DOT_ORG_MINIFIED_JSON']))
|
17
17
|
|
18
18
|
# Mark as safe if we're in Rails
|
19
19
|
if json_string.respond_to?(:html_safe)
|
@@ -57,5 +57,12 @@ module SchemaDotOrg
|
|
57
57
|
self.class.name =~ UNQUALIFIED_CLASS_NAME_REGEX
|
58
58
|
Regexp.last_match(1)
|
59
59
|
end
|
60
|
+
|
61
|
+
|
62
|
+
private
|
63
|
+
|
64
|
+
def rails_production?
|
65
|
+
defined?(Rails) && Rails.env.production?
|
66
|
+
end
|
60
67
|
end
|
61
68
|
end
|
data/schema_dot_org.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schema_dot_org
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robb Shecter
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: validated_object
|
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
113
|
version: '0'
|
114
114
|
requirements: []
|
115
115
|
rubyforge_project:
|
116
|
-
rubygems_version: 2.7.
|
116
|
+
rubygems_version: 2.7.7
|
117
117
|
signing_key:
|
118
118
|
specification_version: 4
|
119
119
|
summary: JSON-LD generator for Schema.org vocabulary
|