circule 0.1.0 → 0.1.1

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: 9449a7b91abcb3058201ee66d2c44925ab3cadd958421731a0269de135556e09
4
- data.tar.gz: f6bc4ede2a8ef059e4cea8e9a02a40203c157b59dd4ba2a4e3e573627b8c1b0b
3
+ metadata.gz: 68e4e4894325d1bf81df66128c33d88c322dd4e08d0faf0b6c18bdc2eed8ae2b
4
+ data.tar.gz: 650614530ad282450742196f3ca0d5a508ed7d596c45c0ec5c0f989ae507ec04
5
5
  SHA512:
6
- metadata.gz: 8ae5266a7208c0b6dfacc7e6dcacf0f35b04aa57a0c80ce445e5c529d8eb329c4547de66ab56830f511116b9ba27299ed09d5c0e2f861d73248fa1ccb1b7cf6d
7
- data.tar.gz: 4672cce80a11799eeccc8ef1d29a93fe4d4a144cf4aaeea21a520fe7bb7ff7627b94c5feef3edad7269adfbfa8e087af5bde82c1d5e356485283e155dd4452f6
6
+ metadata.gz: 2ddb1e5028f38a1fef77c042c1dadda261b031959b5ef9949c6f37399dc321cf77b988df5b2fba4dc4b883e5e9aa02538d294915747ff9bcb5bf8122be0df31f
7
+ data.tar.gz: 47ce9b8709463319b71d2d6797ba2032cecd71bdfd149ed511f5097263e8d36e3799ef92be9a3011a48161bf6e3e659c71e28bfb6be70231196f5cef71aaa3e8
data/.rubocop.yml CHANGED
@@ -1,13 +1,84 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.4
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
- Enabled: true
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
- Layout/LineLength:
13
- Max: 120
79
+ Style/TrailingCommaInArguments:
80
+ Enabled: false
81
+ EnforcedStyleForMultiline: consistent_comma
82
+
83
+ Style/TrailingCommaInHashLiteral:
84
+ EnforcedStyleForMultiline: consistent_comma
data/Gemfile CHANGED
@@ -10,3 +10,5 @@ gem 'rake', '~> 13.0'
10
10
  gem 'minitest', '~> 5.0'
11
11
 
12
12
  gem 'rubocop', '~> 1.7'
13
+ gem 'rubocop-minitest'
14
+ gem 'rubocop-rake'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- circule (0.1.0)
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.4.0'
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__)) do
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
- end
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 STDIN.read
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 STDOUT
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
- data = image.resize(width, height).save(tfile.path)
63
+
64
+ image.resize(width, height).save(tfile.path)
61
65
 
62
66
  @image_label.image = tfile.path
63
67
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Circule
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
data/lib/circule.rb CHANGED
@@ -7,6 +7,7 @@ require 'net/http'
7
7
  require 'chunky_png'
8
8
  require 'securerandom'
9
9
 
10
+ # Convert a hash to an icon.
10
11
  class Circule
11
12
  class Error < StandardError; end
12
13
 
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.0
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-10-30 00:00:00.000000000 Z
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.4.0
62
+ version: 2.7.0
63
63
  required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ">="