bloatpng 0.0.4 → 0.0.5
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.
- data/VERSION +1 -1
- data/bin/bloat +2 -2
- data/bloatpng.gemspec +1 -1
- data/lib/bloatpng.rb +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/bin/bloat
CHANGED
@@ -4,8 +4,8 @@ require 'bloatpng'
|
|
4
4
|
|
5
5
|
if ARGV[2].nil?
|
6
6
|
puts "Usage:\nbloat INPUT_FILE OUTPUT_FILE KILOBYTES_TO_ADD\n\n"
|
7
|
-
puts "Example:\nbloat happy.png 1024"
|
8
|
-
puts " (this would bloat happy.png by one megabyte)"
|
7
|
+
puts "Example:\nbloat happy.png sad.png 1024"
|
8
|
+
puts " (this would bloat happy.png by one megabyte and save it as sad.png)"
|
9
9
|
exit!(1)
|
10
10
|
end
|
11
11
|
|
data/bloatpng.gemspec
CHANGED
data/lib/bloatpng.rb
CHANGED
@@ -9,7 +9,7 @@ class BloatPNG
|
|
9
9
|
if(size < 20)
|
10
10
|
raise NeedsMoreBloatException
|
11
11
|
end
|
12
|
-
n = size - 32 - Math.log(size
|
12
|
+
n = size - 32 - (Math.log(size) / Math.log(2)).to_i
|
13
13
|
key = SecureRandom.hex(15)
|
14
14
|
text = SecureRandom.hex(n)[1..n]
|
15
15
|
self.insert_text_element(input, output, key, text)
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: bloatpng
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Nate Benes
|
@@ -129,7 +129,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
129
129
|
version: '0'
|
130
130
|
segments:
|
131
131
|
- 0
|
132
|
-
hash:
|
132
|
+
hash: 193256320518331296
|
133
133
|
none: false
|
134
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|