dm-validations-ext 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,141 +1,63 @@
1
- # If you're working on more than one datamapper gem at a time, then it's
2
- # recommended to create a local Gemfile and use this instead of the git
3
- # sources. This will make sure that you are developing against your
4
- # other local datamapper sources that you currently work on. Gemfile.local
5
- # will behave identically to the standard Gemfile apart from the fact that
6
- # it fetches the datamapper gems from local paths. This means that you can use
7
- # the same environment variables, like ADAPTER(S) or PLUGIN(S) when running
8
- # bundle commands. Gemfile.local is added to .gitignore, so you don't need to
9
- # worry about accidentally checking local development paths into git.
10
- # In order to create a local Gemfile, all you need to do is run:
11
- #
12
- # bundle exec rake local_gemfile
13
- #
14
- # This will give you a Gemfile.local file that points to your local clones of
15
- # the various datamapper gems. It's assumed that all datamapper repo clones
16
- # reside in the same directory. You can use the Gemfile.local like so for
17
- # running any bundle command:
18
- #
19
- # BUNDLE_GEMFILE=Gemfile.local bundle foo
20
- #
21
- # You can also specify which adapter(s) should be part of the bundle by setting
22
- # an environment variable. This of course also works when using the Gemfile.local
23
- #
24
- # bundle foo # dm-sqlite-adapter
25
- # ADAPTER=mysql bundle foo # dm-mysql-adapter
26
- # ADAPTERS=sqlite,mysql bundle foo # dm-sqlite-adapter and dm-mysql-adapter
27
- #
28
- # Of course you can also use the ADAPTER(S) variable when using the Gemfile.local
29
- # and running specs against selected adapters.
30
- #
31
- # For easily working with adapters supported on your machine, it's recommended
32
- # that you first install all adapters that you are planning to use or work on
33
- # by doing something like
34
- #
35
- # ADAPTERS=sqlite,mysql,postgres bundle install
36
- #
37
- # This will clone the various repositories and make them available to bundler.
38
- # Once you have them installed you can easily switch between adapters for the
39
- # various development tasks. Running something like
40
- #
41
- # ADAPTER=mysql bundle exec rake spec
42
- #
43
- # will make sure that the dm-mysql-adapter is part of the bundle, and will be used
44
- # when running the specs.
45
- #
46
- # You can also specify which plugin(s) should be part of the bundle by setting
47
- # an environment variable. This also works when using the Gemfile.local
48
- #
49
- # bundle foo # dm-migrations
50
- # PLUGINS=dm-validations bundle foo # dm-migrations and dm-validations
51
- # PLUGINS=dm-validations,dm-types bundle foo # dm-migrations, dm-validations and dm-types
52
- #
53
- # Of course you can combine the PLUGIN(S) and ADAPTER(S) env vars to run specs
54
- # for certain adapter/plugin combinations.
55
- #
56
- # Finally, to speed up running specs and other tasks, it's recommended to run
57
- #
58
- # bundle lock
59
- #
60
- # after running 'bundle install' for the first time. This will make 'bundle exec' run
61
- # a lot faster compared to the unlocked version. With an unlocked bundle you would
62
- # typically just run 'bundle install' from time to time to fetch the latest sources from
63
- # upstream. When you locked your bundle, you need to run
64
- #
65
- # bundle install --relock
66
- #
67
- # to make sure to fetch the latest updates and then lock the bundle again. Gemfile.lock
68
- # is added to the .gitignore file, so you don't need to worry about accidentally checking
69
- # it into version control.
1
+ require 'pathname'
70
2
 
71
3
  source 'http://rubygems.org'
72
4
 
73
- DATAMAPPER = 'http://github.com/datamapper'
74
- DM_VERSION = '~> 1.0.1'
5
+ SOURCE = ENV.fetch('SOURCE', :git).to_sym
6
+ REPO_POSTFIX = SOURCE == :path ? '' : '.git'
7
+ DATAMAPPER = SOURCE == :path ? Pathname(__FILE__).dirname.parent : 'http://github.com/datamapper'
8
+ DM_VERSION = '~> 1.1.0'
9
+ DO_VERSION = '~> 0.10.2'
10
+ DM_DO_ADAPTERS = %w[ sqlite postgres mysql oracle sqlserver ]
75
11
 
76
- group :runtime do # Runtime dependencies (as in the gemspec)
12
+ gem 'dm-core', DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-core#{REPO_POSTFIX}"
77
13
 
78
- if ENV['EXTLIB']
79
- gem 'extlib', '~> 0.9.15', :git => "#{DATAMAPPER}/extlib.git"
80
- else
81
- gem 'activesupport', '~> 3.0.0', :git => 'http://github.com/rails/rails.git', :branch => '3-0-stable', :require => nil
82
- end
83
-
84
- gem 'dm-core', DM_VERSION, :git => "#{DATAMAPPER}/dm-core.git"
85
- gem 'dm-validations', DM_VERSION, :git => "#{DATAMAPPER}/dm-validations.git"
86
-
87
- end
88
-
89
- group(:development) do # Development dependencies (as in the gemspec)
14
+ group :development do
90
15
 
16
+ gem 'jeweler', '~> 1.5.2'
91
17
  gem 'rake', '~> 0.8.7'
92
- gem 'rspec', '~> 2.0.1'
93
- gem 'jeweler', '~> 1.4'
18
+ gem 'rspec', '~> 2.4'
94
19
 
95
20
  end
96
21
 
97
- group :quality do # These gems contain rake tasks that check the quality of the source code
22
+ platforms :mri_18 do
23
+ group :quality do
98
24
 
99
- gem 'metric_fu', '~> 1.3'
100
- gem 'rcov', '~> 0.9.8'
101
- gem 'reek', '~> 1.2.8'
102
- gem 'roodi', '~> 2.1'
103
- gem 'yard', '~> 0.5'
104
- gem 'yardstick', '~> 0.1'
25
+ gem 'rcov', '~> 0.9.9'
26
+ gem 'reek', '~> 1.2.8'
27
+ gem 'yard', '~> 0.6'
28
+ gem 'yardstick', '~> 0.2'
105
29
 
30
+ end
106
31
  end
107
32
 
108
- group :datamapper do # We need this because we want to pin these dependencies to their git master sources
33
+ group :datamapper do
109
34
 
110
35
  adapters = ENV['ADAPTER'] || ENV['ADAPTERS']
111
36
  adapters = adapters.to_s.tr(',', ' ').split.uniq - %w[ in_memory ]
112
37
 
113
- DO_VERSION = '~> 0.10.2'
114
- DM_DO_ADAPTERS = %w[ sqlite postgres mysql oracle sqlserver ]
115
-
116
38
  if (do_adapters = DM_DO_ADAPTERS & adapters).any?
117
- options = {}
118
- options[:git] = "#{DATAMAPPER}/do.git" if ENV['DO_GIT'] == 'true'
39
+ do_options = {}
40
+ do_options[:git] = "#{DATAMAPPER}/do#{REPO_POSTFIX}" if ENV['DO_GIT'] == 'true'
119
41
 
120
- gem 'data_objects', DO_VERSION, options.dup
42
+ gem 'data_objects', DO_VERSION, do_options.dup
121
43
 
122
44
  do_adapters.each do |adapter|
123
45
  adapter = 'sqlite3' if adapter == 'sqlite'
124
- gem "do_#{adapter}", DO_VERSION, options.dup
46
+ gem "do_#{adapter}", DO_VERSION, do_options.dup
125
47
  end
126
48
 
127
- gem 'dm-do-adapter', DM_VERSION, :git => "#{DATAMAPPER}/dm-do-adapter.git"
49
+ gem 'dm-do-adapter', DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-do-adapter#{REPO_POSTFIX}"
128
50
  end
129
51
 
130
52
  adapters.each do |adapter|
131
- gem "dm-#{adapter}-adapter", DM_VERSION, :git => "#{DATAMAPPER}/dm-#{adapter}-adapter.git"
53
+ gem "dm-#{adapter}-adapter", DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-#{adapter}-adapter#{REPO_POSTFIX}"
132
54
  end
133
55
 
134
56
  plugins = ENV['PLUGINS'] || ENV['PLUGIN']
135
57
  plugins = plugins.to_s.tr(',', ' ').split.push('dm-migrations').uniq
136
58
 
137
59
  plugins.each do |plugin|
138
- gem plugin, DM_VERSION, :git => "#{DATAMAPPER}/#{plugin}.git"
60
+ gem plugin, DM_VERSION, SOURCE => "#{DATAMAPPER}/#{plugin}#{REPO_POSTFIX}"
139
61
  end
140
62
 
141
63
  end
data/Rakefile CHANGED
@@ -14,7 +14,7 @@ begin
14
14
  gem.authors = [ 'Piotr Solnica' ]
15
15
  gem.has_rdoc = 'yard'
16
16
 
17
- gem.add_dependency 'dm-validations', '~> 1.0.2'
17
+ gem.add_dependency 'dm-validations', '~> 1.1.0'
18
18
 
19
19
  gem.add_development_dependency 'rspec', '~> 2.0.1'
20
20
  gem.add_development_dependency 'jeweler', '~> 1.4'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
@@ -1,66 +1,74 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dm-validations-ext}
8
- s.version = "0.0.1"
8
+ s.version = "0.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Piotr Solnica"]
12
- s.date = %q{2010-10-26}
12
+ s.date = %q{2011-03-19}
13
13
  s.description = %q{DataMapper plugin providing better error messages handling.}
14
14
  s.email = %q{piotr.solnica [a] gmail [d] com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README.rdoc"
17
+ "README.rdoc"
18
18
  ]
19
19
  s.files = [
20
- ".gitignore",
21
- "Gemfile",
22
- "LICENSE",
23
- "README.rdoc",
24
- "Rakefile",
25
- "VERSION",
26
- "dm-validations-ext.gemspec",
27
- "lib/dm-validations-ext.rb",
28
- "spec/public/validations_ext_spec.rb",
29
- "spec/rcov.opts",
30
- "spec/spec_helper.rb",
31
- "tasks/ci.rake",
32
- "tasks/local_gemfile.rake",
33
- "tasks/metrics.rake",
34
- "tasks/spec.rake",
35
- "tasks/yard.rake",
36
- "tasks/yardstick.rake"
20
+ "Gemfile",
21
+ "LICENSE",
22
+ "README.rdoc",
23
+ "Rakefile",
24
+ "VERSION",
25
+ "dm-validations-ext.gemspec",
26
+ "lib/dm-validations-ext.rb",
27
+ "spec/public/validations_ext_spec.rb",
28
+ "spec/rcov.opts",
29
+ "spec/spec_helper.rb",
30
+ "tasks/ci.rake",
31
+ "tasks/local_gemfile.rake",
32
+ "tasks/metrics.rake",
33
+ "tasks/spec.rake",
34
+ "tasks/yard.rake",
35
+ "tasks/yardstick.rake"
37
36
  ]
38
- s.has_rdoc = %q{yard}
39
37
  s.homepage = %q{http://github.com/solnic/dm-validations-ext}
40
- s.rdoc_options = ["--charset=UTF-8"]
41
38
  s.require_paths = ["lib"]
42
- s.rubygems_version = %q{1.3.7}
39
+ s.rubygems_version = %q{1.6.2}
43
40
  s.summary = %q{DataMapper plugin providing better error messages handling.}
44
41
  s.test_files = [
45
- "spec/spec_helper.rb",
46
- "spec/public/validations_ext_spec.rb"
42
+ "spec/public/validations_ext_spec.rb",
43
+ "spec/spec_helper.rb"
47
44
  ]
48
45
 
49
46
  if s.respond_to? :specification_version then
50
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
51
47
  s.specification_version = 3
52
48
 
53
49
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
54
- s.add_runtime_dependency(%q<dm-validations>, ["~> 1.0.2"])
50
+ s.add_runtime_dependency(%q<dm-core>, ["~> 1.1.0"])
51
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
52
+ s.add_development_dependency(%q<rake>, ["~> 0.8.7"])
53
+ s.add_development_dependency(%q<rspec>, ["~> 2.4"])
54
+ s.add_runtime_dependency(%q<dm-validations>, ["~> 1.1.0"])
55
55
  s.add_development_dependency(%q<rspec>, ["~> 2.0.1"])
56
56
  s.add_development_dependency(%q<jeweler>, ["~> 1.4"])
57
57
  else
58
- s.add_dependency(%q<dm-validations>, ["~> 1.0.2"])
58
+ s.add_dependency(%q<dm-core>, ["~> 1.1.0"])
59
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
60
+ s.add_dependency(%q<rake>, ["~> 0.8.7"])
61
+ s.add_dependency(%q<rspec>, ["~> 2.4"])
62
+ s.add_dependency(%q<dm-validations>, ["~> 1.1.0"])
59
63
  s.add_dependency(%q<rspec>, ["~> 2.0.1"])
60
64
  s.add_dependency(%q<jeweler>, ["~> 1.4"])
61
65
  end
62
66
  else
63
- s.add_dependency(%q<dm-validations>, ["~> 1.0.2"])
67
+ s.add_dependency(%q<dm-core>, ["~> 1.1.0"])
68
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
69
+ s.add_dependency(%q<rake>, ["~> 0.8.7"])
70
+ s.add_dependency(%q<rspec>, ["~> 2.4"])
71
+ s.add_dependency(%q<dm-validations>, ["~> 1.1.0"])
64
72
  s.add_dependency(%q<rspec>, ["~> 2.0.1"])
65
73
  s.add_dependency(%q<jeweler>, ["~> 1.4"])
66
74
  end
@@ -48,7 +48,7 @@ describe DataMapper::ValidationsExt do
48
48
  describe "#errors" do
49
49
  before { @user.save }
50
50
  subject { @user.errors[:group] }
51
- it { should be_blank }
51
+ it { should be_empty }
52
52
  end
53
53
  end
54
54
 
@@ -116,7 +116,7 @@ describe DataMapper::ValidationsExt do
116
116
  describe "#errors" do
117
117
  subject { @user.errors[:roles] }
118
118
 
119
- it { should be_blank }
119
+ it { should be_empty }
120
120
  end
121
121
  end
122
122
  end
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dm-validations-ext
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 1
9
- version: 0.0.1
4
+ prerelease:
5
+ version: 0.0.2
10
6
  platform: ruby
11
7
  authors:
12
8
  - Piotr Solnica
@@ -14,53 +10,86 @@ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2010-10-26 00:00:00 +02:00
13
+ date: 2011-03-19 00:00:00 +01:00
18
14
  default_executable:
19
15
  dependencies:
20
16
  - !ruby/object:Gem::Dependency
21
- name: dm-validations
22
- prerelease: false
17
+ name: dm-core
23
18
  requirement: &id001 !ruby/object:Gem::Requirement
24
19
  none: false
25
20
  requirements:
26
21
  - - ~>
27
22
  - !ruby/object:Gem::Version
28
- segments:
29
- - 1
30
- - 0
31
- - 2
32
- version: 1.0.2
23
+ version: 1.1.0
33
24
  type: :runtime
25
+ prerelease: false
34
26
  version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
28
+ name: jeweler
29
+ requirement: &id002 !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - ~>
33
+ - !ruby/object:Gem::Version
34
+ version: 1.5.2
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: *id002
38
+ - !ruby/object:Gem::Dependency
39
+ name: rake
40
+ requirement: &id003 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 0.8.7
46
+ type: :development
47
+ prerelease: false
48
+ version_requirements: *id003
35
49
  - !ruby/object:Gem::Dependency
36
50
  name: rspec
51
+ requirement: &id004 !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ~>
55
+ - !ruby/object:Gem::Version
56
+ version: "2.4"
57
+ type: :development
37
58
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
59
+ version_requirements: *id004
60
+ - !ruby/object:Gem::Dependency
61
+ name: dm-validations
62
+ requirement: &id005 !ruby/object:Gem::Requirement
63
+ none: false
64
+ requirements:
65
+ - - ~>
66
+ - !ruby/object:Gem::Version
67
+ version: 1.1.0
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: *id005
71
+ - !ruby/object:Gem::Dependency
72
+ name: rspec
73
+ requirement: &id006 !ruby/object:Gem::Requirement
39
74
  none: false
40
75
  requirements:
41
76
  - - ~>
42
77
  - !ruby/object:Gem::Version
43
- segments:
44
- - 2
45
- - 0
46
- - 1
47
78
  version: 2.0.1
48
79
  type: :development
49
- version_requirements: *id002
80
+ prerelease: false
81
+ version_requirements: *id006
50
82
  - !ruby/object:Gem::Dependency
51
83
  name: jeweler
52
- prerelease: false
53
- requirement: &id003 !ruby/object:Gem::Requirement
84
+ requirement: &id007 !ruby/object:Gem::Requirement
54
85
  none: false
55
86
  requirements:
56
87
  - - ~>
57
88
  - !ruby/object:Gem::Version
58
- segments:
59
- - 1
60
- - 4
61
89
  version: "1.4"
62
90
  type: :development
63
- version_requirements: *id003
91
+ prerelease: false
92
+ version_requirements: *id007
64
93
  description: DataMapper plugin providing better error messages handling.
65
94
  email: piotr.solnica [a] gmail [d] com
66
95
  executables: []
@@ -71,7 +100,6 @@ extra_rdoc_files:
71
100
  - LICENSE
72
101
  - README.rdoc
73
102
  files:
74
- - .gitignore
75
103
  - Gemfile
76
104
  - LICENSE
77
105
  - README.rdoc
@@ -88,13 +116,13 @@ files:
88
116
  - tasks/spec.rake
89
117
  - tasks/yard.rake
90
118
  - tasks/yardstick.rake
91
- has_rdoc: yard
119
+ has_rdoc: true
92
120
  homepage: http://github.com/solnic/dm-validations-ext
93
121
  licenses: []
94
122
 
95
123
  post_install_message:
96
- rdoc_options:
97
- - --charset=UTF-8
124
+ rdoc_options: []
125
+
98
126
  require_paths:
99
127
  - lib
100
128
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -102,24 +130,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
130
  requirements:
103
131
  - - ">="
104
132
  - !ruby/object:Gem::Version
105
- segments:
106
- - 0
107
133
  version: "0"
108
134
  required_rubygems_version: !ruby/object:Gem::Requirement
109
135
  none: false
110
136
  requirements:
111
137
  - - ">="
112
138
  - !ruby/object:Gem::Version
113
- segments:
114
- - 0
115
139
  version: "0"
116
140
  requirements: []
117
141
 
118
142
  rubyforge_project:
119
- rubygems_version: 1.3.7
143
+ rubygems_version: 1.6.2
120
144
  signing_key:
121
145
  specification_version: 3
122
146
  summary: DataMapper plugin providing better error messages handling.
123
147
  test_files:
124
- - spec/spec_helper.rb
125
148
  - spec/public/validations_ext_spec.rb
149
+ - spec/spec_helper.rb
data/.gitignore DELETED
@@ -1,37 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## Rubinius
17
- *.rbc
18
-
19
- ## PROJECT::GENERAL
20
- *.gem
21
- coverage
22
- rdoc
23
- pkg
24
- tmp
25
- doc
26
- log
27
- .yardoc
28
- measurements
29
-
30
- ## BUNDLER
31
- .bundle
32
- Gemfile.local
33
- Gemfile.lock
34
- Gemfile.local.lock
35
-
36
- ## PROJECT::SPECIFIC
37
- spec/db/