schema_dot_org 1.0.0 → 1.0.1
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +0 -2
- data/lib/schema_dot_org/organization.rb +1 -3
- data/lib/schema_dot_org/version.rb +1 -1
- data/test-script.rb +0 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b1a873ff196b5b941a06d1ebe22e3257cdcac6af80913d6500d5e83904d682c
|
4
|
+
data.tar.gz: b5fef9d53e234eb9ce43c3eb521cb12c23f25164b0aecf9ab1976236620fe2b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 852bfe4e5259d19ffc3ee9b88e83dae9ec894d7785cd75b64eb5d2a4186ecd2abef5e65db7b265e3acaf84bd7b95e84f16a9f153bb6287e615ae25c8b0404296
|
7
|
+
data.tar.gz: af3a67ac2b4d81100e6ef90786a3f3e41e305d960b59f8a3e49a5e421577a1c120200bad24e6ea805158f08eba3bd5ece8a455c4dbc9509f7098cfe22d3240ab
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -22,7 +22,6 @@ include SchemaDotOrg
|
|
22
22
|
org.email = 'say_hi@public.law'
|
23
23
|
org.url = 'https://www.public.law'
|
24
24
|
org.logo = 'https://www.public.law/favicon-196x196.png'
|
25
|
-
org.same_as = 'https://www.facebook.com/PublicDotLaw'
|
26
25
|
org.founding_date = Date.new(2009, 3, 6)
|
27
26
|
org.founder = Person.new do |person|
|
28
27
|
person.name = 'Robb Shecter'
|
@@ -48,7 +47,6 @@ SchemaDotOrg will validate your code, and if correct, will generate Schema.org J
|
|
48
47
|
"email": "say_hi@public.law",
|
49
48
|
"url": "https://www.public.law",
|
50
49
|
"logo": "https://www.public.law/favicon-196x196.png",
|
51
|
-
"same_as": "https://www.facebook.com/PublicDotLaw",
|
52
50
|
"foundingDate": "2009-03-06",
|
53
51
|
"founder": {
|
54
52
|
"@type": "Person",
|
@@ -4,7 +4,7 @@ require 'schema_dot_org'
|
|
4
4
|
|
5
5
|
module SchemaDotOrg
|
6
6
|
class Organization < SchemaType
|
7
|
-
attr_accessor :email, :founder, :founding_date, :founding_location, :logo, :name, :
|
7
|
+
attr_accessor :email, :founder, :founding_date, :founding_location, :logo, :name, :url
|
8
8
|
|
9
9
|
validates :email, type: String
|
10
10
|
validates :founder, type: Person
|
@@ -12,7 +12,6 @@ module SchemaDotOrg
|
|
12
12
|
validates :founding_location, type: Place
|
13
13
|
validates :logo, type: String
|
14
14
|
validates :name, type: String
|
15
|
-
validates :same_as, type: String
|
16
15
|
validates :url, type: String
|
17
16
|
|
18
17
|
def to_json_struct
|
@@ -22,7 +21,6 @@ module SchemaDotOrg
|
|
22
21
|
"email" => email,
|
23
22
|
"url" => url,
|
24
23
|
"logo" => logo,
|
25
|
-
"same_as" => same_as,
|
26
24
|
"founder" => founder.to_json_struct,
|
27
25
|
"foundingDate" => founding_date.to_s,
|
28
26
|
"foundingLocation" => founding_location.to_json_struct
|
data/test-script.rb
CHANGED
@@ -12,7 +12,6 @@ public_law = Organization.new do |org|
|
|
12
12
|
org.email = 'say_hi@public.law'
|
13
13
|
org.url = 'https://www.public.law'
|
14
14
|
org.logo = 'https://www.public.law/favicon-196x196.png'
|
15
|
-
org.same_as = 'https://www.facebook.com/PublicDotLaw'
|
16
15
|
org.founder = Person.new do |person|
|
17
16
|
person.name = 'Robb Shecter'
|
18
17
|
end
|