bson_ext 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +25 -20
- data/ext/cbson/cbson.c +5 -0
- data/ext/cbson/version.h +1 -1
- metadata +29 -31
data/Rakefile
CHANGED
@@ -5,10 +5,6 @@ require 'fileutils'
|
|
5
5
|
require 'rake'
|
6
6
|
require 'rake/testtask'
|
7
7
|
require 'rake/gempackagetask'
|
8
|
-
begin
|
9
|
-
require 'rake/contrib/rubyforgepublisher'
|
10
|
-
rescue LoadError
|
11
|
-
end
|
12
8
|
require 'rbconfig'
|
13
9
|
include Config
|
14
10
|
ENV['TEST_MODE'] = 'TRUE'
|
@@ -146,16 +142,24 @@ task :ydoc do
|
|
146
142
|
require File.join(File.dirname(__FILE__), 'lib', 'mongo')
|
147
143
|
out = File.join('ydoc', Mongo::VERSION)
|
148
144
|
FileUtils.rm_rf('ydoc')
|
149
|
-
system "yardoc lib/**/*.rb lib/mongo/**/*.rb lib/bson/**/*.rb -e yard/yard_ext.rb -p yard/templates -o #{out} --title MongoRuby-#{Mongo::VERSION} --files docs/TUTORIAL.md,docs/GridFS.md,docs/FAQ.md,docs/REPLICA_SETS.md,docs/WRITE_CONCERN.md,docs/HISTORY.md,docs/CREDITS.md,docs/
|
145
|
+
system "yardoc lib/**/*.rb lib/mongo/**/*.rb lib/bson/**/*.rb -e yard/yard_ext.rb -p yard/templates -o #{out} --title MongoRuby-#{Mongo::VERSION} --files docs/TUTORIAL.md,docs/GridFS.md,docs/FAQ.md,docs/REPLICA_SETS.md,docs/WRITE_CONCERN.md,docs/HISTORY.md,docs/CREDITS.md,docs/RELEASES.md"
|
150
146
|
end
|
151
147
|
|
152
148
|
namespace :bamboo do
|
149
|
+
task :ci_reporter do
|
150
|
+
begin
|
151
|
+
require 'ci/reporter/rake/test_unit'
|
152
|
+
rescue LoadError
|
153
|
+
warn "Warning: Unable to load ci_reporter gem."
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
153
157
|
namespace :test do
|
154
|
-
task :ruby do
|
158
|
+
task :ruby => [:ci_reporter, "ci:setup:testunit"] do
|
155
159
|
Rake::Task['test:ruby'].invoke
|
156
160
|
end
|
157
161
|
|
158
|
-
task :c do
|
162
|
+
task :c => [:ci_reporter, "ci:setup:testunit"] do
|
159
163
|
Rake::Task['gem:install_extensions'].invoke
|
160
164
|
Rake::Task['test:c'].invoke
|
161
165
|
end
|
@@ -166,29 +170,30 @@ namespace :gem do
|
|
166
170
|
|
167
171
|
desc "Install the gem locally"
|
168
172
|
task :install do
|
169
|
-
|
170
|
-
|
173
|
+
`gem build bson.gemspec`
|
174
|
+
`gem install --no-rdoc --no-ri bson-*.gem`
|
171
175
|
|
172
|
-
|
173
|
-
|
176
|
+
`gem build mongo.gemspec`
|
177
|
+
`gem install --no-rdoc --no-ri mongo-*.gem`
|
174
178
|
|
175
|
-
|
176
|
-
|
179
|
+
`rm mongo-*.gem`
|
180
|
+
`rm bson-*.gem`
|
177
181
|
end
|
178
182
|
|
179
183
|
desc "Install the optional c extensions"
|
180
184
|
task :install_extensions do
|
181
|
-
|
182
|
-
|
183
|
-
|
185
|
+
`gem uninstall bson_ext`
|
186
|
+
`gem build bson_ext.gemspec`
|
187
|
+
`gem install --no-rdoc --no-ri bson_ext-*.gem`
|
188
|
+
`rm bson_ext-*.gem`
|
184
189
|
end
|
185
190
|
|
186
191
|
desc "Build all gems"
|
187
192
|
task :build_all do
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
193
|
+
`gem build mongo.gemspec`
|
194
|
+
`gem build bson.gemspec`
|
195
|
+
`gem build bson.java.gemspec`
|
196
|
+
`gem build bson_ext.gemspec`
|
192
197
|
end
|
193
198
|
|
194
199
|
end
|
data/ext/cbson/cbson.c
CHANGED
@@ -495,7 +495,9 @@ static int write_element(VALUE key, VALUE value, VALUE extra, int allow_id) {
|
|
495
495
|
}
|
496
496
|
if (flags & MULTILINE) {
|
497
497
|
char multiline = 'm';
|
498
|
+
char dotall = 's';
|
498
499
|
SAFE_WRITE(buffer, &multiline, 1);
|
500
|
+
SAFE_WRITE(buffer, &dotall, 1);
|
499
501
|
}
|
500
502
|
if (flags & EXTENDED) {
|
501
503
|
char extended = 'x';
|
@@ -759,6 +761,9 @@ static VALUE get_value(const char* buffer, int* position, int type) {
|
|
759
761
|
else if (flag == 'm') {
|
760
762
|
flags |= MULTILINE;
|
761
763
|
}
|
764
|
+
else if (flag == 's') {
|
765
|
+
flags |= MULTILINE;
|
766
|
+
}
|
762
767
|
else if (flag == 'x') {
|
763
768
|
flags |= EXTENDED;
|
764
769
|
}
|
data/ext/cbson/version.h
CHANGED
metadata
CHANGED
@@ -3,18 +3,18 @@ name: bson_ext
|
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
version: 1.3.
|
6
|
+
- 1
|
7
|
+
- 3
|
8
|
+
- 1
|
9
|
+
version: 1.3.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
|
-
- Mike Dirolf
|
12
|
+
- Mike Dirolf
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-
|
17
|
+
date: 2011-05-11 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|
@@ -23,20 +23,20 @@ email: mongodb-dev@googlegroups.com
|
|
23
23
|
executables: []
|
24
24
|
|
25
25
|
extensions:
|
26
|
-
- ext/cbson/extconf.rb
|
26
|
+
- ext/cbson/extconf.rb
|
27
27
|
extra_rdoc_files: []
|
28
28
|
|
29
29
|
files:
|
30
|
-
- Rakefile
|
31
|
-
- bson_ext.gemspec
|
32
|
-
- ext/cbson/extconf.rb
|
33
|
-
- ext/cbson/encoding_helpers.c
|
34
|
-
- ext/cbson/buffer.c
|
35
|
-
- ext/cbson/cbson.c
|
36
|
-
- ext/cbson/encoding_helpers.h
|
37
|
-
- ext/cbson/version.h
|
38
|
-
- ext/cbson/buffer.h
|
39
|
-
has_rdoc:
|
30
|
+
- Rakefile
|
31
|
+
- bson_ext.gemspec
|
32
|
+
- ext/cbson/extconf.rb
|
33
|
+
- ext/cbson/encoding_helpers.c
|
34
|
+
- ext/cbson/buffer.c
|
35
|
+
- ext/cbson/cbson.c
|
36
|
+
- ext/cbson/encoding_helpers.h
|
37
|
+
- ext/cbson/version.h
|
38
|
+
- ext/cbson/buffer.h
|
39
|
+
has_rdoc: true
|
40
40
|
homepage: http://www.mongodb.org
|
41
41
|
licenses: []
|
42
42
|
|
@@ -44,27 +44,25 @@ post_install_message:
|
|
44
44
|
rdoc_options: []
|
45
45
|
|
46
46
|
require_paths:
|
47
|
-
- ext
|
47
|
+
- ext
|
48
48
|
required_ruby_version: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
49
|
requirements:
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
segments:
|
53
|
+
- 0
|
54
|
+
version: "0"
|
56
55
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
56
|
requirements:
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
segments:
|
60
|
+
- 0
|
61
|
+
version: "0"
|
64
62
|
requirements: []
|
65
63
|
|
66
64
|
rubyforge_project:
|
67
|
-
rubygems_version: 1.3.
|
65
|
+
rubygems_version: 1.3.6
|
68
66
|
signing_key:
|
69
67
|
specification_version: 3
|
70
68
|
summary: C extensions for Ruby BSON.
|