methodize 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +4 -0
  2. data/lib/methodize.rb +4 -4
  3. metadata +76 -35
  4. checksums.yaml +0 -7
data/README.md CHANGED
@@ -105,3 +105,7 @@ Check the tests for more examples.
105
105
 
106
106
  *Created by Luis Cipriani*<br/>
107
107
  *http://blog.talleye.com*
108
+
109
+
110
+ [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lfcipriani/methodize/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
111
+
@@ -17,10 +17,10 @@ end
17
17
 
18
18
  module MethodizedHash
19
19
  def self.extended(base)
20
- # ruby >1.9 returns an array of symbols for object.public_methods
20
+ # ruby >1.9 returns an array of symbols for object.public_methods
21
21
  # while <1.9 returns an array of string. This methods guess it right
22
- @@key_coerce = RUBY_VERSION.start_with?("1.9", "2.0") ? lambda { |k| k.to_sym } : lambda { |k| k.to_s }
23
-
22
+ @@key_coerce = RUBY_VERSION.match(/^(1\.9[.\d]*|2[.\d]+)$/) ? lambda { |k| k.to_sym } : lambda { |k| k.to_s }
23
+
24
24
  # if some of the Hash keys and public methods names conflict
25
25
  # we free the existant method to enable the user to call it
26
26
  __metaclass__ = base.__metaclass__
@@ -28,7 +28,7 @@ module MethodizedHash
28
28
  base.__free_method__(k.to_sym, __metaclass__) if base.public_methods.include?(@@key_coerce.call(k))
29
29
  end
30
30
  end
31
-
31
+
32
32
  def [](key)
33
33
  ::Methodize.__normalize__(super(key))
34
34
  end
metadata CHANGED
@@ -1,62 +1,103 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: methodize
3
- version: !ruby/object:Gem::Version
4
- version: 0.3.0
3
+ version: !ruby/object:Gem::Version
4
+ hash: 17
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 3
9
+ - 1
10
+ version: 0.3.1
5
11
  platform: ruby
6
- authors:
12
+ authors:
7
13
  - Luis Cipriani
8
14
  - Marcelo Manzan
15
+ - Luiz Rocha
9
16
  autorequire:
10
17
  bindir: bin
11
18
  cert_chain: []
12
- date: 2013-08-09 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
19
+
20
+ date: 2014-01-08 00:00:00 -02:00
21
+ default_executable:
22
+ dependencies:
23
+ - !ruby/object:Gem::Dependency
15
24
  name: rake
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - '>='
19
- - !ruby/object:Gem::Version
20
- version: '0'
25
+ prerelease: false
26
+ requirement: &id001 !ruby/object:Gem::Requirement
27
+ none: false
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ hash: 3
32
+ segments:
33
+ - 0
34
+ version: "0"
21
35
  type: :development
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: bundler
22
39
  prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - '>='
26
- - !ruby/object:Gem::Version
27
- version: '0'
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 3
46
+ segments:
47
+ - 0
48
+ version: "0"
49
+ type: :development
50
+ version_requirements: *id002
28
51
  description:
29
- email: lfcipriani@gmail.com
52
+ email:
53
+ - lfcipriani@gmail.com
54
+ - manzan@gmail.com
55
+ - lsdrocha@gmail.com
30
56
  executables: []
57
+
31
58
  extensions: []
59
+
32
60
  extra_rdoc_files: []
33
- files:
61
+
62
+ files:
34
63
  - README.md
35
- - lib/methodize.rb
36
64
  - lib/methodize/hash.rb
37
- - test/methodize_test.rb
65
+ - lib/methodize.rb
38
66
  - test/hash_test.rb
67
+ - test/methodize_test.rb
68
+ has_rdoc: true
39
69
  homepage: http://talleye.com
40
70
  licenses: []
41
- metadata: {}
71
+
42
72
  post_install_message:
43
73
  rdoc_options: []
44
- require_paths:
74
+
75
+ require_paths:
45
76
  - lib
46
- required_ruby_version: !ruby/object:Gem::Requirement
47
- requirements:
48
- - - '>='
49
- - !ruby/object:Gem::Version
50
- version: '0'
51
- required_rubygems_version: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - '>='
54
- - !ruby/object:Gem::Version
55
- version: '0'
77
+ required_ruby_version: !ruby/object:Gem::Requirement
78
+ none: false
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ hash: 3
83
+ segments:
84
+ - 0
85
+ version: "0"
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ none: false
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ hash: 3
92
+ segments:
93
+ - 0
94
+ version: "0"
56
95
  requirements: []
96
+
57
97
  rubyforge_project:
58
- rubygems_version: 2.0.6
98
+ rubygems_version: 1.6.2
59
99
  signing_key:
60
- specification_version: 4
100
+ specification_version: 3
61
101
  summary: Module to read from and write to the keys of a ruby Hash using methods
62
102
  test_files: []
103
+
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 1ed87493c72770773be90bcc598bafda6d277150
4
- data.tar.gz: 47050fd8f94b3e34fb0f74b907dfb841872c751e
5
- SHA512:
6
- metadata.gz: 6afbbbfda66192cc6293b3b59949f877f630a4440a3a36a2d989a4f553bee02a20b6b8880b598e7edb47a9490b67962f9284e6d08e3384e9ddb1cdd8dd666d68
7
- data.tar.gz: 1039d641835228f32ea38adced1d524bba5e792b92f10b671c68546126bc99f6f3c5fcdd8b3827f801818a749c6fb21933f7ee80c493802db37cfda51758aeb8