filentory-cli 0.2.0 → 0.3.0
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 +7 -0
- data/.travis.yml +3 -1
- data/Gemfile.lock +9 -2
- data/README.md +23 -3
- data/README.rdoc +32 -7
- data/bin/filentory-cli +33 -7
- data/features/filentory-cli.feature +16 -6
- data/features/step_definitions/filentory-cli_steps.rb +24 -2
- data/features/support/auth.yaml +2 -0
- data/features/support/config.ru +2 -0
- data/features/support/demoserver.rb +20 -0
- data/features/support/env.rb +4 -1
- data/filentory-cli.gemspec +4 -1
- data/lib/filentory.rb +1 -0
- data/lib/filentory/datastore.rb +1 -1
- data/lib/filentory/exifextractor.rb +3 -0
- data/lib/filentory/fileentry.rb +6 -0
- data/lib/filentory/sender.rb +31 -0
- data/lib/filentory/version.rb +1 -1
- data/lib/filentory/videoextractor.rb +3 -0
- data/results.html +1 -1
- data/test/tc_datastore.rb +2 -2
- data/test/tc_sender.rb +95 -0
- metadata +79 -48
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ab404e63461f97450b949b1b6d33c2955cf16e92
|
4
|
+
data.tar.gz: 5bdd548e805d3190b15d391288cb9620f0664da6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 91763eecc66a891faf87e4298ca10c266e34685a7cc32caeac82338028e465a4e4dcc6b60d5a5c82ee3fe58fd49ac62bc79025aa647fe3c4e407fba07fdbe1a3
|
7
|
+
data.tar.gz: 48f94db9a4a29e243e8291b8725b5d672bc1040edd5b4dccb736727fb0633a95ef8b9fecc6022ab2042c5477f044029dfd64c17eb3c6af8174e31f71ab383513
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
filentory-cli (0.
|
4
|
+
filentory-cli (0.3.0)
|
5
5
|
exifr (~> 1.1.3)
|
6
6
|
json_spec (~> 1.1.1)
|
7
7
|
methadone (~> 1.3.1)
|
@@ -27,6 +27,7 @@ GEM
|
|
27
27
|
multi_test (>= 0.0.2)
|
28
28
|
diff-lcs (1.2.5)
|
29
29
|
exifr (1.1.3)
|
30
|
+
fakeweb (1.3.0)
|
30
31
|
ffi (1.9.3)
|
31
32
|
gherkin (2.12.2)
|
32
33
|
multi_json (~> 1.3)
|
@@ -40,6 +41,9 @@ GEM
|
|
40
41
|
multi_test (0.0.3)
|
41
42
|
nokogiri (1.5.6)
|
42
43
|
oj (2.5.3)
|
44
|
+
rack (1.5.2)
|
45
|
+
rack-test (0.6.2)
|
46
|
+
rack (>= 1.0)
|
43
47
|
rake (10.1.1)
|
44
48
|
rdoc (4.1.0)
|
45
49
|
json (~> 1.4)
|
@@ -50,7 +54,7 @@ GEM
|
|
50
54
|
rspec-core (2.14.7)
|
51
55
|
rspec-expectations (2.14.4)
|
52
56
|
diff-lcs (>= 1.1.3, < 2.0)
|
53
|
-
rspec-mocks (2.14.
|
57
|
+
rspec-mocks (2.14.5)
|
54
58
|
streamio-ffmpeg (1.0.0)
|
55
59
|
xmp (0.2.0)
|
56
60
|
nokogiri (~> 1.5.0)
|
@@ -60,6 +64,9 @@ PLATFORMS
|
|
60
64
|
|
61
65
|
DEPENDENCIES
|
62
66
|
aruba
|
67
|
+
fakeweb (~> 1.3)
|
63
68
|
filentory-cli!
|
69
|
+
rack (~> 1.5.2)
|
70
|
+
rack-test (~> 0.6.2)
|
64
71
|
rake (~> 10.1.1)
|
65
72
|
rdoc
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# Filentory-cli [](https://travis-ci.org/jgraber/filentory-cli) [](https://codeclimate.com/github/jgraber/filentory-cli)
|
1
|
+
# Filentory-cli [](https://travis-ci.org/jgraber/filentory-cli) [](https://codeclimate.com/github/jgraber/filentory-cli) [](http://badge.fury.io/rb/filentory-cli)
|
2
2
|
|
3
|
-
A tool to create an
|
3
|
+
A tool to create an inventory of a storage medium.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -18,7 +18,23 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
$ filentory-cli --log-level fatal "demo" .
|
22
|
+
{
|
23
|
+
"^o":"Datastore",
|
24
|
+
"name":"demo",
|
25
|
+
"files":[
|
26
|
+
[
|
27
|
+
{
|
28
|
+
"^o":"FileEntry",
|
29
|
+
"path":".",
|
30
|
+
"name":"50quickideas.pdf",
|
31
|
+
"last_modified":"2014-01-01T18:06:12+01:00",
|
32
|
+
"size":49447,
|
33
|
+
"checksum":"348a5b72877dcb5e0354f8eef62e5ff4e546043881dd051b9f8c2dea6ab23bb7"
|
34
|
+
}
|
35
|
+
]
|
36
|
+
}
|
37
|
+
|
22
38
|
|
23
39
|
## Contributing
|
24
40
|
|
@@ -27,3 +43,7 @@ TODO: Write usage instructions here
|
|
27
43
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
44
|
4. Push to the branch (`git push origin my-new-feature`)
|
29
45
|
5. Create new Pull Request
|
46
|
+
|
47
|
+
## Testing
|
48
|
+
Start the minimal web service as a endpoint to send data with this command:
|
49
|
+
$rackup features/support/config.ru
|
data/README.rdoc
CHANGED
@@ -1,19 +1,44 @@
|
|
1
|
-
= filentory-cli -
|
1
|
+
= filentory-cli - A tool to create an inventory of a storage medium
|
2
2
|
|
3
|
-
Author::
|
4
|
-
Copyright:: Copyright (c) 2014
|
3
|
+
Author:: Johnny Graber (JG@JGraber.ch)
|
4
|
+
Copyright:: Copyright (c) 2014 Johnny Graber
|
5
5
|
|
6
|
-
|
7
|
-
DESCRIBE YOUR GEM HERE
|
6
|
+
A tool to create an inventory of a storage medium.
|
8
7
|
|
9
8
|
== Links
|
10
9
|
|
11
|
-
* {Source on Github}[
|
12
|
-
* RDoc[
|
10
|
+
* {Source on Github}[https://github.com/jgraber/filentory-cli]
|
11
|
+
* RDoc[http://rdoc.info/github/jgraber/filentory-cli/frames]
|
13
12
|
|
14
13
|
== Install
|
14
|
+
$ gem install filentory-cli
|
15
15
|
|
16
16
|
== Examples
|
17
|
+
$ filentory-cli --log-level fatal "demo" .
|
18
|
+
{
|
19
|
+
"^o":"Datastore",
|
20
|
+
"name":"demo",
|
21
|
+
"files":[
|
22
|
+
[
|
23
|
+
{
|
24
|
+
"^o":"FileEntry",
|
25
|
+
"path":".",
|
26
|
+
"name":"50quickideas.pdf",
|
27
|
+
"last_modified":"2014-01-01T18:06:12+01:00",
|
28
|
+
"size":49447,
|
29
|
+
"checksum":"348a5b72877dcb5e0354f8eef62e5ff4e546043881dd051b9f8c2dea6ab23bb7"
|
30
|
+
}
|
31
|
+
]
|
32
|
+
}
|
17
33
|
|
18
34
|
== Contributing
|
35
|
+
1. Fork it
|
36
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
37
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
38
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
39
|
+
5. Create new Pull Request
|
40
|
+
|
19
41
|
|
42
|
+
== Testing
|
43
|
+
Start the minimal web service as a endpoint to send data with this command:
|
44
|
+
$rackup features/support/config.ru
|
data/bin/filentory-cli
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
2
|
+
require 'yaml'
|
3
3
|
require 'optparse'
|
4
4
|
require 'methadone'
|
5
5
|
require 'filentory.rb'
|
6
|
+
#require 'filentory/sender.rb'
|
7
|
+
#require 'uri'
|
6
8
|
|
7
9
|
class App
|
8
10
|
include Methadone::Main
|
@@ -13,17 +15,40 @@ class App
|
|
13
15
|
info("name: #{name}")
|
14
16
|
info "path: #{absolute_path}"
|
15
17
|
info "server: #{server}"
|
16
|
-
info "
|
18
|
+
info "mediatype: #{options[:type]}"
|
17
19
|
|
18
20
|
data_store = Datastore.new (name)
|
19
|
-
data_store.
|
21
|
+
data_store.mediatype = options[:type]
|
20
22
|
collector = Collector.new
|
21
23
|
data_store.files << collector.collect(absolute_path)
|
24
|
+
|
25
|
+
begin
|
26
|
+
if server.nil?
|
27
|
+
puts data_store.to_json
|
28
|
+
else
|
29
|
+
|
30
|
+
begin
|
31
|
+
config_path = options[:auth] || File.join(ENV['HOME'], '.filentory.yaml')
|
32
|
+
auth_data = YAML.load_file(config_path)
|
33
|
+
auth_data.keys.each {|key| puts "will send #{key}"}
|
34
|
+
rescue
|
35
|
+
auth_data = nil
|
36
|
+
end
|
37
|
+
|
38
|
+
sender = Sender.new(server)
|
39
|
+
sender.additional_fields = auth_data
|
40
|
+
response = sender.post(data_store.to_json)
|
41
|
+
|
42
|
+
if(sender.failed?)
|
43
|
+
puts "ERROR: sending to '#{server}' failed: #{response.code} - #{response.message}"
|
44
|
+
else
|
45
|
+
puts "Sending '#{name}' to '#{server}' was successfull."
|
46
|
+
end
|
47
|
+
end
|
22
48
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
# the options Hash
|
49
|
+
rescue => exeption_detected
|
50
|
+
puts "Error: #{exeption_detected}"
|
51
|
+
end
|
27
52
|
end
|
28
53
|
|
29
54
|
# supplemental methods here
|
@@ -34,6 +59,7 @@ class App
|
|
34
59
|
|
35
60
|
# Options:
|
36
61
|
on("-t TYPE", "--type TYPE", "The type of the media to add to the filentory-cli")
|
62
|
+
on("-a FILE", "--auth FILE", "A path to a YAML file with authentication information")
|
37
63
|
|
38
64
|
# Arguments of Filentory-cli
|
39
65
|
arg :name # required argument
|
@@ -1,8 +1,5 @@
|
|
1
|
-
Feature:
|
2
|
-
|
3
|
-
I want to have aruba and cucumber setup
|
4
|
-
So I don't have to do it myself
|
5
|
-
|
1
|
+
Feature: Filentory-cli works
|
2
|
+
|
6
3
|
Scenario: App just runs
|
7
4
|
When I get help for "filentory-cli"
|
8
5
|
Then the exit status should be 0
|
@@ -12,6 +9,7 @@ Feature: My bootstrapped app kinda works
|
|
12
9
|
And the following options should be documented:
|
13
10
|
|--version|
|
14
11
|
|--type|
|
12
|
+
|--auth|
|
15
13
|
And the banner should document that this app's arguments are:
|
16
14
|
|name||
|
17
15
|
|path||
|
@@ -21,10 +19,22 @@ Feature: My bootstrapped app kinda works
|
|
21
19
|
When I run "filentory-cli" for the test data
|
22
20
|
Then I should get JSON as output
|
23
21
|
And the "name" should be "testrun"
|
24
|
-
And the "
|
22
|
+
And the "mediatype" should be "DVD"
|
25
23
|
And there should be 4 entries in "files"
|
26
24
|
And the first file should be placed in the root folder
|
27
25
|
And the second file should be in the "folder"
|
28
26
|
And the image file should have metadata
|
29
27
|
And the video file should have metadata
|
30
28
|
|
29
|
+
Scenario: Sending data to server
|
30
|
+
When I run "filentory-cli" with a server parameter
|
31
|
+
Then I should get a message that the data was send successfully
|
32
|
+
|
33
|
+
Scenario: YAML file present while sending data to server
|
34
|
+
When I run "filentory-cli" with a server parameter and a yaml file
|
35
|
+
Then I should get a message that the data was send successfully
|
36
|
+
And I should get a message that "mykey" was send with the JSON data
|
37
|
+
|
38
|
+
Scenario: Server does not exist
|
39
|
+
When I run "filentory-cli" with the wrong server parameter
|
40
|
+
Then I should get a message that the data could not be sent
|
@@ -6,7 +6,7 @@ end
|
|
6
6
|
Then(/^I should get JSON as output$/) do
|
7
7
|
@output.should have_json_path("name")
|
8
8
|
@output.should have_json_path("files")
|
9
|
-
@output.should have_json_path("
|
9
|
+
@output.should have_json_path("mediatype")
|
10
10
|
end
|
11
11
|
|
12
12
|
Then(/^the "(.*?)" should be "(.*?)"$/) do |key, value|
|
@@ -48,7 +48,29 @@ Then(/^the video file should have metadata$/) do
|
|
48
48
|
}
|
49
49
|
end
|
50
50
|
|
51
|
-
|
51
|
+
When(/^I run "(.*?)" with a server parameter$/) do |arg1|
|
52
|
+
@output_send_ok = `filentory-cli "testrun" test/integration/data http://localhost:9292/ok -t DVD --log-level fatal`
|
53
|
+
end
|
54
|
+
|
55
|
+
Then(/^I should get a message that the data was send successfully$/) do
|
56
|
+
@output_send_ok.should include "successfull"
|
57
|
+
end
|
58
|
+
|
59
|
+
When(/^I run "(.*?)" with the wrong server parameter$/) do |arg1|
|
60
|
+
@output_send_ok = `filentory-cli "testrun" test/integration/data http://localhost:5555 -t DVD --log-level fatal`
|
61
|
+
end
|
62
|
+
|
63
|
+
Then(/^I should get a message that the data could not be sent$/) do
|
64
|
+
@output_send_ok.should include "failed"
|
65
|
+
end
|
66
|
+
|
67
|
+
When(/^I run "(.*?)" with a server parameter and a yaml file$/) do |arg1|
|
68
|
+
@output_send_ok = `filentory-cli "testrun" test/integration/data http://localhost:9292/ok -t DVD --log-level fatal --auth features/support/auth.yaml`
|
69
|
+
end
|
70
|
+
|
71
|
+
Then(/^I should get a message that "(.*?)" was send with the JSON data$/) do |value|
|
72
|
+
@output_send_ok.should include value
|
73
|
+
end
|
52
74
|
|
53
75
|
def last_json
|
54
76
|
@output
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class DemoServer
|
2
|
+
def call(env)
|
3
|
+
req = Rack::Request.new(env)
|
4
|
+
Rack::Response.new.finish do |res|
|
5
|
+
res['Content-Type'] = 'text/plain'
|
6
|
+
|
7
|
+
if req.path.start_with? "/ok"
|
8
|
+
res.status = 200
|
9
|
+
keys = []
|
10
|
+
req.params.each_key {|key| keys << key }
|
11
|
+
str = keys.join(" ")
|
12
|
+
puts keys
|
13
|
+
res.write str
|
14
|
+
else
|
15
|
+
res.status = 404
|
16
|
+
res.write "ERROR"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/features/support/env.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require 'aruba/cucumber'
|
2
2
|
require 'methadone/cucumber'
|
3
3
|
require "json_spec/cucumber"
|
4
|
+
require 'fakeweb'
|
5
|
+
require 'rack/test'
|
4
6
|
|
5
7
|
ENV['PATH'] = "#{File.expand_path(File.dirname(__FILE__) + '/../../bin')}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
|
6
8
|
LIB_DIR = File.join(File.expand_path(File.dirname(__FILE__)),'..','..','lib')
|
@@ -10,8 +12,9 @@ Before do
|
|
10
12
|
@puts = true
|
11
13
|
@original_rubylib = ENV['RUBYLIB']
|
12
14
|
ENV['RUBYLIB'] = LIB_DIR + File::PATH_SEPARATOR + ENV['RUBYLIB'].to_s
|
15
|
+
|
13
16
|
end
|
14
17
|
|
15
18
|
After do
|
16
|
-
|
19
|
+
ENV['RUBYLIB'] = @original_rubylib
|
17
20
|
end
|
data/filentory-cli.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |gem|
|
|
8
8
|
gem.version = Filentory::VERSION
|
9
9
|
gem.authors = ["Johnny Graber"]
|
10
10
|
gem.email = ["jg@jgraber.ch"]
|
11
|
-
gem.description = "A tool to create an
|
11
|
+
gem.description = "A tool to create an inventory of a storage medium"
|
12
12
|
gem.summary = "Filentory-cli is a first step to get order in a chaotic collection of storage medias."
|
13
13
|
gem.homepage = "https://github.com/jgraber/filentory-cli"
|
14
14
|
|
@@ -19,6 +19,9 @@ Gem::Specification.new do |gem|
|
|
19
19
|
gem.add_development_dependency('rdoc')
|
20
20
|
gem.add_development_dependency('aruba')
|
21
21
|
gem.add_development_dependency('rake', '~> 10.1.1')
|
22
|
+
gem.add_development_dependency('fakeweb', '~> 1.3')
|
23
|
+
gem.add_development_dependency('rack', '~>1.5.2')
|
24
|
+
gem.add_development_dependency('rack-test', '~> 0.6.2')
|
22
25
|
gem.add_dependency('methadone', '~> 1.3.1')
|
23
26
|
gem.add_dependency('oj', '~> 2.5.3')
|
24
27
|
gem.add_dependency('json_spec', '~> 1.1.1')
|
data/lib/filentory.rb
CHANGED
data/lib/filentory/datastore.rb
CHANGED
@@ -3,6 +3,7 @@ require 'xmp'
|
|
3
3
|
|
4
4
|
class ExifExtractor
|
5
5
|
|
6
|
+
# Extracts the metadata of a file at a given path in the file system.
|
6
7
|
def metadata_for_file(file_path)
|
7
8
|
img = EXIFR::JPEG.new(file_path)
|
8
9
|
|
@@ -17,6 +18,8 @@ class ExifExtractor
|
|
17
18
|
Hash.new
|
18
19
|
end
|
19
20
|
|
21
|
+
# Check if ExifExtractor handles the file extension.
|
22
|
+
# Example: ExifExtractor.handles? ".jpg" => returns true
|
20
23
|
def self.handles?(file_extension)
|
21
24
|
[".jpg", ".jpeg", ".tiff"].include? file_extension
|
22
25
|
end
|
data/lib/filentory/fileentry.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# FileEntry is used as a simple container to store information
|
2
|
+
# about the file like metadata, size or checksum.
|
1
3
|
class FileEntry
|
2
4
|
attr_accessor :path, :name, :checksum, :size, :metadata
|
3
5
|
|
@@ -6,14 +8,18 @@ class FileEntry
|
|
6
8
|
@name = name
|
7
9
|
end
|
8
10
|
|
11
|
+
# Set the last_modified date. It uses the date.strftime method
|
12
|
+
# to convert it in a ISO 8601 format to be radable in JSON.
|
9
13
|
def last_modified=(date)
|
10
14
|
@last_modified = date.strftime("%FT%T%:z")
|
11
15
|
end
|
12
16
|
|
17
|
+
# Get the last_modified date
|
13
18
|
def last_modified
|
14
19
|
DateTime.iso8601(@last_modified)
|
15
20
|
end
|
16
21
|
|
22
|
+
# Overrides to_s to get a human readable output.
|
17
23
|
def to_s
|
18
24
|
@path + @name + " (" + @size.to_s + ") - " + @last_modified
|
19
25
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'uri'
|
2
|
+
require 'net/http'
|
3
|
+
|
4
|
+
class Sender
|
5
|
+
attr_accessor :url, :datafield_name, :additional_fields
|
6
|
+
|
7
|
+
def initialize(url)
|
8
|
+
@url = URI.parse(url)
|
9
|
+
@failed = nil
|
10
|
+
@datafield_name = "data"
|
11
|
+
end
|
12
|
+
|
13
|
+
def post(message)
|
14
|
+
begin
|
15
|
+
params = {@datafield_name => message}
|
16
|
+
if not @additional_fields.nil?
|
17
|
+
params.merge!(@additional_fields)
|
18
|
+
end
|
19
|
+
response = Net::HTTP.post_form(@url, params)
|
20
|
+
@failed = !response.code.to_s.start_with?("2")
|
21
|
+
rescue => error_message
|
22
|
+
response = Net::HTTPResponse.new "ERROR", "400", error_message
|
23
|
+
@failed = true
|
24
|
+
end
|
25
|
+
response
|
26
|
+
end
|
27
|
+
|
28
|
+
def failed?
|
29
|
+
@failed
|
30
|
+
end
|
31
|
+
end
|
data/lib/filentory/version.rb
CHANGED
@@ -2,6 +2,7 @@ require 'streamio-ffmpeg'
|
|
2
2
|
|
3
3
|
class VideoExtractor
|
4
4
|
|
5
|
+
# Extracts the metadata of a file at a given path in the file system.
|
5
6
|
def metadata_for_file(file_path)
|
6
7
|
movie = FFMPEG::Movie.new(file_path)
|
7
8
|
|
@@ -14,6 +15,8 @@ class VideoExtractor
|
|
14
15
|
result.delete_if { |k, v| v.nil? || v.to_s.empty?}
|
15
16
|
end
|
16
17
|
|
18
|
+
# Check if VideoExtractor handles the file extension.
|
19
|
+
# Example: VideoExtractor.handles? ".mov" => returns true
|
17
20
|
def self.handles?(file_extension)
|
18
21
|
[".avi", ".mpeg", ".mov", ".mp4", ".flv"].include? file_extension
|
19
22
|
end
|
data/results.html
CHANGED
@@ -469,4 +469,4 @@ e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["
|
|
469
469
|
$('#'+element_id).css('color', '#000000');
|
470
470
|
}
|
471
471
|
|
472
|
-
</script></head><body><!-- Step count 16--><div class="cucumber"><div id="cucumber-header"><div id="label"><h1>Cucumber Features</h1></div><div id="summary"><p id="totals"></p><p id="duration"></p><div id="expand-collapse"><p id="expander">Expand All</p><p id="collapser">Collapse All</p></div></div></div><div class="feature"><h2><span class="val">Feature: My bootstrapped app kinda works</span></h2><p class="narrative">In order to get going on coding my awesome app<br/>I want to have aruba and cucumber setup<br/>So I don't have to do it myself<br/></p><div class='scenario'><span class="scenario_file">features/filentory-cli.feature:6</span><h3 id="scenario_1"><span class="keyword">Scenario:</span> <span class="val">App just runs</span></h3><ol><li id='features_filentory-cli_feature_7' class='step passed'><div class="step_name"><span class="keyword">When </span><span class="step val">I get help for "<span class="param">filentory-cli</span>"</span></div><div class="step_file"><span>methadone-1.3.1/lib/methadone/cucumber.rb:58</span></div></li> <script type="text/javascript">moveProgressBar('6.2');</script><li id='features_filentory-cli_feature_8' class='step passed'><div class="step_name"><span class="keyword">Then </span><span class="step val">the exit status should be <span class="param">0</span></span></div><div class="step_file"><span>aruba-0.5.4/lib/aruba/cucumber.rb:188</span></div></li> <script type="text/javascript">moveProgressBar('12.5');</script><li id='features_filentory-cli_feature_9' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the banner should be present</span></div><div class="step_file"><span>methadone-1.3.1/lib/methadone/cucumber.rb:78</span></div></li> <script type="text/javascript">moveProgressBar('18.7');</script><li id='features_filentory-cli_feature_10' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">there should be a one line summary of what the app does</span></div><div class="step_file"><span>methadone-1.3.1/lib/methadone/cucumber.rb:109</span></div></li> <script type="text/javascript">moveProgressBar('25.0');</script><li id='features_filentory-cli_feature_11' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the banner should document that this app takes options</span></div><div class="step_file"><span>methadone-1.3.1/lib/methadone/cucumber.rb:82</span></div></li> <script type="text/javascript">moveProgressBar('31.2');</script><li id='features_filentory-cli_feature_12' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the following options should be documented:</span></div><div class="step_file"><span>methadone-1.3.1/lib/methadone/cucumber.rb:63</span></div><table><tr class='step' id='row_-1'><td class="step" id="row_-1_0"><div><span class="step param">--version</span></div></td></tr> <script type="text/javascript">moveProgressBar('43.7');</script><tr class='step' id='row_-1'><td class="step" id="row_-1_0"><div><span class="step param">--type</span></div></td></tr> <script type="text/javascript">moveProgressBar('50.0');</script></table></li> <script type="text/javascript">moveProgressBar('50.0');</script><li id='features_filentory-cli_feature_15' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the banner should document that this app's arguments are:</span></div><div class="step_file"><span>methadone-1.3.1/lib/methadone/cucumber.rb:87</span></div><table><tr class='step' id='row_-1'><td class="step" id="row_-1_0"><div><span class="step param">name</span></div></td><td class="step" id="row_-1_1"><div><span class="step param"></span></div></td></tr> <script type="text/javascript">moveProgressBar('62.5');</script><tr class='step' id='row_-1'><td class="step" id="row_-1_0"><div><span class="step param">path</span></div></td><td class="step" id="row_-1_1"><div><span class="step param"></span></div></td></tr> <script type="text/javascript">moveProgressBar('68.7');</script><tr class='step' id='row_-1'><td class="step" id="row_-1_0"><div><span class="step param">server</span></div></td><td class="step" id="row_-1_1"><div><span class="step param">optional</span></div></td></tr> <script type="text/javascript">moveProgressBar('75.0');</script></table></li> <script type="text/javascript">moveProgressBar('75.0');</script></ol></div><div class='scenario'><span class="scenario_file">features/filentory-cli.feature:20</span><h3 id="scenario_2"><span class="keyword">Scenario:</span> <span class="val">App prints JSON</span></h3><ol><li id='features_filentory-cli_feature_21' class='step passed'><div class="step_name"><span class="keyword">When </span><span class="step val">I run "<span class="param">filentory-cli</span>" for the test data</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:2</span></div></li> <script type="text/javascript">moveProgressBar('81.2');</script><li id='features_filentory-cli_feature_22' class='step passed'><div class="step_name"><span class="keyword">Then </span><span class="step val">I should get JSON as output</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:6</span></div></li> <script type="text/javascript">moveProgressBar('87.5');</script><li id='features_filentory-cli_feature_23' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the "<span class="param">name</span>" should be "<span class="param">testrun</span>"</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:12</span></div></li> <script type="text/javascript">moveProgressBar('93.7');</script><li id='features_filentory-cli_feature_24' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the "<span class="param">type</span>" should be "<span class="param">DVD</span>"</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:12</span></div></li> <script type="text/javascript">moveProgressBar('100.0');</script><li id='features_filentory-cli_feature_25' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">there should be <span class="param">4</span> entries in "<span class="param">files</span>"</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:16</span></div></li> <script type="text/javascript">moveProgressBar('106.2');</script><li id='features_filentory-cli_feature_26' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the first file should be placed in the root folder</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:20</span></div></li> <script type="text/javascript">moveProgressBar('112.5');</script><li id='features_filentory-cli_feature_27' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the second file should be in the "<span class="param">folder</span>"</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:27</span></div></li> <script type="text/javascript">moveProgressBar('118.7');</script><li id='features_filentory-cli_feature_28' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the image file should have metadata</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:34</span></div></li> <script type="text/javascript">moveProgressBar('125.0');</script><li id='features_filentory-cli_feature_29' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the video file should have metadata</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:43</span></div></li> <script type="text/javascript">moveProgressBar('131.2');</script></ol></div></div><script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>0m0.836s seconds</strong>";</script><script type="text/javascript">document.getElementById('totals').innerHTML = "2 scenarios (2 passed)<br />16 steps (16 passed)";</script></div></body></html>
|
472
|
+
</script></head><body><!-- Step count 23--><div class="cucumber"><div id="cucumber-header"><div id="label"><h1>Cucumber Features</h1></div><div id="summary"><p id="totals"></p><p id="duration"></p><div id="expand-collapse"><p id="expander">Expand All</p><p id="collapser">Collapse All</p></div></div></div><div class="feature"><h2><span class="val">Feature: Filentory-cli works</span></h2><p class="narrative"></p><div class='scenario'><span class="scenario_file">features/filentory-cli.feature:3</span><h3 id="scenario_1"><span class="keyword">Scenario:</span> <span class="val">App just runs</span></h3><ol><li id='features_filentory-cli_feature_4' class='step passed'><div class="step_name"><span class="keyword">When </span><span class="step val">I get help for "<span class="param">filentory-cli</span>"</span></div><div class="step_file"><span>methadone-1.3.1/lib/methadone/cucumber.rb:58</span></div></li> <script type="text/javascript">moveProgressBar('4.3');</script><li id='features_filentory-cli_feature_5' class='step passed'><div class="step_name"><span class="keyword">Then </span><span class="step val">the exit status should be <span class="param">0</span></span></div><div class="step_file"><span>aruba-0.5.3/lib/aruba/cucumber.rb:154</span></div></li> <script type="text/javascript">moveProgressBar('8.6');</script><li id='features_filentory-cli_feature_6' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the banner should be present</span></div><div class="step_file"><span>methadone-1.3.1/lib/methadone/cucumber.rb:78</span></div></li> <script type="text/javascript">moveProgressBar('13.0');</script><li id='features_filentory-cli_feature_7' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">there should be a one line summary of what the app does</span></div><div class="step_file"><span>methadone-1.3.1/lib/methadone/cucumber.rb:109</span></div></li> <script type="text/javascript">moveProgressBar('17.3');</script><li id='features_filentory-cli_feature_8' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the banner should document that this app takes options</span></div><div class="step_file"><span>methadone-1.3.1/lib/methadone/cucumber.rb:82</span></div></li> <script type="text/javascript">moveProgressBar('21.7');</script><li id='features_filentory-cli_feature_9' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the following options should be documented:</span></div><div class="step_file"><span>methadone-1.3.1/lib/methadone/cucumber.rb:63</span></div><table><tr class='step' id='row_-1'><td class="step" id="row_-1_0"><div><span class="step param">--version</span></div></td></tr> <script type="text/javascript">moveProgressBar('30.4');</script><tr class='step' id='row_-1'><td class="step" id="row_-1_0"><div><span class="step param">--type</span></div></td></tr> <script type="text/javascript">moveProgressBar('34.7');</script><tr class='step' id='row_-1'><td class="step" id="row_-1_0"><div><span class="step param">--auth</span></div></td></tr> <script type="text/javascript">moveProgressBar('39.1');</script></table></li> <script type="text/javascript">moveProgressBar('39.1');</script><li id='features_filentory-cli_feature_13' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the banner should document that this app's arguments are:</span></div><div class="step_file"><span>methadone-1.3.1/lib/methadone/cucumber.rb:87</span></div><table><tr class='step' id='row_-1'><td class="step" id="row_-1_0"><div><span class="step param">name</span></div></td><td class="step" id="row_-1_1"><div><span class="step param"></span></div></td></tr> <script type="text/javascript">moveProgressBar('47.8');</script><tr class='step' id='row_-1'><td class="step" id="row_-1_0"><div><span class="step param">path</span></div></td><td class="step" id="row_-1_1"><div><span class="step param"></span></div></td></tr> <script type="text/javascript">moveProgressBar('52.1');</script><tr class='step' id='row_-1'><td class="step" id="row_-1_0"><div><span class="step param">server</span></div></td><td class="step" id="row_-1_1"><div><span class="step param">optional</span></div></td></tr> <script type="text/javascript">moveProgressBar('56.5');</script></table></li> <script type="text/javascript">moveProgressBar('56.5');</script></ol></div><div class='scenario'><span class="scenario_file">features/filentory-cli.feature:18</span><h3 id="scenario_2"><span class="keyword">Scenario:</span> <span class="val">App prints JSON</span></h3><ol><li id='features_filentory-cli_feature_19' class='step passed'><div class="step_name"><span class="keyword">When </span><span class="step val">I run "<span class="param">filentory-cli</span>" for the test data</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:2</span></div></li> <script type="text/javascript">moveProgressBar('60.8');</script><li id='features_filentory-cli_feature_20' class='step passed'><div class="step_name"><span class="keyword">Then </span><span class="step val">I should get JSON as output</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:6</span></div></li> <script type="text/javascript">moveProgressBar('65.2');</script><li id='features_filentory-cli_feature_21' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the "<span class="param">name</span>" should be "<span class="param">testrun</span>"</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:12</span></div></li> <script type="text/javascript">moveProgressBar('69.5');</script><li id='features_filentory-cli_feature_22' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the "<span class="param">mediatype</span>" should be "<span class="param">DVD</span>"</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:12</span></div></li> <script type="text/javascript">moveProgressBar('73.9');</script><li id='features_filentory-cli_feature_23' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">there should be <span class="param">4</span> entries in "<span class="param">files</span>"</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:16</span></div></li> <script type="text/javascript">moveProgressBar('78.2');</script><li id='features_filentory-cli_feature_24' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the first file should be placed in the root folder</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:20</span></div></li> <script type="text/javascript">moveProgressBar('82.6');</script><li id='features_filentory-cli_feature_25' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the second file should be in the "<span class="param">folder</span>"</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:27</span></div></li> <script type="text/javascript">moveProgressBar('86.9');</script><li id='features_filentory-cli_feature_26' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the image file should have metadata</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:34</span></div></li> <script type="text/javascript">moveProgressBar('91.3');</script><li id='features_filentory-cli_feature_27' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the video file should have metadata</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:43</span></div></li> <script type="text/javascript">moveProgressBar('95.6');</script></ol></div><div class='scenario'><span class="scenario_file">features/filentory-cli.feature:29</span><h3 id="scenario_3"><span class="keyword">Scenario:</span> <span class="val">Sending data to server</span></h3><ol><li id='features_filentory-cli_feature_30' class='step passed'><div class="step_name"><span class="keyword">When </span><span class="step val">I run "<span class="param">filentory-cli</span>" with a server parameter</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:51</span></div></li> <script type="text/javascript">moveProgressBar('100.0');</script><li id='features_filentory-cli_feature_31' class='step passed'><div class="step_name"><span class="keyword">Then </span><span class="step val">I should get a message that the data was send successfully</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:55</span></div></li> <script type="text/javascript">moveProgressBar('104.3');</script></ol></div><div class='scenario'><span class="scenario_file">features/filentory-cli.feature:33</span><h3 id="scenario_4"><span class="keyword">Scenario:</span> <span class="val">YAML file present while sending data to server</span></h3><ol><li id='features_filentory-cli_feature_34' class='step passed'><div class="step_name"><span class="keyword">When </span><span class="step val">I run "<span class="param">filentory-cli</span>" with a server parameter and a yaml file</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:67</span></div></li> <script type="text/javascript">moveProgressBar('108.6');</script><li id='features_filentory-cli_feature_35' class='step passed'><div class="step_name"><span class="keyword">Then </span><span class="step val">I should get a message that the data was send successfully</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:55</span></div></li> <script type="text/javascript">moveProgressBar('113.0');</script><li id='features_filentory-cli_feature_36' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">I should get a message that "<span class="param">mykey</span>" was send with the JSON data</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:71</span></div></li> <script type="text/javascript">moveProgressBar('117.3');</script></ol></div><div class='scenario'><span class="scenario_file">features/filentory-cli.feature:38</span><h3 id="scenario_5"><span class="keyword">Scenario:</span> <span class="val">Server does not exist</span></h3><ol><li id='features_filentory-cli_feature_39' class='step passed'><div class="step_name"><span class="keyword">When </span><span class="step val">I run "<span class="param">filentory-cli</span>" with the wrong server parameter</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:59</span></div></li> <script type="text/javascript">moveProgressBar('121.7');</script><li id='features_filentory-cli_feature_40' class='step passed'><div class="step_name"><span class="keyword">Then </span><span class="step val">I should get a message that the data could not be sent</span></div><div class="step_file"><span>features/step_definitions/filentory-cli_steps.rb:63</span></div></li> <script type="text/javascript">moveProgressBar('126.0');</script></ol></div></div><script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>0m1.145s seconds</strong>";</script><script type="text/javascript">document.getElementById('totals').innerHTML = "5 scenarios (5 passed)<br />23 steps (23 passed)";</script></div></body></html>
|
data/test/tc_datastore.rb
CHANGED
@@ -10,9 +10,9 @@ class TestDatastore < Test::Unit::TestCase
|
|
10
10
|
|
11
11
|
def test_can_set_a_type
|
12
12
|
ds = Datastore.new("")
|
13
|
-
ds.
|
13
|
+
ds.mediatype= "DVD"
|
14
14
|
|
15
|
-
assert_equal("DVD", ds.
|
15
|
+
assert_equal("DVD", ds.mediatype)
|
16
16
|
end
|
17
17
|
|
18
18
|
def test_can_add_array_of_files
|
data/test/tc_sender.rb
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'uri'
|
3
|
+
require 'fakeweb'
|
4
|
+
require 'filentory/sender'
|
5
|
+
|
6
|
+
class TestSender < Test::Unit::TestCase
|
7
|
+
|
8
|
+
def setup
|
9
|
+
end
|
10
|
+
|
11
|
+
def teardown
|
12
|
+
FakeWeb.clean_registry
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_initialisation_with_a_url
|
16
|
+
sender = Sender.new("http://localhost")
|
17
|
+
|
18
|
+
assert_equal(URI.parse("http://localhost"), sender.url)
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_can_send_message
|
22
|
+
url = prepare("http://localhost/board", "send back")
|
23
|
+
|
24
|
+
sender = Sender.new(url)
|
25
|
+
sender.post("a small message.")
|
26
|
+
|
27
|
+
request = FakeWeb.last_request
|
28
|
+
assert_equal("POST", request.method)
|
29
|
+
assert_equal("data=a small message.".gsub(" ", "+"), request.body)
|
30
|
+
assert_equal(false, sender.failed?)
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_correct_error_when_page_is_missing
|
34
|
+
url = prepare_fail("http://localhost/not_there", 404, "Not Found", "Missing page")
|
35
|
+
|
36
|
+
sender = Sender.new(url)
|
37
|
+
answer = sender.post("a small message.")
|
38
|
+
|
39
|
+
assert_equal("404", answer.code)
|
40
|
+
assert_equal("Not Found", answer.message)
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_correct_error_when_unauthorized
|
44
|
+
url = prepare_fail("http://localhost/auth_required", 401, "Unauthorized", "Missing page")
|
45
|
+
|
46
|
+
sender = Sender.new(url)
|
47
|
+
answer = sender.post("a small message.")
|
48
|
+
|
49
|
+
assert_equal("401", answer.code)
|
50
|
+
assert_equal("Unauthorized", answer.message)
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_detects_error
|
54
|
+
url = prepare_fail("http://localhost/auth_required", 401, "Unauthorized", "Missing page")
|
55
|
+
|
56
|
+
sender = Sender.new(url)
|
57
|
+
answer = sender.post("a small message.")
|
58
|
+
|
59
|
+
assert_equal(true, sender.failed?)
|
60
|
+
end
|
61
|
+
|
62
|
+
def test_other_name_for_datafield
|
63
|
+
url = prepare("http://localhost/board", "send back")
|
64
|
+
|
65
|
+
sender = Sender.new(url)
|
66
|
+
sender.datafield_name = "my_own_fieldname"
|
67
|
+
sender.post("a small message.")
|
68
|
+
|
69
|
+
request = FakeWeb.last_request
|
70
|
+
assert_equal("my_own_fieldname=a small message.".gsub(" ", "+"), request.body)
|
71
|
+
end
|
72
|
+
|
73
|
+
def test_add_other_fields
|
74
|
+
url = prepare("http://localhost/board", "send back")
|
75
|
+
|
76
|
+
sender = Sender.new(url)
|
77
|
+
sender.additional_fields = {"a" => "JG"}
|
78
|
+
sender.post("a small message.")
|
79
|
+
|
80
|
+
request = FakeWeb.last_request
|
81
|
+
assert_equal("data=a small message.&a=JG".gsub(" ", "+"), request.body)
|
82
|
+
end
|
83
|
+
|
84
|
+
private
|
85
|
+
def prepare(url, response)
|
86
|
+
FakeWeb.register_uri(:post, url, :body => response)
|
87
|
+
url
|
88
|
+
end
|
89
|
+
|
90
|
+
def prepare_fail(url, status_code, response, body)
|
91
|
+
FakeWeb.register_uri(:post, url, :body => "Nothing to be found 'round here",
|
92
|
+
:status => [status_code.to_s, response])
|
93
|
+
url
|
94
|
+
end
|
95
|
+
end
|
metadata
CHANGED
@@ -1,161 +1,184 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: filentory-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.3.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Johnny Graber
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-
|
11
|
+
date: 2014-03-25 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rdoc
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: aruba
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - ">="
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rake
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- - ~>
|
45
|
+
- - "~>"
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: 10.1.1
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- - ~>
|
52
|
+
- - "~>"
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: 10.1.1
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: fakeweb
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.3'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.3'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rack
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.5.2
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.5.2
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rack-test
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.6.2
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.6.2
|
62
97
|
- !ruby/object:Gem::Dependency
|
63
98
|
name: methadone
|
64
99
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
100
|
requirements:
|
67
|
-
- - ~>
|
101
|
+
- - "~>"
|
68
102
|
- !ruby/object:Gem::Version
|
69
103
|
version: 1.3.1
|
70
104
|
type: :runtime
|
71
105
|
prerelease: false
|
72
106
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
107
|
requirements:
|
75
|
-
- - ~>
|
108
|
+
- - "~>"
|
76
109
|
- !ruby/object:Gem::Version
|
77
110
|
version: 1.3.1
|
78
111
|
- !ruby/object:Gem::Dependency
|
79
112
|
name: oj
|
80
113
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
114
|
requirements:
|
83
|
-
- - ~>
|
115
|
+
- - "~>"
|
84
116
|
- !ruby/object:Gem::Version
|
85
117
|
version: 2.5.3
|
86
118
|
type: :runtime
|
87
119
|
prerelease: false
|
88
120
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
121
|
requirements:
|
91
|
-
- - ~>
|
122
|
+
- - "~>"
|
92
123
|
- !ruby/object:Gem::Version
|
93
124
|
version: 2.5.3
|
94
125
|
- !ruby/object:Gem::Dependency
|
95
126
|
name: json_spec
|
96
127
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
128
|
requirements:
|
99
|
-
- - ~>
|
129
|
+
- - "~>"
|
100
130
|
- !ruby/object:Gem::Version
|
101
131
|
version: 1.1.1
|
102
132
|
type: :runtime
|
103
133
|
prerelease: false
|
104
134
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
135
|
requirements:
|
107
|
-
- - ~>
|
136
|
+
- - "~>"
|
108
137
|
- !ruby/object:Gem::Version
|
109
138
|
version: 1.1.1
|
110
139
|
- !ruby/object:Gem::Dependency
|
111
140
|
name: exifr
|
112
141
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
142
|
requirements:
|
115
|
-
- - ~>
|
143
|
+
- - "~>"
|
116
144
|
- !ruby/object:Gem::Version
|
117
145
|
version: 1.1.3
|
118
146
|
type: :runtime
|
119
147
|
prerelease: false
|
120
148
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
149
|
requirements:
|
123
|
-
- - ~>
|
150
|
+
- - "~>"
|
124
151
|
- !ruby/object:Gem::Version
|
125
152
|
version: 1.1.3
|
126
153
|
- !ruby/object:Gem::Dependency
|
127
154
|
name: xmp
|
128
155
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
156
|
requirements:
|
131
|
-
- - ~>
|
157
|
+
- - "~>"
|
132
158
|
- !ruby/object:Gem::Version
|
133
159
|
version: 0.2.0
|
134
160
|
type: :runtime
|
135
161
|
prerelease: false
|
136
162
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
163
|
requirements:
|
139
|
-
- - ~>
|
164
|
+
- - "~>"
|
140
165
|
- !ruby/object:Gem::Version
|
141
166
|
version: 0.2.0
|
142
167
|
- !ruby/object:Gem::Dependency
|
143
168
|
name: streamio-ffmpeg
|
144
169
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
170
|
requirements:
|
147
|
-
- - ~>
|
171
|
+
- - "~>"
|
148
172
|
- !ruby/object:Gem::Version
|
149
173
|
version: 1.0.0
|
150
174
|
type: :runtime
|
151
175
|
prerelease: false
|
152
176
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
177
|
requirements:
|
155
|
-
- - ~>
|
178
|
+
- - "~>"
|
156
179
|
- !ruby/object:Gem::Version
|
157
180
|
version: 1.0.0
|
158
|
-
description: A tool to create an
|
181
|
+
description: A tool to create an inventory of a storage medium
|
159
182
|
email:
|
160
183
|
- jg@jgraber.ch
|
161
184
|
executables:
|
@@ -163,8 +186,8 @@ executables:
|
|
163
186
|
extensions: []
|
164
187
|
extra_rdoc_files: []
|
165
188
|
files:
|
166
|
-
- .gitignore
|
167
|
-
- .travis.yml
|
189
|
+
- ".gitignore"
|
190
|
+
- ".travis.yml"
|
168
191
|
- Gemfile
|
169
192
|
- Gemfile.lock
|
170
193
|
- LICENSE
|
@@ -174,6 +197,9 @@ files:
|
|
174
197
|
- bin/filentory-cli
|
175
198
|
- features/filentory-cli.feature
|
176
199
|
- features/step_definitions/filentory-cli_steps.rb
|
200
|
+
- features/support/auth.yaml
|
201
|
+
- features/support/config.ru
|
202
|
+
- features/support/demoserver.rb
|
177
203
|
- features/support/env.rb
|
178
204
|
- filentory-cli.gemspec
|
179
205
|
- lib/filentory.rb
|
@@ -181,6 +207,7 @@ files:
|
|
181
207
|
- lib/filentory/datastore.rb
|
182
208
|
- lib/filentory/exifextractor.rb
|
183
209
|
- lib/filentory/fileentry.rb
|
210
|
+
- lib/filentory/sender.rb
|
184
211
|
- lib/filentory/version.rb
|
185
212
|
- lib/filentory/videoextractor.rb
|
186
213
|
- results.html
|
@@ -192,36 +219,39 @@ files:
|
|
192
219
|
- test/tc_datastore.rb
|
193
220
|
- test/tc_exifextractor.rb
|
194
221
|
- test/tc_fileentry.rb
|
222
|
+
- test/tc_sender.rb
|
195
223
|
- test/tc_something.rb
|
196
224
|
- test/tc_videoextractor.rb
|
197
225
|
homepage: https://github.com/jgraber/filentory-cli
|
198
226
|
licenses: []
|
227
|
+
metadata: {}
|
199
228
|
post_install_message:
|
200
229
|
rdoc_options: []
|
201
230
|
require_paths:
|
202
231
|
- lib
|
203
232
|
required_ruby_version: !ruby/object:Gem::Requirement
|
204
|
-
none: false
|
205
233
|
requirements:
|
206
|
-
- -
|
234
|
+
- - ">="
|
207
235
|
- !ruby/object:Gem::Version
|
208
236
|
version: '0'
|
209
237
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
210
|
-
none: false
|
211
238
|
requirements:
|
212
|
-
- -
|
239
|
+
- - ">="
|
213
240
|
- !ruby/object:Gem::Version
|
214
241
|
version: '0'
|
215
242
|
requirements: []
|
216
243
|
rubyforge_project:
|
217
|
-
rubygems_version:
|
244
|
+
rubygems_version: 2.2.2
|
218
245
|
signing_key:
|
219
|
-
specification_version:
|
246
|
+
specification_version: 4
|
220
247
|
summary: Filentory-cli is a first step to get order in a chaotic collection of storage
|
221
248
|
medias.
|
222
249
|
test_files:
|
223
250
|
- features/filentory-cli.feature
|
224
251
|
- features/step_definitions/filentory-cli_steps.rb
|
252
|
+
- features/support/auth.yaml
|
253
|
+
- features/support/config.ru
|
254
|
+
- features/support/demoserver.rb
|
225
255
|
- features/support/env.rb
|
226
256
|
- test/integration/data/fileA.txt
|
227
257
|
- test/integration/data/folder/fileB.txt
|
@@ -231,5 +261,6 @@ test_files:
|
|
231
261
|
- test/tc_datastore.rb
|
232
262
|
- test/tc_exifextractor.rb
|
233
263
|
- test/tc_fileentry.rb
|
264
|
+
- test/tc_sender.rb
|
234
265
|
- test/tc_something.rb
|
235
266
|
- test/tc_videoextractor.rb
|