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.
Files changed (5) hide show
  1. data/VERSION +1 -1
  2. data/bin/bloat +2 -2
  3. data/bloatpng.gemspec +1 -1
  4. data/lib/bloatpng.rb +1 -1
  5. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "bloatpng"
8
- s.version = "0.0.4"
8
+ s.version = "0.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nate Benes"]
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, 2).to_i
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.4
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: -2390091008730748149
132
+ hash: 193256320518331296
133
133
  none: false
134
134
  required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  requirements: