zbox 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@ require "quick_magick"
2
2
  module Zbox
3
3
  module QmExt
4
4
  def self.resize(filepath,opts={})
5
- allsize={:small=>[160,112],:middle=>[320,224],:default=>[640,480]}
5
+ allsize={:tinylogo=>[100,100],:small=>[160,112],:middle=>[320,224],:default=>[640,480]}
6
6
  if opts[:width] and opts[:height]
7
7
  mw = opts[:width]
8
8
  mh = opts[:height]
@@ -1,5 +1,7 @@
1
1
  class Hash
2
+ class <<self
2
3
  def to_struct(name)
3
4
  Struct.new(name,*keys).new(*values)
4
5
  end
6
+ end
5
7
  end
@@ -1,5 +1,7 @@
1
1
  class Numeric
2
+ class<<self
2
3
  def percentage_of(divnum)
3
4
  sprintf("%0.0f",self.to_f/divnum.to_f*100)+"%"
4
5
  end
6
+ end
5
7
  end
@@ -1,5 +1,7 @@
1
1
  class Struct
2
+ class<<self
2
3
  def to_hash
3
4
  Hash[*members.zip(values).flatten]
4
5
  end
6
+ end
5
7
  end
@@ -1,3 +1,3 @@
1
1
  module Zbox
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -7,6 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.version = Zbox::VERSION
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.add_dependency('quick_magick')
10
+ # gem.executables = ['foo'] #note,it's the file name relative to 'bin/',not the project root
10
11
  s.authors = ["zxy"]
11
12
  s.email = ["zxy@qq.com"]
12
13
  s.homepage = ""
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: zbox
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - zxy
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-21 00:00:00 Z
13
+ date: 2011-04-27 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: quick_magick