java_to_base64 0.0.2-java → 0.0.3-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 2fa451667295116d23951caa98b47a424565ec17
4
- data.tar.gz: 709617ecd361b89696b742e5a6a9c68bbdbbf457
2
+ SHA256:
3
+ metadata.gz: 130c2399bbb8bba3d7ea11c83d946f6529868b3a14af04741c84608240105582
4
+ data.tar.gz: 5e8e53864b90883bd5189a9aa50879d4c917e264b9c76efa89f30a5ff5c94be7
5
5
  SHA512:
6
- metadata.gz: 76e14fb7ee5ed2c616a93c902b7fa6ef605ea84713617683878e8eebcca705466c2143317a59b1348490fae19a58f59403402570b0b261c7c25a39f4bcacb8e2
7
- data.tar.gz: 89d8468750313c4faabe53116b835eb2fb09f693c31c63b383b948eb3b8aa91d9e79d961784c95dd075b0e4a9fa5b714cd4f58a1193bb17144ffb495ffbe19ff
6
+ metadata.gz: ecfbe64e0c2881ec2ffbbca2204494864264ffea9dd63496c5dbdcafca31f83cea543970508d020eb2935634f2050042dbb2037567b03e37149292c32d4df043
7
+ data.tar.gz: 3583ea344ff6abe48021971685a5b05f12a4077a445afbd81e007a65413a3ec125e39509d0e1253c57288227b6b85aaf19076432a3c2a3189648e94043131d55
data/README.md CHANGED
@@ -1,6 +1,13 @@
1
1
  # JavaToBase64
2
2
 
3
- TODO: Write a gem description
3
+ I got tired of writing the apache commons base64 serializer/deserializer into each app that I need to serialize
4
+ raw Java objects into some type of database/cache. If you include `JavaToBase64` into a Java class it will then
5
+ respond to `to_base64` (which is URL safe) and the class will respond to `from_base64`.
6
+
7
+ As long as the java class implements serializable all will be well with the world.
8
+
9
+ This gem has it's own version of apache commons codec, but if you have another version already loaded it will
10
+ not load the packaged version (through the use of `i_can_has_java_class`)
4
11
 
5
12
  ## Installation
6
13
 
@@ -18,7 +25,16 @@ Or install it yourself as:
18
25
 
19
26
  ## Usage
20
27
 
21
- TODO: Write usage instructions here
28
+ ```ruby
29
+ require 'java_to_base64'
30
+
31
+ class Java::JavaLang::String
32
+ include JavaToBase64
33
+ end
34
+
35
+ string = ::Java::JavaLang::String.new("derp")
36
+ new_string = ::Java::JavaLang::String.from_base64(string.to_base64)
37
+ ```
22
38
 
23
39
  ## Contributing
24
40
 
@@ -1,3 +1,3 @@
1
1
  module JavaToBase64
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -21,7 +21,7 @@ module JavaToBase64
21
21
  end
22
22
 
23
23
  def self.java_instance_of?(klass, klass_or_module)
24
- return klass.java_kind_of?(klass_or_module) || klass.included_modules.include?(klass_or_module)
24
+ return klass.kind_of?(klass_or_module) || klass.included_modules.include?(klass_or_module)
25
25
  end
26
26
 
27
27
  module InstanceMethods
metadata CHANGED
@@ -1,94 +1,94 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: java_to_base64
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: java
6
6
  authors:
7
7
  - Brandon Dewitt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-19 00:00:00.000000000 Z
11
+ date: 2022-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: i_can_has_java_class
15
- version_requirements: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - '>='
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
14
  requirement: !ruby/object:Gem::Requirement
21
15
  requirements:
22
- - - '>='
16
+ - - ">="
23
17
  - !ruby/object:Gem::Version
24
18
  version: '0'
19
+ name: i_can_has_java_class
25
20
  prerelease: false
26
21
  type: :runtime
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
22
  version_requirements: !ruby/object:Gem::Requirement
30
23
  requirements:
31
- - - '>='
24
+ - - ">="
32
25
  - !ruby/object:Gem::Version
33
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
34
28
  requirement: !ruby/object:Gem::Requirement
35
29
  requirements:
36
- - - '>='
30
+ - - ">="
37
31
  - !ruby/object:Gem::Version
38
32
  version: '0'
33
+ name: bundler
39
34
  prerelease: false
40
35
  type: :development
41
- - !ruby/object:Gem::Dependency
42
- name: mocha
43
36
  version_requirements: !ruby/object:Gem::Requirement
44
37
  requirements:
45
- - - '>='
38
+ - - ">="
46
39
  - !ruby/object:Gem::Version
47
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
48
42
  requirement: !ruby/object:Gem::Requirement
49
43
  requirements:
50
- - - '>='
44
+ - - ">="
51
45
  - !ruby/object:Gem::Version
52
46
  version: '0'
47
+ name: mocha
53
48
  prerelease: false
54
49
  type: :development
55
- - !ruby/object:Gem::Dependency
56
- name: pry
57
50
  version_requirements: !ruby/object:Gem::Requirement
58
51
  requirements:
59
- - - '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
62
56
  requirement: !ruby/object:Gem::Requirement
63
57
  requirements:
64
- - - '>='
58
+ - - ">="
65
59
  - !ruby/object:Gem::Version
66
60
  version: '0'
61
+ name: pry
67
62
  prerelease: false
68
63
  type: :development
69
- - !ruby/object:Gem::Dependency
70
- name: rake
71
64
  version_requirements: !ruby/object:Gem::Requirement
72
65
  requirements:
73
- - - '>='
66
+ - - ">="
74
67
  - !ruby/object:Gem::Version
75
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
76
70
  requirement: !ruby/object:Gem::Requirement
77
71
  requirements:
78
- - - '>='
72
+ - - ">="
79
73
  - !ruby/object:Gem::Version
80
74
  version: '0'
75
+ name: rake
81
76
  prerelease: false
82
77
  type: :development
83
- description: ' simple utility module to provide to_base64 and from_base64 for java
84
- objects '
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: " simple utility module to provide to_base64 and from_base64 for java\
84
+ \ objects "
85
85
  email:
86
86
  - brandonsdewitt@gmail.com
87
87
  executables: []
88
88
  extensions: []
89
89
  extra_rdoc_files: []
90
90
  files:
91
- - .gitignore
91
+ - ".gitignore"
92
92
  - Gemfile
93
93
  - LICENSE.txt
94
94
  - README.md
@@ -108,17 +108,16 @@ require_paths:
108
108
  - lib
109
109
  required_ruby_version: !ruby/object:Gem::Requirement
110
110
  requirements:
111
- - - '>='
111
+ - - ">="
112
112
  - !ruby/object:Gem::Version
113
113
  version: '0'
114
114
  required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - '>='
116
+ - - ">="
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0'
119
119
  requirements: []
120
- rubyforge_project:
121
- rubygems_version: 2.2.2
120
+ rubygems_version: 3.3.13
122
121
  signing_key:
123
122
  specification_version: 4
124
123
  summary: simple utility module to provide to_base64 and from_base64 for java objects