ex_cite 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1366306484.598:@expires_in0: @value"2I"(itemType:book
2
+ importedFrom:OpenURL
3
+ :ET
@@ -0,0 +1,4 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1366306484.485:@expires_in0: @value"!I"TY - BOOK
2
+ ER -
3
+
4
+ :ET
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1366737738.405:@expires_in0: @value"xI"n{"source":{"title":null},"pubtype":{"main":"pubnonperiodical"},"pubnonperiodical":{},"contributors":[{}]}:ET
@@ -0,0 +1,2 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1366306484.511:@expires_in0: @value"I"@book{????
2
+ }:ET
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1366306484.577:@expires_in0: @value"�I"|{"source":"book","book":{"title":null},"pubtype":{"main":"pubnonperiodical"},"pubnonperiodical":{},"contributors":[{}]}:ET
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1366737747.458:@expires_in0: @value"xI"n{"source":{"title":null},"pubtype":{"main":"pubnonperiodical"},"pubnonperiodical":{},"contributors":[{}]}:ET
@@ -23,7 +23,7 @@ module ExCite
23
23
  ExCite.acts_as_citable_class = citable_class
24
24
  Citero.from_formats.each do |from|
25
25
  Citero.to_formats.each do |to|
26
- get :index, :data => $formats[from.to_sym], :from_format => from, :to_format => to, :use_route => :cite
26
+ get :index, :data => $formats[from.to_sym], :from_format => from, :to_format => to, :use_route => :export_citations
27
27
  assert_response :success
28
28
  clear
29
29
  initialize_cite
@@ -35,28 +35,34 @@ module ExCite
35
35
  test "should raise an error when a field is missing in index" do
36
36
  $acts_as_citable_classes.each do |citable_class|
37
37
  ExCite.acts_as_citable_class = citable_class
38
- get :index, :id => "error", :use_route => :cite
38
+ get :index, :id => "error", :use_route => :export_citations
39
39
  assert_response :bad_request
40
+ clear
41
+ initialize_cite
40
42
  end
41
43
  end
42
44
 
43
45
  test "should test translate POST and GET" do
44
46
  $acts_as_citable_classes.each do |citable_class|
45
47
  ExCite.acts_as_citable_class = citable_class
46
- get :index, :data => "itemType: book", :from_format => "csf", :to_format => "ris", :use_route => :cite
48
+ get :index, :data => "itemType: book", :from_format => "csf", :to_format => "ris", :use_route => :export_citations
47
49
  assert_response :success
48
50
  clear
49
51
  initialize_cite
50
- post :index, :data => "itemType: book", :from_format => "csf", :to_format => "ris", :use_route => :cite
52
+ post :index, :data => "itemType: book", :from_format => "csf", :to_format => "ris", :use_route => :export_citations
51
53
  assert_response :success
54
+ clear
55
+ initialize_cite
52
56
  end
53
57
  end
54
58
 
55
59
  test "should ignore invalid id" do
56
60
  $acts_as_citable_classes.each do |citable_class|
57
61
  ExCite.acts_as_citable_class = citable_class
58
- get :index, :data => "itemType: book", :from_format => "csf", :to_format => "ris", :id => "unkown", :use_route => :cite
62
+ get :index, :data => "itemType: book", :from_format => "csf", :to_format => "ris", :id => "unkown", :use_route => :export_citations
59
63
  assert_response :success
64
+ clear
65
+ initialize_cite
60
66
  end
61
67
  end
62
68
 
@@ -64,8 +70,10 @@ module ExCite
64
70
  $acts_as_citable_classes.each do |citable_class|
65
71
  ExCite.acts_as_citable_class = citable_class
66
72
  Citero.to_formats.each do |to|
67
- get :index, "rft_val_fmt" => "info:ofi/fmt:kev:mtx:book", :to_format => to, :use_route => :cite
73
+ get :index, "rft_val_fmt" => "info:ofi/fmt:kev:mtx:book", :to_format => to, :use_route => :export_citations
68
74
  assert_response :success
75
+ clear
76
+ initialize_cite
69
77
  end
70
78
  end
71
79
  end
@@ -73,8 +81,10 @@ module ExCite
73
81
  test "should redirect to endnote" do
74
82
  $acts_as_citable_classes.each do |citable_class|
75
83
  ExCite.acts_as_citable_class = citable_class
76
- get :index, :to_format => "endnote", :use_route => :cite
84
+ get :index, :to_format => "endnote", :use_route => :export_citations
77
85
  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"
86
+ clear
87
+ initialize_cite
78
88
  end
79
89
  end
80
90
 
@@ -82,7 +92,7 @@ module ExCite
82
92
  $acts_as_citable_classes.each do |citable_class|
83
93
  ExCite.acts_as_citable_class = citable_class
84
94
  Citero.from_formats.each do |from|
85
- get :index, :to_format => "refworks", :from_format => from, :data => $formats[from], :use_route => :cite
95
+ get :index, :to_format => "refworks", :from_format => from, :data => $formats[from], :use_route => :export_citations
86
96
  assert_response :success
87
97
  assert_template :partial => '_external_form'
88
98
  clear
@@ -95,7 +105,7 @@ module ExCite
95
105
  $acts_as_citable_classes.each do |citable_class|
96
106
  ExCite.acts_as_citable_class = citable_class
97
107
  Citero.from_formats.each do |from|
98
- get :index, :to_format => "easybibpush", :from_format => from, :data => $formats[from], :use_route => :cite
108
+ get :index, :to_format => "easybibpush", :from_format => from, :data => $formats[from], :use_route => :export_citations
99
109
  assert_response :success
100
110
  assert_template :partial => '_external_form'
101
111
  clear
@@ -107,16 +117,20 @@ module ExCite
107
117
  test "should batch map multiple citations" do
108
118
  $acts_as_citable_classes.each do |citable_class|
109
119
  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
120
+ post :index, :to_format => "ris", :from_format => ["csf", "csf"], :data => ["itemType: book", "itemType: journalArticle"], :use_route => :export_citations
111
121
  assert_response :success
122
+ clear
123
+ initialize_cite
112
124
  end
113
125
  end
114
126
 
115
127
  test "should fail since resource key is invalid" do
116
128
  $acts_as_citable_classes.each do |citable_class|
117
129
  ExCite.acts_as_citable_class = citable_class
118
- get :index, :to_format => "ris", :resource_key => "unknown", :use_route => :cite
130
+ get :index, :to_format => "ris", :resource_key => "unknown", :use_route => :export_citations
119
131
  assert_response :bad_request
132
+ clear
133
+ initialize_cite
120
134
  end
121
135
  end
122
136
  end
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: ex_cite
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.0
5
+ version: 1.0.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - hab278
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-11 00:00:00.000000000 Z
12
+ date: 2013-04-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -83,15 +83,13 @@ dependencies:
83
83
  requirements:
84
84
  - - "~>"
85
85
  - !ruby/object:Gem::Version
86
- version: !binary |-
87
- MQ==
86
+ version: 1.1.4
88
87
  none: false
89
88
  requirement: !ruby/object:Gem::Requirement
90
89
  requirements:
91
90
  - - "~>"
92
91
  - !ruby/object:Gem::Version
93
- version: !binary |-
94
- MQ==
92
+ version: 1.1.4
95
93
  none: false
96
94
  prerelease: false
97
95
  type: :runtime
@@ -277,6 +275,7 @@ files:
277
275
  - test/dummy/test/unit/type_two_test.rb
278
276
  - test/dummy/tmp/cache/00B/8A1/c9d431e57fa51ecef5d8dfed8ead3fa142c71284to_easybib
279
277
  - test/dummy/tmp/cache/031/0D1/c9d431e57fa51ecef5d8dfed8ead3fa142c71284to_openurl
278
+ - test/dummy/tmp/cache/assets/C79/9D0/sprockets%2Fc2a0614840a581c50b353a995658e80d
280
279
  - test/dummy/tmp/cache/assets/C88/210/sprockets%2F3472207be8196858ab6481c8dd11d565
281
280
  - test/dummy/tmp/cache/assets/CA5/4B0/sprockets%2F67891927e7bd2bf4c3101f0601b64c13
282
281
  - test/dummy/tmp/cache/assets/CAA/B20/sprockets%2F16b93e59165164c8025e7bc0d9a0820d
@@ -284,9 +283,13 @@ files:
284
283
  - test/dummy/tmp/cache/assets/CDA/530/sprockets%2F80873e6605453beaef3e0c77101d51f4
285
284
  - test/dummy/tmp/cache/assets/D0A/C10/sprockets%2F0cdf5169c4f0a054b8a2983d235bf734
286
285
  - test/dummy/tmp/cache/assets/D0A/F70/sprockets%2F14de97f92b1a1c729c25b2f1a334c828
286
+ - test/dummy/tmp/cache/assets/D0B/BA0/sprockets%2Fd016bd5cefae1b4880de354541277663
287
+ - test/dummy/tmp/cache/assets/D0C/9F0/sprockets%2Fdf0f1db09e51aa085f171846b476465c
288
+ - test/dummy/tmp/cache/assets/D0F/B70/sprockets%2F15259189162a4eda934bd73d60dd3ff2
287
289
  - test/dummy/tmp/cache/assets/D1A/C50/sprockets%2Ff78583ed1a84891a6231df3970bb4c5f
288
290
  - test/dummy/tmp/cache/assets/D28/3C0/sprockets%2F739cc596997bde456b65f5e4660b45ca
289
291
  - test/dummy/tmp/cache/assets/D43/AB0/sprockets%2Fe82e6c7f76371a3bb54b224891fecc25
292
+ - test/dummy/tmp/cache/assets/D79/B20/sprockets%2F9bd1c455c64db259bcc0f5ed557088f6
290
293
  - test/dummy/tmp/cache/assets/DA6/710/sprockets%2F8d5e918def34872c4e7c204b2fce32dd
291
294
  - test/dummy/tmp/cache/assets/DE6/DC0/sprockets%2F5bcaed820e6cbee0a0e092561ce0e25a
292
295
  - test/dummy/tmp/cache/assets/DF9/B40/sprockets%2F61ea80c2ba85ceb6a249ea3ea3fe5c59
@@ -304,7 +307,9 @@ files:
304
307
  - test/dummy/tmp/cache/DA4/540/affd98a65c2fce8403f2d2776024add085305dc8to_csf
305
308
  - test/dummy/tmp/cache/DB6/7A0/affd98a65c2fce8403f2d2776024add085305dc8to_ris
306
309
  - test/dummy/tmp/cache/DB8/5B0/a14aff18a493e0f4e01c75d4f39ea2426ff17c89to_ris
310
+ - test/dummy/tmp/cache/DE6/D00/5c66e1737c71a44c1c2c0c53aacfdbe21a47d22dto_csf
307
311
  - test/dummy/tmp/cache/DF8/1A0/ca02f65b1e44e0da798cff8e53adb7a70211fe70to_csf
312
+ - test/dummy/tmp/cache/DF8/F60/5c66e1737c71a44c1c2c0c53aacfdbe21a47d22dto_ris
308
313
  - test/dummy/tmp/cache/DFD/850/468286998ed7e41613b5b638604d0d418e16f000to_easybib
309
314
  - test/dummy/tmp/cache/E0A/400/ca02f65b1e44e0da798cff8e53adb7a70211fe70to_ris
310
315
  - test/dummy/tmp/cache/E0F/540/ea6c0a7650e32439bef1894db08c8bbf09a2fac6to_ris
@@ -317,16 +322,20 @@ files:
317
322
  - test/dummy/tmp/cache/E68/C90/c9d431e57fa51ecef5d8dfed8ead3fa142c71284to_csf
318
323
  - test/dummy/tmp/cache/E7A/EF0/c9d431e57fa51ecef5d8dfed8ead3fa142c71284to_ris
319
324
  - test/dummy/tmp/cache/E7D/EE0/794c17bcbef330a90c5063ca7b881b06685047aeto_bibtex
325
+ - test/dummy/tmp/cache/EC7/1D0/c40475adaf32bb892347f5266ebc36b75858888ato_easybib
320
326
  - test/dummy/tmp/cache/EDE/F40/794c17bcbef330a90c5063ca7b881b06685047aeto_easybib
321
327
  - test/dummy/tmp/cache/EE6/960/affd98a65c2fce8403f2d2776024add085305dc8to_bibtex
322
328
  - test/dummy/tmp/cache/F04/770/794c17bcbef330a90c5063ca7b881b06685047aeto_openurl
329
+ - test/dummy/tmp/cache/F28/D80/5c66e1737c71a44c1c2c0c53aacfdbe21a47d22dto_bibtex
323
330
  - test/dummy/tmp/cache/F3A/580/ca02f65b1e44e0da798cff8e53adb7a70211fe70to_bibtex
324
331
  - test/dummy/tmp/cache/F47/050/affd98a65c2fce8403f2d2776024add085305dc8to_easybib
325
332
  - test/dummy/tmp/cache/F57/080/32620a8c5f851fed6e2f8a0aa39e6b9d747d7f94to_easybib
326
333
  - test/dummy/tmp/cache/F6D/880/affd98a65c2fce8403f2d2776024add085305dc8to_openurl
327
334
  - test/dummy/tmp/cache/F76/B00/af5dc25c4cb1c5d8a1fd83234ecf9fcb76f23952to_bibtex
328
335
  - test/dummy/tmp/cache/F88/580/a303145d2d5cdb18031c0f7cde5d0c3eb5673addto_easybib
336
+ - test/dummy/tmp/cache/F89/890/5c66e1737c71a44c1c2c0c53aacfdbe21a47d22dto_easybib
329
337
  - test/dummy/tmp/cache/F9B/1B0/ca02f65b1e44e0da798cff8e53adb7a70211fe70to_easybib
338
+ - test/dummy/tmp/cache/F9B/6B0/a20e01c7d752cb63afcbb4a90eb9cb3f999844a0to_easybib
330
339
  - test/dummy/tmp/cache/FAA/570/c9d431e57fa51ecef5d8dfed8ead3fa142c71284to_bibtex
331
340
  - test/dummy/tmp/cache/FAF/0C0/5c66e1737c71a44c1c2c0c53aacfdbe21a47d22dto_openurl
332
341
  - test/dummy/tmp/cache/FC1/9E0/ca02f65b1e44e0da798cff8e53adb7a70211fe70to_openurl
@@ -416,6 +425,7 @@ test_files:
416
425
  - test/dummy/test/unit/type_two_test.rb
417
426
  - test/dummy/tmp/cache/00B/8A1/c9d431e57fa51ecef5d8dfed8ead3fa142c71284to_easybib
418
427
  - test/dummy/tmp/cache/031/0D1/c9d431e57fa51ecef5d8dfed8ead3fa142c71284to_openurl
428
+ - test/dummy/tmp/cache/assets/C79/9D0/sprockets%2Fc2a0614840a581c50b353a995658e80d
419
429
  - test/dummy/tmp/cache/assets/C88/210/sprockets%2F3472207be8196858ab6481c8dd11d565
420
430
  - test/dummy/tmp/cache/assets/CA5/4B0/sprockets%2F67891927e7bd2bf4c3101f0601b64c13
421
431
  - test/dummy/tmp/cache/assets/CAA/B20/sprockets%2F16b93e59165164c8025e7bc0d9a0820d
@@ -423,9 +433,13 @@ test_files:
423
433
  - test/dummy/tmp/cache/assets/CDA/530/sprockets%2F80873e6605453beaef3e0c77101d51f4
424
434
  - test/dummy/tmp/cache/assets/D0A/C10/sprockets%2F0cdf5169c4f0a054b8a2983d235bf734
425
435
  - test/dummy/tmp/cache/assets/D0A/F70/sprockets%2F14de97f92b1a1c729c25b2f1a334c828
436
+ - test/dummy/tmp/cache/assets/D0B/BA0/sprockets%2Fd016bd5cefae1b4880de354541277663
437
+ - test/dummy/tmp/cache/assets/D0C/9F0/sprockets%2Fdf0f1db09e51aa085f171846b476465c
438
+ - test/dummy/tmp/cache/assets/D0F/B70/sprockets%2F15259189162a4eda934bd73d60dd3ff2
426
439
  - test/dummy/tmp/cache/assets/D1A/C50/sprockets%2Ff78583ed1a84891a6231df3970bb4c5f
427
440
  - test/dummy/tmp/cache/assets/D28/3C0/sprockets%2F739cc596997bde456b65f5e4660b45ca
428
441
  - test/dummy/tmp/cache/assets/D43/AB0/sprockets%2Fe82e6c7f76371a3bb54b224891fecc25
442
+ - test/dummy/tmp/cache/assets/D79/B20/sprockets%2F9bd1c455c64db259bcc0f5ed557088f6
429
443
  - test/dummy/tmp/cache/assets/DA6/710/sprockets%2F8d5e918def34872c4e7c204b2fce32dd
430
444
  - test/dummy/tmp/cache/assets/DE6/DC0/sprockets%2F5bcaed820e6cbee0a0e092561ce0e25a
431
445
  - test/dummy/tmp/cache/assets/DF9/B40/sprockets%2F61ea80c2ba85ceb6a249ea3ea3fe5c59
@@ -443,7 +457,9 @@ test_files:
443
457
  - test/dummy/tmp/cache/DA4/540/affd98a65c2fce8403f2d2776024add085305dc8to_csf
444
458
  - test/dummy/tmp/cache/DB6/7A0/affd98a65c2fce8403f2d2776024add085305dc8to_ris
445
459
  - test/dummy/tmp/cache/DB8/5B0/a14aff18a493e0f4e01c75d4f39ea2426ff17c89to_ris
460
+ - test/dummy/tmp/cache/DE6/D00/5c66e1737c71a44c1c2c0c53aacfdbe21a47d22dto_csf
446
461
  - test/dummy/tmp/cache/DF8/1A0/ca02f65b1e44e0da798cff8e53adb7a70211fe70to_csf
462
+ - test/dummy/tmp/cache/DF8/F60/5c66e1737c71a44c1c2c0c53aacfdbe21a47d22dto_ris
447
463
  - test/dummy/tmp/cache/DFD/850/468286998ed7e41613b5b638604d0d418e16f000to_easybib
448
464
  - test/dummy/tmp/cache/E0A/400/ca02f65b1e44e0da798cff8e53adb7a70211fe70to_ris
449
465
  - test/dummy/tmp/cache/E0F/540/ea6c0a7650e32439bef1894db08c8bbf09a2fac6to_ris
@@ -456,16 +472,20 @@ test_files:
456
472
  - test/dummy/tmp/cache/E68/C90/c9d431e57fa51ecef5d8dfed8ead3fa142c71284to_csf
457
473
  - test/dummy/tmp/cache/E7A/EF0/c9d431e57fa51ecef5d8dfed8ead3fa142c71284to_ris
458
474
  - test/dummy/tmp/cache/E7D/EE0/794c17bcbef330a90c5063ca7b881b06685047aeto_bibtex
475
+ - test/dummy/tmp/cache/EC7/1D0/c40475adaf32bb892347f5266ebc36b75858888ato_easybib
459
476
  - test/dummy/tmp/cache/EDE/F40/794c17bcbef330a90c5063ca7b881b06685047aeto_easybib
460
477
  - test/dummy/tmp/cache/EE6/960/affd98a65c2fce8403f2d2776024add085305dc8to_bibtex
461
478
  - test/dummy/tmp/cache/F04/770/794c17bcbef330a90c5063ca7b881b06685047aeto_openurl
479
+ - test/dummy/tmp/cache/F28/D80/5c66e1737c71a44c1c2c0c53aacfdbe21a47d22dto_bibtex
462
480
  - test/dummy/tmp/cache/F3A/580/ca02f65b1e44e0da798cff8e53adb7a70211fe70to_bibtex
463
481
  - test/dummy/tmp/cache/F47/050/affd98a65c2fce8403f2d2776024add085305dc8to_easybib
464
482
  - test/dummy/tmp/cache/F57/080/32620a8c5f851fed6e2f8a0aa39e6b9d747d7f94to_easybib
465
483
  - test/dummy/tmp/cache/F6D/880/affd98a65c2fce8403f2d2776024add085305dc8to_openurl
466
484
  - test/dummy/tmp/cache/F76/B00/af5dc25c4cb1c5d8a1fd83234ecf9fcb76f23952to_bibtex
467
485
  - test/dummy/tmp/cache/F88/580/a303145d2d5cdb18031c0f7cde5d0c3eb5673addto_easybib
486
+ - test/dummy/tmp/cache/F89/890/5c66e1737c71a44c1c2c0c53aacfdbe21a47d22dto_easybib
468
487
  - test/dummy/tmp/cache/F9B/1B0/ca02f65b1e44e0da798cff8e53adb7a70211fe70to_easybib
488
+ - test/dummy/tmp/cache/F9B/6B0/a20e01c7d752cb63afcbb4a90eb9cb3f999844a0to_easybib
469
489
  - test/dummy/tmp/cache/FAA/570/c9d431e57fa51ecef5d8dfed8ead3fa142c71284to_bibtex
470
490
  - test/dummy/tmp/cache/FAF/0C0/5c66e1737c71a44c1c2c0c53aacfdbe21a47d22dto_openurl
471
491
  - test/dummy/tmp/cache/FC1/9E0/ca02f65b1e44e0da798cff8e53adb7a70211fe70to_openurl