keyczar-jruby 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -6,7 +6,7 @@ TODO: Write a gem description
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
9
- gem 'keyczar'
9
+ gem 'keyczar-jruby'
10
10
 
11
11
  And then execute:
12
12
 
@@ -14,11 +14,41 @@ And then execute:
14
14
 
15
15
  Or install it yourself as:
16
16
 
17
- $ gem install keyczar
17
+ $ gem install keyczar-jruby
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ Simply require "keyczar-jruby" or just "keyczar". You'll want to set the Log4j properties for Keyczar, unless you enjoy warnings.
22
+
23
+ An example file for development might look like:
24
+
25
+ ```
26
+ log4j.rootLogger=DEBUG, Keyczar
27
+ log4j.appender.Keyczar=org.apache.log4j.RollingFileAppender
28
+ log4j.appender.Keyczar.File=log/keyczar_development.log
29
+ log4j.appender.Keyczar.MaxFileSize=10MB
30
+ log4j.appender.Keyczar.MaxBackupIndex=10
31
+ log4j.appender.Keyczar.layout=org.apache.log4j.PatternLayout
32
+ log4j.appender.Keyczar.layout.ConversionPattern=%d{ISO8601} %p %t %c - %m%n
33
+ ```
34
+
35
+ And one for production:
36
+
37
+ ```
38
+ log4j.rootLogger=ERROR, Keyczar
39
+ log4j.appender.Keyczar=org.apache.log4j.RollingFileAppender
40
+ log4j.appender.Keyczar.File=log/keyczar_production.log
41
+ log4j.appender.Keyczar.MaxFileSize=10MB
42
+ log4j.appender.Keyczar.MaxBackupIndex=10
43
+ log4j.appender.Keyczar.layout=org.apache.log4j.PatternLayout
44
+ log4j.appender.Keyczar.layout.ConversionPattern=%d{ISO8601} %p %t %c - %m%n
45
+ ```
46
+
47
+ Where ever you save this, you'll then want to call:
48
+
49
+ ```ruby
50
+ Keyczar.set_logger_properties("/full/path/to/keyczar_logging_production.properties")
51
+ ```
22
52
 
23
53
  ## Contributing
24
54
 
data/lib/keyczar.rb CHANGED
@@ -14,6 +14,12 @@ module Keyczar
14
14
  true
15
15
  end
16
16
  end
17
+
18
+ # @param [String] The full file-system path to a Log4j Properties File
19
+ # @return [nil] Nil is a good sign
20
+ def self.set_logger_properties(props_file)
21
+ org.apache.log4j.PropertyConfigurator.configure(props_file.to_s)
22
+ end
17
23
  end
18
24
 
19
25
  Keyczar.load_jars!
@@ -1,3 +1,3 @@
1
1
  module Keyczar
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keyczar-jruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-07 00:00:00.000000000 Z
12
+ date: 2012-06-08 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: This is a JRuby library for the Java Keyczar cryptographic toolkit.
15
15
  email: