fpr 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: 02ec2a5f27bcf1355ac720882966be85a6ce7ece
4
+ data.tar.gz: 79fea44462d32b4a4be4458d85e9cb361c7a674d
5
+ SHA512:
6
+ metadata.gz: d3639f444ecd5e36fe07afa562b6f5a825e5a745226a022c4103e9176fa9da8c1d742993ddf958569b99353cfc0b8589e34a0e52d4526799fbf8c71aa8392505
7
+ data.tar.gz: d5c7d4e0dec4d6fd56de3860439c4ee33b2385c1f27a181490cc9767d817375cadb3d3c711e3a47a191526d2ccf8e7ee84ea3b0522450bef709e301024efa320
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in fpr.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,14 @@
1
+ Copyright © 2015 Adam Wead
2
+ Additional copyright may be held by others, as reflected in the commit history.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # FPR
2
+
3
+ Ruby gem for interfacing with Archivematica's FPR service.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'fpr'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install fpr
20
+
21
+ ## Usage
22
+
23
+ No useage yet, still in development.
24
+
25
+ ## Contributing
26
+
27
+ 1. Fork it ( https://github.com/[my-github-username]/fpr/fork )
28
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
29
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
30
+ 4. Push to the branch (`git push origin my-new-feature`)
31
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
data/fpr.gemspec ADDED
@@ -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 'fpr/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "fpr"
8
+ spec.version = Fpr::VERSION
9
+ spec.authors = ["Adam Wead"]
10
+ spec.email = ["amsterdamos@gmail.com"]
11
+ spec.summary = %q{Ruby gem for interfacing with Archivematica's FPR service.}
12
+ spec.description = %q{Ruby gem for interfacing with Archivematica's FPR service.}
13
+ spec.homepage = ""
14
+ spec.license = "APACHE2"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.7"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ end
data/lib/fpr.rb ADDED
@@ -0,0 +1,5 @@
1
+ require "fpr/version"
2
+
3
+ module Fpr
4
+ # Your code goes here...
5
+ end
@@ -0,0 +1,3 @@
1
+ module Fpr
2
+ VERSION = "0.0.1"
3
+ end
data/litmus.rb ADDED
@@ -0,0 +1,40 @@
1
+ require 'net/http'
2
+ require 'json'
3
+ require 'byebug'
4
+
5
+ def json_response uri
6
+ JSON.parse(Net::HTTP.get(URI(uri))).to_hash
7
+ end
8
+
9
+ def end_points
10
+ json_response "https://fpr.archivematica.org/fpr/api/v2/?format=json"
11
+ end
12
+
13
+ def info id
14
+ json_response "https://fpr.archivematica.org/fpr/api/v2/format-version/?pronom_id=#{id}&format=json"
15
+ end
16
+
17
+ def rules uuid, mode
18
+ json_response "https://fpr.archivematica.org/fpr/api/v2/fp-rule/?purpose=#{mode}&format=json&fmt=#{uuid}"
19
+ end
20
+
21
+ def command uuid
22
+ json_response "https://fpr.archivematica.org/fpr/api/v2/fp-command/?format=json&uuid=#{uuid}"
23
+ end
24
+
25
+ def tool uuid
26
+ json_response "https://fpr.archivematica.org/fpr/api/v2/fp-tool/?format=json&uuid=#{uuid}"
27
+ end
28
+
29
+ puts "\nEndpoints:"
30
+ puts end_points
31
+ puts "\nInfo:"
32
+ puts info("fmt/4")
33
+ puts "\nRules:"
34
+ puts rules("6370b72f-4caa-4d90-abc6-4816c8a0a603", "access")
35
+ puts "\nCommand:"
36
+ puts command "6957fdac-a1ed-470f-89f7-fb00be42ea13"
37
+ puts "\nTool:"
38
+ puts tool "8d81cd4f-20ee-4a82-9eca-455699509cd5"
39
+
40
+
metadata ADDED
@@ -0,0 +1,81 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fpr
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Adam Wead
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-03-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description: Ruby gem for interfacing with Archivematica's FPR service.
42
+ email:
43
+ - amsterdamos@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - Gemfile
50
+ - LICENSE.txt
51
+ - README.md
52
+ - Rakefile
53
+ - fpr.gemspec
54
+ - lib/fpr.rb
55
+ - lib/fpr/version.rb
56
+ - litmus.rb
57
+ homepage: ''
58
+ licenses:
59
+ - APACHE2
60
+ metadata: {}
61
+ post_install_message:
62
+ rdoc_options: []
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ requirements: []
76
+ rubyforge_project:
77
+ rubygems_version: 2.4.5
78
+ signing_key:
79
+ specification_version: 4
80
+ summary: Ruby gem for interfacing with Archivematica's FPR service.
81
+ test_files: []