jamieorc-joint 0.6.1 → 0.6.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/.gitignore +1 -0
- data/Gemfile +1 -0
- data/joint.gemspec +1 -1
- data/lib/joint/io.rb +4 -0
- data/lib/joint/version.rb +1 -1
- data/test/joint/test_io.rb +11 -0
- data/test/test_joint.rb +4 -8
- metadata +8 -7
- data/Gemfile.lock +0 -50
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/joint.gemspec
CHANGED
@@ -4,7 +4,7 @@ require File.expand_path('../lib/joint/version', __FILE__)
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "jamieorc-joint"
|
6
6
|
s.summary = %Q{MongoMapper and GridFS joined in file upload love.}
|
7
|
-
s.description = %Q{MongoMapper and GridFS joined in file upload love. Updates by Jamie for EmbeddedDocument.}
|
7
|
+
s.description = %Q{MongoMapper and GridFS joined in file upload love. Updates by Jamie for EmbeddedDocument, IO.}
|
8
8
|
s.email = "jamieorc@gmail.com"
|
9
9
|
s.homepage = "http://github.com/jamieorc/joint"
|
10
10
|
s.authors = ["John Nunemaker", "Jamie Orchard-Hays"]
|
data/lib/joint/io.rb
CHANGED
data/lib/joint/version.rb
CHANGED
data/test/joint/test_io.rb
CHANGED
@@ -25,4 +25,15 @@ class IOTest < Test::Unit::TestCase
|
|
25
25
|
Joint::IO.new(:content => 'Testing').read.should == 'Testing'
|
26
26
|
end
|
27
27
|
end
|
28
|
+
|
29
|
+
context "#rewind" do
|
30
|
+
should "rewinds the io to position 0" do
|
31
|
+
io = Joint::IO.new(:content => 'Testing')
|
32
|
+
io.read.should == 'Testing'
|
33
|
+
io.read.should == ''
|
34
|
+
io.rewind
|
35
|
+
io.read.should == 'Testing'
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
28
39
|
end
|
data/test/test_joint.rb
CHANGED
@@ -72,7 +72,7 @@ class JointTest < Test::Unit::TestCase
|
|
72
72
|
Asset.attachment_accessor_module.should be_instance_of(Module)
|
73
73
|
EmbeddedAsset.attachment_accessor_module.should be_instance_of(Module)
|
74
74
|
end
|
75
|
-
|
75
|
+
|
76
76
|
context "with inheritance" do
|
77
77
|
should "add attachment to attachment_names" do
|
78
78
|
BaseModel.attachment_names.should == Set.new([:file])
|
@@ -167,7 +167,7 @@ class JointTest < Test::Unit::TestCase
|
|
167
167
|
subject.save
|
168
168
|
end
|
169
169
|
end
|
170
|
-
|
170
|
+
|
171
171
|
context "Assigning new attachments to embedded document" do
|
172
172
|
setup do
|
173
173
|
@asset = Asset.new
|
@@ -285,10 +285,6 @@ class JointTest < Test::Unit::TestCase
|
|
285
285
|
end
|
286
286
|
subject { @doc }
|
287
287
|
|
288
|
-
# should "not change attachment id" do
|
289
|
-
# subject.file_id_changed?.should be(false)
|
290
|
-
# end
|
291
|
-
|
292
288
|
should "update keys" do
|
293
289
|
subject.file_name.should == 'test2.txt'
|
294
290
|
subject.file_type.should == "text/plain"
|
@@ -428,7 +424,7 @@ class JointTest < Test::Unit::TestCase
|
|
428
424
|
subject.image = nil
|
429
425
|
subject.image.nil?.should be(true)
|
430
426
|
end
|
431
|
-
|
427
|
+
|
432
428
|
should "respond with true when asked if the attachment is blank?" do
|
433
429
|
subject.image = nil
|
434
430
|
subject.image.blank?.should be(true)
|
@@ -502,7 +498,7 @@ class JointTest < Test::Unit::TestCase
|
|
502
498
|
assert_grid_difference(-1) { subject._root_document.destroy }
|
503
499
|
end
|
504
500
|
end
|
505
|
-
|
501
|
+
|
506
502
|
# What about when an embedded document is removed?
|
507
503
|
|
508
504
|
context "Assigning file name" do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jamieorc-joint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 2
|
10
|
+
version: 0.6.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- John Nunemaker
|
@@ -16,7 +16,8 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date:
|
19
|
+
date: 2012-01-10 00:00:00 -05:00
|
20
|
+
default_executable:
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
22
23
|
name: wand
|
@@ -62,7 +63,7 @@ dependencies:
|
|
62
63
|
version: "0.9"
|
63
64
|
type: :runtime
|
64
65
|
version_requirements: *id003
|
65
|
-
description: MongoMapper and GridFS joined in file upload love. Updates by Jamie for EmbeddedDocument.
|
66
|
+
description: MongoMapper and GridFS joined in file upload love. Updates by Jamie for EmbeddedDocument, IO.
|
66
67
|
email: jamieorc@gmail.com
|
67
68
|
executables: []
|
68
69
|
|
@@ -73,7 +74,6 @@ extra_rdoc_files: []
|
|
73
74
|
files:
|
74
75
|
- .gitignore
|
75
76
|
- Gemfile
|
76
|
-
- Gemfile.lock
|
77
77
|
- LICENSE
|
78
78
|
- README.rdoc
|
79
79
|
- Rakefile
|
@@ -95,6 +95,7 @@ files:
|
|
95
95
|
- test/helper.rb
|
96
96
|
- test/joint/test_io.rb
|
97
97
|
- test/test_joint.rb
|
98
|
+
has_rdoc: true
|
98
99
|
homepage: http://github.com/jamieorc/joint
|
99
100
|
licenses: []
|
100
101
|
|
@@ -124,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
125
|
requirements: []
|
125
126
|
|
126
127
|
rubyforge_project:
|
127
|
-
rubygems_version: 1.
|
128
|
+
rubygems_version: 1.5.2
|
128
129
|
signing_key:
|
129
130
|
specification_version: 3
|
130
131
|
summary: MongoMapper and GridFS joined in file upload love.
|
data/Gemfile.lock
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
joint (0.6.1)
|
5
|
-
mime-types
|
6
|
-
mongo_mapper (~> 0.9)
|
7
|
-
wand (~> 0.4)
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: http://rubygems.org/
|
11
|
-
specs:
|
12
|
-
activemodel (3.1.3)
|
13
|
-
activesupport (= 3.1.3)
|
14
|
-
builder (~> 3.0.0)
|
15
|
-
i18n (~> 0.6)
|
16
|
-
activesupport (3.1.3)
|
17
|
-
multi_json (~> 1.0)
|
18
|
-
bson (1.3.1)
|
19
|
-
bson_ext (1.3.1)
|
20
|
-
builder (3.0.0)
|
21
|
-
i18n (0.6.0)
|
22
|
-
jnunemaker-matchy (0.4.0)
|
23
|
-
mime-types (1.17.2)
|
24
|
-
mocha (0.9.10)
|
25
|
-
rake
|
26
|
-
mongo (1.3.1)
|
27
|
-
bson (>= 1.3.1)
|
28
|
-
mongo_mapper (0.10.1)
|
29
|
-
activemodel (~> 3.0)
|
30
|
-
activesupport (~> 3.0)
|
31
|
-
plucky (~> 0.4.0)
|
32
|
-
multi_json (1.0.3)
|
33
|
-
plucky (0.4.3)
|
34
|
-
mongo (~> 1.3)
|
35
|
-
rake (0.8.7)
|
36
|
-
safe_shell (1.0.1)
|
37
|
-
shoulda (2.11.3)
|
38
|
-
wand (0.4)
|
39
|
-
mime-types
|
40
|
-
safe_shell (~> 1.0.0)
|
41
|
-
|
42
|
-
PLATFORMS
|
43
|
-
ruby
|
44
|
-
|
45
|
-
DEPENDENCIES
|
46
|
-
bson_ext
|
47
|
-
jnunemaker-matchy
|
48
|
-
joint!
|
49
|
-
mocha
|
50
|
-
shoulda
|