cashbox 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bbbb49b6fa34d70a5c000aafe27c3771841b03cc
4
- data.tar.gz: bfb53fde2bf3719d69bd29b5098857201ecd2ee1
3
+ metadata.gz: 59a2448650f0f71fb5c40df130c1d0a2b56b42da
4
+ data.tar.gz: b1d47e46020d7e98ae156e1eff9bc553ce8b25a5
5
5
  SHA512:
6
- metadata.gz: 9c5c85bea1794162082b2b53ca0d9f8b1e1c4ab32288404312adb86e09a07198675ff82e8809d4931d02761a4d3a293e405f700e00f7c8aab4d2156e667e4f75
7
- data.tar.gz: 8d638b3c60d4db9536bdaa8a895fc6239fc11166530340dc8bac38fcad540adb85e881afcb1dbee77ee09064cdf54bbb3232d3891c3ff7df80ad0b611d29a8df
6
+ metadata.gz: 9ca7f3b5751c6c26a4f261e0a6b3d2621b7753d8207f352af3fc9647a21116811539c0930d8caa57ae9a31a2c528bec8abcc9a90a98477698c4d5120fa107807
7
+ data.tar.gz: e8f94e7f0ba5774e96ec661cb3f3f7ba3a9356085c6a066dc764a6157e8766bdf2e5ea113bfbf0acb512cc36b9d670680762c32eac8147cc3f98fdffc7ecefd6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cashbox (0.0.14)
4
+ cashbox (0.0.15)
5
5
  activesupport
6
6
  addressable
7
7
  hashie
@@ -15,53 +15,52 @@ GEM
15
15
  i18n (>= 0.7, < 2)
16
16
  minitest (~> 5.1)
17
17
  tzinfo (~> 1.1)
18
- addressable (2.5.0)
19
- public_suffix (~> 2.0, >= 2.0.2)
18
+ addressable (2.5.2)
19
+ public_suffix (>= 2.0.2, < 4.0)
20
20
  byebug (3.5.1)
21
21
  columnize (~> 0.8)
22
22
  debugger-linecache (~> 1.2)
23
23
  slop (~> 3.6)
24
- coderay (1.1.1)
24
+ coderay (1.1.2)
25
25
  columnize (0.9.0)
26
26
  concurrent-ruby (1.0.5)
27
27
  crack (0.4.3)
28
28
  safe_yaml (~> 1.0.0)
29
29
  debugger-linecache (1.2.0)
30
30
  diff-lcs (1.3)
31
- hashdiff (0.3.2)
31
+ hashdiff (0.3.7)
32
32
  hashie (3.5.7)
33
33
  httparty (0.16.2)
34
34
  multi_xml (>= 0.5.2)
35
35
  i18n (1.0.1)
36
36
  concurrent-ruby (~> 1.0)
37
- method_source (0.8.2)
37
+ method_source (0.9.0)
38
38
  minitest (5.11.3)
39
39
  multi_xml (0.6.0)
40
- pry (0.10.4)
40
+ pry (0.11.3)
41
41
  coderay (~> 1.1.0)
42
- method_source (~> 0.8.1)
43
- slop (~> 3.4)
42
+ method_source (~> 0.9.0)
44
43
  pry-byebug (2.0.0)
45
44
  byebug (~> 3.4)
46
45
  pry (~> 0.10)
47
- public_suffix (2.0.5)
46
+ public_suffix (3.0.2)
48
47
  rake (10.5.0)
49
- rspec (3.5.0)
50
- rspec-core (~> 3.5.0)
51
- rspec-expectations (~> 3.5.0)
52
- rspec-mocks (~> 3.5.0)
53
- rspec-core (3.5.4)
54
- rspec-support (~> 3.5.0)
55
- rspec-expectations (3.5.0)
48
+ rspec (3.7.0)
49
+ rspec-core (~> 3.7.0)
50
+ rspec-expectations (~> 3.7.0)
51
+ rspec-mocks (~> 3.7.0)
52
+ rspec-core (3.7.1)
53
+ rspec-support (~> 3.7.0)
54
+ rspec-expectations (3.7.0)
56
55
  diff-lcs (>= 1.2.0, < 2.0)
57
- rspec-support (~> 3.5.0)
56
+ rspec-support (~> 3.7.0)
58
57
  rspec-its (1.2.0)
59
58
  rspec-core (>= 3.0.0)
60
59
  rspec-expectations (>= 3.0.0)
61
- rspec-mocks (3.5.0)
60
+ rspec-mocks (3.7.0)
62
61
  diff-lcs (>= 1.2.0, < 2.0)
63
- rspec-support (~> 3.5.0)
64
- rspec-support (3.5.0)
62
+ rspec-support (~> 3.7.0)
63
+ rspec-support (3.7.1)
65
64
  safe_yaml (1.0.4)
66
65
  slop (3.6.0)
67
66
  thread_safe (0.3.6)
@@ -9,7 +9,7 @@ module Cashbox::Concern
9
9
  extend SingleForwardable
10
10
 
11
11
  def_single_delegators :repository, :where, :all, :first, :find
12
- def_instance_delegators :repository, :save, :destroy
12
+ def_instance_delegators :repository, :save, :save!, :destroy
13
13
 
14
14
  def repository
15
15
  @repository ||= Cashbox::Repository.new(self)
@@ -30,8 +30,15 @@ module Cashbox
30
30
  end
31
31
 
32
32
  def save
33
+ save!
34
+ rescue Exception
35
+ false
36
+ end
37
+
38
+ def save!
33
39
  request = Cashbox::Request.new(:post, route(@instance.vid), { body: @instance.to_json })
34
40
  cast(request.response)
41
+ true
35
42
  end
36
43
 
37
44
  def destroy
@@ -1,3 +1,3 @@
1
1
  module Cashbox
2
- VERSION = "0.0.14"
2
+ VERSION = "0.0.15"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cashbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathon Storer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-16 00:00:00.000000000 Z
11
+ date: 2018-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler