dm-types 0.10.1 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE CHANGED
@@ -1,22 +1,20 @@
1
- Copyright (c) 2007, 2008, 2009 Sam Smoot, Dan Kubb
1
+ Copyright (c) 2009, 2008, 2009 Sam Smoot, Dan Kubb
2
2
 
3
- Permission is hereby granted, free of charge, to any person
4
- obtaining a copy of this software and associated documentation
5
- files (the "Software"), to deal in the Software without
6
- restriction, including without limitation the rights to use,
7
- copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- copies of the Software, and to permit persons to whom the
9
- Software is furnished to do so, subject to the following
10
- conditions:
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
11
10
 
12
11
  The above copyright notice and this permission notice shall be
13
12
  included in all copies or substantial portions of the Software.
14
13
 
15
14
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
- OTHER DEALINGS IN THE SOFTWARE.
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile CHANGED
@@ -1,24 +1,34 @@
1
- require 'pathname'
1
+ require 'rubygems'
2
+ require 'rake'
2
3
 
3
- ROOT = Pathname(__FILE__).dirname.expand_path
4
- JRUBY = RUBY_PLATFORM =~ /java/
5
- WINDOWS = Gem.win_platform?
6
- SUDO = (WINDOWS || JRUBY) ? '' : ('sudo' unless ENV['SUDOLESS'])
4
+ begin
5
+ gem 'jeweler', '~> 1.4'
6
+ require 'jeweler'
7
7
 
8
- require ROOT + 'lib/dm-types/version'
8
+ Jeweler::Tasks.new do |gem|
9
+ gem.name = 'dm-types'
10
+ gem.summary = 'DataMapper plugin providing extra data types'
11
+ gem.description = gem.summary
12
+ gem.email = 'dan.kubb [a] gmail [d] com'
13
+ gem.homepage = 'http://github.com/datamapper/dm-more/tree/master/%s' % gem.name
14
+ gem.authors = [ 'Dan Kubb' ]
9
15
 
10
- AUTHOR = 'Sam Smoot'
11
- EMAIL = 'ssmoot [a] gmail [d] com'
12
- GEM_NAME = 'dm-types'
13
- GEM_VERSION = DataMapper::Types::VERSION
14
- GEM_DEPENDENCIES = [['dm-core', GEM_VERSION]]
15
- GEM_CLEAN = %w[ log pkg coverage ]
16
- GEM_EXTRAS = { :has_rdoc => true, :extra_rdoc_files => %w[ README.rdoc LICENSE TODO History.rdoc ] }
16
+ gem.rubyforge_project = 'datamapper'
17
17
 
18
- PROJECT_NAME = 'datamapper'
19
- PROJECT_URL = "http://github.com/datamapper/dm-more/tree/master/#{GEM_NAME}"
20
- PROJECT_DESCRIPTION = PROJECT_SUMMARY = 'DataMapper plugin providing extra data types'
18
+ gem.add_dependency 'bcrypt-ruby', '~> 2.1.2'
19
+ gem.add_dependency 'dm-core', '~> 0.10.2'
20
+ gem.add_dependency 'fastercsv', '~> 1.5.0'
21
+ gem.add_dependency 'json_pure', '~> 1.2.0'
22
+ gem.add_dependency 'uuidtools', '~> 2.1.1'
23
+ gem.add_dependency 'stringex', '~> 1.1.0'
21
24
 
22
- [ ROOT, ROOT.parent ].each do |dir|
23
- Pathname.glob(dir.join('tasks/**/*.rb').to_s).each { |f| require f }
25
+ gem.add_development_dependency 'rspec', '~> 1.2.9'
26
+ gem.add_development_dependency 'yard', '~> 0.4.0'
27
+ end
28
+
29
+ Jeweler::GemcutterTasks.new
30
+
31
+ FileList['tasks/**/*.rake'].each { |task| import task }
32
+ rescue LoadError
33
+ puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler'
24
34
  end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.10.2
@@ -0,0 +1,121 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{dm-types}
8
+ s.version = "0.10.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Dan Kubb"]
12
+ s.date = %q{2009-12-11}
13
+ s.description = %q{DataMapper plugin providing extra data types}
14
+ s.email = %q{dan.kubb [a] gmail [d] com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ "LICENSE",
21
+ "README.rdoc",
22
+ "Rakefile",
23
+ "VERSION",
24
+ "dm-types.gemspec",
25
+ "lib/dm-types.rb",
26
+ "lib/dm-types/bcrypt_hash.rb",
27
+ "lib/dm-types/comma_separated_list.rb",
28
+ "lib/dm-types/csv.rb",
29
+ "lib/dm-types/enum.rb",
30
+ "lib/dm-types/epoch_time.rb",
31
+ "lib/dm-types/file_path.rb",
32
+ "lib/dm-types/flag.rb",
33
+ "lib/dm-types/ip_address.rb",
34
+ "lib/dm-types/json.rb",
35
+ "lib/dm-types/regexp.rb",
36
+ "lib/dm-types/slug.rb",
37
+ "lib/dm-types/uri.rb",
38
+ "lib/dm-types/uuid.rb",
39
+ "lib/dm-types/yaml.rb",
40
+ "spec/fixtures/article.rb",
41
+ "spec/fixtures/bookmark.rb",
42
+ "spec/fixtures/invention.rb",
43
+ "spec/fixtures/network_node.rb",
44
+ "spec/fixtures/person.rb",
45
+ "spec/fixtures/software_package.rb",
46
+ "spec/fixtures/ticket.rb",
47
+ "spec/fixtures/tshirt.rb",
48
+ "spec/integration/bcrypt_hash_spec.rb",
49
+ "spec/integration/comma_separated_list_spec.rb",
50
+ "spec/integration/enum_spec.rb",
51
+ "spec/integration/file_path_spec.rb",
52
+ "spec/integration/flag_spec.rb",
53
+ "spec/integration/ip_address_spec.rb",
54
+ "spec/integration/json_spec.rb",
55
+ "spec/integration/slug_spec.rb",
56
+ "spec/integration/uri_spec.rb",
57
+ "spec/integration/uuid_spec.rb",
58
+ "spec/integration/yaml_spec.rb",
59
+ "spec/rcov.opts",
60
+ "spec/shared/identity_function_group.rb",
61
+ "spec/spec.opts",
62
+ "spec/spec_helper.rb",
63
+ "spec/unit/bcrypt_hash_spec.rb",
64
+ "spec/unit/csv_spec.rb",
65
+ "spec/unit/enum_spec.rb",
66
+ "spec/unit/epoch_time_spec.rb",
67
+ "spec/unit/file_path_spec.rb",
68
+ "spec/unit/flag_spec.rb",
69
+ "spec/unit/ip_address_spec.rb",
70
+ "spec/unit/json_spec.rb",
71
+ "spec/unit/regexp_spec.rb",
72
+ "spec/unit/uri_spec.rb",
73
+ "spec/unit/yaml_spec.rb",
74
+ "tasks/ci.rake",
75
+ "tasks/metrics.rake",
76
+ "tasks/spec.rake",
77
+ "tasks/yard.rake",
78
+ "tasks/yardstick.rake"
79
+ ]
80
+ s.homepage = %q{http://github.com/datamapper/dm-more/tree/master/dm-types}
81
+ s.rdoc_options = ["--charset=UTF-8"]
82
+ s.require_paths = ["lib"]
83
+ s.rubyforge_project = %q{datamapper}
84
+ s.rubygems_version = %q{1.3.5}
85
+ s.summary = %q{DataMapper plugin providing extra data types}
86
+
87
+ if s.respond_to? :specification_version then
88
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
89
+ s.specification_version = 3
90
+
91
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
92
+ s.add_runtime_dependency(%q<bcrypt-ruby>, ["~> 2.1.2"])
93
+ s.add_runtime_dependency(%q<dm-core>, ["~> 0.10.2"])
94
+ s.add_runtime_dependency(%q<fastercsv>, ["~> 1.5.0"])
95
+ s.add_runtime_dependency(%q<json_pure>, ["~> 1.2.0"])
96
+ s.add_runtime_dependency(%q<uuidtools>, ["~> 2.1.1"])
97
+ s.add_runtime_dependency(%q<stringex>, ["~> 1.1.0"])
98
+ s.add_development_dependency(%q<rspec>, ["~> 1.2.9"])
99
+ s.add_development_dependency(%q<yard>, ["~> 0.4.0"])
100
+ else
101
+ s.add_dependency(%q<bcrypt-ruby>, ["~> 2.1.2"])
102
+ s.add_dependency(%q<dm-core>, ["~> 0.10.2"])
103
+ s.add_dependency(%q<fastercsv>, ["~> 1.5.0"])
104
+ s.add_dependency(%q<json_pure>, ["~> 1.2.0"])
105
+ s.add_dependency(%q<uuidtools>, ["~> 2.1.1"])
106
+ s.add_dependency(%q<stringex>, ["~> 1.1.0"])
107
+ s.add_dependency(%q<rspec>, ["~> 1.2.9"])
108
+ s.add_dependency(%q<yard>, ["~> 0.4.0"])
109
+ end
110
+ else
111
+ s.add_dependency(%q<bcrypt-ruby>, ["~> 2.1.2"])
112
+ s.add_dependency(%q<dm-core>, ["~> 0.10.2"])
113
+ s.add_dependency(%q<fastercsv>, ["~> 1.5.0"])
114
+ s.add_dependency(%q<json_pure>, ["~> 1.2.0"])
115
+ s.add_dependency(%q<uuidtools>, ["~> 2.1.1"])
116
+ s.add_dependency(%q<stringex>, ["~> 1.1.0"])
117
+ s.add_dependency(%q<rspec>, ["~> 1.2.9"])
118
+ s.add_dependency(%q<yard>, ["~> 0.4.0"])
119
+ end
120
+ end
121
+
@@ -9,7 +9,6 @@ module DataMapper
9
9
  module Types
10
10
  class Csv < DataMapper::Type
11
11
  primitive Text
12
- lazy true
13
12
 
14
13
  def self.load(value, property)
15
14
  case value
@@ -3,9 +3,7 @@ require 'json'
3
3
  module DataMapper
4
4
  module Types
5
5
  class Json < DataMapper::Type
6
- primitive String
7
- length 65535
8
- lazy true
6
+ primitive Text
9
7
 
10
8
  def self.load(value, property)
11
9
  if value.nil?
@@ -4,7 +4,11 @@ module DataMapper
4
4
  module Types
5
5
  class Slug < DataMapper::Type
6
6
  primitive String
7
- length 65535
7
+ length 2000
8
+
9
+ # Maximum length chosen because URI type is limited to 2000
10
+ # characters, and a slug is a component of a URI, so it should
11
+ # not exceed the maximum URI length either.
8
12
 
9
13
  def self.load(value, property)
10
14
  value
@@ -3,9 +3,7 @@ require 'yaml'
3
3
  module DataMapper
4
4
  module Types
5
5
  class Yaml < DataMapper::Type
6
- primitive String
7
- length 65535
8
- lazy true
6
+ primitive Text
9
7
 
10
8
  def self.load(value, property)
11
9
  if value.nil?
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  try_spec do
4
4
 
5
- require 'spec/fixtures/person'
5
+ require './spec/fixtures/person'
6
6
 
7
7
  describe DataMapper::Types::Fixtures::Person do
8
8
  before :all do
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  try_spec do
4
4
 
5
- require 'spec/fixtures/person'
5
+ require './spec/fixtures/person'
6
6
 
7
7
  describe DataMapper::Types::Fixtures::Person do
8
8
  before :all do
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  try_spec do
4
4
 
5
- require 'spec/fixtures/ticket'
5
+ require './spec/fixtures/ticket'
6
6
 
7
7
  describe DataMapper::Types::Fixtures::Ticket do
8
8
  describe 'that is dumped and then loaded' do
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  try_spec do
4
4
 
5
- require 'spec/fixtures/software_package'
5
+ require './spec/fixtures/software_package'
6
6
 
7
7
  describe DataMapper::Types::Fixtures::SoftwarePackage do
8
8
  describe 'with source path at /var/cache/apt/archives/linux-libc-dev_2.6.28-11.40_i386.deb' do
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  try_spec do
4
4
 
5
- require 'spec/fixtures/tshirt'
5
+ require './spec/fixtures/tshirt'
6
6
 
7
7
  describe DataMapper::Types::Fixtures::TShirt do
8
8
  before do
@@ -12,7 +12,7 @@ end
12
12
 
13
13
  try_spec do
14
14
 
15
- require 'spec/fixtures/network_node'
15
+ require './spec/fixtures/network_node'
16
16
 
17
17
  describe DataMapper::Types::Fixtures::NetworkNode do
18
18
  before :all do
@@ -125,8 +125,12 @@ try_spec do
125
125
  @resource.reload
126
126
  end
127
127
 
128
- it 'has NO IP address' do
129
- @resource.ip_address.should be_nil
128
+ it 'is an IPv4 node' do
129
+ @resource.should run_ipv4
130
+ end
131
+
132
+ it 'should be the expected value' do
133
+ @resource.ip_address.should == IPAddr.new('0.0.0.0')
130
134
  end
131
135
  end
132
136
  end
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  try_spec do
4
4
 
5
- require 'spec/fixtures/person'
5
+ require './spec/fixtures/person'
6
6
 
7
7
  describe DataMapper::Types::Fixtures::Person do
8
8
  before :all do
@@ -4,7 +4,7 @@ require 'spec_helper'
4
4
 
5
5
  try_spec do
6
6
 
7
- require 'spec/fixtures/article'
7
+ require './spec/fixtures/article'
8
8
 
9
9
  describe DataMapper::Types::Fixtures::Article do
10
10
  describe "persisted with title and slug set to 'New DataMapper Type'" do
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  try_spec do
4
4
 
5
- require 'spec/fixtures/bookmark'
5
+ require './spec/fixtures/bookmark'
6
6
 
7
7
  describe DataMapper::Types::Fixtures::Bookmark do
8
8
  describe 'without URI' do
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  try_spec do
4
4
 
5
- require 'spec/fixtures/network_node'
5
+ require './spec/fixtures/network_node'
6
6
 
7
7
  describe DataMapper::Types::Fixtures::NetworkNode do
8
8
  describe 'with UUID set as UUID object' do
@@ -2,8 +2,8 @@ require 'spec_helper'
2
2
 
3
3
  try_spec do
4
4
 
5
- require 'spec/fixtures/person'
6
- require 'spec/fixtures/invention'
5
+ require './spec/fixtures/person'
6
+ require './spec/fixtures/invention'
7
7
 
8
8
  describe DataMapper::Types::Fixtures::Person do
9
9
  before :all do
@@ -0,0 +1,6 @@
1
+ --exclude "spec"
2
+ --sort coverage
3
+ --callsites
4
+ --xrefs
5
+ --profile
6
+ --text-summary
@@ -1,2 +1,4 @@
1
1
  --colour
2
2
  --loadby random
3
+ --format profile
4
+ --backtrace
@@ -41,11 +41,7 @@ HAS_POSTGRES = load_driver(:postgres, 'postgres://postgres@localhost/dm_core_tes
41
41
 
42
42
 
43
43
  DEPENDENCIES = {
44
- 'bcrypt' => 'bcrypt-ruby',
45
- 'fastercsv' => 'fastercsv',
46
- 'json' => 'json',
47
- 'stringex' => 'stringex',
48
- 'uuidtools' => 'uuidtools',
44
+ 'bcrypt' => 'bcrypt-ruby',
49
45
  }
50
46
 
51
47
  def try_spec
@@ -0,0 +1 @@
1
+ task :ci => [ :verify_measurements, 'metrics:all' ]
@@ -0,0 +1,36 @@
1
+ begin
2
+ require 'metric_fu'
3
+ rescue LoadError
4
+ namespace :metrics do
5
+ task :all do
6
+ abort 'metric_fu is not available. In order to run metrics:all, you must: gem install metric_fu'
7
+ end
8
+ end
9
+ end
10
+
11
+ begin
12
+ require 'reek/adapters/rake_task'
13
+
14
+ Reek::RakeTask.new do |t|
15
+ t.fail_on_error = true
16
+ t.verbose = false
17
+ t.source_files = 'lib/**/*.rb'
18
+ end
19
+ rescue LoadError
20
+ task :reek do
21
+ abort 'Reek is not available. In order to run reek, you must: gem install reek'
22
+ end
23
+ end
24
+
25
+ begin
26
+ require 'roodi'
27
+ require 'roodi_task'
28
+
29
+ RoodiTask.new do |t|
30
+ t.verbose = false
31
+ end
32
+ rescue LoadError
33
+ task :roodi do
34
+ abort 'Roodi is not available. In order to run roodi, you must: gem install roodi'
35
+ end
36
+ end
@@ -0,0 +1,41 @@
1
+ spec_defaults = lambda do |spec|
2
+ spec.pattern = 'spec/**/*_spec.rb'
3
+ spec.libs << 'lib' << 'spec'
4
+ spec.spec_opts << '--options' << 'spec/spec.opts'
5
+ end
6
+
7
+ begin
8
+ require 'spec/rake/spectask'
9
+
10
+ Spec::Rake::SpecTask.new(:spec, &spec_defaults)
11
+ rescue LoadError
12
+ task :spec do
13
+ abort 'rspec is not available. In order to run spec, you must: gem install rspec'
14
+ end
15
+ end
16
+
17
+ begin
18
+ require 'rcov'
19
+ require 'spec/rake/verify_rcov'
20
+
21
+ Spec::Rake::SpecTask.new(:rcov) do |rcov|
22
+ spec_defaults.call(rcov)
23
+ rcov.rcov = true
24
+ rcov.rcov_opts = File.read('spec/rcov.opts').split(/\s+/)
25
+ end
26
+
27
+ RCov::VerifyTask.new(:verify_rcov => :rcov) do |rcov|
28
+ rcov.threshold = 100
29
+ end
30
+ rescue LoadError
31
+ %w[ rcov verify_rcov ].each do |name|
32
+ task name do
33
+ abort "rcov is not available. In order to run #{name}, you must: gem install rcov"
34
+ end
35
+ end
36
+ end
37
+
38
+ task :spec => :check_dependencies
39
+ task :rcov => :check_dependencies
40
+
41
+ task :default => :spec
@@ -0,0 +1,9 @@
1
+ begin
2
+ require 'yard'
3
+
4
+ YARD::Rake::YardocTask.new
5
+ rescue LoadError
6
+ task :yard do
7
+ abort 'YARD is not available. In order to run yard, you must: gem install yard'
8
+ end
9
+ end
@@ -0,0 +1,19 @@
1
+ begin
2
+ require 'pathname'
3
+ require 'yardstick/rake/measurement'
4
+ require 'yardstick/rake/verify'
5
+
6
+ # yardstick_measure task
7
+ Yardstick::Rake::Measurement.new
8
+
9
+ # verify_measurements task
10
+ Yardstick::Rake::Verify.new do |verify|
11
+ verify.threshold = 100
12
+ end
13
+ rescue LoadError
14
+ %w[ yardstick_measure verify_measurements ].each do |name|
15
+ task name.to_s do
16
+ abort "Yardstick is not available. In order to run #{name}, you must: gem install yardstick"
17
+ end
18
+ end
19
+ end
metadata CHANGED
@@ -1,46 +1,112 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dm-types
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
- - Sam Smoot
7
+ - Dan Kubb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-30 00:00:00 -07:00
12
+ date: 2009-12-11 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: bcrypt-ruby
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ~>
22
+ - !ruby/object:Gem::Version
23
+ version: 2.1.2
24
+ version:
15
25
  - !ruby/object:Gem::Dependency
16
26
  name: dm-core
17
27
  type: :runtime
18
28
  version_requirement:
19
29
  version_requirements: !ruby/object:Gem::Requirement
20
30
  requirements:
21
- - - "="
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 0.10.2
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: fastercsv
37
+ type: :runtime
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 1.5.0
44
+ version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: json_pure
47
+ type: :runtime
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 1.2.0
54
+ version:
55
+ - !ruby/object:Gem::Dependency
56
+ name: uuidtools
57
+ type: :runtime
58
+ version_requirement:
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ~>
22
62
  - !ruby/object:Gem::Version
23
- version: 0.10.1
63
+ version: 2.1.1
64
+ version:
65
+ - !ruby/object:Gem::Dependency
66
+ name: stringex
67
+ type: :runtime
68
+ version_requirement:
69
+ version_requirements: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ~>
72
+ - !ruby/object:Gem::Version
73
+ version: 1.1.0
74
+ version:
75
+ - !ruby/object:Gem::Dependency
76
+ name: rspec
77
+ type: :development
78
+ version_requirement:
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ~>
82
+ - !ruby/object:Gem::Version
83
+ version: 1.2.9
84
+ version:
85
+ - !ruby/object:Gem::Dependency
86
+ name: yard
87
+ type: :development
88
+ version_requirement:
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: 0.4.0
24
94
  version:
25
95
  description: DataMapper plugin providing extra data types
26
- email:
27
- - ssmoot [a] gmail [d] com
96
+ email: dan.kubb [a] gmail [d] com
28
97
  executables: []
29
98
 
30
99
  extensions: []
31
100
 
32
101
  extra_rdoc_files:
33
- - README.rdoc
34
102
  - LICENSE
35
- - TODO
36
- - History.rdoc
103
+ - README.rdoc
37
104
  files:
38
- - History.rdoc
39
105
  - LICENSE
40
- - Manifest.txt
41
106
  - README.rdoc
42
107
  - Rakefile
43
- - TODO
108
+ - VERSION
109
+ - dm-types.gemspec
44
110
  - lib/dm-types.rb
45
111
  - lib/dm-types/bcrypt_hash.rb
46
112
  - lib/dm-types/comma_separated_list.rb
@@ -55,7 +121,6 @@ files:
55
121
  - lib/dm-types/slug.rb
56
122
  - lib/dm-types/uri.rb
57
123
  - lib/dm-types/uuid.rb
58
- - lib/dm-types/version.rb
59
124
  - lib/dm-types/yaml.rb
60
125
  - spec/fixtures/article.rb
61
126
  - spec/fixtures/bookmark.rb
@@ -76,6 +141,7 @@ files:
76
141
  - spec/integration/uri_spec.rb
77
142
  - spec/integration/uuid_spec.rb
78
143
  - spec/integration/yaml_spec.rb
144
+ - spec/rcov.opts
79
145
  - spec/shared/identity_function_group.rb
80
146
  - spec/spec.opts
81
147
  - spec/spec_helper.rb
@@ -90,16 +156,18 @@ files:
90
156
  - spec/unit/regexp_spec.rb
91
157
  - spec/unit/uri_spec.rb
92
158
  - spec/unit/yaml_spec.rb
93
- - tasks/install.rb
94
- - tasks/spec.rb
159
+ - tasks/ci.rake
160
+ - tasks/metrics.rake
161
+ - tasks/spec.rake
162
+ - tasks/yard.rake
163
+ - tasks/yardstick.rake
95
164
  has_rdoc: true
96
165
  homepage: http://github.com/datamapper/dm-more/tree/master/dm-types
97
166
  licenses: []
98
167
 
99
168
  post_install_message:
100
169
  rdoc_options:
101
- - --main
102
- - README.rdoc
170
+ - --charset=UTF-8
103
171
  require_paths:
104
172
  - lib
105
173
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -1,36 +0,0 @@
1
- === 0.10.1 / 2009-09-30
2
-
3
- * No changes this version
4
-
5
- === 0.10.0 / 2009-09-15
6
-
7
- * Updated to work with dm-core 0.10.0
8
-
9
- === 0.9.11 / 2009-03-29
10
-
11
- * No changes this version
12
-
13
- === 0.9.10 / 2009-01-19
14
-
15
- * 1 bug fix:
16
-
17
- * Return empty array for a flag type property when value is nil or <= 0
18
-
19
- * 2 minor enhancements:
20
-
21
- * Updated Csv, Json, Yaml types to use a Text primitive rather than
22
- a String
23
- * Allow Flag property to be nullable
24
-
25
- === 0.9.9 / 2009-01-04
26
-
27
- * 1 bug fix:
28
-
29
- * Updated DM::Json.typecast to handle nil values
30
-
31
- === 0.9.8 / 2008-12-07
32
-
33
- * 2 bug fixes:
34
-
35
- * Corrected BCryptHash type behavior (previously, value would be repeated saved
36
- * tightened uuidtools requirement for the uuid type
@@ -1,57 +0,0 @@
1
- History.rdoc
2
- LICENSE
3
- Manifest.txt
4
- README.rdoc
5
- Rakefile
6
- TODO
7
- lib/dm-types.rb
8
- lib/dm-types/bcrypt_hash.rb
9
- lib/dm-types/comma_separated_list.rb
10
- lib/dm-types/csv.rb
11
- lib/dm-types/enum.rb
12
- lib/dm-types/epoch_time.rb
13
- lib/dm-types/file_path.rb
14
- lib/dm-types/flag.rb
15
- lib/dm-types/ip_address.rb
16
- lib/dm-types/json.rb
17
- lib/dm-types/regexp.rb
18
- lib/dm-types/slug.rb
19
- lib/dm-types/uri.rb
20
- lib/dm-types/uuid.rb
21
- lib/dm-types/version.rb
22
- lib/dm-types/yaml.rb
23
- spec/fixtures/article.rb
24
- spec/fixtures/bookmark.rb
25
- spec/fixtures/invention.rb
26
- spec/fixtures/network_node.rb
27
- spec/fixtures/person.rb
28
- spec/fixtures/software_package.rb
29
- spec/fixtures/ticket.rb
30
- spec/fixtures/tshirt.rb
31
- spec/integration/bcrypt_hash_spec.rb
32
- spec/integration/comma_separated_list_spec.rb
33
- spec/integration/enum_spec.rb
34
- spec/integration/file_path_spec.rb
35
- spec/integration/flag_spec.rb
36
- spec/integration/ip_address_spec.rb
37
- spec/integration/json_spec.rb
38
- spec/integration/slug_spec.rb
39
- spec/integration/uri_spec.rb
40
- spec/integration/uuid_spec.rb
41
- spec/integration/yaml_spec.rb
42
- spec/shared/identity_function_group.rb
43
- spec/spec.opts
44
- spec/spec_helper.rb
45
- spec/unit/bcrypt_hash_spec.rb
46
- spec/unit/csv_spec.rb
47
- spec/unit/enum_spec.rb
48
- spec/unit/epoch_time_spec.rb
49
- spec/unit/file_path_spec.rb
50
- spec/unit/flag_spec.rb
51
- spec/unit/ip_address_spec.rb
52
- spec/unit/json_spec.rb
53
- spec/unit/regexp_spec.rb
54
- spec/unit/uri_spec.rb
55
- spec/unit/yaml_spec.rb
56
- tasks/install.rb
57
- tasks/spec.rb
data/TODO DELETED
@@ -1,74 +0,0 @@
1
- ### -*- mode:org -*-
2
-
3
- * Spec suite improvement
4
- ** integration
5
- *** DONE bcrypt_hash_spec.rb
6
- *** DONE enum_spec.rb
7
- *** DONE file_path_spec.rb
8
- *** DONE flag_spec.rb
9
- *** DONE ip_address_spec.rb
10
- *** DONE json_spec.rb
11
- *** DONE slug_spec.rb
12
- *** DONE uri_spec.rb
13
- *** DONE uuid_spec.rb
14
- *** DONE yaml_spec.rb
15
-
16
- MK reworked spec suite to the point we actually
17
- can trust it
18
-
19
- ** fixtures
20
-
21
- It should be perfectly possible to combine fixture
22
- models from dm-validations and dm-types, and publish
23
- a little gem that all DM plugins developers can use
24
- as a basis
25
-
26
- *** TODO Investigate if sharing of models across DM plugins makes sense
27
-
28
- * Ideas/prototypes of New types
29
- ** SHA1 hash
30
-
31
- Case: when you want to compute SHA1 of another property
32
- and store it. Useful for file stores, caching and other things.
33
-
34
- Would be a good example of how types can interact with models
35
- via property binding
36
-
37
- ** LowercaseString
38
-
39
- A string type subclass that downcases the input
40
-
41
- Case: CASES WHERE YOU WOULD HATE TO SEE UPPERCASE!
42
-
43
- ** EmbeddedValue
44
-
45
- An experiment of type/model interaction: takes a class
46
- and uses YAML/JSON for serialization
47
-
48
- To complete the picture we would need to add validation
49
- delegation (so embedded object can add errors to
50
- the parent if it makes sense), but it would be helpful
51
- to shape up Property/Type refactoring, and should take
52
- as little time as one evening
53
-
54
- ** ZIP
55
-
56
- Input: a string, output: a ZIP object that is smart enough
57
- to provide predicates
58
-
59
- Need to find a library for zips that would fit
60
-
61
- ** Address
62
-
63
- Same as ZIP but for actuall address. Again, stored
64
- in YAML I suppose
65
-
66
- ** Coordinate
67
-
68
- Input: two floats or two strings can be cast to floats,
69
- output: object that knows how to render a map for itself
70
-
71
- ** DNA
72
-
73
- Mostly for fun, to see how far we can push current types API
74
- with little help from BioRuby
@@ -1,5 +0,0 @@
1
- module DataMapper
2
- module Types
3
- VERSION = '0.10.1'.freeze
4
- end
5
- end
@@ -1,13 +0,0 @@
1
- def sudo_gem(cmd)
2
- sh "#{SUDO} #{RUBY} -S gem #{cmd}", :verbose => false
3
- end
4
-
5
- desc "Install #{GEM_NAME} #{GEM_VERSION}"
6
- task :install => [ :package ] do
7
- sudo_gem "install pkg/#{GEM_NAME}-#{GEM_VERSION} --no-update-sources"
8
- end
9
-
10
- desc "Uninstall #{GEM_NAME} #{GEM_VERSION}"
11
- task :uninstall => [ :clobber ] do
12
- sudo_gem "uninstall #{GEM_NAME} -v#{GEM_VERSION} -Ix"
13
- end
@@ -1,25 +0,0 @@
1
- begin
2
- require 'spec/rake/spectask'
3
-
4
- task :default => [ :spec ]
5
-
6
- desc 'Run specifications'
7
- Spec::Rake::SpecTask.new(:spec) do |t|
8
- t.spec_opts << '--options' << 'spec/spec.opts' if File.exists?('spec/spec.opts')
9
- t.libs << 'lib' << 'spec' # needed for CI rake spec task, duplicated in spec_helper
10
-
11
- begin
12
- require 'rcov'
13
- t.rcov = JRUBY ? false : (ENV.has_key?('NO_RCOV') ? ENV['NO_RCOV'] != 'true' : true)
14
- t.rcov_opts << '--exclude' << 'spec'
15
- t.rcov_opts << '--text-summary'
16
- t.rcov_opts << '--sort' << 'coverage' << '--sort-reverse'
17
- rescue LoadError
18
- # rcov not installed
19
- rescue SyntaxError
20
- # rcov syntax invalid
21
- end
22
- end
23
- rescue LoadError
24
- # rspec not installed
25
- end