uuids 4.1.1 → 4.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f93eea7930c7e35cc6b0542f0e08b8d53f42b4fa
4
- data.tar.gz: f3366beb9a693ed185e09e4e31f0986cf4d184b0
3
+ metadata.gz: c19cc8038584b292cd59a02adcb4a05cbac196df
4
+ data.tar.gz: 4b275fb3e28a46259b9ab5e66f628370b9003013
5
5
  SHA512:
6
- metadata.gz: 763717aec060066d166e17f6124d7f8403441cef7bb671fd6f223ba81941aa005e3fb93d7b5436d8ab24a93b74b08b4a7ee9ba6a0d29d206f044011f776b6cb3
7
- data.tar.gz: 8ef018081ba71c6f2e1744583b0004763796e76a3ccb354a6bd0811229574ed1bc12c19bf97a19da445244d0ea923990d6122b460e866419b1bd182cc87444bf
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
- escape do
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
@@ -1,5 +1,5 @@
1
1
  module Uuids
2
2
 
3
3
  # Current release.
4
- VERSION = "4.1.1"
4
+ VERSION = "4.1.2"
5
5
  end
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.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-16 00:00:00.000000000 Z
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: '1.3'
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: '1.3'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: coveralls
29
29
  requirement: !ruby/object:Gem::Requirement