gretel-jsonld 0.1.0 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d3c3259c95025ca3013246ffef2562de36cd01d
4
- data.tar.gz: cac38755ad0fafd73912c5e46c8f95900a9c70fa
3
+ metadata.gz: 3ee0aa4c582e0ed7f3be4f2b3b45a68fbc91b307
4
+ data.tar.gz: 3c6e4229650d0c54bb5f85a63e6286fc5f929ea8
5
5
  SHA512:
6
- metadata.gz: 2e20f0fa070a8350e10ae6bb0b8aac604e90b5ce58c167fd914159cee6722a0a1a5b8c3cedc9338324c6ea59f0a282ca729059fe589e5bf8e15c9ff32dd9c80d
7
- data.tar.gz: 8232b6731349a1bb5d49b6b8c510a2bc595d3d72314bf3837756e60d3737ba8dc1c633612a742d34876bd1aaa353d9da53835aedcd7fb98f9e12d703556b506f
6
+ metadata.gz: 845201072ef51ec8237ab5c78bb58bb9cafc8b352fdffa1aa1067813fbf05d4983eed2b7a6859cd20c55ca35d3b5482e367d8fcd490f072228911239eef925c1
7
+ data.tar.gz: 4af53b5deea25b7afd2a95614b0fbef8e677eca5e3bf8d01ee03ccaf60c376d75388805bf6153a7f7789b89148f89f5b71697335820c51285598e3b12b7b8bc3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
1
  # CHANGELOG
2
+ ## [0.1.1](https://github.com/yasaichi/gretel-jsonld/releases/tag/v0.1.1) (November 25, 2017)
3
+ * Cope with Rails 4.0 or former
4
+
2
5
  ## [0.1.0](https://github.com/yasaichi/gretel-jsonld/releases/tag/v0.1.0) (November 23, 2017)
3
6
  * The initial release to reserve the gem name
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2017 yasaichi
1
+ Copyright 2017 Yuichi Goto
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/Rakefile CHANGED
@@ -16,9 +16,8 @@ RDoc::Task.new(:rdoc) do |rdoc|
16
16
  rdoc.rdoc_files.include("lib/**/*.rb")
17
17
  end
18
18
 
19
-
20
-
21
-
22
-
19
+ require "rspec/core/rake_task"
20
+ RSpec::Core::RakeTask.new(:spec)
21
+ task default: :spec
23
22
 
24
23
  require "bundler/gem_tasks"
@@ -11,12 +11,17 @@ module Gretel
11
11
  @link_collection = link_collection
12
12
  end
13
13
 
14
- def to_json(*args)
14
+ # NOTE: Override #as_json to cope with Rails 4.0 or former
15
+ def as_json(options = nil)
15
16
  {
16
17
  "@context": "http://schema.org",
17
18
  "@type": "BreadcrumbList",
18
19
  itemListElement: item_list_element,
19
- }.to_json(*args)
20
+ }.as_json(options)
21
+ end
22
+
23
+ def to_json(*args)
24
+ as_json.to_json(*args)
20
25
  end
21
26
 
22
27
  private
@@ -12,7 +12,8 @@ module Gretel
12
12
  @position = position
13
13
  end
14
14
 
15
- def to_json(*args)
15
+ # NOTE: Override #as_json to cope with Rails 4.0 or former
16
+ def as_json(options = nil)
16
17
  {
17
18
  "@type": "ListItem",
18
19
  position: @position,
@@ -20,7 +21,11 @@ module Gretel
20
21
  "@id": @id,
21
22
  name: @name,
22
23
  }
23
- }.to_json(*args)
24
+ }.as_json(options)
25
+ end
26
+
27
+ def to_json(*args)
28
+ as_json.to_json(*args)
24
29
  end
25
30
  end
26
31
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gretel
4
4
  module Jsonld
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gretel-jsonld
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - yasaichi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-23 00:00:00.000000000 Z
11
+ date: 2017-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gretel
@@ -94,7 +94,21 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
- description: gretel-json-ld enables gretel gem to handle JSON-LD based breadcrumbs.
97
+ - !ruby/object:Gem::Dependency
98
+ name: simplecov
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description: gretel-jsonld enables gretel gem to handle JSON-LD based breadcrumbs.
98
112
  email:
99
113
  - yasaichi@users.noreply.github.com
100
114
  executables: []
@@ -133,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
147
  version: '0'
134
148
  requirements: []
135
149
  rubyforge_project:
136
- rubygems_version: 2.6.13
150
+ rubygems_version: 2.5.2.1
137
151
  signing_key:
138
152
  specification_version: 4
139
153
  summary: Gretel extension for supporting JSON-LD breadcrumbs