platform_helpers 0.1.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,4 +1,10 @@
1
- === 1.0.0 / 2011-07-13
1
+ === 0.1.2 / 2011-10-01
2
+
3
+ * Added common interface for MD5, differences between ruby versions
4
+ * Simple interface for adding methods to a given object:
5
+ define_me('method_name') { some code goes here }
6
+
7
+ === 0.1.0 / 2011-07-13
2
8
 
3
9
  * 1 major enhancement
4
10
 
data/Manifest.txt CHANGED
@@ -15,4 +15,7 @@ lib/platform_helpers/nil.rb
15
15
  lib/platform_helpers/float.rb
16
16
  lib/platform_helpers/parse.rb
17
17
  lib/platform_helpers/browser.rb
18
+ lib/platform_helpers/gem.rb
19
+ lib/platform_helpers/md5.rb
20
+ lib/platform_helpers/simple_def.rb
18
21
  Rakefile
@@ -5,10 +5,12 @@
5
5
 
6
6
 
7
7
  class PlatformHelpers
8
- VERSION = '0.1.0'
8
+ VERSION = '0.1.2'
9
9
  end
10
10
 
11
11
  base = File.expand_path(File.dirname(__FILE__))
12
+ require base + '/platform_helpers/md5'
13
+ require base + '/platform_helpers/simple_def'
12
14
  require base + '/platform_helpers/array'
13
15
  require base + '/platform_helpers/bool'
14
16
  require base + '/platform_helpers/date_time'
@@ -19,3 +21,4 @@ require base + '/platform_helpers/parse'
19
21
  require base + '/platform_helpers/string'
20
22
  require base + '/platform_helpers/token'
21
23
  require base + '/platform_helpers/browser'
24
+ require base + '/platform_helpers/gem'
@@ -22,5 +22,10 @@ class Time
22
22
  def date
23
23
  Date.parse("#{self.month}/#{self.day}/#{self.year}")
24
24
  end
25
+
26
+ def self.to_md5
27
+ MD5.hexdigest("#{Time.now.tv_sec}")
28
+ end
29
+
25
30
  end
26
31
 
@@ -0,0 +1,11 @@
1
+ module Gem
2
+ def self.system_path
3
+ p = nil
4
+ Gem.path.each { |i|
5
+ next if i =~ /\/home/
6
+ p=i
7
+ break
8
+ }
9
+ p
10
+ end
11
+ end
@@ -0,0 +1,6 @@
1
+ if RUBY_VERSION =~ /1\.8/
2
+ require 'md5'
3
+ elsif RUBY_VERSION =~ /1\.9/
4
+ require 'digest/md5'
5
+ include Digest
6
+ end
@@ -0,0 +1,13 @@
1
+ class Object
2
+ def metaclass
3
+ class << self;self;end
4
+ end
5
+ def define_me(name, *args, &blk)
6
+ metaclass.module_eval {
7
+ define_method(name) { |*args|
8
+ self.instance_exec(*args, &blk)
9
+ }
10
+ }
11
+ end
12
+ end
13
+
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: platform_helpers
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.1.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - ""
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-22 00:00:00 Z
13
+ date: 2011-10-02 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: hoe
@@ -57,6 +57,9 @@ files:
57
57
  - lib/platform_helpers/float.rb
58
58
  - lib/platform_helpers/parse.rb
59
59
  - lib/platform_helpers/browser.rb
60
+ - lib/platform_helpers/gem.rb
61
+ - lib/platform_helpers/md5.rb
62
+ - lib/platform_helpers/simple_def.rb
60
63
  - .gemtest
61
64
  homepage: http://cyberconnect.biz/opensource
62
65
  licenses: []
@@ -82,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
85
  requirements: []
83
86
 
84
87
  rubyforge_project: platform_helpers
85
- rubygems_version: 1.8.8
88
+ rubygems_version: 1.8.10
86
89
  signing_key:
87
90
  specification_version: 3
88
91
  summary: Override's some Ruby classes to add methods making for uniform calls