jruby_coercion 0.0.5-java → 0.0.6-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,3 +17,4 @@ end
17
17
 
18
18
  require "jruby_coercion/ruby_to_java/registry"
19
19
  require "jruby_coercion/numeric"
20
+ require "jruby_coercion/string"
@@ -0,0 +1,17 @@
1
+ require 'jruby_coercion'
2
+ require 'jruby_coercion/coercable'
3
+ require 'jruby_coercion/ruby_to_java/registry'
4
+
5
+ class String
6
+ include ::JrubyCoercion::Coercable
7
+ end
8
+
9
+ # java.math.BigDecimal
10
+ ::JrubyCoercion::RubyToJava::Registry.register_converter(String, java.math.BigDecimal) do |string|
11
+ java.math.BigDecimal.new(string)
12
+ end
13
+
14
+ # java.math.BigInteger
15
+ ::JrubyCoercion::RubyToJava::Registry.register_converter(String, java.math.BigInteger) do |string|
16
+ java.math.BigInteger.new(string)
17
+ end
@@ -1,3 +1,3 @@
1
1
  module JrubyCoercion
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,68 +1,47 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jruby_coercion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
5
4
  prerelease:
5
+ version: 0.0.6
6
6
  platform: java
7
7
  authors:
8
8
  - Brandon Dewitt
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-11 00:00:00.000000000 Z
12
+ date: 2013-01-23 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- version_requirements: !ruby/object:Gem::Requirement
16
+ version_requirements: &2056 !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - ! '>='
19
19
  - !ruby/object:Gem::Version
20
- version: !binary |-
21
- MA==
22
- none: false
23
- requirement: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ! '>='
26
- - !ruby/object:Gem::Version
27
- version: !binary |-
28
- MA==
20
+ version: '0'
29
21
  none: false
22
+ requirement: *2056
30
23
  prerelease: false
31
24
  type: :development
32
25
  - !ruby/object:Gem::Dependency
33
26
  name: rspec
34
- version_requirements: !ruby/object:Gem::Requirement
35
- requirements:
36
- - - ! '>='
37
- - !ruby/object:Gem::Version
38
- version: !binary |-
39
- MA==
40
- none: false
41
- requirement: !ruby/object:Gem::Requirement
27
+ version_requirements: &2074 !ruby/object:Gem::Requirement
42
28
  requirements:
43
29
  - - ! '>='
44
30
  - !ruby/object:Gem::Version
45
- version: !binary |-
46
- MA==
31
+ version: '0'
47
32
  none: false
33
+ requirement: *2074
48
34
  prerelease: false
49
35
  type: :development
50
36
  - !ruby/object:Gem::Dependency
51
37
  name: pry-nav
52
- version_requirements: !ruby/object:Gem::Requirement
53
- requirements:
54
- - - ! '>='
55
- - !ruby/object:Gem::Version
56
- version: !binary |-
57
- MA==
58
- none: false
59
- requirement: !ruby/object:Gem::Requirement
38
+ version_requirements: &2090 !ruby/object:Gem::Requirement
60
39
  requirements:
61
40
  - - ! '>='
62
41
  - !ruby/object:Gem::Version
63
- version: !binary |-
64
- MA==
42
+ version: '0'
65
43
  none: false
44
+ requirement: *2090
66
45
  prerelease: false
67
46
  type: :development
68
47
  description: ! ' gem to facilitate automatic coercion between jruby/java objects '
@@ -85,6 +64,7 @@ files:
85
64
  - lib/jruby_coercion/numeric.rb
86
65
  - lib/jruby_coercion/registry.rb
87
66
  - lib/jruby_coercion/ruby_to_java/registry.rb
67
+ - lib/jruby_coercion/string.rb
88
68
  - lib/jruby_coercion/version.rb
89
69
  - spec/coercions/big_decimal_spec.rb
90
70
  - spec/coercions/big_integer_spec.rb
@@ -99,25 +79,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
99
79
  requirements:
100
80
  - - ! '>='
101
81
  - !ruby/object:Gem::Version
102
- segments:
103
- - 0
104
- version: !binary |-
105
- MA==
106
- hash: 2
82
+ version: '0'
107
83
  none: false
108
84
  required_rubygems_version: !ruby/object:Gem::Requirement
109
85
  requirements:
110
86
  - - ! '>='
111
87
  - !ruby/object:Gem::Version
112
- segments:
113
- - 0
114
- version: !binary |-
115
- MA==
116
- hash: 2
88
+ version: '0'
117
89
  none: false
118
90
  requirements: []
119
91
  rubyforge_project:
120
- rubygems_version: 1.8.24
92
+ rubygems_version: 1.8.15
121
93
  signing_key:
122
94
  specification_version: 3
123
95
  summary: helps coerce ruby objects into java type automatically
@@ -125,3 +97,4 @@ test_files:
125
97
  - spec/coercions/big_decimal_spec.rb
126
98
  - spec/coercions/big_integer_spec.rb
127
99
  - spec/spec_helper.rb
100
+ ...