dm-parse 0.3.11 → 0.3.12

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.11
1
+ 0.3.12
data/dm-parse.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "dm-parse"
8
- s.version = "0.3.11"
8
+ s.version = "0.3.12"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Zhi-Qiang Lei"]
12
- s.date = "2012-07-07"
12
+ s.date = "2012-07-10"
13
13
  s.description = "An extension to make DataMapper working on Parse.com"
14
14
  s.email = "zhiqiang.lei@gmail.com"
15
15
  s.extra_rdoc_files = [
data/lib/is/parse.rb CHANGED
@@ -13,7 +13,7 @@ module DataMapper
13
13
 
14
14
  storage_names[:default] = "_User"
15
15
 
16
- property :username, Property::String
16
+ property :username, Property::String, unique: true
17
17
  property :password, Property::String
18
18
  property :email, Property::String, format: :email_address
19
19
 
@@ -124,6 +124,12 @@ describe User do
124
124
  it { should_not be_valid }
125
125
  end
126
126
 
127
+ context "when an username is taken" do
128
+ before { model.create username: username, password: password, email: "#{username}@abc.com" }
129
+
130
+ it { should_not be_valid }
131
+ end
132
+
127
133
  describe "class" do
128
134
  subject { model }
129
135
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dm-parse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.11
4
+ version: 0.3.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-07 00:00:00.000000000 Z
12
+ date: 2012-07-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dm-core
@@ -258,7 +258,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
258
258
  version: '0'
259
259
  segments:
260
260
  - 0
261
- hash: -1903385392634618347
261
+ hash: -3688795961939783232
262
262
  required_rubygems_version: !ruby/object:Gem::Requirement
263
263
  none: false
264
264
  requirements: