hydra-core 5.4.1 → 6.0.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
data/hydra-core.gemspec CHANGED
@@ -22,7 +22,8 @@ Gem::Specification.new do |gem|
22
22
  gem.add_dependency "rails", '~>3.2.3'
23
23
  gem.add_dependency "blacklight", '~> 4.0'
24
24
  gem.add_dependency "devise"
25
- gem.add_dependency "active-fedora", '~> 5.3'
25
+ gem.add_dependency "active-fedora", '>= 5.3'
26
+ gem.add_dependency 'RedCloth', '=4.2.9'
26
27
  gem.add_dependency 'block_helpers'
27
28
  gem.add_dependency 'sanitize'
28
29
  gem.add_dependency 'hydra-mods', ">= 0.0.6"
@@ -1,4 +1,4 @@
1
1
  module HydraHead
2
- VERSION = "5.4.1"
2
+ VERSION = "6.0.0.pre1"
3
3
  end
4
4
 
@@ -28,9 +28,7 @@ module Hydra::Controller::UploadBehavior
28
28
  # @param [#read] file the IO object that is the blob
29
29
  # @param [String] file the IO object that is the blob
30
30
  # @return [FileAsset] file the File Asset
31
- def add_posted_blob_to_asset(asset, file, file_name = nil)
32
- # deprecating 2 argument constructor because it depends on a HTTP request. If we pass the file name we can use for non-web too.
33
- Deprecation.warn(Hydra::Controller::UploadBehavior, "add_posted_blob_to_asset with a 2 argument constructor is deprecated. Pass a filename (e.g. \"file.original_name\") as the third argument. 2 argument constructor will be removed in hydra-core 6" ) if file_name.nil?
31
+ def add_posted_blob_to_asset(asset, file, file_name)
34
32
  file_name ||= file.original_filename
35
33
  asset.add_file(file, datastream_id, file_name)
36
34
  end
@@ -39,19 +37,4 @@ module Hydra::Controller::UploadBehavior
39
37
  def datastream_id
40
38
  "content"
41
39
  end
42
-
43
- # Associate the new file asset with its container
44
- def associate_file_asset_with_container(file_asset=nil, container_id=nil)
45
- if container_id.nil?
46
- container_id = params[:asset_id]
47
- end
48
- if file_asset.nil?
49
- file_asset = @file_asset
50
- end
51
- file_asset.add_relationship(:is_part_of, container_id)
52
- file_asset.save
53
- end
54
- deprecation_deprecate :associate_file_asset_with_container
55
-
56
-
57
40
  end
@@ -12,10 +12,10 @@ describe Hydra::Controller::UploadBehavior do
12
12
  file_name = "Posted Filename.foo"
13
13
  helper.stub(:params).and_return( :Filedata=>[mock_file], :Filename=>file_name, "container_id"=>"hydrangea:2973" )
14
14
  mock_fa = mock("file asset")
15
- mock_file.should_receive(:original_filename).and_return(file_name)
15
+ # mock_file.should_receive(:original_filename).and_return(file_name)
16
16
  helper.stub(:datastream_id).and_return('bar')
17
17
  mock_fa.should_receive(:add_file).with(mock_file, 'bar', file_name)
18
- helper.add_posted_blob_to_asset(mock_fa,mock_file) # this is the deprecated 2 argument method
18
+ helper.add_posted_blob_to_asset(mock_fa,mock_file, file_name) # this is the deprecated 2 argument method
19
19
  end
20
20
 
21
21
  it "should support submissions from swfupload" do
@@ -23,18 +23,18 @@ describe Hydra::Controller::UploadBehavior do
23
23
  file_name = "Posted Filename.foo"
24
24
  helper.stub(:params).and_return( :Filedata=>[mock_file], :Filename=>file_name, "container_id"=>"hydrangea:2973" )
25
25
  mock_fa = mock("file asset")
26
- mock_file.should_receive(:original_filename).and_return(file_name)
26
+ # mock_file.should_receive(:original_filename).and_return(file_name)
27
27
  mock_fa.should_receive(:add_file).with(mock_file, 'content', file_name)
28
- helper.add_posted_blob_to_asset(mock_fa,mock_file)
28
+ helper.add_posted_blob_to_asset(mock_fa,mock_file, file_name)
29
29
  end
30
30
  it "should support submissions from single-file uploader, defaulting to dsId of content" do
31
31
  mock_file = mock("File")
32
32
  file_name = "Posted Filename.foo"
33
33
  helper.stub(:params).and_return( :Filedata=>[mock_file], :container_id=>"hydrangea:2973" )
34
- mock_file.should_receive(:original_filename).and_return(file_name)
34
+ # mock_file.should_receive(:original_filename).and_return(file_name)
35
35
  mock_fa = mock("file asset")
36
36
  mock_fa.should_receive(:add_file).with(mock_file, 'content', file_name)
37
- helper.add_posted_blob_to_asset(mock_fa,mock_file)
37
+ helper.add_posted_blob_to_asset(mock_fa,mock_file, file_name)
38
38
  end
39
39
  end
40
40
  end
data/tasks/rspec.rake CHANGED
@@ -1,13 +1,12 @@
1
1
  ENV["RAILS_ROOT"] ||= 'spec/internal'
2
2
 
3
- GEM_ROOT= File.expand_path(File.join(File.dirname(__FILE__),".."))
4
-
5
3
  desc "Run specs"
6
4
  task :spec => [:generate, :fixtures] do |t|
7
- focused_spec = ENV['SPEC'] ? " SPEC=#{File.join(GEM_ROOT, ENV['SPEC'])}" : ''
8
- within_test_app do
9
- system "rake myspec#{focused_spec}"
10
- abort "Error running hydra-core" unless $?.success?
5
+ Bundler.with_clean_env do
6
+ within_test_app do
7
+ system "rake myspec"
8
+ abort "Error running hydra-core" unless $?.success?
9
+ end
11
10
  end
12
11
  end
13
12
 
@@ -27,14 +26,16 @@ task :generate do
27
26
  `cp spec/support/Gemfile spec/internal`
28
27
  puts "Copying generator"
29
28
  `cp -r spec/support/lib/generators spec/internal/lib`
30
- within_test_app do
31
- puts "Bundle install"
32
- `bundle install`
33
- puts "running test_app_generator"
34
- system "rails generate test_app"
35
-
36
- puts "running migrations"
37
- puts `rake db:migrate db:test:prepare`
29
+ Bundler.with_clean_env do
30
+ within_test_app do
31
+ puts "Bundle install"
32
+ `bundle install`
33
+ puts "running test_app_generator"
34
+ system "rails generate test_app"
35
+
36
+ puts "running migrations"
37
+ puts `rake db:migrate db:test:prepare`
38
+ end
38
39
  end
39
40
  end
40
41
  puts "Running specs"
@@ -48,8 +49,6 @@ end
48
49
 
49
50
  def within_test_app
50
51
  FileUtils.cd('spec/internal')
51
- Bundler.with_clean_env do
52
- yield
53
- end
52
+ yield
54
53
  FileUtils.cd('../..')
55
54
  end
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydra-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.1
4
+ version: 6.0.0.pre1
5
+ prerelease: 6
5
6
  platform: ruby
6
7
  authors:
7
8
  - Matt Zumwalt, Bess Sadler, Julie Meloni, Naomi Dushay, Jessie Keck, John Scofield,
@@ -9,256 +10,306 @@ authors:
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2015-06-25 00:00:00.000000000 Z
13
+ date: 2013-01-24 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: rails
16
17
  requirement: !ruby/object:Gem::Requirement
18
+ none: false
17
19
  requirements:
18
- - - "~>"
20
+ - - ~>
19
21
  - !ruby/object:Gem::Version
20
22
  version: 3.2.3
21
23
  type: :runtime
22
24
  prerelease: false
23
25
  version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
24
27
  requirements:
25
- - - "~>"
28
+ - - ~>
26
29
  - !ruby/object:Gem::Version
27
30
  version: 3.2.3
28
31
  - !ruby/object:Gem::Dependency
29
32
  name: blacklight
30
33
  requirement: !ruby/object:Gem::Requirement
34
+ none: false
31
35
  requirements:
32
- - - "~>"
36
+ - - ~>
33
37
  - !ruby/object:Gem::Version
34
38
  version: '4.0'
35
39
  type: :runtime
36
40
  prerelease: false
37
41
  version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
38
43
  requirements:
39
- - - "~>"
44
+ - - ~>
40
45
  - !ruby/object:Gem::Version
41
46
  version: '4.0'
42
47
  - !ruby/object:Gem::Dependency
43
48
  name: devise
44
49
  requirement: !ruby/object:Gem::Requirement
50
+ none: false
45
51
  requirements:
46
- - - ">="
52
+ - - ! '>='
47
53
  - !ruby/object:Gem::Version
48
54
  version: '0'
49
55
  type: :runtime
50
56
  prerelease: false
51
57
  version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
52
59
  requirements:
53
- - - ">="
60
+ - - ! '>='
54
61
  - !ruby/object:Gem::Version
55
62
  version: '0'
56
63
  - !ruby/object:Gem::Dependency
57
64
  name: active-fedora
58
65
  requirement: !ruby/object:Gem::Requirement
66
+ none: false
59
67
  requirements:
60
- - - "~>"
68
+ - - ! '>='
61
69
  - !ruby/object:Gem::Version
62
70
  version: '5.3'
63
71
  type: :runtime
64
72
  prerelease: false
65
73
  version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
66
75
  requirements:
67
- - - "~>"
76
+ - - ! '>='
68
77
  - !ruby/object:Gem::Version
69
78
  version: '5.3'
79
+ - !ruby/object:Gem::Dependency
80
+ name: RedCloth
81
+ requirement: !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - '='
85
+ - !ruby/object:Gem::Version
86
+ version: 4.2.9
87
+ type: :runtime
88
+ prerelease: false
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - '='
93
+ - !ruby/object:Gem::Version
94
+ version: 4.2.9
70
95
  - !ruby/object:Gem::Dependency
71
96
  name: block_helpers
72
97
  requirement: !ruby/object:Gem::Requirement
98
+ none: false
73
99
  requirements:
74
- - - ">="
100
+ - - ! '>='
75
101
  - !ruby/object:Gem::Version
76
102
  version: '0'
77
103
  type: :runtime
78
104
  prerelease: false
79
105
  version_requirements: !ruby/object:Gem::Requirement
106
+ none: false
80
107
  requirements:
81
- - - ">="
108
+ - - ! '>='
82
109
  - !ruby/object:Gem::Version
83
110
  version: '0'
84
111
  - !ruby/object:Gem::Dependency
85
112
  name: sanitize
86
113
  requirement: !ruby/object:Gem::Requirement
114
+ none: false
87
115
  requirements:
88
- - - ">="
116
+ - - ! '>='
89
117
  - !ruby/object:Gem::Version
90
118
  version: '0'
91
119
  type: :runtime
92
120
  prerelease: false
93
121
  version_requirements: !ruby/object:Gem::Requirement
122
+ none: false
94
123
  requirements:
95
- - - ">="
124
+ - - ! '>='
96
125
  - !ruby/object:Gem::Version
97
126
  version: '0'
98
127
  - !ruby/object:Gem::Dependency
99
128
  name: hydra-mods
100
129
  requirement: !ruby/object:Gem::Requirement
130
+ none: false
101
131
  requirements:
102
- - - ">="
132
+ - - ! '>='
103
133
  - !ruby/object:Gem::Version
104
134
  version: 0.0.6
105
135
  type: :runtime
106
136
  prerelease: false
107
137
  version_requirements: !ruby/object:Gem::Requirement
138
+ none: false
108
139
  requirements:
109
- - - ">="
140
+ - - ! '>='
110
141
  - !ruby/object:Gem::Version
111
142
  version: 0.0.6
112
143
  - !ruby/object:Gem::Dependency
113
144
  name: deprecation
114
145
  requirement: !ruby/object:Gem::Requirement
146
+ none: false
115
147
  requirements:
116
- - - ">="
148
+ - - ! '>='
117
149
  - !ruby/object:Gem::Version
118
150
  version: 0.0.5
119
151
  type: :runtime
120
152
  prerelease: false
121
153
  version_requirements: !ruby/object:Gem::Requirement
154
+ none: false
122
155
  requirements:
123
- - - ">="
156
+ - - ! '>='
124
157
  - !ruby/object:Gem::Version
125
158
  version: 0.0.5
126
159
  - !ruby/object:Gem::Dependency
127
160
  name: jquery-rails
128
161
  requirement: !ruby/object:Gem::Requirement
162
+ none: false
129
163
  requirements:
130
- - - ">="
164
+ - - ! '>='
131
165
  - !ruby/object:Gem::Version
132
166
  version: '0'
133
167
  type: :runtime
134
168
  prerelease: false
135
169
  version_requirements: !ruby/object:Gem::Requirement
170
+ none: false
136
171
  requirements:
137
- - - ">="
172
+ - - ! '>='
138
173
  - !ruby/object:Gem::Version
139
174
  version: '0'
140
175
  - !ruby/object:Gem::Dependency
141
176
  name: hydra-access-controls
142
177
  requirement: !ruby/object:Gem::Requirement
178
+ none: false
143
179
  requirements:
144
180
  - - '='
145
181
  - !ruby/object:Gem::Version
146
- version: 5.4.1
182
+ version: 6.0.0.pre1
147
183
  type: :runtime
148
184
  prerelease: false
149
185
  version_requirements: !ruby/object:Gem::Requirement
186
+ none: false
150
187
  requirements:
151
188
  - - '='
152
189
  - !ruby/object:Gem::Version
153
- version: 5.4.1
190
+ version: 6.0.0.pre1
154
191
  - !ruby/object:Gem::Dependency
155
192
  name: sqlite3
156
193
  requirement: !ruby/object:Gem::Requirement
194
+ none: false
157
195
  requirements:
158
- - - ">="
196
+ - - ! '>='
159
197
  - !ruby/object:Gem::Version
160
198
  version: '0'
161
199
  type: :development
162
200
  prerelease: false
163
201
  version_requirements: !ruby/object:Gem::Requirement
202
+ none: false
164
203
  requirements:
165
- - - ">="
204
+ - - ! '>='
166
205
  - !ruby/object:Gem::Version
167
206
  version: '0'
168
207
  - !ruby/object:Gem::Dependency
169
208
  name: yard
170
209
  requirement: !ruby/object:Gem::Requirement
210
+ none: false
171
211
  requirements:
172
- - - ">="
212
+ - - ! '>='
173
213
  - !ruby/object:Gem::Version
174
214
  version: '0'
175
215
  type: :development
176
216
  prerelease: false
177
217
  version_requirements: !ruby/object:Gem::Requirement
218
+ none: false
178
219
  requirements:
179
- - - ">="
220
+ - - ! '>='
180
221
  - !ruby/object:Gem::Version
181
222
  version: '0'
182
223
  - !ruby/object:Gem::Dependency
183
224
  name: jettywrapper
184
225
  requirement: !ruby/object:Gem::Requirement
226
+ none: false
185
227
  requirements:
186
- - - ">="
228
+ - - ! '>='
187
229
  - !ruby/object:Gem::Version
188
230
  version: 1.3.1
189
231
  type: :development
190
232
  prerelease: false
191
233
  version_requirements: !ruby/object:Gem::Requirement
234
+ none: false
192
235
  requirements:
193
- - - ">="
236
+ - - ! '>='
194
237
  - !ruby/object:Gem::Version
195
238
  version: 1.3.1
196
239
  - !ruby/object:Gem::Dependency
197
240
  name: rspec-rails
198
241
  requirement: !ruby/object:Gem::Requirement
242
+ none: false
199
243
  requirements:
200
- - - ">="
244
+ - - ! '>='
201
245
  - !ruby/object:Gem::Version
202
246
  version: '0'
203
247
  type: :development
204
248
  prerelease: false
205
249
  version_requirements: !ruby/object:Gem::Requirement
250
+ none: false
206
251
  requirements:
207
- - - ">="
252
+ - - ! '>='
208
253
  - !ruby/object:Gem::Version
209
254
  version: '0'
210
255
  - !ruby/object:Gem::Dependency
211
256
  name: cucumber-rails
212
257
  requirement: !ruby/object:Gem::Requirement
258
+ none: false
213
259
  requirements:
214
- - - ">="
260
+ - - ! '>='
215
261
  - !ruby/object:Gem::Version
216
262
  version: 1.2.0
217
263
  type: :development
218
264
  prerelease: false
219
265
  version_requirements: !ruby/object:Gem::Requirement
266
+ none: false
220
267
  requirements:
221
- - - ">="
268
+ - - ! '>='
222
269
  - !ruby/object:Gem::Version
223
270
  version: 1.2.0
224
271
  - !ruby/object:Gem::Dependency
225
272
  name: factory_girl_rails
226
273
  requirement: !ruby/object:Gem::Requirement
274
+ none: false
227
275
  requirements:
228
- - - ">="
276
+ - - ! '>='
229
277
  - !ruby/object:Gem::Version
230
278
  version: '0'
231
279
  type: :development
232
280
  prerelease: false
233
281
  version_requirements: !ruby/object:Gem::Requirement
282
+ none: false
234
283
  requirements:
235
- - - ">="
284
+ - - ! '>='
236
285
  - !ruby/object:Gem::Version
237
286
  version: '0'
238
287
  - !ruby/object:Gem::Dependency
239
288
  name: solrizer-fedora
240
289
  requirement: !ruby/object:Gem::Requirement
290
+ none: false
241
291
  requirements:
242
- - - ">="
292
+ - - ! '>='
243
293
  - !ruby/object:Gem::Version
244
294
  version: 2.1.0
245
295
  type: :development
246
296
  prerelease: false
247
297
  version_requirements: !ruby/object:Gem::Requirement
298
+ none: false
248
299
  requirements:
249
- - - ">="
300
+ - - ! '>='
250
301
  - !ruby/object:Gem::Version
251
302
  version: 2.1.0
252
- description: 'Hydra-Head is a Rails Engine containing the core code for a Hydra application.
253
- The full hydra stack includes: Blacklight, Fedora, Solr, active-fedora, solrizer,
254
- and om'
303
+ description: ! 'Hydra-Head is a Rails Engine containing the core code for a Hydra
304
+ application. The full hydra stack includes: Blacklight, Fedora, Solr, active-fedora,
305
+ solrizer, and om'
255
306
  email:
256
307
  - hydra-tech@googlegroups.com
257
308
  executables: []
258
309
  extensions: []
259
310
  extra_rdoc_files: []
260
311
  files:
261
- - ".gitignore"
312
+ - .gitignore
262
313
  - Rakefile
263
314
  - app/helpers/blacklight_helper.rb
264
315
  - app/helpers/facets_helper.rb
@@ -346,26 +397,27 @@ files:
346
397
  - tasks/rspec.rake
347
398
  homepage: http://projecthydra.org
348
399
  licenses: []
349
- metadata: {}
350
400
  post_install_message:
351
401
  rdoc_options: []
352
402
  require_paths:
353
403
  - lib
354
404
  required_ruby_version: !ruby/object:Gem::Requirement
405
+ none: false
355
406
  requirements:
356
- - - ">="
407
+ - - ! '>='
357
408
  - !ruby/object:Gem::Version
358
409
  version: 1.9.3
359
410
  required_rubygems_version: !ruby/object:Gem::Requirement
411
+ none: false
360
412
  requirements:
361
- - - ">="
413
+ - - ! '>'
362
414
  - !ruby/object:Gem::Version
363
- version: '0'
415
+ version: 1.3.1
364
416
  requirements: []
365
417
  rubyforge_project:
366
- rubygems_version: 2.4.5
418
+ rubygems_version: 1.8.24
367
419
  signing_key:
368
- specification_version: 4
420
+ specification_version: 3
369
421
  summary: Hydra-Head Rails Engine (requires Rails3)
370
422
  test_files:
371
423
  - spec/.gitignore
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 48d52222bc896b2d9c11f494fc602c4c382eb42a
4
- data.tar.gz: c614246d07a286f0bd7ccf6bea8b8a1de375019e
5
- SHA512:
6
- metadata.gz: 2286d10d903d8e49917c2e352f0700edb26e4511ebb6234eeebdb1e83326deec056147d93fc3b968ccea9ab6f0632a55e4d81921bd09628f325fbb54b2ea723c
7
- data.tar.gz: 5f21042b0a34570c85ce67d47bd0b4ffc642613a7631a9aa2c249dc9f24ed5ef4da5678bbb77b1c7310773e7f5686fe017699f30a97f3fff764a16042e6c6689