hydra-core 7.0.2 → 7.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d577174ff0ef92967ca14739944d84afb20a9423
4
- data.tar.gz: 9a543361435ece3e0d8dd79c7e3f14e7ef132cbf
3
+ metadata.gz: 49c1ef1f64800f182b669ba5b25067a0a7d415d4
4
+ data.tar.gz: 1fd527af20a13a8b4dc3db83892f241c633000c3
5
5
  SHA512:
6
- metadata.gz: d63eebac5910e2c2e605a14f0410ce08ddbd6e36bf322070475d96ddf39189c9ccf0c3f85a9d431ca5dc091bb2bcdea9dd1a93984cdb50c89314805f3aec7e9c
7
- data.tar.gz: 4159b69fa1ff989ef98e07e15e8d8322f168df8dd7670ce23e62deba5276e531245eddc24ed78e937df12558d4bd28962772b28c0986fe3ac53e83e45d857e25
6
+ metadata.gz: 3740cfd837867de113e17925b004e65d71d363be1c651fad8f11a6d2abf048e78cc970f942e14507422737082377523c77aa4fe2dd348365eca7697321869bb0
7
+ data.tar.gz: 7d9cf5f855fb92a68cc2b91d5281226a6db7e52252be6bde9826e54d14e71dd95c2e49bf0eb4b780459d43efbfc702a8fd7fc0ff330e7205f74bf1b75285b204
@@ -7,6 +7,8 @@ module Hydra
7
7
  source_root File.expand_path('../templates', __FILE__)
8
8
 
9
9
  argument :model_name, :type => :string , :default => "user"
10
+ class_option :'skip-rspec', type: :boolean, default: false, desc: "Skip the rspec generator"
11
+
10
12
 
11
13
  desc """
12
14
  This generator makes the following changes to your application:
@@ -21,6 +23,8 @@ module Hydra
21
23
  #
22
24
 
23
25
  def inject_test_framework
26
+ return if options[:'skip-rspec']
27
+
24
28
  application("\n" <<
25
29
  " config.generators do |g|\n" <<
26
30
  " g.test_framework :rspec, :spec => true\n" <<
@@ -1,4 +1,4 @@
1
1
  module HydraHead
2
- VERSION = "7.0.2"
2
+ VERSION = "7.1.0.rc1"
3
3
  end
4
4
 
@@ -28,6 +28,6 @@ class TestAppGenerator < Rails::Generators::Base
28
28
  def run_hydra_head_generator
29
29
  say_status("warning", "GENERATING HH", :yellow)
30
30
 
31
- generate 'hydra:head', '-f'
31
+ generate 'hydra:head', '-f --skip-rspec'
32
32
  end
33
33
  end
@@ -1,4 +1,6 @@
1
1
  group :develop do
2
2
  gem 'active-fedora', github: "projecthydra/active_fedora"
3
3
  end
4
+ gem 'rspec-rails', '~> 2.99', group: :test
5
+ gem 'rspec-its'
4
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydra-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.2
4
+ version: 7.1.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Zumwalt, Bess Sadler, Julie Meloni, Naomi Dushay, Jessie Keck, John Scofield,
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-06 00:00:00.000000000 Z
12
+ date: 2014-06-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -51,14 +51,14 @@ dependencies:
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 7.0.2
54
+ version: 7.1.0.rc1
55
55
  type: :runtime
56
56
  prerelease: false
57
57
  version_requirements: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 7.0.2
61
+ version: 7.1.0.rc1
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: jettywrapper
64
64
  requirement: !ruby/object:Gem::Requirement
@@ -169,7 +169,6 @@ files:
169
169
  - lib/railties/hydra_jetty.rake
170
170
  - spec/.gitignore
171
171
  - spec/controllers/catalog_controller_spec.rb
172
- - spec/controllers/catalog_valid_html_spec.rb
173
172
  - spec/controllers/downloads_controller_spec.rb
174
173
  - spec/factories.rb
175
174
  - spec/helpers/blacklight_helper_spec.rb
@@ -213,9 +212,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
213
212
  version: 1.9.3
214
213
  required_rubygems_version: !ruby/object:Gem::Requirement
215
214
  requirements:
216
- - - ">="
215
+ - - ">"
217
216
  - !ruby/object:Gem::Version
218
- version: '0'
217
+ version: 1.3.1
219
218
  requirements: []
220
219
  rubyforge_project:
221
220
  rubygems_version: 2.2.2
@@ -225,7 +224,6 @@ summary: Hydra-Head Rails Engine (requires Rails3)
225
224
  test_files:
226
225
  - spec/.gitignore
227
226
  - spec/controllers/catalog_controller_spec.rb
228
- - spec/controllers/catalog_valid_html_spec.rb
229
227
  - spec/controllers/downloads_controller_spec.rb
230
228
  - spec/factories.rb
231
229
  - spec/helpers/blacklight_helper_spec.rb
@@ -1,81 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
-
3
- # This uses nokogiri to check formedness. It's slightly less strict than the markup_validit
4
- # currently not being used.
5
- def well_formed(html)
6
- begin
7
- Nokogiri::XML(html.gsub("&", "&amp;" )) { |config| config.strict } #Literal & in text are not allowed, but we don't care.
8
- return "ok"
9
- rescue Nokogiri::XML::SyntaxError => e
10
- # Write the offensive HTML to a file in tmp/html_validity_failures with a filename based on Time.now.iso8601
11
- html_failures_dir = File.expand_path(File.dirname(__FILE__) + '/../../tmp/html_validity_failures')
12
- FileUtils.mkdir_p(html_failures_dir)
13
- filename = Time.now.iso8601(3).gsub(":","")+".html"
14
- file_path = File.join(html_failures_dir, filename)
15
- file = File.open(file_path, "w")
16
- file.write(html)
17
- return "#{e.inspect} -- Line: #{e.line} -- Level: #{e.level} -- Code: #{e.code}. HTML Saved to RAILS_ROOT/tmp/html_validity_failures/#{filename}"
18
- end
19
- end
20
-
21
-
22
-
23
- # This checks document for validity (if required) and well formedness
24
- # Pass in a html string. IF you want to check for XHTML validity, do rake spec HTML_VALIDITY=true. Otherwise only document form is checked
25
- # by nokogiri.
26
- def document_check(html, html_validity=ENV["HTML_VALIDITY"])
27
- if html_validity == "true" || html_validity == true
28
- html.should be_xhtml_transitional
29
- end
30
- well_formed(html).should == "ok"
31
- end
32
-
33
-
34
- describe CatalogController do
35
- describe "Home Page" do
36
-
37
- it "Should have Valid HTML when not logged in" do
38
- get("index", "controller"=>"catalog")
39
- document_check(response.body)
40
- end
41
-
42
- it "Should have Valid HTML when I'm logged in" do
43
- sign_in FactoryGirl.build(:user, :email=>"archivist1@example.com")
44
- get("index", "controller"=>"catalog")
45
- document_check(response.body)
46
- end
47
- end
48
-
49
- describe "Document Pages" do
50
-
51
- before(:each) do
52
- mock_user = FactoryGirl.build(:user, :email=>"archivist1@example.com")
53
- sign_in mock_user
54
- end
55
-
56
- it "Should have valid html when in Article Browse Show" do
57
- get(:show, {:id=>"hydrangea:fixture_mods_article1"})
58
- document_check(response.body)
59
- end
60
-
61
- it "Should have valid html when in Dataset Browse Show" do
62
- get(:show, {:id=>"hydrangea:fixture_mods_dataset1"})
63
- document_check(response.body)
64
- end
65
-
66
- it "Should have valid html when in Dataset Browse Show" do
67
- get(:show, {:id=>"hydrus:admin_class1"})
68
- File.open('/tmp/out.xml', 'w') { |f| f << response.body }
69
- document_check(response.body)
70
- end
71
-
72
- # The delete view should be the same for all data types
73
- it "Should have valid html when in Dataset Delete" do
74
- get(:show, {:id=>"hydrangea:fixture_mods_dataset1"}, :action=>"delete")
75
- document_check(response.body)
76
- end
77
-
78
-
79
- end #Document pages
80
-
81
- end