concord_cacher 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,16 +2,16 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{concord_cacher}
5
- s.version = "0.1.12"
5
+ s.version = "0.1.13"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Aaron Unger"]
9
9
  s.cert_chain = ["/Users/aunger/gem-public_cert.pem"]
10
- s.date = %q{2010-09-07}
10
+ s.date = %q{2010-11-04}
11
11
  s.description = %q{concord_cacher provides support for locally caching a resource and all referenced resources in multiple different ways. It is intended for using with other Concord Consortium projects and not necessarily for outside projects.}
12
12
  s.email = %q{aunger @nospam@ concord.org}
13
13
  s.extra_rdoc_files = ["README.textile", "lib/concord/cacher.rb", "lib/concord/diy_local_cacher.rb", "lib/concord/filename_generators.rb", "lib/concord/filename_generators/default_generator.rb", "lib/concord/filename_generators/diy_generator.rb", "lib/concord/filename_generators/java_proxy_generator.rb", "lib/concord/helper.rb", "lib/concord/java_proxy_cacher.rb", "lib/concord/resource.rb", "lib/concord_cacher.rb"]
14
- s.files = ["Manifest", "README.textile", "Rakefile", "concord_cacher.gemspec", "lib/concord/cacher.rb", "lib/concord/diy_local_cacher.rb", "lib/concord/filename_generators.rb", "lib/concord/filename_generators/default_generator.rb", "lib/concord/filename_generators/diy_generator.rb", "lib/concord/filename_generators/java_proxy_generator.rb", "lib/concord/helper.rb", "lib/concord/java_proxy_cacher.rb", "lib/concord/resource.rb", "lib/concord_cacher.rb", "spec/data/always_skip.otml", "spec/data/bad_url.otml", "spec/data/codebase.otml", "spec/data/element_reference.otml", "spec/data/empty.otml", "spec/data/empty_url.otml", "spec/data/mw_model_absolute.otml", "spec/data/mw_model_relative.otml", "spec/data/nlogo_absolute.otml", "spec/data/nlogo_relative.otml", "spec/data/recursion.otml", "spec/data/recursive_loop.otml", "spec/data/resources/chart_line.png", "spec/data/resources/delete.png", "spec/data/resources/loop1.otml", "spec/data/resources/loop2.otml", "spec/data/resources/nlogo/SpaceRescue.Practice1.nlogo", "spec/data/resources/recurse1.otml", "spec/data/resources/recurse2.otml", "spec/data/resources/statesofmatter/bench.gif", "spec/data/resources/statesofmatter/downHighlightMol1.gif", "spec/data/resources/statesofmatter/downHighlightMol2.gif", "spec/data/resources/statesofmatter/eightBall.gif", "spec/data/resources/statesofmatter/eightBall.html", "spec/data/resources/statesofmatter/eightBall.mml", "spec/data/resources/statesofmatter/eightBallZoom.gif", "spec/data/resources/statesofmatter/gold.gif", "spec/data/resources/statesofmatter/gold.html", "spec/data/resources/statesofmatter/gold.mml", "spec/data/resources/statesofmatter/goldZoom.gif", "spec/data/resources/statesofmatter/helium.gif", "spec/data/resources/statesofmatter/helium.html", "spec/data/resources/statesofmatter/helium.mml", "spec/data/resources/statesofmatter/heliumZoom.gif", "spec/data/resources/statesofmatter/hydrogen.gif", "spec/data/resources/statesofmatter/hydrogen.html", "spec/data/resources/statesofmatter/hydrogen.mml", "spec/data/resources/statesofmatter/hydrogenZoom.gif", "spec/data/resources/statesofmatter/rootBeer.gif", "spec/data/resources/statesofmatter/rootBeer.html", "spec/data/resources/statesofmatter/rootBeer.mml", "spec/data/resources/statesofmatter/rootBeerZoom.gif", "spec/data/resources/statesofmatter/statesOfMatter$0.mml", "spec/data/resources/statesofmatter/statesOfMatter.cml", "spec/data/resources/statesofmatter/statesOfMatterPage1$0.mml", "spec/data/resources/statesofmatter/statesOfMatterPage1.cml", "spec/data/resources/statesofmatter/unknown.gif", "spec/data/resources/statesofmatter/unknown.html", "spec/data/resources/statesofmatter/unknown.mml", "spec/data/resources/statesofmatter/unknownZoom.gif", "spec/data/resources/statesofmatter/upHighlightMol1.gif", "spec/data/resources/statesofmatter/upHighlightMol2.gif", "spec/data/resources/statesofmatter/water.gif", "spec/data/resources/statesofmatter/water.html", "spec/data/resources/statesofmatter/water.mml", "spec/data/resources/statesofmatter/waterZoom.gif", "spec/data/resources/text.txt", "spec/data/standard_uri.otml", "spec/data/url_with_space.otml", "spec/data/xml_entities.otml", "spec/diy_local_cacher_spec.rb", "spec/helpers/cache_helper.rb", "spec/java_proxy_cacher_spec.rb", "xml_entities.otml"]
14
+ s.files = ["Manifest", "README.textile", "Rakefile", "concord_cacher.gemspec", "lib/concord/cacher.rb", "lib/concord/diy_local_cacher.rb", "lib/concord/filename_generators.rb", "lib/concord/filename_generators/default_generator.rb", "lib/concord/filename_generators/diy_generator.rb", "lib/concord/filename_generators/java_proxy_generator.rb", "lib/concord/helper.rb", "lib/concord/java_proxy_cacher.rb", "lib/concord/resource.rb", "lib/concord_cacher.rb", "spec/data/always_skip.otml", "spec/data/bad_url.otml", "spec/data/codebase.otml", "spec/data/element_reference.otml", "spec/data/empty.otml", "spec/data/empty_url.otml", "spec/data/mw_model_absolute.otml", "spec/data/mw_model_relative.otml", "spec/data/nlogo_absolute.otml", "spec/data/nlogo_relative.otml", "spec/data/recursion.otml", "spec/data/recursive_loop.otml", "spec/data/resources/chart_line.png", "spec/data/resources/delete.png", "spec/data/resources/loop1.otml", "spec/data/resources/loop2.otml", "spec/data/resources/nlogo/SpaceRescue.Practice1.nlogo", "spec/data/resources/recurse1.otml", "spec/data/resources/recurse2.otml", "spec/data/resources/statesofmatter/bench.gif", "spec/data/resources/statesofmatter/downHighlightMol1.gif", "spec/data/resources/statesofmatter/downHighlightMol2.gif", "spec/data/resources/statesofmatter/eightBall.gif", "spec/data/resources/statesofmatter/eightBall.html", "spec/data/resources/statesofmatter/eightBall.mml", "spec/data/resources/statesofmatter/eightBallZoom.gif", "spec/data/resources/statesofmatter/gold.gif", "spec/data/resources/statesofmatter/gold.html", "spec/data/resources/statesofmatter/gold.mml", "spec/data/resources/statesofmatter/goldZoom.gif", "spec/data/resources/statesofmatter/helium.gif", "spec/data/resources/statesofmatter/helium.html", "spec/data/resources/statesofmatter/helium.mml", "spec/data/resources/statesofmatter/heliumZoom.gif", "spec/data/resources/statesofmatter/hydrogen.gif", "spec/data/resources/statesofmatter/hydrogen.html", "spec/data/resources/statesofmatter/hydrogen.mml", "spec/data/resources/statesofmatter/hydrogenZoom.gif", "spec/data/resources/statesofmatter/rootBeer.gif", "spec/data/resources/statesofmatter/rootBeer.html", "spec/data/resources/statesofmatter/rootBeer.mml", "spec/data/resources/statesofmatter/rootBeerZoom.gif", "spec/data/resources/statesofmatter/statesOfMatter$0.mml", "spec/data/resources/statesofmatter/statesOfMatter.cml", "spec/data/resources/statesofmatter/statesOfMatterPage1$0.mml", "spec/data/resources/statesofmatter/statesOfMatterPage1.cml", "spec/data/resources/statesofmatter/unknown.gif", "spec/data/resources/statesofmatter/unknown.html", "spec/data/resources/statesofmatter/unknown.mml", "spec/data/resources/statesofmatter/unknownZoom.gif", "spec/data/resources/statesofmatter/upHighlightMol1.gif", "spec/data/resources/statesofmatter/upHighlightMol2.gif", "spec/data/resources/statesofmatter/water.gif", "spec/data/resources/statesofmatter/water.html", "spec/data/resources/statesofmatter/water.mml", "spec/data/resources/statesofmatter/waterZoom.gif", "spec/data/resources/text.txt", "spec/data/standard_uri.otml", "spec/data/url_with_space.otml", "spec/data/xml_entities.otml", "spec/diy_local_cacher_spec.rb", "spec/helpers/cache_helper.rb", "spec/java_proxy_cacher_spec.rb", "xml_entities.otml", "spec/data/urls_in_resourcelist.otml"]
15
15
  s.homepage = %q{http://github.com/psndcsrv/concord_cacher}
16
16
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Concord_cacher", "--main", "README.textile"]
17
17
  s.require_paths = ["lib"]
@@ -21,10 +21,10 @@ class ::Concord::Resource
21
21
  # we should switch to using named groups to allow more complex regex matchers
22
22
  # !!!!!!!!!!!!!!!!!!!!!!!!!!!!
23
23
 
24
- URL_REGEX = /(http[s]?:\/\/[^'"]+)/i
24
+ URL_REGEX = /(http[s]?:\/\/[^'"<>]+)/i
25
25
  # the imageBytes can be referenced by a OTImage object
26
26
  # MW and Netlogo models use authoredDataURL attributes
27
- SRC_REGEX = /(?:src|href|imageBytes|authoredDataURL)[ ]?=[ ]?['"](.+?)['"]/i
27
+ SRC_REGEX = /(?:src|href|imageBytes|authoredDataURL)[ ]?=[ ]?['"](.+?)['"<>]/i
28
28
 
29
29
  ALWAYS_SKIP_REGEXES = []
30
30
  ALWAYS_SKIP_REGEXES << Regexp.new(/^(mailto|jres)/i)
@@ -0,0 +1,18 @@
1
+ <otrunk id="6b230c1d-8816-4ef3-9c7a-b84a0da0b35f">
2
+ <imports>
3
+ <import class="org.concord.otrunk.OTSystem" />
4
+ </imports>
5
+ <objects>
6
+ <OTSystem local_id="system">
7
+ <root>
8
+ <OTDataAxis>
9
+ <customGridLabels>
10
+ <entry key="1.0">
11
+ <string>http://portal.concord.org/images/icons/chart_line.png</string>
12
+ </entry>
13
+ </customGridLabels>
14
+ </OTDataAxis>
15
+ </root>
16
+ </OTSystem>
17
+ </objects>
18
+ </otrunk>
@@ -371,5 +371,17 @@ describe 'DIY Local Cacher' do
371
371
  does_not_exist?(f)
372
372
  end
373
373
  end
374
+
375
+ it 'should not include trailing </string> when url is part of resource list or map' do
376
+ expected_files = []
377
+ expected_files << filename_for('http://portal.concord.org/images/icons/chart_line.png')
378
+
379
+ cache('urls_in_resource_list.otml', :activity => mockup('urls_in_resource_list.otml'))
380
+
381
+ cache_size.should == 1
382
+ expected_files.each do |f|
383
+ exists?(f)
384
+ end
385
+ end
374
386
  end
375
387
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 12
9
- version: 0.1.12
8
+ - 13
9
+ version: 0.1.13
10
10
  platform: ruby
11
11
  authors:
12
12
  - Aaron Unger
@@ -35,7 +35,7 @@ cert_chain:
35
35
  8kT2T2VF
36
36
  -----END CERTIFICATE-----
37
37
 
38
- date: 2010-09-07 00:00:00 -04:00
38
+ date: 2010-11-04 00:00:00 -04:00
39
39
  default_executable:
40
40
  dependencies: []
41
41
 
@@ -136,6 +136,7 @@ files:
136
136
  - spec/helpers/cache_helper.rb
137
137
  - spec/java_proxy_cacher_spec.rb
138
138
  - xml_entities.otml
139
+ - spec/data/urls_in_resourcelist.otml
139
140
  has_rdoc: true
140
141
  homepage: http://github.com/psndcsrv/concord_cacher
141
142
  licenses: []
metadata.gz.sig CHANGED
Binary file