CurlingIron 0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9a63d9c6982b490fe893ddab9b37f55173e1f76f
4
+ data.tar.gz: 6df6db4faf7ccc40882df0d9ce18ec26d93d77ba
5
+ SHA512:
6
+ metadata.gz: f167d2ca381df13e8328fe46af02efc34b5e9aa5aaa8c923de11edc95f2ee398d64c968b8c02800ebdf5de72da1d61d10062ba310ad53fb2a2c686155f2e3c51
7
+ data.tar.gz: 1d296cd53c0ee40eeab42aff80e6e0b3bd4a9d3a973f5eee5540435c9bdbd7f2e86a3bf4f9f395cf9b664ec8976ee3200bc28a732c1f44875b21c5f5970b059c
data/.gitignore ADDED
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'CurlingIron/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "CurlingIron"
8
+ spec.version = CurlingIron::VERSION
9
+ spec.authors = ["Trey Terrell"]
10
+ spec.email = ["trey.terrell@oregonstate.edu"]
11
+ spec.summary = %q{Curl angle brackets in RDFXML}
12
+ spec.homepage = ""
13
+ spec.license = "CC0-1.0"
14
+
15
+ spec.files = `git ls-files -z`.split("\x0")
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_development_dependency "linkeddata"
21
+ spec.add_development_dependency "bundler", "~> 1.6"
22
+ spec.add_development_dependency "rake"
23
+ end
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in CurlingIron.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,127 @@
1
+ Creative Commons CC0 1.0 Universal
2
+ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
3
+ LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
4
+ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION
5
+ ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE
6
+ USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND
7
+ DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT
8
+ OR THE INFORMATION OR WORKS PROVIDED HEREUNDER.
9
+
10
+ Statement of Purpose
11
+
12
+ The laws of most jurisdictions throughout the world automatically confer
13
+ exclusive Copyright and Related Rights (defined below) upon the creator
14
+ and subsequent owner(s) (each and all, an "owner") of an original work
15
+ of authorship and/or a database (each, a "Work").
16
+
17
+ Certain owners wish to permanently relinquish those rights to a Work for
18
+ the purpose of contributing to a commons of creative, cultural and
19
+ scientific works ("Commons") that the public can reliably and without
20
+ fear of later claims of infringement build upon, modify, incorporate in
21
+ other works, reuse and redistribute as freely as possible in any form
22
+ whatsoever and for any purposes, including without limitation commercial
23
+ purposes. These owners may contribute to the Commons to promote the
24
+ ideal of a free culture and the further production of creative, cultural
25
+ and scientific works, or to gain reputation or greater distribution for
26
+ their Work in part through the use and efforts of others.
27
+
28
+ For these and/or other purposes and motivations, and without any
29
+ expectation of additional consideration or compensation, the person
30
+ associating CC0 with a Work (the "Affirmer"), to the extent that he or
31
+ she is an owner of Copyright and Related Rights in the Work, voluntarily
32
+ elects to apply CC0 to the Work and publicly distribute the Work under
33
+ its terms, with knowledge of his or her Copyright and Related Rights in
34
+ the Work and the meaning and intended legal effect of CC0 on those
35
+ rights.
36
+
37
+ 1. Copyright and Related Rights. A Work made available under CC0 may be
38
+ protected by copyright and related or neighboring rights ("Copyright and
39
+ Related Rights"). Copyright and Related Rights include, but are not
40
+ limited to, the following:
41
+
42
+ i. the right to reproduce, adapt, distribute, perform, display,
43
+ communicate, and translate a Work;
44
+
45
+ ii. moral rights retained by the original author(s) and/or performer(s);
46
+
47
+ iii. publicity and privacy rights pertaining to a person's image or
48
+ likeness depicted in a Work;
49
+
50
+ iv. rights protecting against unfair competition in regards to a Work,
51
+ subject to the limitations in paragraph 4(a), below;
52
+
53
+ v. rights protecting the extraction, dissemination, use and reuse of
54
+ data in a Work;
55
+
56
+ vi. database rights (such as those arising under Directive 96/9/EC of
57
+ the European Parliament and of the Council of 11 March 1996 on the legal
58
+ protection of databases, and under any national implementation thereof,
59
+ including any amended or successor version of such directive); and
60
+
61
+ vii. other similar, equivalent or corresponding rights throughout the
62
+ world based on applicable law or treaty, and any national
63
+ implementations thereof.
64
+
65
+ 2. Waiver. To the greatest extent permitted by, but not in contravention
66
+ of, applicable law, Affirmer hereby overtly, fully, permanently,
67
+ irrevocably and unconditionally waives, abandons, and surrenders all of
68
+ Affirmer's Copyright and Related Rights and associated claims and causes
69
+ of action, whether now known or unknown (including existing as well as
70
+ future claims and causes of action), in the Work (i) in all territories
71
+ worldwide, (ii) for the maximum duration provided by applicable law or
72
+ treaty (including future time extensions), (iii) in any current or
73
+ future medium and for any number of copies, and (iv) for any purpose
74
+ whatsoever, including without limitation commercial, advertising or
75
+ promotional purposes (the "Waiver"). Affirmer makes the Waiver for the
76
+ benefit of each member of the public at large and to the detriment of
77
+ Affirmer's heirs and successors, fully intending that such Waiver shall
78
+ not be subject to revocation, rescission, cancellation, termination, or
79
+ any other legal or equitable action to disrupt the quiet enjoyment of
80
+ the Work by the public as contemplated by Affirmer's express Statement
81
+ of Purpose.
82
+
83
+ 3. Public License Fallback. Should any part of the Waiver for any reason
84
+ be judged legally invalid or ineffective under applicable law, then the
85
+ Waiver shall be preserved to the maximum extent permitted taking into
86
+ account Affirmer's express Statement of Purpose. In addition, to the
87
+ extent the Waiver is so judged Affirmer hereby grants to each affected
88
+ person a royalty-free, non transferable, non sublicensable, non
89
+ exclusive, irrevocable and unconditional license to exercise Affirmer's
90
+ Copyright and Related Rights in the Work (i) in all territories
91
+ worldwide, (ii) for the maximum duration provided by applicable law or
92
+ treaty (including future time extensions), (iii) in any current or
93
+ future medium and for any number of copies, and (iv) for any purpose
94
+ whatsoever, including without limitation commercial, advertising or
95
+ promotional purposes (the "License"). The License shall be deemed
96
+ effective as of the date CC0 was applied by Affirmer to the Work. Should
97
+ any part of the License for any reason be judged legally invalid or
98
+ ineffective under applicable law, such partial invalidity or
99
+ ineffectiveness shall not invalidate the remainder of the License, and
100
+ in such case Affirmer hereby affirms that he or she will not (i)
101
+ exercise any of his or her remaining Copyright and Related Rights in the
102
+ Work or (ii) assert any associated claims and causes of action with
103
+ respect to the Work, in either case contrary to Affirmer's express
104
+ Statement of Purpose.
105
+
106
+ 4. Limitations and Disclaimers.
107
+
108
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
109
+ surrendered, licensed or otherwise affected by this document.
110
+
111
+ b. Affirmer offers the Work as-is and makes no representations or
112
+ warranties of any kind concerning the Work, express, implied, statutory
113
+ or otherwise, including without limitation warranties of title,
114
+ merchantability, fitness for a particular purpose, non infringement, or
115
+ the absence of latent or other defects, accuracy, or the present or
116
+ absence of errors, whether or not discoverable, all to the greatest
117
+ extent permissible under applicable law.
118
+
119
+ c. Affirmer disclaims responsibility for clearing rights of other
120
+ persons that may apply to the Work or any use thereof, including without
121
+ limitation any person's Copyright and Related Rights in the Work.
122
+ Further, Affirmer disclaims responsibility for obtaining any necessary
123
+ consents, permissions or other rights required for any use of the Work.
124
+
125
+ d. Affirmer understands and acknowledges that Creative Commons is not a
126
+ party to this document and has no duty or obligation with respect to
127
+ this CC0 or use of the Work.
data/README.md ADDED
@@ -0,0 +1,34 @@
1
+ # Curling::Iron
2
+
3
+ Small library to convert RDFXML to JSON-LD
4
+
5
+ Just a joke from
6
+ [https://twitter.com/azaroth42/status/488807765360398336](https://twitter.com/azaroth42/status/488807765360398336)
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ gem 'curling-iron'
13
+
14
+ And then execute:
15
+
16
+ $ bundle
17
+
18
+ Or install it yourself as:
19
+
20
+ $ gem install curling-iron
21
+
22
+ ## Usage
23
+
24
+ ```ruby
25
+ CurlingIron.curl(File.read(test.xml)) # => JSON-LD
26
+ ```
27
+
28
+ ## Contributing
29
+
30
+ 1. Fork it ( https://github.com/[my-github-username]/curling-iron/fork )
31
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
32
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
33
+ 4. Push to the branch (`git push origin my-new-feature`)
34
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,9 @@
1
+ require "CurlingIron/version"
2
+ require 'linkeddata'
3
+
4
+ module CurlingIron
5
+ def curl(xml_content)
6
+ RDF::Reader.for(:rdfxml).new(xml_content).dump(:jsonld)
7
+ end
8
+ module_function :curl
9
+ end
@@ -0,0 +1,3 @@
1
+ module CurlingIron
2
+ VERSION = "0.0.1"
3
+ end
metadata ADDED
@@ -0,0 +1,95 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: CurlingIron
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Trey Terrell
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-07-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: linkeddata
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.6'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.6'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description:
56
+ email:
57
+ - trey.terrell@oregonstate.edu
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - CurlingIron.gemspec
64
+ - Gemfile
65
+ - LICENSE.txt
66
+ - README.md
67
+ - Rakefile
68
+ - lib/CurlingIron.rb
69
+ - lib/CurlingIron/version.rb
70
+ homepage: ''
71
+ licenses:
72
+ - CC0-1.0
73
+ metadata: {}
74
+ post_install_message:
75
+ rdoc_options: []
76
+ require_paths:
77
+ - lib
78
+ required_ruby_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ required_rubygems_version: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ requirements: []
89
+ rubyforge_project:
90
+ rubygems_version: 2.2.2
91
+ signing_key:
92
+ specification_version: 4
93
+ summary: Curl angle brackets in RDFXML
94
+ test_files: []
95
+ has_rdoc: