uuids 4.1.1 → 4.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +5 -2
- data/app/services/add.rb +6 -5
- data/lib/uuids/version.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c19cc8038584b292cd59a02adcb4a05cbac196df
|
4
|
+
data.tar.gz: 4b275fb3e28a46259b9ab5e66f628370b9003013
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c859f191c64ac2308aa82943553232c89300f784d932009e4dad6d135a4d76e361c58651243307b1e72adda2786a9a40266e41d5f5b1afc989c3b2bc5113f27
|
7
|
+
data.tar.gz: ba8b045684148f125afb35ef4ea9ceb0fe0ef2d20af67063089f3385cd7e7031835fd3c3cdd299569d65a9ed0f83e52542f1fc698731f338bcb37b80a034a3b1
|
data/README.rdoc
CHANGED
@@ -62,16 +62,19 @@ Or install it yourself as:
|
|
62
62
|
|
63
63
|
Then run the command in the root of a <b>end-up application</b>:
|
64
64
|
|
65
|
-
$ uuids install
|
65
|
+
$ uuids install -g
|
66
66
|
|
67
67
|
Use the <tt>-d</tt> key when installing the gem into a <b>module</b> that is not
|
68
68
|
an end-up application (Rails engine etc.):
|
69
69
|
|
70
|
-
$ uuids install -d
|
70
|
+
$ uuids install -d -g
|
71
71
|
|
72
72
|
(this will copy the gem's migrations to the host's dummy folder:
|
73
73
|
+spec/dummy/db/migrate+).
|
74
74
|
|
75
|
+
The -g key allows copying gem's factory girl factories to the host application.
|
76
|
+
Review them and remove unused.
|
77
|
+
|
75
78
|
== Usage
|
76
79
|
|
77
80
|
=== Adding UUIDs to models
|
data/app/services/add.rb
CHANGED
@@ -48,7 +48,11 @@ module Uuids
|
|
48
48
|
# @publish created(uuid,messages) when the uuid has been created.
|
49
49
|
# @publish error(messages) when the uuid cannot be created.
|
50
50
|
def run
|
51
|
-
create_uuid
|
51
|
+
escape { create_uuid }
|
52
|
+
rescue => err
|
53
|
+
publish :error, err.messages
|
54
|
+
else
|
55
|
+
on_uuid_created
|
52
56
|
end
|
53
57
|
|
54
58
|
private
|
@@ -56,10 +60,7 @@ module Uuids
|
|
56
60
|
attr_reader :uuid
|
57
61
|
|
58
62
|
def create_uuid
|
59
|
-
|
60
|
-
@uuid = Models::Uuid.create! record: record, value: value
|
61
|
-
on_uuid_created
|
62
|
-
end
|
63
|
+
@uuid = Models::Uuid.create! record: record, value: value
|
63
64
|
end
|
64
65
|
|
65
66
|
def on_uuid_created
|
data/lib/uuids/version.rb
CHANGED
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uuids
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kozin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hexx-active_record
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: coveralls
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|