uniquify-uuid 0.0.3 → 0.0.4
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.
- checksums.yaml +7 -0
- data/lib/uniquify-uuid.rb +8 -10
- data/lib/uniquify-uuid/version.rb +2 -2
- data/uniquify-uuid.gemspec +9 -11
- metadata +23 -21
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 891d7ad59ddf0b4f0fa77dde3d7f19b3921ca3e2
|
4
|
+
data.tar.gz: a96ba9756464d8291be08acadea32570170177f5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 91229fb9ada81ca2ba66185e7b2ca1bdd6e85395ab93b061438c6c6a4470a7dea8270b8e3d4d22a5eddeddff0349f41fe4e3f1b278bdd501fd12d84f8b09ad75
|
7
|
+
data.tar.gz: 0dbb51efeb2ecc953c2ffa79402e3ec697d7bcf88c158c66f55b103f570820910e4026ca768ea4ce5df1d4315c966b1d1725a522ad34aa7f0653d9e0141812ff
|
data/lib/uniquify-uuid.rb
CHANGED
@@ -1,16 +1,14 @@
|
|
1
|
-
require
|
1
|
+
require "uniquify-uuid/uuid"
|
2
2
|
|
3
3
|
module Uniquify
|
4
4
|
extend ActiveSupport::Concern
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
end while self.class.exists?(name => self[name])
|
11
|
-
end
|
5
|
+
|
6
|
+
def ensure_unique(name)
|
7
|
+
begin
|
8
|
+
self[name] = yield(self)
|
9
|
+
end while self.class.exists?(name => self[name])
|
12
10
|
end
|
13
|
-
|
11
|
+
|
14
12
|
module ClassMethods
|
15
13
|
def uniquify *args, &block
|
16
14
|
args.each do |name|
|
@@ -23,4 +21,4 @@ end
|
|
23
21
|
|
24
22
|
class ActiveRecord::Base
|
25
23
|
include Uniquify
|
26
|
-
end
|
24
|
+
end
|
@@ -1,3 +1,3 @@
|
|
1
1
|
module Uniquify
|
2
|
-
VERSION = '0.0.
|
3
|
-
end
|
2
|
+
VERSION = '0.0.4'
|
3
|
+
end
|
data/uniquify-uuid.gemspec
CHANGED
@@ -6,18 +6,16 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.name = 'uniquify-uuid'
|
7
7
|
s.version = Uniquify::VERSION
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
|
-
s.authors = ['
|
10
|
-
s.email = ['
|
9
|
+
s.authors = ['Pavel Pravosud']
|
10
|
+
s.email = ['pavel@pravosud.com']
|
11
11
|
s.homepage = 'http://github.com/rwz/uniquify-uuid'
|
12
|
-
s.
|
13
|
-
s.
|
14
|
-
|
15
|
-
s.rubyforge_project = "uniquify-uuid"
|
12
|
+
s.license = 'MIT'
|
13
|
+
s.summary = 'Generate a unique UUID token with Active Record'
|
14
|
+
s.description = 'The same as Ryan Bates uniquify gem, but uses UUID as default to generate tokens'
|
16
15
|
|
17
16
|
s.files = `git ls-files`.split("\n")
|
18
17
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
-
s.
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
end
|
18
|
+
s.require_path = 'lib'
|
19
|
+
|
20
|
+
s.add_dependency 'simple_uuid', '~> 0.4.0'
|
21
|
+
end
|
metadata
CHANGED
@@ -1,36 +1,38 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uniquify-uuid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.4
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
|
-
-
|
7
|
+
- Pavel Pravosud
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-07-07 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: simple_uuid
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - "~>"
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
19
|
+
version: 0.4.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.4.0
|
25
27
|
description: The same as Ryan Bates uniquify gem, but uses UUID as default to generate
|
26
|
-
tokens
|
28
|
+
tokens
|
27
29
|
email:
|
28
|
-
-
|
30
|
+
- pavel@pravosud.com
|
29
31
|
executables: []
|
30
32
|
extensions: []
|
31
33
|
extra_rdoc_files: []
|
32
34
|
files:
|
33
|
-
- .gitignore
|
35
|
+
- ".gitignore"
|
34
36
|
- Gemfile
|
35
37
|
- README.md
|
36
38
|
- Rakefile
|
@@ -39,27 +41,27 @@ files:
|
|
39
41
|
- lib/uniquify-uuid/version.rb
|
40
42
|
- uniquify-uuid.gemspec
|
41
43
|
homepage: http://github.com/rwz/uniquify-uuid
|
42
|
-
licenses:
|
44
|
+
licenses:
|
45
|
+
- MIT
|
46
|
+
metadata: {}
|
43
47
|
post_install_message:
|
44
48
|
rdoc_options: []
|
45
49
|
require_paths:
|
46
50
|
- lib
|
47
51
|
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
-
none: false
|
49
52
|
requirements:
|
50
|
-
- -
|
53
|
+
- - ">="
|
51
54
|
- !ruby/object:Gem::Version
|
52
55
|
version: '0'
|
53
56
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
|
-
none: false
|
55
57
|
requirements:
|
56
|
-
- -
|
58
|
+
- - ">="
|
57
59
|
- !ruby/object:Gem::Version
|
58
60
|
version: '0'
|
59
61
|
requirements: []
|
60
|
-
rubyforge_project:
|
61
|
-
rubygems_version:
|
62
|
+
rubyforge_project:
|
63
|
+
rubygems_version: 2.2.2
|
62
64
|
signing_key:
|
63
|
-
specification_version:
|
64
|
-
summary: Generate a unique UUID token with Active Record
|
65
|
+
specification_version: 4
|
66
|
+
summary: Generate a unique UUID token with Active Record
|
65
67
|
test_files: []
|