iq_rdf 0.1.16 → 0.1.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 985cc8b02831cc489803bb8ab8bf17ad1ea0bec3
4
- data.tar.gz: 61fbb6c02a8a8a8a13d1151ee2bbef74a2e8e784
2
+ SHA256:
3
+ metadata.gz: 8d1e7f78d4501e4926a949b23e9eac85ee22541fdc98445ceecf8125e1b43f6c
4
+ data.tar.gz: 23fcf45f8d9848b40d655f686fc656981e68d7bb6affc0551ab497c5a0e48e1f
5
5
  SHA512:
6
- metadata.gz: '096d438f95afe8be17afdc28b9517d3cd3ea82fb2766c9667c597c8c1f55c70c83caa63f8391da86977d835eac5357840f92c2da57148ef9b29a44e901a07349'
7
- data.tar.gz: '034199d8c6b497b5b1944e63798cfa49f38de8e2abb9d4394f01498fb972851bd47cadf0111317e463675a8fae3dc968a1810489711a57a03197e0401523b2c3'
6
+ metadata.gz: 65cbaee04cc22cf60b667cadc6a107ceca63f2947830b2ac3eff4045754cd8f5fa5f3021e7202a8c5d9aee96d85c6122f781f5e2cf053c12a202e2d3436ae3a3
7
+ data.tar.gz: fcfec08a7092d8aeec7c737a52a093493da4a8a9e1f12fb12cbf31b97f56c93d0b4e25ae4fb99b718b79c041c43dfe8d01c042aeb33552dcfec319b5e6fd438f
data/README.md CHANGED
@@ -1,4 +1,7 @@
1
- # IqRdf - RDF Renderering for Ruby and Rails [![build status](https://secure.travis-ci.org/innoq/iq_rdf.png)](http://travis-ci.org/innoq/iq_rdf)
1
+ # IqRdf - RDF Renderering for Ruby and Rails
2
+
3
+ ![CI](https://github.com/innoq/iq_rdf/workflows/CI/badge.svg)
4
+
2
5
  IqRdf is a RDF renderer for Ruby and Rails. You can use it in any Ruby
3
6
  environment to render Trurtle-, N-Triple- (not implemented yet) or XML-RDF.
4
7
 
@@ -12,10 +12,12 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- def IqRdf.rails_template(template)
15
+ def IqRdf.rails_template(template, source = nil)
16
+ source ||= template.source
17
+
16
18
  <<-EOV
17
19
  document = IqRdf::Document.new()
18
- #{template.source}
20
+ #{source}
19
21
  if params[:format].to_s == "ttl"
20
22
  controller.response.headers["Content-Type"] ||= 'text/turtle;charset=utf-8'
21
23
  document.to_turtle
@@ -34,7 +36,16 @@ end
34
36
 
35
37
  module ActionView
36
38
 
37
- if Rails.version >= "3"
39
+ if Rails.version >= "6"
40
+ class Template::Handlers::IqRdf
41
+ # see https://github.com/rails/rails/commit/28f88e0074f473f58c2d3fd54cb3daff81027c12
42
+ def self.call(template, source)
43
+ IqRdf.rails_template(template, source)
44
+ end
45
+ end
46
+ ActionView::Template.register_template_handler('iqrdf', ActionView::Template::Handlers::IqRdf)
47
+
48
+ elsif Rails.version >= "3"
38
49
 
39
50
  class Template::Handlers::IqRdf
40
51
  def self.call(template)
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
 
15
15
  module IqRdf
16
- VERSION = "0.1.16"
16
+ VERSION = "0.1.17"
17
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iq_rdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Till Schulte-Coerne
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-26 00:00:00.000000000 Z
11
+ date: 2022-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -104,7 +104,7 @@ files:
104
104
  homepage: http://github.com/innoq/iq_rdf
105
105
  licenses: []
106
106
  metadata: {}
107
- post_install_message:
107
+ post_install_message:
108
108
  rdoc_options: []
109
109
  require_paths:
110
110
  - lib
@@ -119,14 +119,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  - !ruby/object:Gem::Version
120
120
  version: '0'
121
121
  requirements: []
122
- rubyforge_project:
123
- rubygems_version: 2.6.11
124
- signing_key:
122
+ rubygems_version: 3.0.3.1
123
+ signing_key:
125
124
  specification_version: 4
126
125
  summary: IqRdf - A builder like rdf library for ruby and rails
127
126
  test_files:
127
+ - test/xml_test.rb
128
+ - test/turtle_test.rb
129
+ - test/test_helper.rb
128
130
  - test/iq_rdf_test.rb
129
131
  - test/ntriples_test.rb
130
- - test/test_helper.rb
131
- - test/turtle_test.rb
132
- - test/xml_test.rb