dorsale 3.11.0 → 3.12.0

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
  SHA256:
3
- metadata.gz: 3c5b7404b272ca5ba112982222ab479da275f739afb4b81857ddad3ec5dcf132
4
- data.tar.gz: d8f4cb12f3b9f02813c2b112d98479d86c1e9a6de21547a60c0237acd58f3f6f
3
+ metadata.gz: 2929616b8560e74343ed527fd6ede62bc2ee0bfa66e7629390ef8c0963bfd27f
4
+ data.tar.gz: b3d12ad8b3c19316706583baebe2790b8f26e94e263806781fe6622beb1947fc
5
5
  SHA512:
6
- metadata.gz: cd150b1f65bec68063d60e6b792d46bf009083c7b5b03b7d269468c9c439dae7532da9fe6289a7e8a3c769fa64996bf02ba7cdb951483a2f97edf75eee91923a
7
- data.tar.gz: 1666b09c7a94602c592cabe30bb22385cbb776762bec90952501e9233d71a4a48cb3363e30c9cd7a57e282e65dcafd5fcd529e60f7f2049986257ced1b9e8361
6
+ metadata.gz: 3817c01b04ff4a47bb5a87f0a9073314a4a1ceae7c55018ddddeb1ed1c692e8d4ab647f1931876bf657d20355557174a2cec19aaa9d99f6a1fd0c6ee2990a888
7
+ data.tar.gz: 8621383721811a53a903e7c214163ef12ae2919fbec6c05304b1e0af5a1d0a7ddd4d32f9b0c36b5fe922f66ef3c48ed83e500e8e5db76c351ca4fcf6b6bfd9f0
data/CHANGELOG.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ## Next version
4
4
 
5
+ ## 3.12.0
6
+ - Change attachment observers
7
+
5
8
  ## 3.11.0
6
9
  - Various updates
7
10
  - Remove bh gem dependency
@@ -23,7 +23,7 @@ class Dorsale::Alexandrie::AttachmentsController < ::Dorsale::ApplicationControl
23
23
  authorize @attachment, :create?
24
24
 
25
25
  if @attachment.save
26
- notify_attachable
26
+ notify_attachable(:create)
27
27
  else
28
28
  flash.now[:alert] = t("messages.attachments.create_error")
29
29
  end
@@ -41,7 +41,7 @@ class Dorsale::Alexandrie::AttachmentsController < ::Dorsale::ApplicationControl
41
41
  authorize @attachment, :update?
42
42
 
43
43
  if @attachment.update(attachment_params_for_update)
44
- notify_attachable
44
+ notify_attachable(:update)
45
45
  else
46
46
  flash.now[:alert] = t("messages.attachments.update_error")
47
47
  end
@@ -53,7 +53,7 @@ class Dorsale::Alexandrie::AttachmentsController < ::Dorsale::ApplicationControl
53
53
  authorize @attachment, :delete?
54
54
 
55
55
  if @attachment.destroy
56
- notify_attachable
56
+ notify_attachable(:delete)
57
57
  else
58
58
  flash.now[:alert] = t("messages.attachments.delete_error")
59
59
  end
@@ -117,7 +117,7 @@ class Dorsale::Alexandrie::AttachmentsController < ::Dorsale::ApplicationControl
117
117
  render :index
118
118
  end
119
119
 
120
- def notify_attachable
121
- @attachment.attachable.send(:try, :after_attachments_changes)
120
+ def notify_attachable(action)
121
+ @attachment.attachable.send(:try, :on_attachment_action, @attachment, action)
122
122
  end
123
123
  end
@@ -118,7 +118,7 @@ class Dorsale::BillingMachine::Quotation < ::Dorsale::ApplicationRecord
118
118
  end
119
119
  end
120
120
 
121
- def after_attachments_changes
121
+ def on_attachment_action(_attachment, _action)
122
122
  Dorsale::BillingMachine::PdfFileGenerator.(self)
123
123
  end
124
124
  end
@@ -15,7 +15,7 @@ When(/^I create a new expense$/) do
15
15
 
16
16
  within all(".nested-fields").first do
17
17
  find("input[id$='_name']").set "ExpenseLine1Name"
18
- find("input[id$='_date']").set "21/06/2015"
18
+ find("input[id$='_date']").set "2015-06-21"
19
19
  select @category.name
20
20
  find("input[id$='_total_all_taxes']").set "100"
21
21
  find("input[id$='_vat']").set "20"
@@ -26,7 +26,7 @@ When(/^I create a new expense$/) do
26
26
 
27
27
  within all(".nested-fields").last do
28
28
  find("input[id$='_name']").set "ExpenseLine2Name"
29
- find("input[id$='_date']").set "12/06/2015"
29
+ find("input[id$='_date']").set "2015-06-12"
30
30
  select @category.name
31
31
  find("input[id$='_total_all_taxes']").set "200"
32
32
  find("input[id$='_vat']").set "40"
@@ -5,4 +5,4 @@ def Zonebie.set_random_timezone
5
5
  # https://github.com/agilidee/dorsale/issues/273
6
6
  end
7
7
  Agilibox::CucumberConfig.require_all_helpers!
8
- Agilibox::CucumberConfig.require_poltergeist!
8
+ Agilibox::CucumberConfig.require_cuprite!
@@ -1,3 +1,3 @@
1
1
  module Dorsale
2
- VERSION = "3.11.0"
2
+ VERSION = "3.12.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dorsale
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.11.0
4
+ version: 3.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - agilidée
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-03 00:00:00.000000000 Z
11
+ date: 2019-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails