Skip to content

Commit

Permalink
Really really minor stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
czycha committed Dec 7, 2014
1 parent fce8287 commit 24f7cf2
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,5 +1,6 @@
*.gem
*.rbc
.DS_Store
.bundle
.config
.yardoc
Expand Down
11 changes: 6 additions & 5 deletions Gemfile.lock
@@ -1,20 +1,21 @@
PATH
remote: .
specs:
pxlsrt (1.0.1)
oily_png (= 1.1.1)
pxlsrt (1.6.2)
oily_png (~> 1.1.2)
thor (~> 0.18)

GEM
remote: https://rubygems.org/
specs:
chunky_png (1.3.1)
oily_png (1.1.1)
chunky_png (~> 1.3.0)
chunky_png (1.3.3)
oily_png (1.1.2)
chunky_png (~> 1.3.1)
rake (10.3.2)
thor (0.19.1)

PLATFORMS
ruby
x64-mingw32

DEPENDENCIES
Expand Down
Empty file modified bin/pxlsrt 100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion lib/pxlsrt/colors.rb
Expand Up @@ -12,7 +12,7 @@ def self.getRGBA(pxl)
##
# Check if file is a PNG image. ChunkyPNG only works with PNG images. Eventually, I might use conversion tools to add support, but not right now.
def self.isPNG?(path)
return File.read(path).bytes==[137, 80, 78, 71, 10]
return File.open(path, 'rb').read(9).include?('PNG')
end
##
# Converts an RGB-like array ([red, green, blue]) into an HSB-like array ([hue, saturation, brightness]).
Expand Down
2 changes: 1 addition & 1 deletion lib/pxlsrt/helpers.rb
Expand Up @@ -5,7 +5,7 @@ class Helpers
##
# Determines if a value has content.
def self.contented(c)
return (c.class!=NilClass and ((defined? c)!="nil") and ((/(\S)/.match("#{c}"))!=nil))
return c != nil
end
##
# Used to output a red string to the terminal.
Expand Down
2 changes: 1 addition & 1 deletion lib/pxlsrt/version.rb
@@ -1,5 +1,5 @@
##
# The main module, your best friend.
module Pxlsrt
VERSION = "1.6.1"
VERSION = "1.6.2"
end
2 changes: 1 addition & 1 deletion pxlsrt.gemspec
Expand Up @@ -20,6 +20,6 @@ Gem::Specification.new do |spec|

spec.add_development_dependency "bundler", "~> 1.6"
spec.add_development_dependency "rake", "~> 10.2"
spec.add_dependency "oily_png", "1.1.1"
spec.add_dependency "oily_png", "~> 1.1.2"
spec.add_dependency "thor", "~> 0.18"
end

0 comments on commit 24f7cf2

Please sign in to comment.