bcdatabase 1.1.0 → 1.2.0
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/CHANGELOG.markdown +6 -0
- data/README.markdown +7 -0
- data/lib/bcdatabase/version.rb +1 -1
- data/lib/bcdatabase.rb +12 -1
- metadata +4 -4
data/CHANGELOG.markdown
CHANGED
data/README.markdown
CHANGED
@@ -221,6 +221,13 @@ JRuby (tested on 1.6+), provided that `jruby-openssl` is also
|
|
221
221
|
installed. It is [continuously tested][ci] on all three of these
|
222
222
|
platforms.
|
223
223
|
|
224
|
+
There is support for having a different adapter defined for
|
225
|
+
JRuby. It's very similar to the DataMapper support described above: if
|
226
|
+
you define a key called `jruby_adapter` in a configuration, it will be
|
227
|
+
copied to `adapter` when Bcdatabase is running under JRuby. Unlike the
|
228
|
+
DataMapper support, it is automatic — no need to specify a
|
229
|
+
transform.
|
230
|
+
|
224
231
|
[ci]: https://public-ci.nubic.northwestern.edu/job/bcdatabase/
|
225
232
|
|
226
233
|
## Credits
|
data/lib/bcdatabase/version.rb
CHANGED
data/lib/bcdatabase.rb
CHANGED
@@ -120,16 +120,27 @@ module Bcdatabase
|
|
120
120
|
},
|
121
121
|
:datamapper => lambda { |entry, name, group|
|
122
122
|
entry.merge('adapter' => entry['datamapper_adapter']) if entry['datamapper_adapter']
|
123
|
+
},
|
124
|
+
:jruby => lambda { |entry, name, group|
|
125
|
+
entry.merge('adapter' => entry['jruby_adapter']) if entry['jruby_adapter']
|
123
126
|
}
|
124
127
|
}
|
125
128
|
|
129
|
+
def self.automatic_transforms
|
130
|
+
@automatic_transforms ||= [
|
131
|
+
:key_defaults,
|
132
|
+
:decrypt,
|
133
|
+
(:jruby if RUBY_PLATFORM =~ /java/)
|
134
|
+
].compact
|
135
|
+
end
|
136
|
+
|
126
137
|
##
|
127
138
|
# Creates a configuration from a set of YAML files.
|
128
139
|
#
|
129
140
|
# General use of the library should not use this method, but
|
130
141
|
# instead should use {Bcdatabase.load}.
|
131
142
|
def initialize(files, transforms=[])
|
132
|
-
@transforms = (
|
143
|
+
@transforms = (self.class.automatic_transforms + transforms).collect do |t|
|
133
144
|
case t
|
134
145
|
when Symbol
|
135
146
|
BUILT_IN_TRANSFORMS[t] or fail "No built-in transform named #{t.inspect}"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bcdatabase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
8
|
+
- 2
|
9
9
|
- 0
|
10
|
-
version: 1.
|
10
|
+
version: 1.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Rhett Sutphin
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-09-01 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|