moped-gridfs 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +23 -0
- data/.rspec +1 -0
- data/.ruby-gemset +1 -0
- data/.travis.yml +10 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +22 -0
- data/README.md +90 -0
- data/Rakefile +6 -0
- data/gemfiles/moped15.gemfile +4 -0
- data/lib/moped/gridfs.rb +2 -0
- data/lib/moped/gridfs/access_modes.rb +48 -0
- data/lib/moped/gridfs/bucket.rb +66 -0
- data/lib/moped/gridfs/bucketable.rb +33 -0
- data/lib/moped/gridfs/buckets.rb +37 -0
- data/lib/moped/gridfs/extensions/session.rb +21 -0
- data/lib/moped/gridfs/file.rb +233 -0
- data/lib/moped/gridfs/files.rb +29 -0
- data/lib/moped/gridfs/inspectable.rb +15 -0
- data/lib/moped/gridfs/version.rb +5 -0
- data/moped-gridfs.gemspec +26 -0
- data/perf/compare.rb +143 -0
- data/perf/perf_helper.rb +33 -0
- data/spec/lib/moped/gridfs/bucket_spec.rb +119 -0
- data/spec/lib/moped/gridfs/buckets_spec.rb +45 -0
- data/spec/lib/moped/gridfs/file_spec.rb +83 -0
- data/spec/lib/moped/gridfs/getters.rb +78 -0
- data/spec/lib/moped/gridfs/read.rb +106 -0
- data/spec/lib/moped/gridfs/setters.rb +113 -0
- data/spec/lib/moped/gridfs/write.rb +152 -0
- data/spec/spec_helper.rb +33 -0
- metadata +152 -0
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
|
3
|
+
|
4
|
+
require "moped/gridfs"
|
5
|
+
require "rspec"
|
6
|
+
require "pry"
|
7
|
+
require "java" if RUBY_PLATFORM == "java"
|
8
|
+
|
9
|
+
ENV["MOPED-GRIDFS_SPEC_HOST"] ||= "127.0.0.1"
|
10
|
+
ENV["MOPED-GRIDFS_SPEC_PORT"] ||= "27017"
|
11
|
+
ENV["MOPED-GRIDFS_SPEC_DB"] ||= "moped-gridfs-test"
|
12
|
+
|
13
|
+
def moped_session
|
14
|
+
addr = ENV["MOPED-GRIDFS_SPEC_HOST"] + ":" + ENV["MOPED-GRIDFS_SPEC_PORT"]
|
15
|
+
|
16
|
+
session = Moped::Session.new([addr])
|
17
|
+
session.use(ENV["MOPED-GRIDFS_SPEC_DB"])
|
18
|
+
session
|
19
|
+
end
|
20
|
+
|
21
|
+
def drop_all_collections
|
22
|
+
moped_session.collections.each(&:drop)
|
23
|
+
end
|
24
|
+
|
25
|
+
RSpec.configure do |config|
|
26
|
+
config.before(:each) do
|
27
|
+
drop_all_collections
|
28
|
+
end
|
29
|
+
|
30
|
+
config.after(:all) do
|
31
|
+
drop_all_collections
|
32
|
+
end
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,152 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: moped-gridfs
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- topac
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-09-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: moped
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.6'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.6'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: mongoDB GridFS implementation for Moped
|
84
|
+
email:
|
85
|
+
- dani.m.mobile@gmail.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- .gitignore
|
91
|
+
- .rspec
|
92
|
+
- .ruby-gemset
|
93
|
+
- .travis.yml
|
94
|
+
- Gemfile
|
95
|
+
- LICENSE.txt
|
96
|
+
- README.md
|
97
|
+
- Rakefile
|
98
|
+
- gemfiles/moped15.gemfile
|
99
|
+
- lib/moped/gridfs.rb
|
100
|
+
- lib/moped/gridfs/access_modes.rb
|
101
|
+
- lib/moped/gridfs/bucket.rb
|
102
|
+
- lib/moped/gridfs/bucketable.rb
|
103
|
+
- lib/moped/gridfs/buckets.rb
|
104
|
+
- lib/moped/gridfs/extensions/session.rb
|
105
|
+
- lib/moped/gridfs/file.rb
|
106
|
+
- lib/moped/gridfs/files.rb
|
107
|
+
- lib/moped/gridfs/inspectable.rb
|
108
|
+
- lib/moped/gridfs/version.rb
|
109
|
+
- moped-gridfs.gemspec
|
110
|
+
- perf/compare.rb
|
111
|
+
- perf/perf_helper.rb
|
112
|
+
- spec/lib/moped/gridfs/bucket_spec.rb
|
113
|
+
- spec/lib/moped/gridfs/buckets_spec.rb
|
114
|
+
- spec/lib/moped/gridfs/file_spec.rb
|
115
|
+
- spec/lib/moped/gridfs/getters.rb
|
116
|
+
- spec/lib/moped/gridfs/read.rb
|
117
|
+
- spec/lib/moped/gridfs/setters.rb
|
118
|
+
- spec/lib/moped/gridfs/write.rb
|
119
|
+
- spec/spec_helper.rb
|
120
|
+
homepage: https://www.github.com/topac/moped-gridfs
|
121
|
+
licenses:
|
122
|
+
- MIT
|
123
|
+
metadata: {}
|
124
|
+
post_install_message:
|
125
|
+
rdoc_options: []
|
126
|
+
require_paths:
|
127
|
+
- lib
|
128
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - '>='
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - '>='
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
requirements: []
|
139
|
+
rubyforge_project:
|
140
|
+
rubygems_version: 2.4.1
|
141
|
+
signing_key:
|
142
|
+
specification_version: 4
|
143
|
+
summary: mongoDB GridFS implementation for Moped
|
144
|
+
test_files:
|
145
|
+
- spec/lib/moped/gridfs/bucket_spec.rb
|
146
|
+
- spec/lib/moped/gridfs/buckets_spec.rb
|
147
|
+
- spec/lib/moped/gridfs/file_spec.rb
|
148
|
+
- spec/lib/moped/gridfs/getters.rb
|
149
|
+
- spec/lib/moped/gridfs/read.rb
|
150
|
+
- spec/lib/moped/gridfs/setters.rb
|
151
|
+
- spec/lib/moped/gridfs/write.rb
|
152
|
+
- spec/spec_helper.rb
|