dm-types 1.0.0 → 1.0.1
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.
- data/.gitignore +1 -0
- data/Gemfile +18 -19
- data/Rakefile +3 -3
- data/VERSION +1 -1
- data/dm-types.gemspec +16 -11
- data/lib/dm-types/enum.rb +2 -13
- data/lib/dm-types/flag.rb +2 -13
- data/lib/dm-types/json.rb +1 -1
- data/lib/dm-types/paranoid_boolean.rb +1 -1
- data/lib/dm-types/paranoid_datetime.rb +1 -1
- data/lib/dm-types/support/flags.rb +41 -0
- data/lib/dm-types/uri.rb +2 -3
- data/lib/dm-types/uuid.rb +4 -0
- data/spec/fixtures/article.rb +23 -25
- data/spec/fixtures/bookmark.rb +15 -17
- data/spec/fixtures/invention.rb +2 -4
- data/spec/fixtures/network_node.rb +34 -36
- data/spec/fixtures/person.rb +15 -18
- data/spec/fixtures/software_package.rb +23 -25
- data/spec/fixtures/ticket.rb +15 -17
- data/spec/fixtures/tshirt.rb +2 -4
- data/spec/integration/bcrypt_hash_spec.rb +4 -4
- data/spec/integration/comma_separated_list_spec.rb +2 -2
- data/spec/integration/enum_spec.rb +7 -7
- data/spec/integration/file_path_spec.rb +7 -7
- data/spec/integration/flag_spec.rb +3 -3
- data/spec/integration/ip_address_spec.rb +2 -2
- data/spec/integration/json_spec.rb +2 -2
- data/spec/integration/slug_spec.rb +5 -5
- data/spec/integration/uri_spec.rb +9 -9
- data/spec/integration/uuid_spec.rb +6 -6
- data/spec/integration/yaml_spec.rb +3 -3
- data/spec/shared/flags_shared_spec.rb +37 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/unit/bcrypt_hash_spec.rb +2 -2
- data/spec/unit/csv_spec.rb +1 -1
- data/spec/unit/enum_spec.rb +4 -0
- data/spec/unit/epoch_time_spec.rb +1 -1
- data/spec/unit/file_path_spec.rb +1 -1
- data/spec/unit/flag_spec.rb +6 -2
- data/spec/unit/ip_address_spec.rb +1 -1
- data/spec/unit/json_spec.rb +2 -2
- data/spec/unit/regexp_spec.rb +1 -1
- data/spec/unit/uri_spec.rb +1 -1
- data/spec/unit/uuid_spec.rb +25 -0
- data/spec/unit/yaml_spec.rb +2 -2
- data/tasks/local_gemfile.rake +5 -7
- metadata +13 -19
| @@ -4,12 +4,12 @@ try_spec do | |
| 4 4 |  | 
| 5 5 | 
             
              require './spec/fixtures/bookmark'
         | 
| 6 6 |  | 
| 7 | 
            -
              describe DataMapper:: | 
| 7 | 
            +
              describe DataMapper::TypesFixtures::Bookmark do
         | 
| 8 8 | 
             
                supported_by :all do
         | 
| 9 9 | 
             
                  describe 'without URI' do
         | 
| 10 10 | 
             
                    before :all do
         | 
| 11 11 | 
             
                      @uri = nil
         | 
| 12 | 
            -
                      @resource = DataMapper:: | 
| 12 | 
            +
                      @resource = DataMapper::TypesFixtures::Bookmark.new(
         | 
| 13 13 | 
             
                        :title  => 'Check this out',
         | 
| 14 14 | 
             
                        :uri    => @uri,
         | 
| 15 15 | 
             
                        :shared => false,
         | 
| @@ -20,7 +20,7 @@ try_spec do | |
| 20 20 | 
             
                    end
         | 
| 21 21 |  | 
| 22 22 | 
             
                    it 'can be found by uri' do
         | 
| 23 | 
            -
                      DataMapper:: | 
| 23 | 
            +
                      DataMapper::TypesFixtures::Bookmark.first(:uri => @uri).should == @resource
         | 
| 24 24 | 
             
                    end
         | 
| 25 25 |  | 
| 26 26 | 
             
                    describe 'when reloaded' do
         | 
| @@ -37,8 +37,8 @@ try_spec do | |
| 37 37 | 
             
                  describe 'with a blank URI' do
         | 
| 38 38 | 
             
                    before :all do
         | 
| 39 39 | 
             
                      @uri = ''
         | 
| 40 | 
            -
                      DataMapper:: | 
| 41 | 
            -
                      @resource = DataMapper:: | 
| 40 | 
            +
                      DataMapper::TypesFixtures::Bookmark.auto_migrate!
         | 
| 41 | 
            +
                      @resource = DataMapper::TypesFixtures::Bookmark.new(
         | 
| 42 42 | 
             
                        :title  => 'Check this out',
         | 
| 43 43 | 
             
                        :uri    => @uri,
         | 
| 44 44 | 
             
                        :shared => false,
         | 
| @@ -49,7 +49,7 @@ try_spec do | |
| 49 49 | 
             
                    end
         | 
| 50 50 |  | 
| 51 51 | 
             
                    it 'can be found by uri' do
         | 
| 52 | 
            -
                      DataMapper:: | 
| 52 | 
            +
                      DataMapper::TypesFixtures::Bookmark.first(:uri => @uri).should == @resource
         | 
| 53 53 | 
             
                    end
         | 
| 54 54 |  | 
| 55 55 | 
             
                    describe 'when reloaded' do
         | 
| @@ -70,7 +70,7 @@ try_spec do | |
| 70 70 | 
             
                  describe 'with invalid URI' do
         | 
| 71 71 | 
             
                    before :all do
         | 
| 72 72 | 
             
                      @uri = 'this is def. not URI'
         | 
| 73 | 
            -
                      @resource = DataMapper:: | 
| 73 | 
            +
                      @resource = DataMapper::TypesFixtures::Bookmark.new(
         | 
| 74 74 | 
             
                        :title  => 'Check this out',
         | 
| 75 75 | 
             
                        :uri    => @uri,
         | 
| 76 76 | 
             
                        :shared => false,
         | 
| @@ -109,7 +109,7 @@ try_spec do | |
| 109 109 | 
             
                  ].each do |uri|
         | 
| 110 110 | 
             
                    describe "with URI set to '#{uri}'" do
         | 
| 111 111 | 
             
                      before :all do
         | 
| 112 | 
            -
                        @resource = DataMapper:: | 
| 112 | 
            +
                        @resource = DataMapper::TypesFixtures::Bookmark.new(
         | 
| 113 113 | 
             
                          :title  => 'Check this out',
         | 
| 114 114 | 
             
                          :uri    => uri,
         | 
| 115 115 | 
             
                          :shared => false,
         | 
| @@ -120,7 +120,7 @@ try_spec do | |
| 120 120 | 
             
                      end
         | 
| 121 121 |  | 
| 122 122 | 
             
                      it 'can be found by uri' do
         | 
| 123 | 
            -
                        DataMapper:: | 
| 123 | 
            +
                        DataMapper::TypesFixtures::Bookmark.first(:uri => uri).should_not be_blank
         | 
| 124 124 | 
             
                      end
         | 
| 125 125 |  | 
| 126 126 | 
             
                      describe 'when reloaded' do
         | 
| @@ -4,13 +4,13 @@ try_spec do | |
| 4 4 |  | 
| 5 5 | 
             
              require './spec/fixtures/network_node'
         | 
| 6 6 |  | 
| 7 | 
            -
              describe DataMapper:: | 
| 7 | 
            +
              describe DataMapper::TypesFixtures::NetworkNode do
         | 
| 8 8 | 
             
                supported_by :all do
         | 
| 9 9 | 
             
                  describe 'with UUID set as UUID object' do
         | 
| 10 10 | 
             
                    before :all do
         | 
| 11 11 | 
             
                      @uuid_string = 'b0fc632e-d744-4821-afe3-4ea0701859ee'
         | 
| 12 12 | 
             
                      @uuid        = UUIDTools::UUID.parse(@uuid_string)
         | 
| 13 | 
            -
                      @resource    = DataMapper:: | 
| 13 | 
            +
                      @resource    = DataMapper::TypesFixtures::NetworkNode.new(:uuid => @uuid)
         | 
| 14 14 |  | 
| 15 15 | 
             
                      @resource.save.should be(true)
         | 
| 16 16 | 
             
                    end
         | 
| @@ -33,7 +33,7 @@ try_spec do | |
| 33 33 | 
             
                  describe 'with UUID set as a valid UUID string' do
         | 
| 34 34 | 
             
                    before :all do
         | 
| 35 35 | 
             
                      @uuid  = 'b0fc632e-d744-4821-afe3-4ea0701859ee'
         | 
| 36 | 
            -
                      @resource = DataMapper:: | 
| 36 | 
            +
                      @resource = DataMapper::TypesFixtures::NetworkNode.new(:uuid => @uuid)
         | 
| 37 37 | 
             
                    end
         | 
| 38 38 |  | 
| 39 39 | 
             
                    describe 'when reloaded' do
         | 
| @@ -55,7 +55,7 @@ try_spec do | |
| 55 55 | 
             
                    before :all do
         | 
| 56 56 | 
             
                      @uuid  = 'meh'
         | 
| 57 57 | 
             
                      @operation = lambda do
         | 
| 58 | 
            -
                        DataMapper:: | 
| 58 | 
            +
                        DataMapper::TypesFixtures::NetworkNode.new(:uuid => @uuid)
         | 
| 59 59 | 
             
                      end
         | 
| 60 60 | 
             
                    end
         | 
| 61 61 |  | 
| @@ -70,7 +70,7 @@ try_spec do | |
| 70 70 | 
             
                    before :all do
         | 
| 71 71 | 
             
                      @uuid  = ''
         | 
| 72 72 | 
             
                      @operation = lambda do
         | 
| 73 | 
            -
                        DataMapper:: | 
| 73 | 
            +
                        DataMapper::TypesFixtures::NetworkNode.new(:uuid => @uuid)
         | 
| 74 74 | 
             
                      end
         | 
| 75 75 | 
             
                    end
         | 
| 76 76 |  | 
| @@ -84,7 +84,7 @@ try_spec do | |
| 84 84 | 
             
                  describe 'with missing UUID' do
         | 
| 85 85 | 
             
                    before :all do
         | 
| 86 86 | 
             
                      @uuid  = nil
         | 
| 87 | 
            -
                      @resource = DataMapper:: | 
| 87 | 
            +
                      @resource = DataMapper::TypesFixtures::NetworkNode.new(:uuid => @uuid)
         | 
| 88 88 | 
             
                    end
         | 
| 89 89 |  | 
| 90 90 | 
             
                    describe 'when reloaded' do
         | 
| @@ -5,10 +5,10 @@ try_spec do | |
| 5 5 | 
             
              require './spec/fixtures/person'
         | 
| 6 6 | 
             
              require './spec/fixtures/invention'
         | 
| 7 7 |  | 
| 8 | 
            -
              describe DataMapper:: | 
| 8 | 
            +
              describe DataMapper::TypesFixtures::Person do
         | 
| 9 9 | 
             
                supported_by :all do
         | 
| 10 10 | 
             
                  before :all do
         | 
| 11 | 
            -
                    @resource = DataMapper:: | 
| 11 | 
            +
                    @resource = DataMapper::TypesFixtures::Person.new(:name => '')
         | 
| 12 12 | 
             
                  end
         | 
| 13 13 |  | 
| 14 14 | 
             
                  describe 'with no inventions information' do
         | 
| @@ -31,7 +31,7 @@ try_spec do | |
| 31 31 | 
             
                  describe 'with a few items on the inventions list' do
         | 
| 32 32 | 
             
                    before :all do
         | 
| 33 33 | 
             
                      @input = [ 'carbon telephone transmitter', 'light bulb', 'electric grid' ].map do |name|
         | 
| 34 | 
            -
                        DataMapper:: | 
| 34 | 
            +
                        DataMapper::TypesFixtures::Invention.new(name)
         | 
| 35 35 | 
             
                      end
         | 
| 36 36 | 
             
                      @resource.inventions = @input
         | 
| 37 37 | 
             
                    end
         | 
| @@ -0,0 +1,37 @@ | |
| 1 | 
            +
            share_examples_for "A property with flags" do
         | 
| 2 | 
            +
              before :all do
         | 
| 3 | 
            +
                %w[ @property_klass ].each do |ivar|
         | 
| 4 | 
            +
                  raise "+#{ivar}+ should be defined in before block" unless instance_variable_defined?(ivar)
         | 
| 5 | 
            +
                end
         | 
| 6 | 
            +
             | 
| 7 | 
            +
                @flags = [ :one, :two, :three ]
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                class ::User
         | 
| 10 | 
            +
                  include DataMapper::Resource
         | 
| 11 | 
            +
                end
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                @property = User.property :item, @property_klass[@flags], :key => true
         | 
| 14 | 
            +
              end
         | 
| 15 | 
            +
             | 
| 16 | 
            +
              describe ".generated_classes" do
         | 
| 17 | 
            +
                it "should cache the generated class" do
         | 
| 18 | 
            +
                  @property_klass.generated_classes[@flags].should_not be_nil
         | 
| 19 | 
            +
                end
         | 
| 20 | 
            +
              end
         | 
| 21 | 
            +
             | 
| 22 | 
            +
              it "should include :flags in accepted_options" do
         | 
| 23 | 
            +
                @property_klass.accepted_options.should include(:flags)
         | 
| 24 | 
            +
              end
         | 
| 25 | 
            +
             | 
| 26 | 
            +
              it "should respond to :generated_classes" do
         | 
| 27 | 
            +
                @property_klass.should respond_to(:generated_classes)
         | 
| 28 | 
            +
              end
         | 
| 29 | 
            +
             | 
| 30 | 
            +
              it "should respond to :flag_map" do
         | 
| 31 | 
            +
                @property.should respond_to(:flag_map)
         | 
| 32 | 
            +
              end
         | 
| 33 | 
            +
             | 
| 34 | 
            +
              it "should be custom" do
         | 
| 35 | 
            +
                @property.custom?.should be(true)
         | 
| 36 | 
            +
              end
         | 
| 37 | 
            +
            end
         | 
    
        data/spec/spec_helper.rb
    CHANGED
    
    
| @@ -8,13 +8,13 @@ try_spec do | |
| 8 8 |  | 
| 9 9 | 
             
                  @nonstandard_type = 1
         | 
| 10 10 |  | 
| 11 | 
            -
                  class TestType
         | 
| 11 | 
            +
                  class ::TestType
         | 
| 12 12 | 
             
                    @a = 1
         | 
| 13 13 | 
             
                    @b = 'Hi There'
         | 
| 14 14 | 
             
                  end
         | 
| 15 15 | 
             
                  @nonstandard_type2 = TestType.new
         | 
| 16 16 |  | 
| 17 | 
            -
                  class User
         | 
| 17 | 
            +
                  class ::User
         | 
| 18 18 | 
             
                    include DataMapper::Resource
         | 
| 19 19 | 
             
                    property :id, Serial
         | 
| 20 20 | 
             
                    property :password, BCryptHash
         | 
    
        data/spec/unit/csv_spec.rb
    CHANGED
    
    
    
        data/spec/unit/enum_spec.rb
    CHANGED
    
    | @@ -7,8 +7,12 @@ try_spec do | |
| 7 7 | 
             
                    include DataMapper::Resource
         | 
| 8 8 | 
             
                    property :id, Serial
         | 
| 9 9 | 
             
                  end
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                  @property_klass = DataMapper::Property::Enum
         | 
| 10 12 | 
             
                end
         | 
| 11 13 |  | 
| 14 | 
            +
                it_should_behave_like "A property with flags"
         | 
| 15 | 
            +
             | 
| 12 16 | 
             
                describe '.dump' do
         | 
| 13 17 | 
             
                  before do
         | 
| 14 18 | 
             
                    @enum = User.property(:enum, DataMapper::Property::Enum[:first, :second, :third])
         | 
    
        data/spec/unit/file_path_spec.rb
    CHANGED
    
    | @@ -4,7 +4,7 @@ require './spec/fixtures/software_package' | |
| 4 4 | 
             
            try_spec do
         | 
| 5 5 | 
             
              describe DataMapper::Property::FilePath do
         | 
| 6 6 | 
             
                before :all do
         | 
| 7 | 
            -
                  @property = DataMapper:: | 
| 7 | 
            +
                  @property = DataMapper::TypesFixtures::SoftwarePackage.properties[:source_path]
         | 
| 8 8 | 
             
                end
         | 
| 9 9 |  | 
| 10 10 | 
             
                before do
         | 
    
        data/spec/unit/flag_spec.rb
    CHANGED
    
    | @@ -6,10 +6,14 @@ try_spec do | |
| 6 6 | 
             
              describe DataMapper::Property::Flag do
         | 
| 7 7 | 
             
                describe '.dump' do
         | 
| 8 8 | 
             
                  before :all do
         | 
| 9 | 
            -
                    @flag = DataMapper:: | 
| 9 | 
            +
                    @flag = DataMapper::TypesFixtures::TShirt.property(
         | 
| 10 10 | 
             
                      :stuff, DataMapper::Property::Flag[:first, :second, :third, :fourth, :fifth])
         | 
| 11 | 
            +
             | 
| 12 | 
            +
                    @property_klass = DataMapper::Property::Flag
         | 
| 11 13 | 
             
                  end
         | 
| 12 14 |  | 
| 15 | 
            +
                it_should_behave_like "A property with flags"
         | 
| 16 | 
            +
             | 
| 13 17 | 
             
                  describe 'when argument matches a value in the flag map' do
         | 
| 14 18 | 
             
                    before :all do
         | 
| 15 19 | 
             
                      @result = @flag.dump(:first)
         | 
| @@ -63,7 +67,7 @@ try_spec do | |
| 63 67 |  | 
| 64 68 | 
             
                describe '.load' do
         | 
| 65 69 | 
             
                  before :all do
         | 
| 66 | 
            -
                    @flag = DataMapper:: | 
| 70 | 
            +
                    @flag = DataMapper::TypesFixtures::TShirt.property(:stuff, DataMapper::Property::Flag, :flags => [:uno, :dos, :tres, :cuatro, :cinco])
         | 
| 67 71 | 
             
                  end
         | 
| 68 72 |  | 
| 69 73 | 
             
                  describe 'when argument matches a key in the flag map' do
         | 
| @@ -7,7 +7,7 @@ try_spec do | |
| 7 7 | 
             
                before :all do
         | 
| 8 8 | 
             
                  @stored = '81.20.130.1'
         | 
| 9 9 | 
             
                  @input  = IPAddr.new(@stored)
         | 
| 10 | 
            -
                  @property = DataMapper:: | 
| 10 | 
            +
                  @property = DataMapper::TypesFixtures::NetworkNode.properties[:ip_address]
         | 
| 11 11 | 
             
                end
         | 
| 12 12 |  | 
| 13 13 | 
             
                describe '#valid?' do
         | 
    
        data/spec/unit/json_spec.rb
    CHANGED
    
    | @@ -7,7 +7,7 @@ try_spec do | |
| 7 7 |  | 
| 8 8 | 
             
              describe DataMapper::Property::Json do
         | 
| 9 9 | 
             
                before :all do
         | 
| 10 | 
            -
                  @property = DataMapper:: | 
| 10 | 
            +
                  @property = DataMapper::TypesFixtures::Person.properties[:positions]
         | 
| 11 11 | 
             
                end
         | 
| 12 12 |  | 
| 13 13 | 
             
                describe '#valid?' do
         | 
| @@ -83,7 +83,7 @@ try_spec do | |
| 83 83 | 
             
                end
         | 
| 84 84 |  | 
| 85 85 | 
             
                describe '.typecast' do
         | 
| 86 | 
            -
                  class SerializeMe
         | 
| 86 | 
            +
                  class ::SerializeMe
         | 
| 87 87 | 
             
                    attr_accessor :name
         | 
| 88 88 | 
             
                  end
         | 
| 89 89 |  | 
    
        data/spec/unit/regexp_spec.rb
    CHANGED
    
    
    
        data/spec/unit/uri_spec.rb
    CHANGED
    
    | @@ -8,7 +8,7 @@ try_spec do | |
| 8 8 | 
             
                  @uri_str = 'http://example.com/path/to/resource/'
         | 
| 9 9 | 
             
                  @uri     = Addressable::URI.parse(@uri_str)
         | 
| 10 10 |  | 
| 11 | 
            -
                  @property = DataMapper:: | 
| 11 | 
            +
                  @property = DataMapper::TypesFixtures::Bookmark.properties[:uri]
         | 
| 12 12 | 
             
                end
         | 
| 13 13 |  | 
| 14 14 | 
             
                describe '.dump' do
         | 
| @@ -0,0 +1,25 @@ | |
| 1 | 
            +
            require 'spec_helper'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            try_spec do
         | 
| 4 | 
            +
              require './spec/fixtures/network_node'
         | 
| 5 | 
            +
             | 
| 6 | 
            +
              describe DataMapper::Property::UUID do
         | 
| 7 | 
            +
                before :all do
         | 
| 8 | 
            +
                  @property = DataMapper::TypesFixtures::NetworkNode.properties[:node_uuid]
         | 
| 9 | 
            +
                  @input    = 'b0fc632e-d744-4821-afe3-4ea0701859ee'
         | 
| 10 | 
            +
                  @uuid     = UUIDTools::UUID.random_create
         | 
| 11 | 
            +
                end
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                describe '#valid?' do
         | 
| 14 | 
            +
                  describe "with a String" do
         | 
| 15 | 
            +
                    subject { @property.valid?(@input) }
         | 
| 16 | 
            +
                    it { subject.should be(true) }
         | 
| 17 | 
            +
                  end
         | 
| 18 | 
            +
             | 
| 19 | 
            +
                  describe "with a UUIDTools::UUID" do
         | 
| 20 | 
            +
                    subject { @property.valid?(@uuid) }
         | 
| 21 | 
            +
                    it { subject.should be(true) }
         | 
| 22 | 
            +
                  end
         | 
| 23 | 
            +
                end
         | 
| 24 | 
            +
              end
         | 
| 25 | 
            +
            end
         | 
    
        data/spec/unit/yaml_spec.rb
    CHANGED
    
    | @@ -7,7 +7,7 @@ try_spec do | |
| 7 7 |  | 
| 8 8 | 
             
              describe DataMapper::Property::Yaml do
         | 
| 9 9 | 
             
                before :all do
         | 
| 10 | 
            -
                  @property = DataMapper:: | 
| 10 | 
            +
                  @property = DataMapper::TypesFixtures::Person.properties[:inventions]
         | 
| 11 11 | 
             
                end
         | 
| 12 12 |  | 
| 13 13 | 
             
                describe '.load' do
         | 
| @@ -65,7 +65,7 @@ try_spec do | |
| 65 65 | 
             
                end
         | 
| 66 66 |  | 
| 67 67 | 
             
                describe '.typecast' do
         | 
| 68 | 
            -
                  class SerializeMe
         | 
| 68 | 
            +
                  class ::SerializeMe
         | 
| 69 69 | 
             
                    attr_accessor :name
         | 
| 70 70 | 
             
                  end
         | 
| 71 71 |  | 
    
        data/tasks/local_gemfile.rake
    CHANGED
    
    | @@ -1,16 +1,14 @@ | |
| 1 1 | 
             
            desc "Support bundling from local source code (allows BUNDLE_GEMFILE=Gemfile.local bundle foo)"
         | 
| 2 2 | 
             
            task :local_gemfile do |t|
         | 
| 3 3 |  | 
| 4 | 
            -
              root | 
| 5 | 
            -
              datamapper | 
| 6 | 
            -
             | 
| 7 | 
            -
              source_regex     = /DATAMAPPER = 'git:\/\/github.com\/datamapper'/
         | 
| 8 | 
            -
              gem_source_regex = /:git => \"#\{DATAMAPPER\}\/(.+?)(?:\.git)?\"/
         | 
| 4 | 
            +
              root       = Pathname(__FILE__).dirname.parent
         | 
| 5 | 
            +
              datamapper = root.parent
         | 
| 9 6 |  | 
| 10 7 | 
             
              root.join('Gemfile.local').open('w') do |f|
         | 
| 11 8 | 
             
                root.join('Gemfile').open.each do |line|
         | 
| 12 | 
            -
                  line.sub!( | 
| 13 | 
            -
                  line.sub!( | 
| 9 | 
            +
                  line.sub!(/DATAMAPPER = 'git:\/\/github.com\/datamapper'/, "DATAMAPPER = '#{datamapper}'")
         | 
| 10 | 
            +
                  line.sub!(/:git => \"#\{DATAMAPPER\}\/(.+?)(?:\.git)?\"/,  ':path => "#{DATAMAPPER}/\1"')
         | 
| 11 | 
            +
                  line.sub!(/do_options\[:git\] = \"#\{DATAMAPPER\}\/(.+?)(?:\.git)?\"/,  'do_options[:path] = "#{DATAMAPPER}/\1"')
         | 
| 14 12 | 
             
                  f.puts line
         | 
| 15 13 | 
             
                end
         | 
| 16 14 | 
             
              end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,13 +1,12 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: dm-types
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              hash: 23
         | 
| 5 4 | 
             
              prerelease: false
         | 
| 6 5 | 
             
              segments: 
         | 
| 7 6 | 
             
              - 1
         | 
| 8 7 | 
             
              - 0
         | 
| 9 | 
            -
              -  | 
| 10 | 
            -
              version: 1.0. | 
| 8 | 
            +
              - 1
         | 
| 9 | 
            +
              version: 1.0.1
         | 
| 11 10 | 
             
            platform: ruby
         | 
| 12 11 | 
             
            authors: 
         | 
| 13 12 | 
             
            - Dan Kubb
         | 
| @@ -15,7 +14,7 @@ autorequire: | |
| 15 14 | 
             
            bindir: bin
         | 
| 16 15 | 
             
            cert_chain: []
         | 
| 17 16 |  | 
| 18 | 
            -
            date: 2010- | 
| 17 | 
            +
            date: 2010-09-07 00:00:00 -07:00
         | 
| 19 18 | 
             
            default_executable: 
         | 
| 20 19 | 
             
            dependencies: 
         | 
| 21 20 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| @@ -26,12 +25,11 @@ dependencies: | |
| 26 25 | 
             
                requirements: 
         | 
| 27 26 | 
             
                - - ~>
         | 
| 28 27 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 29 | 
            -
                    hash: 23
         | 
| 30 28 | 
             
                    segments: 
         | 
| 31 29 | 
             
                    - 1
         | 
| 32 30 | 
             
                    - 0
         | 
| 33 | 
            -
                    -  | 
| 34 | 
            -
                    version: 1.0. | 
| 31 | 
            +
                    - 1
         | 
| 32 | 
            +
                    version: 1.0.1
         | 
| 35 33 | 
             
              type: :runtime
         | 
| 36 34 | 
             
              version_requirements: *id001
         | 
| 37 35 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| @@ -42,7 +40,6 @@ dependencies: | |
| 42 40 | 
             
                requirements: 
         | 
| 43 41 | 
             
                - - ~>
         | 
| 44 42 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 45 | 
            -
                    hash: 5
         | 
| 46 43 | 
             
                    segments: 
         | 
| 47 44 | 
             
                    - 1
         | 
| 48 45 | 
             
                    - 5
         | 
| @@ -58,12 +55,10 @@ dependencies: | |
| 58 55 | 
             
                requirements: 
         | 
| 59 56 | 
             
                - - ~>
         | 
| 60 57 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 61 | 
            -
                    hash: 1
         | 
| 62 58 | 
             
                    segments: 
         | 
| 63 59 | 
             
                    - 1
         | 
| 64 60 | 
             
                    - 4
         | 
| 65 | 
            -
                     | 
| 66 | 
            -
                    version: 1.4.3
         | 
| 61 | 
            +
                    version: "1.4"
         | 
| 67 62 | 
             
              type: :runtime
         | 
| 68 63 | 
             
              version_requirements: *id003
         | 
| 69 64 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| @@ -74,7 +69,6 @@ dependencies: | |
| 74 69 | 
             
                requirements: 
         | 
| 75 70 | 
             
                - - ~>
         | 
| 76 71 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 77 | 
            -
                    hash: 9
         | 
| 78 72 | 
             
                    segments: 
         | 
| 79 73 | 
             
                    - 2
         | 
| 80 74 | 
             
                    - 1
         | 
| @@ -90,7 +84,6 @@ dependencies: | |
| 90 84 | 
             
                requirements: 
         | 
| 91 85 | 
             
                - - ~>
         | 
| 92 86 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 93 | 
            -
                    hash: 19
         | 
| 94 87 | 
             
                    segments: 
         | 
| 95 88 | 
             
                    - 1
         | 
| 96 89 | 
             
                    - 1
         | 
| @@ -106,7 +99,6 @@ dependencies: | |
| 106 99 | 
             
                requirements: 
         | 
| 107 100 | 
             
                - - ~>
         | 
| 108 101 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 109 | 
            -
                    hash: 9
         | 
| 110 102 | 
             
                    segments: 
         | 
| 111 103 | 
             
                    - 1
         | 
| 112 104 | 
             
                    - 3
         | 
| @@ -121,12 +113,11 @@ dependencies: | |
| 121 113 | 
             
                requirements: 
         | 
| 122 114 | 
             
                - - ~>
         | 
| 123 115 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 124 | 
            -
                    hash: 23
         | 
| 125 116 | 
             
                    segments: 
         | 
| 126 117 | 
             
                    - 1
         | 
| 127 118 | 
             
                    - 0
         | 
| 128 | 
            -
                    -  | 
| 129 | 
            -
                    version: 1.0. | 
| 119 | 
            +
                    - 1
         | 
| 120 | 
            +
                    version: 1.0.1
         | 
| 130 121 | 
             
              type: :development
         | 
| 131 122 | 
             
              version_requirements: *id007
         | 
| 132 123 | 
             
            description: DataMapper plugin providing extra data types
         | 
| @@ -161,6 +152,7 @@ files: | |
| 161 152 | 
             
            - lib/dm-types/paranoid_datetime.rb
         | 
| 162 153 | 
             
            - lib/dm-types/regexp.rb
         | 
| 163 154 | 
             
            - lib/dm-types/slug.rb
         | 
| 155 | 
            +
            - lib/dm-types/support/flags.rb
         | 
| 164 156 | 
             
            - lib/dm-types/uri.rb
         | 
| 165 157 | 
             
            - lib/dm-types/uuid.rb
         | 
| 166 158 | 
             
            - lib/dm-types/yaml.rb
         | 
| @@ -184,6 +176,7 @@ files: | |
| 184 176 | 
             
            - spec/integration/uuid_spec.rb
         | 
| 185 177 | 
             
            - spec/integration/yaml_spec.rb
         | 
| 186 178 | 
             
            - spec/rcov.opts
         | 
| 179 | 
            +
            - spec/shared/flags_shared_spec.rb
         | 
| 187 180 | 
             
            - spec/shared/identity_function_group.rb
         | 
| 188 181 | 
             
            - spec/spec.opts
         | 
| 189 182 | 
             
            - spec/spec_helper.rb
         | 
| @@ -199,6 +192,7 @@ files: | |
| 199 192 | 
             
            - spec/unit/paranoid_datetime_spec.rb
         | 
| 200 193 | 
             
            - spec/unit/regexp_spec.rb
         | 
| 201 194 | 
             
            - spec/unit/uri_spec.rb
         | 
| 195 | 
            +
            - spec/unit/uuid_spec.rb
         | 
| 202 196 | 
             
            - spec/unit/yaml_spec.rb
         | 
| 203 197 | 
             
            - tasks/ci.rake
         | 
| 204 198 | 
             
            - tasks/local_gemfile.rake
         | 
| @@ -220,7 +214,6 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 220 214 | 
             
              requirements: 
         | 
| 221 215 | 
             
              - - ">="
         | 
| 222 216 | 
             
                - !ruby/object:Gem::Version 
         | 
| 223 | 
            -
                  hash: 3
         | 
| 224 217 | 
             
                  segments: 
         | 
| 225 218 | 
             
                  - 0
         | 
| 226 219 | 
             
                  version: "0"
         | 
| @@ -229,7 +222,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 229 222 | 
             
              requirements: 
         | 
| 230 223 | 
             
              - - ">="
         | 
| 231 224 | 
             
                - !ruby/object:Gem::Version 
         | 
| 232 | 
            -
                  hash: 3
         | 
| 233 225 | 
             
                  segments: 
         | 
| 234 226 | 
             
                  - 0
         | 
| 235 227 | 
             
                  version: "0"
         | 
| @@ -260,6 +252,7 @@ test_files: | |
| 260 252 | 
             
            - spec/integration/uri_spec.rb
         | 
| 261 253 | 
             
            - spec/integration/uuid_spec.rb
         | 
| 262 254 | 
             
            - spec/integration/yaml_spec.rb
         | 
| 255 | 
            +
            - spec/shared/flags_shared_spec.rb
         | 
| 263 256 | 
             
            - spec/shared/identity_function_group.rb
         | 
| 264 257 | 
             
            - spec/spec_helper.rb
         | 
| 265 258 | 
             
            - spec/unit/bcrypt_hash_spec.rb
         | 
| @@ -274,4 +267,5 @@ test_files: | |
| 274 267 | 
             
            - spec/unit/paranoid_datetime_spec.rb
         | 
| 275 268 | 
             
            - spec/unit/regexp_spec.rb
         | 
| 276 269 | 
             
            - spec/unit/uri_spec.rb
         | 
| 270 | 
            +
            - spec/unit/uuid_spec.rb
         | 
| 277 271 | 
             
            - spec/unit/yaml_spec.rb
         |