eikon 0.1.10 → 0.1.12

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
  SHA256:
3
- metadata.gz: 3953b63ceee83d454dbd4713f71df4d9a0951a93a4237a17fcba4c6d3acd87fb
4
- data.tar.gz: 6dc06db31ae3ca79620a027e51444b5a41dfff619415fec10ba6d9eb51504c9e
3
+ metadata.gz: 56712fc8e778fbe090190c5902907d231e8aa6b56e2c9a96cf99bed44e7b6dac
4
+ data.tar.gz: b42b2a4690f6658809b987427862428466519c76cb95d1a0d90186fc55cd3f70
5
5
  SHA512:
6
- metadata.gz: e58a8eeecd90dd10dfd8f1f466dc3e15065bca99e94fdba5f8d85fde6495d0efaa3cabe10b6a237c2095df73a5f9a446639dd59fa244660df9987ca9ecca6305
7
- data.tar.gz: 854cc94f57d7249256db6ae866a46ffffdb97da483429353667ad71a0c5410586c1d22ab7180dfbf52074e037f42f9c3c0cc11e25fef25955e3343c7950cc0fa
6
+ metadata.gz: a392723a2e2b670a0003e47d94bb0ee3e480a3a0e5cb1741760209b16528ab98b9db781523001c9991e8bd3b14fa2df1787426a15dc7a334610bbb5de6faa409
7
+ data.tar.gz: e1be51a0933c7b255a4843294aac21b8c5e5238157ceaeded8e59dbe62c01347cc837281ba4910d22438c566856d262ea38f20f1cbb226ffc68d158883c63c53
data/Gemfile CHANGED
@@ -16,7 +16,7 @@ gem "sorbet-static-and-runtime"
16
16
 
17
17
  group :development do
18
18
  gem "tapioca", require: false
19
+ gem "pry-byebug"
19
20
  end
20
21
 
21
22
  gem "terrapin"
22
-
data/Gemfile.lock CHANGED
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eikon (0.1.10)
4
+ eikon (0.1.12)
5
+ mutex_m
5
6
  ruby-vips (~> 2.1)
6
7
  sorbet-runtime (>= 0.5.9204)
7
8
  terrapin (~> 0.6.0)
@@ -29,12 +30,14 @@ GEM
29
30
  tzinfo (~> 2.0)
30
31
  ast (2.4.2)
31
32
  builder (3.2.4)
33
+ byebug (11.1.3)
32
34
  climate_control (0.2.0)
35
+ coderay (1.1.3)
33
36
  concurrent-ruby (1.1.10)
34
37
  crass (1.0.6)
35
38
  diff-lcs (1.5.0)
36
39
  erubi (1.11.0)
37
- ffi (1.15.5)
40
+ ffi (1.16.3)
38
41
  i18n (1.12.0)
39
42
  concurrent-ruby (~> 1.0)
40
43
  json (2.6.2)
@@ -44,6 +47,7 @@ GEM
44
47
  method_source (1.0.0)
45
48
  mini_portile2 (2.8.0)
46
49
  minitest (5.16.3)
50
+ mutex_m (0.2.0)
47
51
  netrc (0.11.0)
48
52
  nokogiri (1.13.9)
49
53
  mini_portile2 (~> 2.8.0)
@@ -51,6 +55,12 @@ GEM
51
55
  parallel (1.22.1)
52
56
  parser (3.1.2.1)
53
57
  ast (~> 2.4.1)
58
+ pry (0.14.2)
59
+ coderay (~> 1.1)
60
+ method_source (~> 1.0)
61
+ pry-byebug (3.10.1)
62
+ byebug (~> 11.0)
63
+ pry (>= 0.13, < 0.15)
54
64
  racc (1.6.0)
55
65
  rack (2.2.4)
56
66
  rack-test (2.0.2)
@@ -107,26 +117,16 @@ GEM
107
117
  rubocop-packaging (~> 0.5)
108
118
  rubocop-performance (~> 1.11)
109
119
  rubocop-rails (~> 2.0)
110
- ruby-prof (1.6.3)
111
120
  ruby-progressbar (1.11.0)
112
- ruby-vips (2.1.4)
121
+ ruby-vips (2.2.0)
113
122
  ffi (~> 1.12)
114
- sorbet (0.5.10549)
115
- sorbet-static (= 0.5.10549)
116
- sorbet-runtime (0.5.10549)
117
- sorbet-static (0.5.10549-universal-darwin-14)
118
- sorbet-static (0.5.10549-universal-darwin-15)
119
- sorbet-static (0.5.10549-universal-darwin-16)
120
- sorbet-static (0.5.10549-universal-darwin-17)
121
- sorbet-static (0.5.10549-universal-darwin-18)
122
- sorbet-static (0.5.10549-universal-darwin-19)
123
- sorbet-static (0.5.10549-universal-darwin-20)
124
- sorbet-static (0.5.10549-universal-darwin-21)
125
- sorbet-static (0.5.10549-universal-darwin-22)
126
- sorbet-static (0.5.10549-x86_64-linux)
127
- sorbet-static-and-runtime (0.5.10549)
128
- sorbet (= 0.5.10549)
129
- sorbet-runtime (= 0.5.10549)
123
+ sorbet (0.5.11604)
124
+ sorbet-static (= 0.5.11604)
125
+ sorbet-runtime (0.5.11604)
126
+ sorbet-static (0.5.11604-universal-darwin)
127
+ sorbet-static-and-runtime (0.5.11604)
128
+ sorbet (= 0.5.11604)
129
+ sorbet-runtime (= 0.5.11604)
130
130
  spoom (1.1.12)
131
131
  sorbet (>= 0.5.9204)
132
132
  sorbet-runtime (>= 0.5.9204)
@@ -158,20 +158,20 @@ GEM
158
158
  zeitwerk (2.6.6)
159
159
 
160
160
  PLATFORMS
161
- ruby
161
+ arm64-darwin-23
162
162
 
163
163
  DEPENDENCIES
164
164
  eikon!
165
165
  minitest (~> 5.0)
166
+ pry-byebug
166
167
  rake (~> 12.0)
167
168
  rubocop (~> 1.27)
168
169
  rubocop-rails
169
170
  rubocop-rails_config
170
- ruby-prof (~> 1.6)
171
171
  ruby-vips
172
172
  sorbet-static-and-runtime
173
173
  tapioca
174
174
  terrapin
175
175
 
176
176
  BUNDLED WITH
177
- 2.3.11
177
+ 2.5.22
data/eikon.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.description = "A small pure-Ruby (for now) implementation of DHash"
11
11
  spec.homepage = "https://www.github.com/cguess/eikon"
12
12
  spec.license = "MIT"
13
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
13
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")
14
14
 
15
15
  # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
16
16
 
@@ -31,4 +31,5 @@ Gem::Specification.new do |spec|
31
31
  spec.add_runtime_dependency "ruby-vips", "~> 2.1"
32
32
  spec.add_runtime_dependency "terrapin", "~> 0.6.0"
33
33
  spec.add_runtime_dependency "sorbet-runtime", ">= 0.5.9204"
34
+ spec.add_runtime_dependency "mutex_m"
34
35
  end
data/lib/eikon/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # typed: true
2
2
 
3
3
  module Eikon
4
- VERSION = "0.1.10".freeze
4
+ VERSION = "0.1.12".freeze
5
5
  end
@@ -41,10 +41,11 @@ module Eikon
41
41
  total_time += time_parts[2].to_f # Seconds
42
42
 
43
43
  # Figure out the number of frames per minute given the number of frames we want, default to every ten seconds out of sixty
44
- if number_of_frames.positive?
45
- number_of_frames = number_of_frames - 2
46
- number_of_frames = 0 if number_of_frames.negative?
44
+ if number_of_frames > 2
45
+ # number_of_frames = number_of_frames - 2
46
+ # number_of_frames = 0 if number_of_frames.negative?
47
47
 
48
+ # NOTE: This has to be a fraction, not a whole number, but also, never 0
48
49
  fps = (number_of_frames - 2) / total_time # We subtract two because we're taking the start and end
49
50
  line = Terrapin::CommandLine.new("ffmpeg", "-i :file_name -vf fps=#{fps} :folder_name")
50
51
  line.run(file_name: @file_name, folder_name: "#{output_folder_path}/#{file_name}_%05d.png")
@@ -122,6 +123,14 @@ module Eikon
122
123
  entry.downcase.end_with?(".jpeg")
123
124
  end
124
125
 
126
+ # Somehow there's an emnpty list of files,
127
+ # This is going to exclusively be a bug in a different part of the code
128
+ # that is using this library, so we'll just make sure we don't break
129
+ if file_names.empty?
130
+ puts "No files found in the directory. This is likely a bug in the code that called this library."
131
+ return
132
+ end
133
+
125
134
  # Get the average size of the files
126
135
  total_size = file_names.reduce(0) do |sum, file_name|
127
136
  sum + File.size("#{folder_path}/#{file_name}")
data/lib/eikon.rb CHANGED
@@ -8,6 +8,7 @@ require "vips"
8
8
  require "sorbet-runtime"
9
9
 
10
10
  module Eikon
11
+ # T::Configuration.default_checked_level = :never
11
12
  extend T::Sig
12
13
 
13
14
  class Error < StandardError; end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eikon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Guess
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-27 00:00:00.000000000 Z
11
+ date: 2024-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-vips
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.5.9204
55
+ - !ruby/object:Gem::Dependency
56
+ name: mutex_m
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description: A small pure-Ruby (for now) implementation of DHash
56
70
  email:
57
71
  - cguess@gmail.com
@@ -127,14 +141,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
127
141
  requirements:
128
142
  - - ">="
129
143
  - !ruby/object:Gem::Version
130
- version: 2.3.0
144
+ version: 3.0.0
131
145
  required_rubygems_version: !ruby/object:Gem::Requirement
132
146
  requirements:
133
147
  - - ">="
134
148
  - !ruby/object:Gem::Version
135
149
  version: '0'
136
150
  requirements: []
137
- rubygems_version: 3.4.9
151
+ rubygems_version: 3.5.22
138
152
  signing_key:
139
153
  specification_version: 4
140
154
  summary: A small pure-Ruby (for now) implementation of DHash