filentory-cli 0.3.1 → 0.4.0

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
2
  SHA1:
3
- metadata.gz: 8a519b37e01ef22483cd67dd72d50ce4cfbf4066
4
- data.tar.gz: 892608bbddfa2213ecc4baa0d38d576fc61b3e39
3
+ metadata.gz: 53fe9ba1d8dec98d862e52f0c760eb0b70ff7c71
4
+ data.tar.gz: 611bd7719ad378bef60f4e367e7fcf98d89af444
5
5
  SHA512:
6
- metadata.gz: d36f1a732da8f3eb875265a2fbbb02c8398dd7ff2850b2f7b4f62eaa317c17ba2c4e64ba1639ba875e50fc1f257037631f0a09612d61c45b936fc4e02a99874f
7
- data.tar.gz: f49cb256d6961b2dfbf4c917883b39320f6e75a141b289c0f1d10e4466016f413cd26992cf1f44d38f824f9fd80efc4384bbe40e1dd414dc57c7e95f0432fcda
6
+ metadata.gz: 69edf28c0a232d88d7ad86e08dcd1b04fe15daeb31a966028cb5123fac122580b29047fa697dcd0a0f804314cc18c0847b80c606dbb12da59460306f85509d9c
7
+ data.tar.gz: 8a1bfce969c4c435a4c8878b7e5650c280d3c0d563ee9310648cdc41996e9d53724b185acc140a4f1d6c235e08222c465f1d8f6afd6696ff80a1ae41af082fa7
@@ -1,12 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- filentory-cli (0.3.1)
4
+ filentory-cli (0.4.0)
5
5
  exifr (~> 1.2.0)
6
6
  json_spec (~> 1.1.1)
7
7
  methadone (~> 1.7)
8
8
  oj (~> 2.11)
9
9
  streamio-ffmpeg (~> 1.0.0)
10
+ string-scrub
10
11
  xmp (~> 0.2.0)
11
12
 
12
13
  GEM
@@ -38,11 +39,11 @@ GEM
38
39
  rspec (>= 2.0, < 4.0)
39
40
  methadone (1.8.0)
40
41
  bundler
41
- minitest (5.4.2)
42
+ minitest (5.4.3)
42
43
  multi_json (1.10.1)
43
44
  multi_test (0.1.1)
44
45
  nokogiri (1.5.11)
45
- oj (2.11.0)
46
+ oj (2.11.1)
46
47
  rack (1.5.2)
47
48
  rack-test (0.6.2)
48
49
  rack (>= 1.0)
@@ -67,6 +68,7 @@ GEM
67
68
  simplecov-html (~> 0.8.0)
68
69
  simplecov-html (0.8.0)
69
70
  streamio-ffmpeg (1.0.0)
71
+ string-scrub (0.0.5)
70
72
  xmp (0.2.0)
71
73
  nokogiri (~> 1.5.0)
72
74
 
@@ -29,5 +29,6 @@ Gem::Specification.new do |gem|
29
29
  gem.add_dependency('exifr', '~> 1.2.0')
30
30
  gem.add_dependency('xmp', '~> 0.2.0')
31
31
  gem.add_dependency('streamio-ffmpeg', '~> 1.0.0')
32
+ gem.add_dependency('string-scrub')
32
33
  gem.add_development_dependency('simplecov', '~> 0.9.1')
33
34
  end
@@ -11,11 +11,19 @@ class Collector
11
11
  @pathname = Pathname.new(path)
12
12
 
13
13
  Find.find(path) do |file|
14
- if File.directory?(file)
15
- info "skipping #{file}"
16
- next
14
+ begin
15
+ if File.directory?(file)
16
+ info "skipping #{file}"
17
+ next
18
+ end
19
+ if File.pipe?(file)
20
+ info "skippking pipe #{file}"
21
+ next
22
+ end
23
+ result << extract_file_infos(file)
24
+ rescue => file_error
25
+ error ("error with file '#{path}': #{file}")
17
26
  end
18
- result << extract_file_infos(file)
19
27
  end
20
28
 
21
29
  result
@@ -1,5 +1,6 @@
1
1
  require 'exifr'
2
2
  require 'xmp'
3
+ require 'string-scrub'
3
4
 
4
5
  class ExifExtractor
5
6
 
@@ -15,6 +16,7 @@ class ExifExtractor
15
16
 
16
17
  xmpValues.delete_if { |k, v| v.nil? || v.to_s.empty?}
17
18
  rescue => error
19
+ puts "metadata_for_file #{file_path} failed: #{error}"
18
20
  Hash.new
19
21
  end
20
22
 
@@ -31,20 +33,28 @@ class ExifExtractor
31
33
  namespace = xmp.send(namespace_name)
32
34
  namespace.attributes.each do |attr|
33
35
  begin
34
- xmpValues["#{namespace_name}.#{attr}"] = namespace.send(attr)#.inspect
35
- rescue
36
+ returnval = namespace.send(attr)#.inspect
37
+ #puts "returnval: #{returnval}"
38
+ answer = returnval.scrub("*")
39
+ xmpValues["#{namespace_name}.#{attr}"] = answer.strip.to_s[0..250]
40
+ rescue => error
41
+ #puts error
36
42
  end
37
43
  end
38
- end
44
+ end
45
+ rescue => error
46
+ #puts error
39
47
  end
40
48
 
41
49
  def extract_exif_main_meta_data(img, xmpValues)
42
- xmpValues["exif.model"] = img.model
43
- xmpValues["exif.artist"] = img.artist
50
+ xmpValues["exif.model"] = img.model.scrub("*").strip unless img.model.nil?
51
+ xmpValues["exif.artist"] = img.artist.force_encoding('UTF-8').scrub("*").strip.to_s[0..250] unless img.artist.nil?
44
52
  xmpValues["exif.date_time"] = format_date(img.date_time)
45
53
  xmpValues["exif.date_time_original"] = format_date(img.date_time_original)
46
54
  xmpValues["exif.width"] = img.width
47
- xmpValues["exif.height"] = img.height
55
+ xmpValues["exif.height"] = img.height
56
+ rescue => error
57
+ #puts error
48
58
  end
49
59
 
50
60
 
@@ -58,5 +68,7 @@ class ExifExtractor
58
68
 
59
69
  def format_date(date)
60
70
  date.strftime("%FT%T+00:00") unless date.nil?
71
+ rescue
72
+ nil
61
73
  end
62
74
  end
@@ -16,7 +16,14 @@ class Sender
16
16
  if not @additional_fields.nil?
17
17
  params.merge!(@additional_fields)
18
18
  end
19
- response = Net::HTTP.post_form(@url, params)
19
+ http = Net::HTTP.new(@url.host, @url.port)
20
+ http.read_timeout = 6000
21
+
22
+ request = Net::HTTP::Post.new(@url.request_uri)
23
+ request.set_form_data(params)
24
+
25
+ response = http.request(request)
26
+
20
27
  @failed = !response.code.to_s.start_with?("2")
21
28
  rescue => error_message
22
29
  response = Net::HTTPResponse.new "ERROR", "400", error_message
@@ -1,3 +1,3 @@
1
1
  module Filentory
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -38,8 +38,8 @@ class VideoExtractor
38
38
  "video_codec",
39
39
  "video_stream",
40
40
  "width",
41
- "height",
42
- "valid?"]
41
+ "height"
42
+ ]
43
43
  end
44
44
 
45
45
  def add_creation_time(movie, result)
@@ -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 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 &quot;<span class="param">filentory-cli</span>&quot;</span></div><div class="step_file"><span>methadone-1.8.0/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.6.1/lib/aruba/cucumber.rb:197</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.8.0/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.8.0/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.8.0/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.8.0/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&#39;s arguments are:</span></div><div class="step_file"><span>methadone-1.8.0/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 &quot;<span class="param">filentory-cli</span>&quot; 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 &quot;<span class="param">name</span>&quot; should be &quot;<span class="param">testrun</span>&quot;</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 &quot;<span class="param">mediatype</span>&quot; should be &quot;<span class="param">DVD</span>&quot;</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 &quot;<span class="param">files</span>&quot;</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 &quot;<span class="param">folder</span>&quot;</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 &quot;<span class="param">filentory-cli</span>&quot; 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 &quot;<span class="param">filentory-cli</span>&quot; 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 &quot;<span class="param">mykey</span>&quot; 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 &quot;<span class="param">filentory-cli</span>&quot; 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>0m0.807s seconds</strong>";</script><script type="text/javascript">document.getElementById('totals').innerHTML = "5 scenarios (5 passed)<br />23 steps (23 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 &quot;<span class="param">filentory-cli</span>&quot;</span></div><div class="step_file"><span>methadone-1.8.0/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.6.1/lib/aruba/cucumber.rb:197</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.8.0/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.8.0/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.8.0/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.8.0/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&#39;s arguments are:</span></div><div class="step_file"><span>methadone-1.8.0/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 &quot;<span class="param">filentory-cli</span>&quot; 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 &quot;<span class="param">name</span>&quot; should be &quot;<span class="param">testrun</span>&quot;</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 &quot;<span class="param">mediatype</span>&quot; should be &quot;<span class="param">DVD</span>&quot;</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 &quot;<span class="param">files</span>&quot;</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 &quot;<span class="param">folder</span>&quot;</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 &quot;<span class="param">filentory-cli</span>&quot; 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 &quot;<span class="param">filentory-cli</span>&quot; 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 &quot;<span class="param">mykey</span>&quot; 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 &quot;<span class="param">filentory-cli</span>&quot; 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>0m0.855s seconds</strong>";</script><script type="text/javascript">document.getElementById('totals').innerHTML = "5 scenarios (5 passed)<br />23 steps (23 passed)";</script></div></body></html>
@@ -8,8 +8,8 @@ class TestVideoExtractor < Minitest::Test
8
8
  def test_can_extract_metadata
9
9
  extractor = VideoExtractor.new
10
10
  metadata = extractor.metadata_for_file(File.dirname(__FILE__)+"/integration/data/video.mov")
11
-
12
- assert_equal(2.18, metadata["duration"])
11
+
12
+ assert_in_delta(2.18, metadata["duration"], 0.05)
13
13
  assert_equal("568x320", metadata["resolution"])
14
14
  end
15
15
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filentory-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johnny Graber
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-07 00:00:00.000000000 Z
11
+ date: 2014-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc
@@ -192,6 +192,20 @@ dependencies:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
194
  version: 1.0.0
195
+ - !ruby/object:Gem::Dependency
196
+ name: string-scrub
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :runtime
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
195
209
  - !ruby/object:Gem::Dependency
196
210
  name: simplecov
197
211
  requirement: !ruby/object:Gem::Requirement