<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>curies.gemspec</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <filename>History.txt</filename>
    </modified>
    <modified>
      <filename>License.txt</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ Rakefile
 config/hoe.rb
 config/requirements.rb
 lib/curies.rb
-lib/curie.rb
+lib/curies/curie.rb
 lib/curies/version.rb
 log/debug.log
 script/destroy</diff>
      <filename>Manifest.txt</filename>
    </modified>
    <modified>
      <diff>@@ -54,7 +54,7 @@ sudo gem install curies
 
 (The MIT License)
 
-Copyright (c) 2008 Pius A. Uzamere II, The Uyiosa Corporation
+Copyright (c) 2009 Pius A. Uzamere II, The Uyiosa Corporation
 
 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the</diff>
      <filename>README.txt</filename>
    </modified>
    <modified>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <filename>config/hoe.rb</filename>
    </modified>
    <modified>
      <filename>config/requirements.rb</filename>
    </modified>
    <modified>
      <filename>lib/curies.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,9 @@
+class String
+  def could_be_a_safe_curie?
+    self[0,1] == &quot;[&quot; and self[length - 1, length] == &quot;]&quot;
+  end
+end
+
 class Curie
   DEFAULT_MAPPINGS = {&quot;cal&quot; =&gt; &quot;http://www.w3.org/2002/12/cal/ical#&quot;,
                       &quot;cc&quot; =&gt; &quot;http://creativecommons.org/ns#&quot;,
@@ -6,7 +12,8 @@ class Curie
                       &quot;foaf&quot; =&gt; &quot;http://xmlns.com/foaf/0.1/&quot;, 
                       &quot;rdf&quot; =&gt; &quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;,
                       &quot;rdfs&quot; =&gt; &quot;http://www.w3.org/2000/01/rdf-schema#&quot;,
-                      &quot;xsd&quot; =&gt; &quot;http://www.w3.org/2001/XMLSchema#&quot; }
+                      &quot;xsd&quot; =&gt; &quot;http://www.w3.org/2001/XMLSchema#&quot;,
+                      &quot;http&quot; =&gt; &quot;http&quot; }
   @@mappings = {}
   @@mappings.merge! DEFAULT_MAPPINGS
   
@@ -15,7 +22,15 @@ class Curie
   end
 
   def self.parse(curie_string, opts = {})
-    if curie_string[0,1] == &quot;[&quot; and curie_string[curie_string.length - 1, curie_string.length] == &quot;]&quot;
+    if opts[:treat_unsafe_as_normal_strings] and not curie_string.could_be_a_safe_curie?
+      a = [curie_string, :string]
+      return a
+    end
+    if not(curie_string.index(':')) #just some random string that doesn't even have a colon!
+      #strip off brackets if they exist
+      curie_string = curie_string[1,curie_string.length-2] if curie_string.could_be_a_safe_curie?
+      return curie_string
+    elsif curie_string.could_be_a_safe_curie?
       pivot = curie_string.index(':')
       prefix = curie_string[1,pivot-1]
       reference = curie_string[pivot+1, curie_string.length].chop</diff>
      <filename>lib/curies/curie.rb</filename>
    </modified>
    <modified>
      <filename>lib/curies/version.rb</filename>
    </modified>
    <modified>
      <filename>setup.rb</filename>
    </modified>
    <modified>
      <filename>spec/curies_spec.rb</filename>
    </modified>
    <modified>
      <filename>spec/spec.opts</filename>
    </modified>
    <modified>
      <filename>spec/spec_helper.rb</filename>
    </modified>
    <modified>
      <filename>tasks/deployment.rake</filename>
    </modified>
    <modified>
      <filename>tasks/environment.rake</filename>
    </modified>
    <modified>
      <filename>tasks/rspec.rake</filename>
    </modified>
    <modified>
      <filename>tasks/website.rake</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>blah/History.txt</filename>
    </removed>
    <removed>
      <filename>blah/Manifest.txt</filename>
    </removed>
    <removed>
      <filename>blah/README.txt</filename>
    </removed>
    <removed>
      <filename>blah/Rakefile</filename>
    </removed>
    <removed>
      <filename>blah/bin/blah</filename>
    </removed>
    <removed>
      <filename>blah/lib/blah.rb</filename>
    </removed>
    <removed>
      <filename>blah/test/test_blah.rb</filename>
    </removed>
    <removed>
      <filename>log/debug.log</filename>
    </removed>
    <removed>
      <filename>website/index.html</filename>
    </removed>
    <removed>
      <filename>website/index.txt</filename>
    </removed>
    <removed>
      <filename>website/javascripts/rounded_corners_lite.inc.js</filename>
    </removed>
    <removed>
      <filename>website/stylesheets/screen.css</filename>
    </removed>
    <removed>
      <filename>website/template.rhtml</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>0cc46ad07b403b8f2a0eda34838a7e0b6d54fc05</id>
    </parent>
  </parents>
  <author>
    <name>Pius Uzamere</name>
    <email>pius+git@alum.mit.edu</email>
  </author>
  <url>http://github.com/pius/curies/commit/0e2f2211feb4a50cb05dd77dc86c25b01e5864ae</url>
  <id>0e2f2211feb4a50cb05dd77dc86c25b01e5864ae</id>
  <committed-date>2009-01-08T13:18:05-08:00</committed-date>
  <authored-date>2009-01-08T13:18:05-08:00</authored-date>
  <message>added gemspec</message>
  <tree>8e59a0441201ba6c74be539b86765851fbef02b3</tree>
  <committer>
    <name>Pius Uzamere</name>
    <email>pius+git@alum.mit.edu</email>
  </committer>
</commit>
