curate 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/app/assets/javascripts/curate.js +13 -1
  2. data/app/assets/javascripts/help_modal.js +2 -2
  3. data/app/assets/javascripts/manage_repeating_fields.js +1 -0
  4. data/app/assets/stylesheets/modules/action_bar.css.scss +16 -1
  5. data/app/builders/bootstrap_breadcrumbs_builder.rb +38 -0
  6. data/app/controllers/application_controller.rb +6 -0
  7. data/app/controllers/catalog_controller.rb +2 -0
  8. data/app/controllers/classify_concerns_controller.rb +2 -0
  9. data/app/controllers/curation_concern/base_controller.rb +15 -0
  10. data/app/controllers/curation_concern/generic_files_controller.rb +5 -0
  11. data/app/controllers/dashboard_controller.rb +0 -1
  12. data/app/controllers/help_requests_controller.rb +2 -0
  13. data/app/controllers/terms_of_service_agreements_controller.rb +2 -0
  14. data/app/helpers/application_helper.rb +10 -12
  15. data/app/inputs/multi_value_input.rb +5 -5
  16. data/app/repository_models/curation_concern/model.rb +8 -1
  17. data/app/views/curation_concern/_manage_related_files.html.erb +15 -0
  18. data/app/views/shared/_action_bar.html.erb +10 -15
  19. data/lib/curate/engine.rb +6 -1
  20. data/lib/curate/version.rb +1 -1
  21. data/spec/dummy/log/test.log +15714 -0
  22. data/spec/dummy/tmp/cache/assets/C21/BE0/sprockets%2F070263a383619079784e4ce15cf15443 +0 -0
  23. data/spec/dummy/tmp/cache/assets/C9E/A80/sprockets%2F8401fd13fe82bb392806930ed02005e1 +0 -0
  24. data/spec/dummy/tmp/cache/assets/CA9/5C0/sprockets%2F7d4fe23150294500a7bcd2630667e5c8 +0 -0
  25. data/spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  26. data/spec/dummy/tmp/cache/assets/CE9/740/sprockets%2F4c5e67849a42922256c692cebe3625ae +0 -0
  27. data/spec/dummy/tmp/cache/assets/CEB/D10/sprockets%2Fd72f494e234538d23936515dce8c2e6c +0 -0
  28. data/spec/dummy/tmp/cache/assets/D0D/8D0/sprockets%2F374cb33170b158fda7fd680d1126c99c +0 -0
  29. data/spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  30. data/spec/dummy/tmp/cache/assets/D3E/730/sprockets%2F4132e961bdf0f2ffa2f96a4c7822e209 +0 -0
  31. data/spec/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  32. data/spec/dummy/tmp/cache/assets/D57/2F0/sprockets%2Fcdf8872264f5f8dd811cdf810f6875a7 +0 -0
  33. data/spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  34. data/spec/dummy/tmp/cache/assets/D7E/E80/sprockets%2F611235bfd282813bdfbc998bcbe798e8 +0 -0
  35. data/spec/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  36. data/spec/dummy/tmp/cache/assets/E00/540/sprockets%2Fea0ece5befbce765051e27cf991cc805 +0 -0
  37. data/spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  38. data/spec/dummy/tmp/cache/sass/0001e962498f25574bbd80ca1698db9761058853/action_bar.css.scssc +0 -0
  39. data/spec/features/end_to_end_spec.rb +30 -2
  40. data/spec/helpers/application_helper_spec.rb +3 -2
  41. metadata +25 -3
@@ -35,6 +35,34 @@ describe 'end to end behavior', describe_options do
35
35
  let(:updated_title) { "#{prefix} Another Not Quite" }
36
36
  let(:updated_file_path) { Rails.root.join('app/controllers/application_controller.rb').to_s }
37
37
 
38
+ def assert_breadcrumb_trail(page, *breadcrumbs)
39
+ page.assert_selector('.breadcrumb li', count: breadcrumbs.length)
40
+ within('.breadcrumb') do
41
+ breadcrumbs.each do |text, path|
42
+ if String(path).empty?
43
+ page.has_css?('li', text: text)
44
+ else
45
+ page.has_css?("li a[href='#{path}']", text: text)
46
+ end
47
+ end
48
+ end
49
+ end
50
+
51
+ describe 'breadcrumb' do
52
+ let(:agreed_to_terms_of_service) { true }
53
+ it 'renders a breadcrumb' do
54
+ login_as(user)
55
+ visit('/')
56
+ click_link('Get Started')
57
+ assert_breadcrumb_trail(page, ["Dashboard", '/dashboard'], ["What are you uploading?", nil])
58
+
59
+ visit('/concern/mock_curation_concerns/new')
60
+ assert_breadcrumb_trail(page, ["Dashboard", '/dashboard'], ['New Mock Curation Concern', nil])
61
+ end
62
+ end
63
+
64
+
65
+
38
66
  describe 'terms of service' do
39
67
  let(:agreed_to_terms_of_service) { false }
40
68
  it "only requires me to agree once" do
@@ -61,13 +89,13 @@ describe 'end to end behavior', describe_options do
61
89
  page.should have_content("What are you uploading?")
62
90
  end
63
91
 
64
- it "allows me to directly create a senior thesis" do
92
+ it "allows me to directly create a mock curation concern" do
65
93
  login_as(user)
66
94
  visit('/concern/mock_curation_concerns/new')
67
95
  page.assert_selector('.main-header h2', "Describe Your Thesis")
68
96
  end
69
97
 
70
- it 'remembers senior thesis inputs when data was invalid' do
98
+ it 'remembers mock curation concern inputs when data was invalid' do
71
99
  login_as(user)
72
100
  visit('/concern/mock_curation_concerns/new')
73
101
  create_mock_curation_concern(
@@ -59,15 +59,16 @@ describe ApplicationHelper do
59
59
  describe '#bootstrap_navigation_element' do
60
60
  let(:path) { '/hello/world' }
61
61
  let(:name) { "Link Name"}
62
+ let(:expected_css_matcher) { 'li.active a[href="#"]' }
62
63
  it 'disables the navigation link to the active page' do
63
64
  helper.should_receive(:current_page?).with(path).and_return(true)
64
65
  expect(helper.bootstrap_navigation_element(name, path)).
65
- to have_tag('li.disabled a')
66
+ to have_tag(expected_css_matcher)
66
67
  end
67
68
  it 'does not disable a navigation link that is not the active page' do
68
69
  helper.should_receive(:current_page?).with(path).and_return(false)
69
70
  expect(helper.bootstrap_navigation_element(name, path)).
70
- to_not have_tag('li.disabled a')
71
+ to_not have_tag(expected_css_matcher)
71
72
  end
72
73
  end
73
74
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: curate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -267,6 +267,22 @@ dependencies:
267
267
  - - '>='
268
268
  - !ruby/object:Gem::Version
269
269
  version: '0'
270
+ - !ruby/object:Gem::Dependency
271
+ name: breadcrumbs_on_rails
272
+ requirement: !ruby/object:Gem::Requirement
273
+ none: false
274
+ requirements:
275
+ - - '>='
276
+ - !ruby/object:Gem::Version
277
+ version: '0'
278
+ type: :runtime
279
+ prerelease: false
280
+ version_requirements: !ruby/object:Gem::Requirement
281
+ none: false
282
+ requirements:
283
+ - - '>='
284
+ - !ruby/object:Gem::Version
285
+ version: '0'
270
286
  - !ruby/object:Gem::Dependency
271
287
  name: sqlite3
272
288
  requirement: !ruby/object:Gem::Requirement
@@ -478,6 +494,7 @@ files:
478
494
  - app/assets/stylesheets/modules.scss
479
495
  - app/assets/stylesheets/style/theme.css.scss
480
496
  - app/assets/stylesheets/style/typography.css.scss
497
+ - app/builders/bootstrap_breadcrumbs_builder.rb
481
498
  - app/controllers/application_controller.rb
482
499
  - app/controllers/catalog_controller.rb
483
500
  - app/controllers/classify_concerns_controller.rb
@@ -580,6 +597,7 @@ files:
580
597
  - app/views/curation_concern/_content_license.html.erb
581
598
  - app/views/curation_concern/_contributor_agreement.html.erb
582
599
  - app/views/curation_concern/_doi.html.erb
600
+ - app/views/curation_concern/_manage_related_files.html.erb
583
601
  - app/views/curation_concern/_media_display.html.erb
584
602
  - app/views/curation_concern/_permission.html.erb
585
603
  - app/views/curation_concern/_related_files.html.erb
@@ -805,6 +823,7 @@ files:
805
823
  - spec/dummy/tmp/cache/assets/CE4/1B0/sprockets%2F4893667b7a21289b464be4bb05d6cb37
806
824
  - spec/dummy/tmp/cache/assets/CE9/740/sprockets%2F4c5e67849a42922256c692cebe3625ae
807
825
  - spec/dummy/tmp/cache/assets/CEA/8C0/sprockets%2Fa95a807cc5ce999a772c65c332a38254
826
+ - spec/dummy/tmp/cache/assets/CEB/D10/sprockets%2Fd72f494e234538d23936515dce8c2e6c
808
827
  - spec/dummy/tmp/cache/assets/CEF/9C0/sprockets%2F8d35c088af286570915ee524f71fca67
809
828
  - spec/dummy/tmp/cache/assets/CF2/220/sprockets%2Fd2473a08bfca80032fc2b63d1b701155
810
829
  - spec/dummy/tmp/cache/assets/CF7/0D0/sprockets%2F3083ce7289f23b977d2374f259fb7be7
@@ -817,6 +836,7 @@ files:
817
836
  - spec/dummy/tmp/cache/assets/D0C/8E0/sprockets%2Fd5988a30a4210af88a139700ae89aa9d
818
837
  - spec/dummy/tmp/cache/assets/D0D/320/sprockets%2F6197f7697db2c678ff77ffa98837822a
819
838
  - spec/dummy/tmp/cache/assets/D0D/440/sprockets%2Fbc086214da3895404ab038e397bdf45f
839
+ - spec/dummy/tmp/cache/assets/D0D/8D0/sprockets%2F374cb33170b158fda7fd680d1126c99c
820
840
  - spec/dummy/tmp/cache/assets/D11/390/sprockets%2F1f48c3cd0d514b4e189d16015388ef9b
821
841
  - spec/dummy/tmp/cache/assets/D11/670/sprockets%2F6bc2cb555fe34b794095fa5878103ac3
822
842
  - spec/dummy/tmp/cache/assets/D13/2E0/sprockets%2F7b125a9e648ff8bc51848d05f3a2a822
@@ -1130,7 +1150,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1130
1150
  version: '0'
1131
1151
  segments:
1132
1152
  - 0
1133
- hash: 2212681131524564066
1153
+ hash: 1332653988473689382
1134
1154
  required_rubygems_version: !ruby/object:Gem::Requirement
1135
1155
  none: false
1136
1156
  requirements:
@@ -1139,7 +1159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1139
1159
  version: '0'
1140
1160
  segments:
1141
1161
  - 0
1142
- hash: 2212681131524564066
1162
+ hash: 1332653988473689382
1143
1163
  requirements: []
1144
1164
  rubyforge_project:
1145
1165
  rubygems_version: 1.8.25
@@ -1315,6 +1335,7 @@ test_files:
1315
1335
  - spec/dummy/tmp/cache/assets/CE4/1B0/sprockets%2F4893667b7a21289b464be4bb05d6cb37
1316
1336
  - spec/dummy/tmp/cache/assets/CE9/740/sprockets%2F4c5e67849a42922256c692cebe3625ae
1317
1337
  - spec/dummy/tmp/cache/assets/CEA/8C0/sprockets%2Fa95a807cc5ce999a772c65c332a38254
1338
+ - spec/dummy/tmp/cache/assets/CEB/D10/sprockets%2Fd72f494e234538d23936515dce8c2e6c
1318
1339
  - spec/dummy/tmp/cache/assets/CEF/9C0/sprockets%2F8d35c088af286570915ee524f71fca67
1319
1340
  - spec/dummy/tmp/cache/assets/CF2/220/sprockets%2Fd2473a08bfca80032fc2b63d1b701155
1320
1341
  - spec/dummy/tmp/cache/assets/CF7/0D0/sprockets%2F3083ce7289f23b977d2374f259fb7be7
@@ -1327,6 +1348,7 @@ test_files:
1327
1348
  - spec/dummy/tmp/cache/assets/D0C/8E0/sprockets%2Fd5988a30a4210af88a139700ae89aa9d
1328
1349
  - spec/dummy/tmp/cache/assets/D0D/320/sprockets%2F6197f7697db2c678ff77ffa98837822a
1329
1350
  - spec/dummy/tmp/cache/assets/D0D/440/sprockets%2Fbc086214da3895404ab038e397bdf45f
1351
+ - spec/dummy/tmp/cache/assets/D0D/8D0/sprockets%2F374cb33170b158fda7fd680d1126c99c
1330
1352
  - spec/dummy/tmp/cache/assets/D11/390/sprockets%2F1f48c3cd0d514b4e189d16015388ef9b
1331
1353
  - spec/dummy/tmp/cache/assets/D11/670/sprockets%2F6bc2cb555fe34b794095fa5878103ac3
1332
1354
  - spec/dummy/tmp/cache/assets/D13/2E0/sprockets%2F7b125a9e648ff8bc51848d05f3a2a822