ex_cite 1.0.0

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.
Files changed (129) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +43 -0
  4. data/app/assets/javascripts/ex_cite/application.js +15 -0
  5. data/app/assets/javascripts/ex_cite/cite.js +2 -0
  6. data/app/assets/stylesheets/ex_cite/application.css +13 -0
  7. data/app/assets/stylesheets/ex_cite/cite.css +4 -0
  8. data/app/controllers/ex_cite/export_citations_controller.rb +171 -0
  9. data/app/helpers/ex_cite/application_helper.rb +14 -0
  10. data/app/models/ex_cite/citation.rb +17 -0
  11. data/app/models/ex_cite/push_format.rb +15 -0
  12. data/app/models/ex_cite/resource_key.rb +13 -0
  13. data/app/views/ex_cite/cite/_external_form.html.erb +26 -0
  14. data/app/views/ex_cite/cite/external_form.html.erb +1 -0
  15. data/app/views/layouts/ex_cite/application.html.erb +14 -0
  16. data/config/initializers/citation.rb +7 -0
  17. data/config/initializers/mime_types.rb +3 -0
  18. data/config/routes.rb +3 -0
  19. data/lib/ex_cite/core_ext.rb +32 -0
  20. data/lib/ex_cite/engine.rb +44 -0
  21. data/lib/ex_cite/version.rb +3 -0
  22. data/lib/tasks/ex_cite_tasks.rake +4 -0
  23. data/test/dummy/README.rdoc +261 -0
  24. data/test/dummy/Rakefile +7 -0
  25. data/test/dummy/app/assets/javascripts/application.js +15 -0
  26. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  27. data/test/dummy/app/controllers/application_controller.rb +3 -0
  28. data/test/dummy/app/helpers/application_helper.rb +2 -0
  29. data/test/dummy/app/models/type_one.rb +7 -0
  30. data/test/dummy/app/models/type_two.rb +6 -0
  31. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  32. data/test/dummy/config/application.rb +59 -0
  33. data/test/dummy/config/boot.rb +10 -0
  34. data/test/dummy/config/database.yml +20 -0
  35. data/test/dummy/config/environment.rb +5 -0
  36. data/test/dummy/config/environments/development.rb +37 -0
  37. data/test/dummy/config/environments/production.rb +67 -0
  38. data/test/dummy/config/environments/test.rb +37 -0
  39. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  40. data/test/dummy/config/initializers/inflections.rb +15 -0
  41. data/test/dummy/config/initializers/mime_types.rb +5 -0
  42. data/test/dummy/config/initializers/secret_token.rb +7 -0
  43. data/test/dummy/config/initializers/session_store.rb +8 -0
  44. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  45. data/test/dummy/config/locales/en.yml +5 -0
  46. data/test/dummy/config/routes.rb +4 -0
  47. data/test/dummy/config.ru +4 -0
  48. data/test/dummy/db/development.sqlite3 +0 -0
  49. data/test/dummy/db/migrate/20130211192047_create_type_ones.rb +11 -0
  50. data/test/dummy/db/migrate/20130211192122_create_type_twos.rb +11 -0
  51. data/test/dummy/db/schema.rb +32 -0
  52. data/test/dummy/db/test.sqlite3 +0 -0
  53. data/test/dummy/log/development.log +128 -0
  54. data/test/dummy/log/test.log +9156 -0
  55. data/test/dummy/public/404.html +26 -0
  56. data/test/dummy/public/422.html +26 -0
  57. data/test/dummy/public/500.html +25 -0
  58. data/test/dummy/public/favicon.ico +0 -0
  59. data/test/dummy/script/rails +6 -0
  60. data/test/dummy/test/fixtures/type_ones.yml +36 -0
  61. data/test/dummy/test/fixtures/type_twos.yml +11 -0
  62. data/test/dummy/test/unit/ex_cite_record_test.rb +7 -0
  63. data/test/dummy/test/unit/record_test.rb +7 -0
  64. data/test/dummy/test/unit/type_one_test.rb +7 -0
  65. data/test/dummy/test/unit/type_two_test.rb +7 -0
  66. data/test/dummy/tmp/cache/00B/8A1/c9d431e57fa51ecef5d8dfed8ead3fa142c71284to_easybib +1 -0
  67. data/test/dummy/tmp/cache/031/0D1/c9d431e57fa51ecef5d8dfed8ead3fa142c71284to_openurl +1 -0
  68. data/test/dummy/tmp/cache/C5A/FC0/468286998ed7e41613b5b638604d0d418e16f000to_csf +3 -0
  69. data/test/dummy/tmp/cache/C6C/220/468286998ed7e41613b5b638604d0d418e16f000to_ris +4 -0
  70. data/test/dummy/tmp/cache/CA2/960/1d506e64f277826763665b38ce9f7000cb23673fto_ris +4 -0
  71. data/test/dummy/tmp/cache/CEF/FF0/de17f25829c0b9d278f4a4b873a9765a81e10481to_csf +3 -0
  72. data/test/dummy/tmp/cache/CF2/440/1ad5e264e5a423b07ab635982e79e35290b85c41to_ris +4 -0
  73. data/test/dummy/tmp/cache/D3B/E70/794c17bcbef330a90c5063ca7b881b06685047aeto_csf +3 -0
  74. data/test/dummy/tmp/cache/D4D/0D0/794c17bcbef330a90c5063ca7b881b06685047aeto_ris +4 -0
  75. data/test/dummy/tmp/cache/D5E/ED0/1e1a808df870f039ac20fd161b9c4ea0a3a12101to_ris +4 -0
  76. data/test/dummy/tmp/cache/D86/BF0/6c38bce413d92f7b510f508f23f947e0be53c60fto_ris +9 -0
  77. data/test/dummy/tmp/cache/D9C/600/468286998ed7e41613b5b638604d0d418e16f000to_bibtex +2 -0
  78. data/test/dummy/tmp/cache/DA4/540/affd98a65c2fce8403f2d2776024add085305dc8to_csf +3 -0
  79. data/test/dummy/tmp/cache/DB6/7A0/affd98a65c2fce8403f2d2776024add085305dc8to_ris +4 -0
  80. data/test/dummy/tmp/cache/DB8/5B0/a14aff18a493e0f4e01c75d4f39ea2426ff17c89to_ris +9 -0
  81. data/test/dummy/tmp/cache/DF8/1A0/ca02f65b1e44e0da798cff8e53adb7a70211fe70to_csf +1 -0
  82. data/test/dummy/tmp/cache/DFD/850/468286998ed7e41613b5b638604d0d418e16f000to_easybib +1 -0
  83. data/test/dummy/tmp/cache/E0A/400/ca02f65b1e44e0da798cff8e53adb7a70211fe70to_ris +4 -0
  84. data/test/dummy/tmp/cache/E0F/540/ea6c0a7650e32439bef1894db08c8bbf09a2fac6to_ris +4 -0
  85. data/test/dummy/tmp/cache/E23/080/468286998ed7e41613b5b638604d0d418e16f000to_openurl +1 -0
  86. data/test/dummy/tmp/cache/E34/BE0/af5dc25c4cb1c5d8a1fd83234ecf9fcb76f23952to_csf +3 -0
  87. data/test/dummy/tmp/cache/E46/8B0/35f6ed07eec1943f18d5c970502033f3087000a1to_easybib +1 -0
  88. data/test/dummy/tmp/cache/E46/E40/af5dc25c4cb1c5d8a1fd83234ecf9fcb76f23952to_ris +4 -0
  89. data/test/dummy/tmp/cache/E4E/C40/e493a26438256bfe6a011042b33e1577252cfb89to_easybib +1 -0
  90. data/test/dummy/tmp/cache/E60/9B0/cc141d92caee81bd0601a5ee365fdf9ec31d23bbto_ris +4 -0
  91. data/test/dummy/tmp/cache/E68/C90/c9d431e57fa51ecef5d8dfed8ead3fa142c71284to_csf +4 -0
  92. data/test/dummy/tmp/cache/E7A/EF0/c9d431e57fa51ecef5d8dfed8ead3fa142c71284to_ris +5 -0
  93. data/test/dummy/tmp/cache/E7D/EE0/794c17bcbef330a90c5063ca7b881b06685047aeto_bibtex +2 -0
  94. data/test/dummy/tmp/cache/EDE/F40/794c17bcbef330a90c5063ca7b881b06685047aeto_easybib +1 -0
  95. data/test/dummy/tmp/cache/EE6/960/affd98a65c2fce8403f2d2776024add085305dc8to_bibtex +2 -0
  96. data/test/dummy/tmp/cache/F04/770/794c17bcbef330a90c5063ca7b881b06685047aeto_openurl +1 -0
  97. data/test/dummy/tmp/cache/F3A/580/ca02f65b1e44e0da798cff8e53adb7a70211fe70to_bibtex +2 -0
  98. data/test/dummy/tmp/cache/F47/050/affd98a65c2fce8403f2d2776024add085305dc8to_easybib +1 -0
  99. data/test/dummy/tmp/cache/F57/080/32620a8c5f851fed6e2f8a0aa39e6b9d747d7f94to_easybib +1 -0
  100. data/test/dummy/tmp/cache/F6D/880/affd98a65c2fce8403f2d2776024add085305dc8to_openurl +1 -0
  101. data/test/dummy/tmp/cache/F76/B00/af5dc25c4cb1c5d8a1fd83234ecf9fcb76f23952to_bibtex +2 -0
  102. data/test/dummy/tmp/cache/F88/580/a303145d2d5cdb18031c0f7cde5d0c3eb5673addto_easybib +1 -0
  103. data/test/dummy/tmp/cache/F9B/1B0/ca02f65b1e44e0da798cff8e53adb7a70211fe70to_easybib +1 -0
  104. data/test/dummy/tmp/cache/FAA/570/c9d431e57fa51ecef5d8dfed8ead3fa142c71284to_bibtex +3 -0
  105. data/test/dummy/tmp/cache/FAF/0C0/5c66e1737c71a44c1c2c0c53aacfdbe21a47d22dto_openurl +1 -0
  106. data/test/dummy/tmp/cache/FC1/9E0/ca02f65b1e44e0da798cff8e53adb7a70211fe70to_openurl +1 -0
  107. data/test/dummy/tmp/cache/FD7/AF0/af5dc25c4cb1c5d8a1fd83234ecf9fcb76f23952to_easybib +1 -0
  108. data/test/dummy/tmp/cache/FFD/320/af5dc25c4cb1c5d8a1fd83234ecf9fcb76f23952to_openurl +1 -0
  109. data/test/dummy/tmp/cache/assets/C88/210/sprockets%2F3472207be8196858ab6481c8dd11d565 +0 -0
  110. data/test/dummy/tmp/cache/assets/CA5/4B0/sprockets%2F67891927e7bd2bf4c3101f0601b64c13 +0 -0
  111. data/test/dummy/tmp/cache/assets/CAA/B20/sprockets%2F16b93e59165164c8025e7bc0d9a0820d +0 -0
  112. data/test/dummy/tmp/cache/assets/CB8/590/sprockets%2Fa012427e7a6889d39e712c35d3b395e6 +0 -0
  113. data/test/dummy/tmp/cache/assets/CDA/530/sprockets%2F80873e6605453beaef3e0c77101d51f4 +0 -0
  114. data/test/dummy/tmp/cache/assets/D0A/C10/sprockets%2F0cdf5169c4f0a054b8a2983d235bf734 +0 -0
  115. data/test/dummy/tmp/cache/assets/D0A/F70/sprockets%2F14de97f92b1a1c729c25b2f1a334c828 +0 -0
  116. data/test/dummy/tmp/cache/assets/D1A/C50/sprockets%2Ff78583ed1a84891a6231df3970bb4c5f +0 -0
  117. data/test/dummy/tmp/cache/assets/D28/3C0/sprockets%2F739cc596997bde456b65f5e4660b45ca +0 -0
  118. data/test/dummy/tmp/cache/assets/D43/AB0/sprockets%2Fe82e6c7f76371a3bb54b224891fecc25 +0 -0
  119. data/test/dummy/tmp/cache/assets/DA6/710/sprockets%2F8d5e918def34872c4e7c204b2fce32dd +0 -0
  120. data/test/dummy/tmp/cache/assets/DE6/DC0/sprockets%2F5bcaed820e6cbee0a0e092561ce0e25a +0 -0
  121. data/test/dummy/tmp/cache/assets/DF9/B40/sprockets%2F61ea80c2ba85ceb6a249ea3ea3fe5c59 +0 -0
  122. data/test/dummy/tmp/cache/assets/F28/980/sprockets%2Fcd4defde398dcfb53eea6dd7ba9ad6af +0 -0
  123. data/test/fixtures/ex_cite/citations.yml +11 -0
  124. data/test/functional/ex_cite/export_citations _controller_test.rb +123 -0
  125. data/test/integration/navigation_test.rb +10 -0
  126. data/test/test_helper.rb +35 -0
  127. data/test/unit/ex_cite/citation_test.rb +32 -0
  128. data/test/unit/helpers/ex_cite/cite_helper_test.rb +6 -0
  129. metadata +478 -0
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,36 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ one:
4
+ formatting: MyString
5
+ title: MyString
6
+ raw: MyString
7
+
8
+ two:
9
+ formatting: MyString
10
+ title: MyString
11
+ raw: MyString
12
+
13
+ csf:
14
+ formatting: csf
15
+ title: csf
16
+ raw: "itemType: book\nauthor: Alexander Dumas\ncontributor: D'Artagnan\ntitle: The Three Musketeers"
17
+
18
+ ris:
19
+ formatting: ris
20
+ title: ris
21
+ raw: "TY - JOUR\nAU - Shannon,Claude E.\nER -\n\n"
22
+
23
+ pnx:
24
+ formatting: pnx
25
+ title: pnx
26
+ raw: "<display><type>book</type><title>Information literacy : infiltrating the agenda, challenging minds</title><contributor>Geoff Walton (Geoff L.); Alison Pope</contributor><publisher>Oxford : Chandos Publishing</publisher><creationdate>2011</creationdate><format>xxvi, 294 p. ; 24 cm.</format><identifier>$$Cisbn$$V1843346109; $$Cisbn$$V9781843346104</identifier><subject>Information literacy; Information literacy -- Study and teaching; Information literacy -- Web-based instruction; Library orientation for graduate students; Information services -- User education</subject><description>$$Ccontents$$VIntroduction / Alison Pope and Geoff Walton -- Information literate pedagogy : developing a levels framework for the Open University / Katharine Reedy and Kirsty Baker -- Information literacy in the workplace and the employablity agenda / John Crawford and Christine Irving -- Information literacy in the context of contemporary teaching methods in higher education / Chris Wakeman -- 'Enquiring Minds' and the role of information literacy in the design, management and assessment of student research tasks / Keith Puttick -- Are we sharing our toys in the sandpit? Issues surrounding the design, creation, reuse and re-purposing of learning objects to support information skills and teaching? / Nancy Graham -- Spielburg your way to information literacy : producing educational movies and videos / Gareth Johnson -- Information literacy and noö̈politics / Andrew Whitworth -- Contemporary technologies' influence on learning as a social practice / Ben Scoble -- Understanding the information literacy competencies of UK Higher Education students / Jillian R. Griffiths and Bob Glass.</description><language>eng</language><relation>$$Cseries $$VChandos information professional series</relation><source>nyu_aleph</source><availlibrary>$$INYU$$LBOBST$$1Main Collection$$2(ZA3075 .I54 2011 )$$Savailable$$31$$40$$5N$$60$$XNYU50$$YBOBST$$ZMAIN</availlibrary><lds02>nyu_aleph003522839</lds02><lds01>NYU</lds01><availinstitution>$$INYU$$Savailable</availinstitution><availpnx>available</availpnx></display>"
27
+
28
+ bibtex:
29
+ formatting: bibtex
30
+ title: bibtex
31
+ raw: "@article{Adams2001,\nauthor = {Adams, Nancy K and DeSilva, Shanaka L and Self, Steven and Salas, Guido and Schubring, Steven and Permenter, Jason L and Arbesman, Kendra},\nfile = {:Users/heatherwright/Documents/Scientific Papers/Adams\\_Huaynaputina.pdf:pdf;::},\njournal = {Bulletin of Volcanology},\nkeywords = {Vulcanian eruptions,breadcrust,plinian},\npages = {493--518},\ntitle = {{The physical volcanology of the 1600 eruption of Huaynaputina, southern Peru}},\nvolume = {62},\nyear = {2001}\n}"
32
+
33
+ openurl:
34
+ formatting: openurl
35
+ title: openurl
36
+ raw: "https://getit.library.nyu.edu/resolve?url_ver=Z39.88-2004&rft_val_fmt=info:ofi/fmt:kev:mtx:book&rft.isbn=0836218310&rft.btitle=The+Far+Side+Gallery+3&rft.au=Gary+Larson"
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ one:
4
+ from_format: MyString
5
+ item: MyString
6
+ data: MyString
7
+
8
+ two:
9
+ from_format: MyString
10
+ item: MyString
11
+ data: MyString
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class ExCiteRecordTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class RecordTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class TypeOneTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class TypeTwoTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.009:@expires_in0: @value"�I"{"source":"book","book":{"title":""},"pubtype":{"main":"pubnonperiodical"},"pubnonperiodical":{"title":""},"contributors":[{}]}:ET
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109688.875:@expires_in0: @value"�I"�?rft.ulr_ver=Z39.88-2004&rft.ctx_ver=Z39.88-2004&rft.rfr_id=info:sid/libraries.nyu.edu:citero&rft_val_fmlt=info:ofi/fmt:kev:mtx:book&rft.genre=book&rft.btitle=:ET
@@ -0,0 +1,3 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1365019292.176:@expires_in0: @value"6I",itemType:document
2
+ importedFrom:OpenURL
3
+ :ET
@@ -0,0 +1,4 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1365019292.032:@expires_in0: @value" I"TY - GEN
2
+ ER -
3
+
4
+ :ET
@@ -0,0 +1,4 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1365614220.916:@expires_in0: @value" I"TY - GEN
2
+ ER -
3
+
4
+ :ET
@@ -0,0 +1,3 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363381442.122:@expires_in0: @value"6I",itemType:document
2
+ importedFrom:OpenURL
3
+ :ET
@@ -0,0 +1,4 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.952:@expires_in0: @value" I"TY - GEN
2
+ ER -
3
+
4
+ :ET
@@ -0,0 +1,3 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.217:@expires_in0: @value"2I"(itemType:book
2
+ importedFrom:OpenURL
3
+ :ET
@@ -0,0 +1,4 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.125:@expires_in0: @value"!I"TY - BOOK
2
+ ER -
3
+
4
+ :ET
@@ -0,0 +1,4 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1365794506.61:@expires_in0: @value" I"TY - GEN
2
+ ER -
3
+
4
+ :ET
@@ -0,0 +1,9 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1365614262.541:@expires_in0: @value"�I"�TY - JOUR
2
+ PB - [H. Markley McMahon]
3
+ JO - Los Alamos monitor
4
+ TI - Los Alamos monitor
5
+ CY - Los Alamos, N.M.
6
+ SN - 0893-3456
7
+ ER -
8
+
9
+ :ET
@@ -0,0 +1,2 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1365019292.07:@expires_in0: @value"I"@misc{????
2
+ }:ET
@@ -0,0 +1,3 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.37:@expires_in0: @value"8I".itemType:journalArticle
2
+ importedFrom:RIS
3
+ :ET
@@ -0,0 +1,4 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.284:@expires_in0: @value""I"TY - JOUR
2
+ ER -
3
+
4
+ :ET
@@ -0,0 +1,9 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1365190394.273:@expires_in0: @value"�I"�TY - BOOK
2
+ A1 - Bennion, E. B.
3
+ PB - Blackie Academic
4
+ TI - The technology of cake making.
5
+ SN - 0751403490
6
+ CY - London ; New York
7
+ ER -
8
+
9
+ :ET
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.667:@expires_in0: @value"I"itemType: book:ET
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1365019292.147:@expires_in0: @value"xI"n{"source":{"title":null},"pubtype":{"main":"pubnonperiodical"},"pubnonperiodical":{},"contributors":[{}]}:ET
@@ -0,0 +1,4 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109688.739:@expires_in0: @value"!I"TY - BOOK
2
+ ER -
3
+
4
+ :ET
@@ -0,0 +1,4 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109688.766:@expires_in0: @value"!I"TY - JOUR
2
+ ER -
3
+
4
+ :ET
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1365019291.994:@expires_in0: @value"OI"Ehttp://test.host/assets?from_format=xerxes_xml&to_format=openurl:ET
@@ -0,0 +1,3 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.527:@expires_in0: @value"=I"3itemType: journalArticle
2
+ importedFrom: BibTeX
3
+ :ET
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1365019293.14:@expires_in0: @value"xI"n{"source":{"title":null},"pubtype":{"main":"pubnonperiodical"},"pubnonperiodical":{},"contributors":[{}]}:ET
@@ -0,0 +1,4 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.446:@expires_in0: @value"!I"TY - JOUR
2
+ ER -
3
+
4
+ :ET
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363885829.944:@expires_in0: @value"@I"4{"source":"book","book":{"title":"The technology of cake making."},"pubtype":{"main":"pubnonperiodical"},"pubnonperiodical":{"title":"The technology of cake making.","publisher":"Blackie Academic","city":"London ; New York"},"contributors":[{"function":"author","first":"E.","middle":"B.","last":"Bennion"}]}:ET
@@ -0,0 +1,4 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.91:@expires_in0: @value" I"TY - GEN
2
+ ER -
3
+
4
+ :ET
@@ -0,0 +1,4 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.051:@expires_in0: @value"5I"+itemType:book
2
+ title:
3
+ importedFrom:PNX
4
+ :ET
@@ -0,0 +1,5 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109688.918:@expires_in0: @value"(I"TY - BOOK
2
+ TI -
3
+ ER -
4
+
5
+ :ET
@@ -0,0 +1,2 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.154:@expires_in0: @value"I"@book{????
2
+ }:ET
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.188:@expires_in0: @value"�I"|{"source":"book","book":{"title":null},"pubtype":{"main":"pubnonperiodical"},"pubnonperiodical":{},"contributors":[{}]}:ET
@@ -0,0 +1,2 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.314:@expires_in0: @value"I"@article{????
2
+ }:ET
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.096:@expires_in0: @value"ZI"Phttps://getit.library.nyu.edu/resolve?rft_val_fmt=info:ofi/fmt:kev:mtx:book:ET
@@ -0,0 +1,2 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.604:@expires_in0: @value"I"@book{????
2
+ }:ET
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.339:@expires_in0: @value"{I"v{"source":"journal","journal":{"title":null},"pubtype":{"main":"pubjournal"},"pubjournal":{},"contributors":[{}]}:ET
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363881544.428:@expires_in0: @value"�I"�{"source":"journal","journal":{"title":"Los Alamos monitor"},"pubtype":{"main":"pubjournal"},"pubjournal":{"title":"Los Alamos monitor"},"contributors":[{}]}:ET
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.248:@expires_in0: @value"�I"�?rft.ulr_ver=Z39.88-2004&rft.ctx_ver=Z39.88-2004&rft.rfr_id=info:sid/libraries.nyu.edu:citero&rft_val_fmlt=info:ofi/fmt:kev:mtx:journal&rft.genre=article:ET
@@ -0,0 +1,2 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.471:@expires_in0: @value"#I"@article{Adams2001
2
+ }:ET
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.802:@expires_in0: @value"xI"n{"source":{"title":null},"pubtype":{"main":"pubnonperiodical"},"pubnonperiodical":{},"contributors":[{}]}:ET
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.632:@expires_in0: @value"�I"|{"source":"book","book":{"title":null},"pubtype":{"main":"pubnonperiodical"},"pubnonperiodical":{},"contributors":[{}]}:ET
@@ -0,0 +1,3 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109688.959:@expires_in0: @value"(I"@book{????,
2
+ title = {}
3
+ }:ET
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.717:@expires_in0: @value"^I"Thttp://test.host/assets?rft_val_fmt=info:ofi/fmt:kev:mtx:book&to_format=openurl:ET
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.558:@expires_in0: @value"�I"�?rft.ulr_ver=Z39.88-2004&rft.ctx_ver=Z39.88-2004&rft.rfr_id=info:sid/libraries.nyu.edu:citero&rft_val_fmlt=info:ofi/fmt:kev:mtx:book&rft.genre=book:ET
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.499:@expires_in0: @value"{I"v{"source":"journal","journal":{"title":null},"pubtype":{"main":"pubjournal"},"pubjournal":{},"contributors":[{}]}:ET
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1363109689.409:@expires_in0: @value"�I"�?rft.ulr_ver=Z39.88-2004&rft.ctx_ver=Z39.88-2004&rft.rfr_id=info:sid/libraries.nyu.edu:citero&rft_val_fmlt=info:ofi/fmt:kev:mtx:journal&rft.genre=article:ET
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ one:
4
+ data:
5
+ from_format:
6
+ resource_key: MyString
7
+
8
+ two:
9
+ data:
10
+ from_format:
11
+ resource_key: MyString
@@ -0,0 +1,123 @@
1
+ #!/bin/env ruby
2
+ # encoding: utf-8
3
+ require 'test_helper'
4
+ require 'rack/utils'
5
+ require 'citero-jruby'
6
+
7
+
8
+ module ExCite
9
+ class ExportCitationsControllerTest < ActionController::TestCase
10
+ setup :initialize_cite
11
+ teardown :clear
12
+
13
+ def initialize_cite
14
+ @controller = ExportCitationsController.new
15
+ end
16
+
17
+ def clear
18
+ @controller = nil
19
+ end
20
+
21
+ test "should convert format to format" do
22
+ $acts_as_citable_classes.each do |citable_class|
23
+ ExCite.acts_as_citable_class = citable_class
24
+ Citero.from_formats.each do |from|
25
+ Citero.to_formats.each do |to|
26
+ get :index, :data => $formats[from.to_sym], :from_format => from, :to_format => to, :use_route => :cite
27
+ assert_response :success
28
+ clear
29
+ initialize_cite
30
+ end
31
+ end
32
+ end
33
+ end
34
+
35
+ test "should raise an error when a field is missing in index" do
36
+ $acts_as_citable_classes.each do |citable_class|
37
+ ExCite.acts_as_citable_class = citable_class
38
+ get :index, :id => "error", :use_route => :cite
39
+ assert_response :bad_request
40
+ end
41
+ end
42
+
43
+ test "should test translate POST and GET" do
44
+ $acts_as_citable_classes.each do |citable_class|
45
+ ExCite.acts_as_citable_class = citable_class
46
+ get :index, :data => "itemType: book", :from_format => "csf", :to_format => "ris", :use_route => :cite
47
+ assert_response :success
48
+ clear
49
+ initialize_cite
50
+ post :index, :data => "itemType: book", :from_format => "csf", :to_format => "ris", :use_route => :cite
51
+ assert_response :success
52
+ end
53
+ end
54
+
55
+ test "should ignore invalid id" do
56
+ $acts_as_citable_classes.each do |citable_class|
57
+ ExCite.acts_as_citable_class = citable_class
58
+ get :index, :data => "itemType: book", :from_format => "csf", :to_format => "ris", :id => "unkown", :use_route => :cite
59
+ assert_response :success
60
+ end
61
+ end
62
+
63
+ test "should convert openurl to format" do
64
+ $acts_as_citable_classes.each do |citable_class|
65
+ ExCite.acts_as_citable_class = citable_class
66
+ Citero.to_formats.each do |to|
67
+ get :index, "rft_val_fmt" => "info:ofi/fmt:kev:mtx:book", :to_format => to, :use_route => :cite
68
+ assert_response :success
69
+ end
70
+ end
71
+ end
72
+
73
+ test "should redirect to endnote" do
74
+ $acts_as_citable_classes.each do |citable_class|
75
+ ExCite.acts_as_citable_class = citable_class
76
+ get :index, :to_format => "endnote", :use_route => :cite
77
+ assert_redirected_to "http://www.myendnoteweb.com/?func=directExport&partnerName=Primo&dataIdentifier=1&dataRequestUrl=http%3A%2F%2Ftest.host%2Fcite%2Fexport_citations%3Fresource_key%5B%5D%3Dcc141d92caee81bd0601a5ee365fdf9ec31d23bb%26to_format%3Dris"
78
+ end
79
+ end
80
+
81
+ test "should redirect to refworks" do
82
+ $acts_as_citable_classes.each do |citable_class|
83
+ ExCite.acts_as_citable_class = citable_class
84
+ Citero.from_formats.each do |from|
85
+ get :index, :to_format => "refworks", :from_format => from, :data => $formats[from], :use_route => :cite
86
+ assert_response :success
87
+ assert_template :partial => '_external_form'
88
+ clear
89
+ initialize_cite
90
+ end
91
+ end
92
+ end
93
+
94
+ test "should redirect to easybib" do
95
+ $acts_as_citable_classes.each do |citable_class|
96
+ ExCite.acts_as_citable_class = citable_class
97
+ Citero.from_formats.each do |from|
98
+ get :index, :to_format => "easybibpush", :from_format => from, :data => $formats[from], :use_route => :cite
99
+ assert_response :success
100
+ assert_template :partial => '_external_form'
101
+ clear
102
+ initialize_cite
103
+ end
104
+ end
105
+ end
106
+
107
+ test "should batch map multiple citations" do
108
+ $acts_as_citable_classes.each do |citable_class|
109
+ ExCite.acts_as_citable_class = citable_class
110
+ post :index, :to_format => "ris", :from_format => ["csf", "csf"], :data => ["itemType: book", "itemType: journalArticle"], :use_route => :cite
111
+ assert_response :success
112
+ end
113
+ end
114
+
115
+ test "should fail since resource key is invalid" do
116
+ $acts_as_citable_classes.each do |citable_class|
117
+ ExCite.acts_as_citable_class = citable_class
118
+ get :index, :to_format => "ris", :resource_key => "unknown", :use_route => :cite
119
+ assert_response :bad_request
120
+ end
121
+ end
122
+ end
123
+ end
@@ -0,0 +1,10 @@
1
+ require 'test_helper'
2
+
3
+ class NavigationTest < ActionDispatch::IntegrationTest
4
+ fixtures :all
5
+
6
+ # test "the truth" do
7
+ # assert true
8
+ # end
9
+ end
10
+
@@ -0,0 +1,35 @@
1
+ require 'coveralls'
2
+ Coveralls.wear!
3
+
4
+ require 'simplecov'
5
+ require 'simplecov-rcov'
6
+
7
+ SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
8
+ SimpleCov.start 'rails'
9
+
10
+ # Configure Rails Environment
11
+ ENV["RAILS_ENV"] = "test"
12
+
13
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
14
+ require "rails/test_help"
15
+
16
+
17
+ Rails.backtrace_cleaner.remove_silencers!
18
+
19
+ # Load support files
20
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
21
+
22
+ # Load fixtures from the engine
23
+ if ActiveSupport::TestCase.method_defined?(:fixture_path=)
24
+ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
25
+ end
26
+
27
+ $formats ||= Hash[
28
+ :csf => "itemType: book",
29
+ :ris => "TY - JOUR\nER -\n\n",
30
+ :openurl => "https://getit.library.nyu.edu/resolve?rft_val_fmt=info:ofi/fmt:kev:mtx:book",
31
+ :bibtex => "@article{Adams2001\n}",
32
+ :pnx => "<display><type>book</type></display>"
33
+ ]
34
+
35
+ $acts_as_citable_classes = ["ExCite::Citation", "TypeOne"]