carrierwave_direct 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -403,3 +403,4 @@ You should now be able to run the tests
403
403
  * [travisp (Travis Pew)](https://github.com/travisp) - Compatibility for CarrierWave 0.6.0
404
404
  * [jgorset (Johannes Gorset)](https://github.com/jgorset) - Added note about removing 'store_dir' in README
405
405
  * [frahugo (Hugo Frappier)](https://github.com/frahugo) - Fix bug where CarrierWaveDirect Validations were being added to non CarrierWaveDirect ActiveRecord models
406
+ * [bak (Benjamin Cullen-Kerney)](https://github.com/bak) - Fix bug where CarrierWaveDirect specific methods were being added to non CarrierWaveDirect ActiveRecord models
@@ -6,6 +6,9 @@ module CarrierWaveDirect
6
6
  def mount_uploader(column, uploader=nil, options={}, &block)
7
7
  super
8
8
 
9
+ # Don't go further unless the class included CarrierWaveDirect::Uploader
10
+ return unless uploader.ancestors.include?(CarrierWaveDirect::Uploader)
11
+
9
12
  uploader.class_eval <<-RUBY, __FILE__, __LINE__+1
10
13
  def #{column}; self; end
11
14
  RUBY
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module CarrierwaveDirect
4
- VERSION = "0.0.6"
4
+ VERSION = "0.0.7"
5
5
  end
6
6
 
@@ -62,6 +62,12 @@ describe CarrierWave::ActiveRecord do
62
62
 
63
63
  subject.class.ancestors.should_not include(CarrierWaveDirect::Validations::ActiveModel)
64
64
  end
65
+
66
+ it "does not modify the class with CarrierWaveDirect-specific methods" do
67
+ subject.class.mount_uploader :video, StandardUploader
68
+
69
+ subject.methods.should_not include(:has_video_upload?)
70
+ end
65
71
  end
66
72
  end
67
73
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave_direct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-11 00:00:00.000000000Z
12
+ date: 2012-08-08 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: carrierwave
16
- requirement: &71299690 !ruby/object:Gem::Requirement
16
+ requirement: &79942990 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *71299690
24
+ version_requirements: *79942990
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: uuid
27
- requirement: &71299200 !ruby/object:Gem::Requirement
27
+ requirement: &79925320 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *71299200
35
+ version_requirements: *79925320
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: fog
38
- requirement: &71298880 !ruby/object:Gem::Requirement
38
+ requirement: &79924230 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *71298880
46
+ version_requirements: *79924230
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &71298350 !ruby/object:Gem::Requirement
49
+ requirement: &79923830 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *71298350
57
+ version_requirements: *79923830
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: timecop
60
- requirement: &71297740 !ruby/object:Gem::Requirement
60
+ requirement: &79923400 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *71297740
68
+ version_requirements: *79923400
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rails
71
- requirement: &71297330 !ruby/object:Gem::Requirement
71
+ requirement: &79922550 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *71297330
79
+ version_requirements: *79922550
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: sqlite3
82
- requirement: &71296950 !ruby/object:Gem::Requirement
82
+ requirement: &79920990 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *71296950
90
+ version_requirements: *79920990
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: capybara
93
- requirement: &71296410 !ruby/object:Gem::Requirement
93
+ requirement: &79920000 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,7 +98,7 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *71296410
101
+ version_requirements: *79920000
102
102
  description: Process your uploads in the background by uploading directly to S3
103
103
  email:
104
104
  - dwilkie@gmail.com
@@ -155,18 +155,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
155
155
  - - ! '>='
156
156
  - !ruby/object:Gem::Version
157
157
  version: '0'
158
- segments:
159
- - 0
160
- hash: -508082893
161
158
  required_rubygems_version: !ruby/object:Gem::Requirement
162
159
  none: false
163
160
  requirements:
164
161
  - - ! '>='
165
162
  - !ruby/object:Gem::Version
166
163
  version: '0'
167
- segments:
168
- - 0
169
- hash: -508082893
170
164
  requirements: []
171
165
  rubyforge_project: carrierwave_direct
172
166
  rubygems_version: 1.8.10