circule 0.1.0 → 0.1.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 +4 -4
- data/.rubocop.yml +77 -6
- data/Gemfile +2 -0
- data/Gemfile.lock +7 -1
- data/circule.gemspec +3 -3
- data/exe/circule +4 -2
- data/lib/circule/gui.rb +5 -1
- data/lib/circule/version.rb +1 -1
- data/lib/circule.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68e4e4894325d1bf81df66128c33d88c322dd4e08d0faf0b6c18bdc2eed8ae2b
|
4
|
+
data.tar.gz: 650614530ad282450742196f3ca0d5a508ed7d596c45c0ec5c0f989ae507ec04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ddb1e5028f38a1fef77c042c1dadda261b031959b5ef9949c6f37399dc321cf77b988df5b2fba4dc4b883e5e9aa02538d294915747ff9bcb5bf8122be0df31f
|
7
|
+
data.tar.gz: 47ce9b8709463319b71d2d6797ba2032cecd71bdfd149ed511f5097263e8d36e3799ef92be9a3011a48161bf6e3e659c71e28bfb6be70231196f5cef71aaa3e8
|
data/.rubocop.yml
CHANGED
@@ -1,13 +1,84 @@
|
|
1
1
|
AllCops:
|
2
|
-
|
2
|
+
NewCops: enable
|
3
|
+
TargetRubyVersion: 2.7
|
4
|
+
|
5
|
+
Layout/ExtraSpacing:
|
6
|
+
Enabled: false
|
7
|
+
|
8
|
+
Layout/FirstHashElementIndentation:
|
9
|
+
Enabled: false
|
10
|
+
|
11
|
+
Layout/HashAlignment:
|
12
|
+
Enabled: false
|
13
|
+
|
14
|
+
Layout/LineLength:
|
15
|
+
Max: 120
|
16
|
+
|
17
|
+
Layout/MultilineMethodCallBraceLayout:
|
18
|
+
Enabled: false
|
19
|
+
|
20
|
+
Layout/MultilineMethodCallIndentation:
|
21
|
+
Enabled: false
|
22
|
+
|
23
|
+
Layout/SpaceAroundOperators:
|
24
|
+
Enabled: false
|
25
|
+
|
26
|
+
Layout/SpaceBeforeFirstArg:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
Layout/SpaceInsideArrayLiteralBrackets:
|
30
|
+
Enabled: false
|
31
|
+
|
32
|
+
Lint/AmbiguousOperator:
|
33
|
+
Enabled: false
|
34
|
+
|
35
|
+
Lint/AmbiguousOperatorPrecedence:
|
36
|
+
Enabled: false
|
37
|
+
|
38
|
+
Lint/EmptyWhen:
|
39
|
+
Enabled: false
|
40
|
+
|
41
|
+
Metrics/AbcSize:
|
42
|
+
Enabled: false
|
43
|
+
|
44
|
+
Metrics/BlockLength:
|
45
|
+
Enabled: false
|
46
|
+
|
47
|
+
Metrics/MethodLength:
|
48
|
+
Enabled: false
|
49
|
+
|
50
|
+
Naming/MethodParameterName:
|
51
|
+
Enabled: false
|
52
|
+
|
53
|
+
Metrics/ParameterLists:
|
54
|
+
Enabled: false
|
55
|
+
|
56
|
+
Naming/MemoizedInstanceVariableName:
|
57
|
+
Enabled: false
|
58
|
+
EnforcedStyleForLeadingUnderscores: required
|
59
|
+
|
60
|
+
Style/BlockDelimiters:
|
61
|
+
EnforcedStyle: semantic
|
62
|
+
BracesRequiredMethods: [button, entry, frame, label, spinbox]
|
63
|
+
|
64
|
+
Style/ClassAndModuleChildren:
|
65
|
+
EnforcedStyle: compact
|
66
|
+
|
67
|
+
Style/RescueModifier:
|
68
|
+
Enabled: false
|
69
|
+
|
70
|
+
Style/Semicolon:
|
71
|
+
AllowAsExpressionSeparator: true
|
3
72
|
|
4
73
|
Style/StringLiterals:
|
5
|
-
|
6
|
-
EnforcedStyle: double_quotes
|
74
|
+
EnforcedStyle: single_quotes
|
7
75
|
|
8
76
|
Style/StringLiteralsInInterpolation:
|
9
|
-
Enabled: true
|
10
77
|
EnforcedStyle: double_quotes
|
11
78
|
|
12
|
-
|
13
|
-
|
79
|
+
Style/TrailingCommaInArguments:
|
80
|
+
Enabled: false
|
81
|
+
EnforcedStyleForMultiline: consistent_comma
|
82
|
+
|
83
|
+
Style/TrailingCommaInHashLiteral:
|
84
|
+
EnforcedStyleForMultiline: consistent_comma
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
circule (0.1.
|
4
|
+
circule (0.1.1)
|
5
5
|
chunky_png
|
6
6
|
|
7
7
|
GEM
|
@@ -28,6 +28,10 @@ GEM
|
|
28
28
|
unicode-display_width (>= 1.4.0, < 3.0)
|
29
29
|
rubocop-ast (1.12.0)
|
30
30
|
parser (>= 3.0.1.1)
|
31
|
+
rubocop-minitest (0.15.2)
|
32
|
+
rubocop (>= 0.90, < 2.0)
|
33
|
+
rubocop-rake (0.6.0)
|
34
|
+
rubocop (~> 1.0)
|
31
35
|
ruby-progressbar (1.11.0)
|
32
36
|
unicode-display_width (2.1.0)
|
33
37
|
|
@@ -39,6 +43,8 @@ DEPENDENCIES
|
|
39
43
|
minitest (~> 5.0)
|
40
44
|
rake (~> 13.0)
|
41
45
|
rubocop (~> 1.7)
|
46
|
+
rubocop-minitest
|
47
|
+
rubocop-rake
|
42
48
|
|
43
49
|
BUNDLED WITH
|
44
50
|
2.2.27
|
data/circule.gemspec
CHANGED
@@ -11,17 +11,17 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.summary = ''
|
12
12
|
spec.homepage = 'https://gitlab.com/fjc/circule'
|
13
13
|
spec.license = 'MIT'
|
14
|
-
spec.required_ruby_version = '>= 2.
|
14
|
+
spec.required_ruby_version = '>= 2.7.0'
|
15
15
|
|
16
16
|
spec.metadata['homepage_uri'] = spec.homepage
|
17
17
|
|
18
18
|
# Specify which files should be added to the gem when it is released.
|
19
19
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
20
|
-
spec.files = Dir.chdir(File.expand_path(__dir__))
|
20
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) {
|
21
21
|
`git ls-files -z`.split("\x0").reject do |f|
|
22
22
|
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
23
23
|
end
|
24
|
-
|
24
|
+
}
|
25
25
|
|
26
26
|
spec.bindir = 'exe'
|
27
27
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
data/exe/circule
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require 'circule'
|
4
5
|
require 'optparse'
|
@@ -83,6 +84,7 @@ if options[:gui]
|
|
83
84
|
|
84
85
|
if options[:interactive]
|
85
86
|
require 'pry'
|
87
|
+
require 'trace_eval' rescue nil
|
86
88
|
Thread.new do gui.pry ensure `reset` end
|
87
89
|
end
|
88
90
|
|
@@ -92,7 +94,7 @@ else
|
|
92
94
|
when nil
|
93
95
|
when '-'
|
94
96
|
require 'digest'
|
95
|
-
options[:hex] = Digest::SHA256.hexdigest
|
97
|
+
options[:hex] = Digest::SHA256.hexdigest $stdin.read
|
96
98
|
else
|
97
99
|
require 'digest'
|
98
100
|
options[:hex] = Digest::SHA256.hexdigest File.read(options[:file])
|
@@ -113,7 +115,7 @@ else
|
|
113
115
|
case options[:save]
|
114
116
|
when nil
|
115
117
|
when '-'
|
116
|
-
circule.image.write
|
118
|
+
circule.image.write $stdout
|
117
119
|
else
|
118
120
|
circule.image.save options[:save]
|
119
121
|
end
|
data/lib/circule/gui.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative '../circule'
|
2
4
|
|
3
5
|
require 'digest'
|
@@ -10,6 +12,7 @@ rescue LoadError
|
|
10
12
|
warn "Could not find gem 'glimmer-dsl-tk' in locally installed gems."
|
11
13
|
end
|
12
14
|
|
15
|
+
# Glimmer Tk GUI for Circule
|
13
16
|
class Circule::GUI
|
14
17
|
include Glimmer
|
15
18
|
|
@@ -57,7 +60,8 @@ class Circule::GUI
|
|
57
60
|
|
58
61
|
width = image.width * @scale.to_i
|
59
62
|
height = image.height * @scale.to_i
|
60
|
-
|
63
|
+
|
64
|
+
image.resize(width, height).save(tfile.path)
|
61
65
|
|
62
66
|
@image_label.image = tfile.path
|
63
67
|
end
|
data/lib/circule/version.rb
CHANGED
data/lib/circule.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: circule
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank J. Cameron
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chunky_png
|
@@ -59,7 +59,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
59
59
|
requirements:
|
60
60
|
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 2.
|
62
|
+
version: 2.7.0
|
63
63
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - ">="
|