File: remove_rubygems_from_bins.patch

package info (click to toggle)
ruby-bson 1.10.0-1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 284 kB
  • ctags: 269
  • sloc: ruby: 1,551; makefile: 5
file content (48 lines) | stat: -rw-r--r-- 1,331 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Description: remove use of and messages about rubygems
Author: Cédric Boutillier <boutil@debian.org>,
 Prach Pongpanich <prachpub@gmail.com>
Forwarded: no
Last-Updated: 2013-06-11
--- a/bin/j2bson
+++ b/bin/j2bson
@@ -15,19 +15,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-require 'rubygems'
 require 'bson'
 
 # Note that, at the moment, this will not properly round-trip
 # in all cases from the output generated by b2json.
-begin
 require 'json/pure'  # broken with 'json/ext'
-rescue LoadError
-  puts "This script requires json/pure. Please install one of the following:"
-  puts "  gem install json_pure"
-  puts "  gem install json"
-  Process.exit
-end
 
 # Convert all JSON objects in an IO into BSON.
 def print_j2bson(io)
--- a/bin/b2json
+++ b/bin/b2json
@@ -15,18 +15,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-require 'rubygems'
 require 'bson'
 
 # Note that this will not properly round-trip in all cases
 # from the output generated by j2bson.
-begin
 require 'yajl'
-rescue LoadError
-  puts "This script requires yajl. Please install as follows:"
-  puts "  gem install yajl-ruby"
-  Process.exit
-end
 
 # Convert all documents in an IO into JSON.
 def print_b2json(io)