aaq 0.1.2 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9cab226391144dd5064b2fbc96b924636e269a9c2603d18d4fb60d414849acfe
4
- data.tar.gz: 1af17ec31992d271aac400c3ce47d1faf58960853ef59fd7c3cc97e37b6c5a2b
3
+ metadata.gz: 719d27872f8a7e13baa7775cc795ce893de4d655516d92f5ec101fbc73c34e6c
4
+ data.tar.gz: ade5d54ccd08bcc27ccc01a7ac509f538c78881c9be0d30b00ddea0a484fef13
5
5
  SHA512:
6
- metadata.gz: 7fc18b47144a71608afad1515da2c45845223ba4237a1ccbce60431742f253330abc9ffa0271c6b458b7c16b411c60245e62c671588cdd9cef2733a528f58259
7
- data.tar.gz: a104f1ee0769d0de1de81fd4e7d6d676f8191af18b4f6a246076fe6375421262a8a268cf8b85daca41f310fcfa2c18ac07b1fbbc0cd33e23cb2e00ab090b7636
6
+ metadata.gz: 76bf04cdb15ee9ff8ba2f546763ffe82264315064469292d7d54f116b3ea455598a5bd6dc8f212b6f264d5618caa2876f3630c92f9db9545c3fcd1b365632ab4
7
+ data.tar.gz: f8d1c5ebe31bd3920e77aec42140787266516921a74924ffda848e5954348df7ea9f0cbdbea02b772d7a84774128002ff43ea7c5804435844d37abfc088a84fd
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2018-07-18 22:17:05 +0900 using RuboCop version 0.58.1.
3
+ # on 2018-11-10 23:33:14 +0900 using RuboCop version 0.60.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -14,7 +14,7 @@ Metrics/AbcSize:
14
14
  # Configuration parameters: CountComments, ExcludedMethods.
15
15
  # ExcludedMethods: refine
16
16
  Metrics/BlockLength:
17
- Max: 60
17
+ Max: 61
18
18
 
19
19
  # Offense count: 1
20
20
  # Configuration parameters: CountComments.
@@ -22,13 +22,13 @@ Metrics/ClassLength:
22
22
  Max: 118
23
23
 
24
24
  # Offense count: 2
25
- # Configuration parameters: CountComments.
25
+ # Configuration parameters: CountComments, ExcludedMethods.
26
26
  Metrics/MethodLength:
27
27
  Max: 24
28
28
 
29
29
  # Offense count: 4
30
30
  # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
31
- # AllowedNames: io, id, to, by, on, in, at
31
+ # AllowedNames: io, id, to, by, on, in, at, ip, db
32
32
  Naming/UncommunicativeMethodParamName:
33
33
  Exclude:
34
34
  - 'lib/aaq.rb'
data/README.md CHANGED
@@ -11,25 +11,11 @@ Create ascii art quine from image file.
11
11
  ```sh
12
12
  # Download sample image
13
13
  curl -O https://github-media-downloads.s3.amazonaws.com/Octocats.zip && unzip Octocats.zip
14
- bundle exec aaq Octocat/Octocat.png --color
14
+ aaq Octocat/Octocat.png --color
15
15
  ```
16
16
 
17
17
  ## Installation
18
18
 
19
- Add this line to your application's Gemfile:
20
-
21
- ```ruby
22
- gem 'aaq'
23
- ```
24
-
25
- And then execute:
26
-
27
- ```sh
28
- $ bundle
29
- ```
30
-
31
- Or install it yourself as:
32
-
33
19
  ```sh
34
20
  $ gem install aaq
35
21
  ```
@@ -39,28 +25,28 @@ $ gem install aaq
39
25
  Simple quine.
40
26
 
41
27
  ```sh
42
- bundle exec aaq Octocat/Octocat.png
28
+ aaq Octocat/Octocat.png
43
29
  ```
44
30
 
45
31
  Colorful quine.
46
32
 
47
33
  ```sh
48
- bundle exec aaq Octocat/Octocat.png --color
34
+ aaq Octocat/Octocat.png --color
49
35
  ```
50
36
 
51
37
  Delete escape sequence.
52
38
 
53
39
  ```sh
54
- bundle exec aaq Octocat/Octocat.png --color | ruby -ne 'puts $_.gsub(/\e.*?m/, "")' | ruby
40
+ aaq Octocat/Octocat.png --color | ruby -ne 'puts $_.gsub(/\e.*?m/, "")' | ruby
55
41
  ```
56
42
 
57
43
  Put `--color` option.
58
44
 
59
45
  ```sh
60
- bundle exec aaq Octocat/Octocat.png | xargs -0 -J % ruby -e % '' --color
46
+ aaq Octocat/Octocat.png | xargs -0 -J % ruby -e % '' --color
61
47
  ```
62
48
 
63
- In source code.
49
+ In your source code.
64
50
 
65
51
  ```ruby
66
52
  require 'aaq'
data/lib/aaq.rb CHANGED
@@ -73,6 +73,7 @@ module AAQ
73
73
  width.times do |w|
74
74
  i = h * width + w
75
75
  next if i < 10
76
+
76
77
  c += co if i >= c.size
77
78
  str += b.map { |x| x[i] }.include?(1) ? c[k += 1] : ' '
78
79
  end
@@ -113,7 +114,7 @@ module AAQ
113
114
  end
114
115
 
115
116
  def to_256(pix)
116
- [pix.red / 257, pix.green / 257, pix.blue / 257]
117
+ [pix.red / 256, pix.green / 256, pix.blue / 256]
117
118
  end
118
119
 
119
120
  def to_256color(pix, memo)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AAQ
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aaq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - yskoht
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-18 00:00:00.000000000 Z
11
+ date: 2018-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler