dorsale 4.0.0 → 4.1.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.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/app/controllers/dorsale/alexandrie/attachments_controller.rb +1 -1
  4. data/app/controllers/dorsale/application_controller.rb +1 -1
  5. data/app/controllers/dorsale/billing_machine/application_controller.rb +1 -1
  6. data/app/controllers/dorsale/billing_machine/invoices_controller.rb +1 -1
  7. data/app/controllers/dorsale/billing_machine/payment_terms_controller.rb +1 -1
  8. data/app/controllers/dorsale/billing_machine/quotations_controller.rb +1 -1
  9. data/app/controllers/dorsale/comments_controller.rb +1 -1
  10. data/app/controllers/dorsale/customer_vault/activity_types_controller.rb +1 -1
  11. data/app/controllers/dorsale/customer_vault/application_controller.rb +1 -1
  12. data/app/controllers/dorsale/customer_vault/events_controller.rb +1 -1
  13. data/app/controllers/dorsale/customer_vault/links_controller.rb +1 -1
  14. data/app/controllers/dorsale/customer_vault/origins_controller.rb +1 -1
  15. data/app/controllers/dorsale/customer_vault/people_controller.rb +1 -1
  16. data/app/controllers/dorsale/expense_gun/application_controller.rb +1 -1
  17. data/app/controllers/dorsale/expense_gun/categories_controller.rb +1 -1
  18. data/app/controllers/dorsale/flyboy/application_controller.rb +1 -1
  19. data/app/controllers/dorsale/flyboy/task_comments_controller.rb +1 -1
  20. data/app/controllers/dorsale/flyboy/tasks_controller.rb +1 -1
  21. data/app/controllers/dorsale/users_controller.rb +1 -1
  22. data/app/filters/dorsale/billing_machine/small_data/filter_for_invoices.rb +1 -1
  23. data/app/filters/dorsale/billing_machine/small_data/filter_for_quotations.rb +1 -1
  24. data/app/filters/dorsale/billing_machine/small_data/filter_strategy_by_customer.rb +1 -1
  25. data/app/filters/dorsale/billing_machine/small_data/filter_strategy_by_payment_status.rb +1 -1
  26. data/app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb +1 -1
  27. data/app/filters/dorsale/customer_vault/small_data/filter_for_events.rb +1 -1
  28. data/app/filters/dorsale/customer_vault/small_data/filter_for_people.rb +1 -1
  29. data/app/filters/dorsale/customer_vault/small_data/filter_strategy_by_activity_type.rb +1 -1
  30. data/app/filters/dorsale/expense_gun/small_data/filter_for_expenses.rb +1 -1
  31. data/app/filters/dorsale/flyboy/small_data/filter_for_tasks.rb +1 -1
  32. data/app/filters/dorsale/flyboy/small_data/filter_strategy_by_task_state.rb +2 -2
  33. data/app/mailers/dorsale/application_mailer.rb +1 -1
  34. data/app/mailers/dorsale/flyboy/task_mailer.rb +1 -1
  35. data/app/mailers/dorsale/user_mailer.rb +1 -1
  36. data/app/models/dorsale/address.rb +3 -3
  37. data/app/models/dorsale/alexandrie/attachment.rb +1 -1
  38. data/app/models/dorsale/alexandrie/attachment_type.rb +1 -1
  39. data/app/models/dorsale/billing_machine/invoice.rb +1 -1
  40. data/app/models/dorsale/billing_machine/invoice_line.rb +1 -1
  41. data/app/models/dorsale/billing_machine/payment_term.rb +1 -1
  42. data/app/models/dorsale/billing_machine/quotation.rb +2 -2
  43. data/app/models/dorsale/billing_machine/quotation_line.rb +1 -1
  44. data/app/models/dorsale/comment.rb +1 -1
  45. data/app/models/dorsale/customer_vault/activity_type.rb +1 -1
  46. data/app/models/dorsale/customer_vault/corporation.rb +2 -2
  47. data/app/models/dorsale/customer_vault/event.rb +3 -3
  48. data/app/models/dorsale/customer_vault/individual.rb +2 -2
  49. data/app/models/dorsale/customer_vault/link.rb +1 -1
  50. data/app/models/dorsale/customer_vault/origin.rb +1 -1
  51. data/app/models/dorsale/customer_vault/person.rb +5 -5
  52. data/app/models/dorsale/expense_gun/category.rb +1 -1
  53. data/app/models/dorsale/expense_gun/expense.rb +2 -2
  54. data/app/models/dorsale/expense_gun/expense_line.rb +1 -1
  55. data/app/models/dorsale/flyboy/task.rb +4 -4
  56. data/app/models/dorsale/flyboy/task_comment.rb +1 -1
  57. data/app/pdfs/dorsale/application_pdf.rb +1 -1
  58. data/app/pdfs/dorsale/billing_machine/invoice_multiple_vat_pdf.rb +13 -13
  59. data/app/pdfs/dorsale/billing_machine/invoice_single_vat_pdf.rb +13 -13
  60. data/app/pdfs/dorsale/billing_machine/quotation_multiple_vat_pdf.rb +1 -1
  61. data/app/pdfs/dorsale/billing_machine/quotation_single_vat_pdf.rb +1 -1
  62. data/app/pdfs/dorsale/expense_gun/expense_pdf.rb +2 -2
  63. data/app/pdfs/dorsale/prawn_helpers.rb +2 -2
  64. data/app/policies/dorsale/application_policy.rb +1 -1
  65. data/app/services/dorsale/billing_machine/invoice/copy.rb +1 -1
  66. data/app/services/dorsale/billing_machine/invoice/statistics.rb +2 -2
  67. data/app/services/dorsale/billing_machine/quotation/copy.rb +1 -1
  68. data/app/services/dorsale/billing_machine/quotation/statistics.rb +2 -2
  69. data/app/services/dorsale/billing_machine/quotation/to_invoice.rb +5 -5
  70. data/app/services/dorsale/expense_gun/expense/copy.rb +1 -1
  71. data/app/services/dorsale/flyboy/task/copy.rb +1 -1
  72. data/app/services/dorsale/flyboy/task/snoozer.rb +1 -1
  73. data/app/services/dorsale/service.rb +2 -2
  74. data/app/services/dorsale/tag_list_for_model.rb +1 -1
  75. data/app/uploaders/dorsale/alexandrie/file_uploader.rb +1 -1
  76. data/app/uploaders/dorsale/application_uploader.rb +1 -1
  77. data/app/uploaders/dorsale/avatar_uploader.rb +1 -1
  78. data/app/uploaders/dorsale/image_uploader.rb +2 -2
  79. data/app/uploaders/dorsale/pdf_uploader.rb +2 -2
  80. data/app/views/dorsale/customer_vault/people/index.xlsx.ruby +3 -3
  81. data/features/step_definitions/billing_machine_invoices_steps.rb +3 -3
  82. data/features/step_definitions/billing_machine_multiple_vat.rb +1 -1
  83. data/features/step_definitions/billing_machine_quotations_steps.rb +2 -2
  84. data/features/step_definitions/customer_vault_corporations_steps.rb +3 -3
  85. data/features/step_definitions/customer_vault_tasks_steps.rb +3 -3
  86. data/lib/dorsale/engine.rb +5 -5
  87. data/lib/dorsale/version.rb +1 -1
  88. data/spec/controllers/dorsale/alexandrie/attachments_controller_spec.rb +1 -1
  89. data/spec/controllers/dorsale/customer_vault/events_controller_spec.rb +1 -1
  90. data/spec/controllers/dorsale/customer_vault/people_controller_spec.rb +1 -1
  91. data/spec/controllers/dorsale/expense_gun/expenses_controller_spec.rb +1 -1
  92. data/spec/factories/alexandrie_attachment_types.rb +1 -1
  93. data/spec/factories/alexandrie_attachments.rb +1 -1
  94. data/spec/factories/billing_machine_invoice_lines.rb +1 -1
  95. data/spec/factories/billing_machine_invoices.rb +1 -1
  96. data/spec/factories/billing_machine_payment_terms.rb +1 -1
  97. data/spec/factories/billing_machine_quotation_lines.rb +1 -1
  98. data/spec/factories/billing_machine_quotations.rb +1 -1
  99. data/spec/factories/customer_vault_activity_types.rb +1 -1
  100. data/spec/factories/customer_vault_corporations.rb +1 -1
  101. data/spec/factories/customer_vault_event.rb +1 -1
  102. data/spec/factories/customer_vault_individuals.rb +1 -1
  103. data/spec/factories/customer_vault_links.rb +1 -1
  104. data/spec/factories/customer_vault_origins.rb +1 -1
  105. data/spec/factories/dorsale_addresses.rb +1 -1
  106. data/spec/factories/dorsale_comments.rb +1 -1
  107. data/spec/factories/expense_gun_categories.rb +1 -1
  108. data/spec/factories/expense_gun_expense_lines.rb +1 -1
  109. data/spec/factories/expense_gun_expenses.rb +1 -1
  110. data/spec/factories/flyboy_task_comments.rb +1 -1
  111. data/spec/factories/flyboy_tasks.rb +1 -1
  112. data/spec/mailers/user_mailer_spec.rb +2 -2
  113. data/spec/models/dorsale/alexandrie/attachment_spec.rb +1 -1
  114. data/spec/models/dorsale/alexandrie/attachment_type_spec.rb +1 -1
  115. data/spec/models/dorsale/billing_machine/invoice_spec.rb +5 -5
  116. data/spec/models/dorsale/billing_machine/quotation_line_spec.rb +1 -1
  117. data/spec/models/dorsale/billing_machine/quotation_spec.rb +4 -4
  118. data/spec/models/dorsale/billing_machine_spec.rb +1 -1
  119. data/spec/models/dorsale/customer_vault/activity_type_spec.rb +1 -1
  120. data/spec/models/dorsale/customer_vault/corporation_spec.rb +1 -1
  121. data/spec/models/dorsale/customer_vault/event_spec.rb +1 -1
  122. data/spec/models/dorsale/customer_vault/individual_spec.rb +1 -1
  123. data/spec/models/dorsale/customer_vault/link_spec.rb +1 -1
  124. data/spec/models/dorsale/customer_vault/origin_spec.rb +1 -1
  125. data/spec/models/dorsale/customer_vault/person_spec.rb +1 -1
  126. data/spec/models/dorsale/expense_gun/category_spec.rb +1 -1
  127. data/spec/models/dorsale/expense_gun/expense_line_spec.rb +1 -1
  128. data/spec/models/dorsale/flyboy/task_spec.rb +5 -5
  129. data/spec/models/dorsale/i18n_spec.rb +1 -1
  130. data/spec/pdfs/dorsale/billing_machine/invoice_multiple_vat_pdf_spec.rb +3 -3
  131. data/spec/pdfs/dorsale/billing_machine/invoice_single_vat_pdf_spec.rb +3 -3
  132. data/spec/pdfs/dorsale/billing_machine/quotation_multiple_vat_pdf_spec.rb +3 -3
  133. data/spec/pdfs/dorsale/billing_machine/quotation_single_vat_pdf_spec.rb +3 -3
  134. data/spec/rails_helper.rb +0 -3
  135. data/spec/routing/dorsale/billing_machine/invoices_routing_spec.rb +2 -2
  136. data/spec/routing/dorsale/billing_machine/quotations_routing_spec.rb +2 -2
  137. data/spec/routing/dorsale/customer_vault/activity_types_routing_spec.rb +2 -2
  138. data/spec/routing/dorsale/customer_vault/events_routing_spec.rb +2 -2
  139. data/spec/routing/dorsale/customer_vault/origins_routing_spec.rb +2 -2
  140. data/spec/routing/dorsale/customer_vault/people_routing_spec.rb +2 -2
  141. data/spec/routing/dorsale/expense_gun/expenses_routing_spec.rb +2 -2
  142. data/spec/routing/dorsale/flyboy/task_comments_routing_spec.rb +2 -2
  143. data/spec/routing/dorsale/flyboy/tasks_routing_spec.rb +2 -2
  144. data/spec/routing/dorsale/users_routing_spec.rb +2 -2
  145. data/spec/services/dorsale/expense_gun/expense/copy_spec.rb +2 -2
  146. metadata +48 -51
@@ -1,9 +1,9 @@
1
1
  require "rails_helper"
2
2
 
3
- describe ::Dorsale::UserMailer do
3
+ describe Dorsale::UserMailer do
4
4
  describe "New Account" do
5
5
  let(:user) { create(:user) }
6
- let(:email) { ::Dorsale::UserMailer.new_account(user, user.password) }
6
+ let(:email) { Dorsale::UserMailer.new_account(user, user.password) }
7
7
 
8
8
  it "should send to the right person" do
9
9
  expect(email.to).to eq([user.email])
@@ -1,6 +1,6 @@
1
1
  require "rails_helper"
2
2
 
3
- describe ::Dorsale::Alexandrie::Attachment, type: :model do
3
+ describe Dorsale::Alexandrie::Attachment, type: :model do
4
4
  it { is_expected.to belong_to :attachable }
5
5
  it { is_expected.to belong_to :sender }
6
6
  it { is_expected.to belong_to :attachment_type }
@@ -1,6 +1,6 @@
1
1
  require "rails_helper"
2
2
 
3
- describe ::Dorsale::Alexandrie::AttachmentType, type: :model do
3
+ describe Dorsale::Alexandrie::AttachmentType, type: :model do
4
4
  it { is_expected.to have_many(:attachments).dependent(:nullify) }
5
5
 
6
6
  it { is_expected.to validate_presence_of :name }
@@ -3,7 +3,7 @@ require "rails_helper"
3
3
  describe Dorsale::BillingMachine::Invoice, type: :model do
4
4
  # Reset to default mode before each test
5
5
  before :each do
6
- ::Dorsale::BillingMachine.vat_mode = :single
6
+ Dorsale::BillingMachine.vat_mode = :single
7
7
  end
8
8
 
9
9
  it { is_expected.to belong_to :customer }
@@ -105,8 +105,8 @@ describe Dorsale::BillingMachine::Invoice, type: :model do
105
105
 
106
106
  it "should work fine upon creation" do
107
107
  invoice = build(:billing_machine_invoice)
108
- invoice.lines << ::Dorsale::BillingMachine::InvoiceLine.new(quantity: 1, unit_price: 10)
109
- invoice.lines << ::Dorsale::BillingMachine::InvoiceLine.new(quantity: 1, unit_price: 10)
108
+ invoice.lines << Dorsale::BillingMachine::InvoiceLine.new(quantity: 1, unit_price: 10)
109
+ invoice.lines << Dorsale::BillingMachine::InvoiceLine.new(quantity: 1, unit_price: 10)
110
110
  invoice.save!
111
111
  end
112
112
  end
@@ -120,7 +120,7 @@ describe Dorsale::BillingMachine::Invoice, type: :model do
120
120
 
121
121
  describe "vat rate" do
122
122
  it "default vat rate should be 20" do
123
- expect(described_class.new.vat_rate).to eq ::Dorsale::BillingMachine.default_vat_rate
123
+ expect(described_class.new.vat_rate).to eq Dorsale::BillingMachine.default_vat_rate
124
124
  end
125
125
 
126
126
  it "it should be specified vat rate" do
@@ -144,7 +144,7 @@ describe Dorsale::BillingMachine::Invoice, type: :model do
144
144
  end
145
145
 
146
146
  it "it should raise when vat mode is multiple" do
147
- ::Dorsale::BillingMachine.vat_mode = :multiple
147
+ Dorsale::BillingMachine.vat_mode = :multiple
148
148
  invoice = build(:billing_machine_invoice)
149
149
  expect { invoice.vat_rate }.to raise_error(RuntimeError)
150
150
  end
@@ -25,7 +25,7 @@ describe Dorsale::BillingMachine::QuotationLine do
25
25
  end
26
26
 
27
27
  it "vat_rate should be 0" do
28
- expect(described_class.new.vat_rate).to eq ::Dorsale::BillingMachine.default_vat_rate
28
+ expect(described_class.new.vat_rate).to eq Dorsale::BillingMachine.default_vat_rate
29
29
  end
30
30
  end
31
31
 
@@ -42,8 +42,8 @@ describe Dorsale::BillingMachine::Quotation do
42
42
 
43
43
  it "should work fine upon creation" do
44
44
  quotation = build(:billing_machine_quotation)
45
- quotation.lines << ::Dorsale::BillingMachine::QuotationLine.new(quantity: 1, unit_price: 10)
46
- quotation.lines << ::Dorsale::BillingMachine::QuotationLine.new(quantity: 1, unit_price: 10)
45
+ quotation.lines << Dorsale::BillingMachine::QuotationLine.new(quantity: 1, unit_price: 10)
46
+ quotation.lines << Dorsale::BillingMachine::QuotationLine.new(quantity: 1, unit_price: 10)
47
47
  quotation.save!
48
48
  end
49
49
 
@@ -74,7 +74,7 @@ describe Dorsale::BillingMachine::Quotation do
74
74
 
75
75
  describe "vat rate" do
76
76
  it "default vat rate should be 20" do
77
- expect(described_class.new.vat_rate).to eq ::Dorsale::BillingMachine.default_vat_rate
77
+ expect(described_class.new.vat_rate).to eq Dorsale::BillingMachine.default_vat_rate
78
78
  end
79
79
 
80
80
  it "it should be specified vat rate" do
@@ -98,7 +98,7 @@ describe Dorsale::BillingMachine::Quotation do
98
98
  end
99
99
 
100
100
  it "it should raise when vat mode is multiple" do
101
- ::Dorsale::BillingMachine.vat_mode = :multiple
101
+ Dorsale::BillingMachine.vat_mode = :multiple
102
102
  quotation = build(:billing_machine_quotation)
103
103
  expect { quotation.vat_rate }.to raise_error(RuntimeError)
104
104
  end
@@ -2,7 +2,7 @@ require "rails_helper"
2
2
 
3
3
  RSpec.describe Dorsale::BillingMachine do
4
4
  let(:bm) {
5
- ::Dorsale::BillingMachine
5
+ Dorsale::BillingMachine
6
6
  }
7
7
 
8
8
  describe "::vat_mode" do
@@ -1,6 +1,6 @@
1
1
  require "rails_helper"
2
2
 
3
- RSpec.describe ::Dorsale::CustomerVault::ActivityType, type: :model do
3
+ RSpec.describe Dorsale::CustomerVault::ActivityType, type: :model do
4
4
  it { is_expected.to validate_presence_of :name }
5
5
 
6
6
  it "should have a valid factory" do
@@ -1,6 +1,6 @@
1
1
  require "rails_helper"
2
2
 
3
- RSpec.describe ::Dorsale::CustomerVault::Corporation, type: :model do
3
+ RSpec.describe Dorsale::CustomerVault::Corporation, type: :model do
4
4
  it { is_expected.to have_one(:address).dependent(:destroy) }
5
5
  it { is_expected.to have_many :comments }
6
6
  it { is_expected.to have_many :taggings }
@@ -1,6 +1,6 @@
1
1
  require "rails_helper"
2
2
 
3
- RSpec.describe ::Dorsale::CustomerVault::Event, type: :model do
3
+ RSpec.describe Dorsale::CustomerVault::Event, type: :model do
4
4
  it { is_expected.to belong_to :author }
5
5
  it { is_expected.to belong_to :person }
6
6
 
@@ -1,6 +1,6 @@
1
1
  require "rails_helper"
2
2
 
3
- RSpec.describe ::Dorsale::CustomerVault::Individual, :type => :model do
3
+ RSpec.describe Dorsale::CustomerVault::Individual, :type => :model do
4
4
  it "should have a valid factory" do
5
5
  individual = create(:customer_vault_individual)
6
6
  expect(individual).to be_valid
@@ -1,6 +1,6 @@
1
1
  require "rails_helper"
2
2
 
3
- RSpec.describe ::Dorsale::CustomerVault::Link, type: :model do
3
+ RSpec.describe Dorsale::CustomerVault::Link, type: :model do
4
4
  it "should have a valid factory" do
5
5
  link = build(:customer_vault_link)
6
6
  expect(link).to be_valid
@@ -1,4 +1,4 @@
1
- RSpec.describe ::Dorsale::CustomerVault::Origin, type: :model do
1
+ RSpec.describe Dorsale::CustomerVault::Origin, type: :model do
2
2
  it { is_expected.to validate_presence_of :name }
3
3
 
4
4
  it "should have a valid factory" do
@@ -1,6 +1,6 @@
1
1
  require "rails_helper"
2
2
 
3
- RSpec.describe ::Dorsale::CustomerVault::Person, type: :model do
3
+ RSpec.describe Dorsale::CustomerVault::Person, type: :model do
4
4
  describe "#links" do
5
5
  let!(:c) { create(:customer_vault_corporation) }
6
6
  let!(:i) { create(:customer_vault_individual) }
@@ -1,6 +1,6 @@
1
1
  require "rails_helper"
2
2
 
3
- RSpec.describe ::Dorsale::ExpenseGun::Category, type: :model do
3
+ RSpec.describe Dorsale::ExpenseGun::Category, type: :model do
4
4
  it { is_expected.to validate_presence_of :name }
5
5
 
6
6
  it "category factory should be valid?" do
@@ -1,6 +1,6 @@
1
1
  require "rails_helper"
2
2
 
3
- RSpec.describe ::Dorsale::ExpenseGun::ExpenseLine, type: :model do
3
+ RSpec.describe Dorsale::ExpenseGun::ExpenseLine, type: :model do
4
4
  it { is_expected.to belong_to :expense }
5
5
  it { is_expected.to validate_presence_of :expense }
6
6
  it { is_expected.to validate_presence_of :category }
@@ -119,7 +119,7 @@ describe Dorsale::Flyboy::Task do
119
119
  task2 = create(:flyboy_task, owner: @user1, term: Date.current-1, done: false)
120
120
  task3 = create(:flyboy_task, owner: @user1, term: Date.current-2, done: true)
121
121
  task4 = create(:flyboy_task, owner: @user1, term: Date.current-2, done: false)
122
- tasks = ::Dorsale::Flyboy::Task.delayed
122
+ tasks = Dorsale::Flyboy::Task.delayed
123
123
  expect(tasks).to contain_exactly(task2, task4)
124
124
  end
125
125
 
@@ -127,7 +127,7 @@ describe Dorsale::Flyboy::Task do
127
127
  task = create(:flyboy_task, owner: @user1, term: Date.current+1)
128
128
  task1 = create(:flyboy_task, owner: @user1, term: Date.current, done: true)
129
129
  task2 = create(:flyboy_task, owner: @user1, term: Date.current, done: false)
130
- tasks = ::Dorsale::Flyboy::Task.today
130
+ tasks = Dorsale::Flyboy::Task.today
131
131
  expect(tasks).to contain_exactly(task2)
132
132
  end
133
133
 
@@ -135,7 +135,7 @@ describe Dorsale::Flyboy::Task do
135
135
  task = create(:flyboy_task, owner: @user1, term: Date.current)
136
136
  task1 = create(:flyboy_task, owner: @user1, term: Date.tomorrow, done: true)
137
137
  task2 = create(:flyboy_task, owner: @user1, term: Date.tomorrow, done: false)
138
- tasks = ::Dorsale::Flyboy::Task.tomorrow
138
+ tasks = Dorsale::Flyboy::Task.tomorrow
139
139
  expect(tasks).to contain_exactly(task2)
140
140
  end
141
141
 
@@ -146,7 +146,7 @@ describe Dorsale::Flyboy::Task do
146
146
  task2 = create(:flyboy_task, owner: @user1, term: Date.current+2, done: false)
147
147
  task3 = create(:flyboy_task, owner: @user1, term: Date.current+3, done: false)
148
148
  task4 = create(:flyboy_task, owner: @user1, term: Date.current+5, done: false)
149
- tasks = ::Dorsale::Flyboy::Task.this_week
149
+ tasks = Dorsale::Flyboy::Task.this_week
150
150
  expect(tasks).to contain_exactly(task2, task3)
151
151
  end
152
152
 
@@ -157,7 +157,7 @@ describe Dorsale::Flyboy::Task do
157
157
  task2 = create(:flyboy_task, owner: @user1, term: Date.current+7, done: false)
158
158
  task3 = create(:flyboy_task, owner: @user1, term: Date.current+9, done: false)
159
159
  task4 = create(:flyboy_task, owner: @user1, term: Date.current+12, done: false)
160
- tasks = ::Dorsale::Flyboy::Task.next_week
160
+ tasks = Dorsale::Flyboy::Task.next_week
161
161
  expect(tasks).to contain_exactly(task2, task3)
162
162
  end
163
163
  end # describe "scopes"
@@ -5,7 +5,7 @@ require "rails_helper"
5
5
  RSpec.describe "i18n" do
6
6
  Rails.application.eager_load!
7
7
 
8
- ::Dorsale::ApplicationRecord.descendants.each do |model|
8
+ Dorsale::ApplicationRecord.descendants.each do |model|
9
9
  next unless model.to_s.start_with?("Dorsale")
10
10
 
11
11
  it "should i18n #{model} model name" do
@@ -1,8 +1,8 @@
1
1
  require "rails_helper"
2
2
 
3
- describe ::Dorsale::BillingMachine::InvoiceMultipleVatPdf, pdfs: true do
3
+ describe Dorsale::BillingMachine::InvoiceMultipleVatPdf, pdfs: true do
4
4
  before :each do
5
- ::Dorsale::BillingMachine.vat_mode = :multiple
5
+ Dorsale::BillingMachine.vat_mode = :multiple
6
6
  end
7
7
 
8
8
  let(:invoice) {
@@ -33,7 +33,7 @@ describe ::Dorsale::BillingMachine::InvoiceMultipleVatPdf, pdfs: true do
33
33
  end
34
34
 
35
35
  it "should work with empty invoice" do
36
- invoice = ::Dorsale::BillingMachine::Invoice.new
36
+ invoice = Dorsale::BillingMachine::Invoice.new
37
37
 
38
38
  expect {
39
39
  described_class.new(invoice).tap(&:build).render_with_attachments
@@ -1,8 +1,8 @@
1
1
  require "rails_helper"
2
2
 
3
- describe ::Dorsale::BillingMachine::InvoiceSingleVatPdf, pdfs: true do
3
+ describe Dorsale::BillingMachine::InvoiceSingleVatPdf, pdfs: true do
4
4
  before :each do
5
- ::Dorsale::BillingMachine.vat_mode = :single
5
+ Dorsale::BillingMachine.vat_mode = :single
6
6
  end
7
7
 
8
8
  let(:invoice) {
@@ -33,7 +33,7 @@ describe ::Dorsale::BillingMachine::InvoiceSingleVatPdf, pdfs: true do
33
33
  end
34
34
 
35
35
  it "should work with empty invoice" do
36
- invoice = ::Dorsale::BillingMachine::Invoice.new
36
+ invoice = Dorsale::BillingMachine::Invoice.new
37
37
 
38
38
  expect {
39
39
  described_class.new(invoice).tap(&:build).render_with_attachments
@@ -1,8 +1,8 @@
1
1
  require "rails_helper"
2
2
 
3
- describe ::Dorsale::BillingMachine::QuotationMultipleVatPdf, pdfs: true do
3
+ describe Dorsale::BillingMachine::QuotationMultipleVatPdf, pdfs: true do
4
4
  before :each do
5
- ::Dorsale::BillingMachine.vat_mode = :multiple
5
+ Dorsale::BillingMachine.vat_mode = :multiple
6
6
  end
7
7
 
8
8
  let(:quotation) {
@@ -33,7 +33,7 @@ describe ::Dorsale::BillingMachine::QuotationMultipleVatPdf, pdfs: true do
33
33
  end
34
34
 
35
35
  it "should work with empty quotation" do
36
- quotation = ::Dorsale::BillingMachine::Quotation.new
36
+ quotation = Dorsale::BillingMachine::Quotation.new
37
37
 
38
38
  expect {
39
39
  described_class.new(quotation).tap(&:build).render_with_attachments
@@ -1,8 +1,8 @@
1
1
  require "rails_helper"
2
2
 
3
- describe ::Dorsale::BillingMachine::QuotationSingleVatPdf, pdfs: true do
3
+ describe Dorsale::BillingMachine::QuotationSingleVatPdf, pdfs: true do
4
4
  before :each do
5
- ::Dorsale::BillingMachine.vat_mode = :single
5
+ Dorsale::BillingMachine.vat_mode = :single
6
6
  end
7
7
 
8
8
  let(:quotation) {
@@ -33,7 +33,7 @@ describe ::Dorsale::BillingMachine::QuotationSingleVatPdf, pdfs: true do
33
33
  end
34
34
 
35
35
  it "should work with empty quotation" do
36
- quotation = ::Dorsale::BillingMachine::Quotation.new
36
+ quotation = Dorsale::BillingMachine::Quotation.new
37
37
 
38
38
  expect {
39
39
  described_class.new(quotation).tap(&:build).render_with_attachments
data/spec/rails_helper.rb CHANGED
@@ -29,9 +29,6 @@ Dir[File.expand_path('../support/**/*.rb', __FILE__)].each { |f| require f }
29
29
  ActiveRecord::Migration.maintain_test_schema!
30
30
 
31
31
  RSpec.configure do |config|
32
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
33
- config.fixture_path = "#{::Rails.root}/spec/fixtures"
34
-
35
32
  # If you're not using ActiveRecord, or you'd prefer not to run each of your
36
33
  # examples within a transaction, remove the following line or assign false
37
34
  # instead of true.
@@ -1,7 +1,7 @@
1
1
  require "rails_helper"
2
2
 
3
- describe ::Dorsale::BillingMachine::InvoicesController, type: :routing do
4
- routes { ::Dorsale::Engine.routes }
3
+ describe Dorsale::BillingMachine::InvoicesController, type: :routing do
4
+ routes { Dorsale::Engine.routes }
5
5
 
6
6
  describe "routing" do
7
7
  it "#index" do
@@ -1,8 +1,8 @@
1
1
  require "rails_helper"
2
2
 
3
- describe ::Dorsale::BillingMachine::QuotationsController do
3
+ describe Dorsale::BillingMachine::QuotationsController do
4
4
  describe "routing" do
5
- routes { ::Dorsale::Engine.routes }
5
+ routes { Dorsale::Engine.routes }
6
6
 
7
7
  it "#index" do
8
8
  expect(get "/billing_machine/quotations").to \
@@ -1,7 +1,7 @@
1
1
  require "rails_helper"
2
2
 
3
- describe ::Dorsale::CustomerVault::ActivityTypesController do
4
- routes { ::Dorsale::Engine.routes }
3
+ describe Dorsale::CustomerVault::ActivityTypesController do
4
+ routes { Dorsale::Engine.routes }
5
5
 
6
6
  describe "routing" do
7
7
  it "#index" do
@@ -1,7 +1,7 @@
1
1
  require "rails_helper"
2
2
 
3
- RSpec.describe ::Dorsale::CustomerVault::EventsController, type: :routing do
4
- routes { ::Dorsale::Engine.routes }
3
+ RSpec.describe Dorsale::CustomerVault::EventsController, type: :routing do
4
+ routes { Dorsale::Engine.routes }
5
5
 
6
6
  describe "routing" do
7
7
  it "#index" do
@@ -1,7 +1,7 @@
1
1
  require "rails_helper"
2
2
 
3
- describe ::Dorsale::CustomerVault::OriginsController do
4
- routes { ::Dorsale::Engine.routes }
3
+ describe Dorsale::CustomerVault::OriginsController do
4
+ routes { Dorsale::Engine.routes }
5
5
 
6
6
  describe "routing" do
7
7
  it "#index" do
@@ -1,7 +1,7 @@
1
1
  require "rails_helper"
2
2
 
3
- RSpec.describe ::Dorsale::CustomerVault::PeopleController, type: :routing do
4
- routes { ::Dorsale::Engine.routes }
3
+ RSpec.describe Dorsale::CustomerVault::PeopleController, type: :routing do
4
+ routes { Dorsale::Engine.routes }
5
5
 
6
6
  describe "routing" do
7
7
  it "#index" do
@@ -1,7 +1,7 @@
1
1
  require "rails_helper"
2
2
 
3
- describe ::Dorsale::ExpenseGun::ExpensesController, type: :routing do
4
- routes { ::Dorsale::Engine.routes }
3
+ describe Dorsale::ExpenseGun::ExpensesController, type: :routing do
4
+ routes { Dorsale::Engine.routes }
5
5
 
6
6
  describe "routing" do
7
7
  it "#index" do
@@ -1,8 +1,8 @@
1
1
  require "rails_helper"
2
2
 
3
- describe ::Dorsale::Flyboy::TaskCommentsController, type: :routing do
3
+ describe Dorsale::Flyboy::TaskCommentsController, type: :routing do
4
4
  describe "routing" do
5
- routes { ::Dorsale::Engine.routes }
5
+ routes { Dorsale::Engine.routes }
6
6
 
7
7
  it "routes to #create" do
8
8
  expect(post("flyboy/task_comments")).to route_to("dorsale/flyboy/task_comments#create")
@@ -1,8 +1,8 @@
1
1
  require "rails_helper"
2
2
 
3
- describe ::Dorsale::Flyboy::TasksController, type: :routing do
3
+ describe Dorsale::Flyboy::TasksController, type: :routing do
4
4
  describe "routing" do
5
- routes { ::Dorsale::Engine.routes }
5
+ routes { Dorsale::Engine.routes }
6
6
 
7
7
  it "routes to #index" do
8
8
  expect(get("flyboy/tasks")).to route_to("dorsale/flyboy/tasks#index")
@@ -1,8 +1,8 @@
1
1
  require "rails_helper"
2
2
 
3
- RSpec.describe ::Dorsale::UsersController, type: :routing do
3
+ RSpec.describe Dorsale::UsersController, type: :routing do
4
4
  describe "routing" do
5
- routes { ::Dorsale::Engine.routes }
5
+ routes { Dorsale::Engine.routes }
6
6
  it "routes to #index" do
7
7
  expect(:get => "users").to route_to("dorsale/users#index")
8
8
  end
@@ -1,6 +1,6 @@
1
1
  require "rails_helper"
2
2
 
3
- RSpec.describe ::Dorsale::ExpenseGun::Expense::Copy do
3
+ RSpec.describe Dorsale::ExpenseGun::Expense::Copy do
4
4
  let(:expense) {
5
5
  expense = Dorsale::ExpenseGun::Expense.create!(
6
6
  :user => create(:user),
@@ -19,7 +19,7 @@ RSpec.describe ::Dorsale::ExpenseGun::Expense::Copy do
19
19
  }
20
20
 
21
21
  let(:copy) {
22
- ::Dorsale::ExpenseGun::Expense::Copy.(expense)
22
+ Dorsale::ExpenseGun::Expense::Copy.(expense)
23
23
  }
24
24
 
25
25
  it "should duplicate expense attributes" do
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dorsale
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - agilidée
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2022-11-18 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rails
@@ -948,7 +947,6 @@ homepage: https://github.com/agilidee/dorsale
948
947
  licenses:
949
948
  - Nonstandard
950
949
  metadata: {}
951
- post_install_message:
952
950
  rdoc_options: []
953
951
  require_paths:
954
952
  - lib
@@ -963,11 +961,55 @@ required_rubygems_version: !ruby/object:Gem::Requirement
963
961
  - !ruby/object:Gem::Version
964
962
  version: '0'
965
963
  requirements: []
966
- rubygems_version: 3.3.7
967
- signing_key:
964
+ rubygems_version: 3.6.9
968
965
  specification_version: 4
969
966
  summary: Modular ERP made with Ruby on Rails
970
967
  test_files:
968
+ - features/access.feature
969
+ - features/billing_machine_invoices.feature
970
+ - features/billing_machine_multiple_vat.feature
971
+ - features/billing_machine_payment_terms.feature
972
+ - features/billing_machine_quotations.feature
973
+ - features/customer_vault_activity_types.feature
974
+ - features/customer_vault_corporations.feature
975
+ - features/customer_vault_filters.feature
976
+ - features/customer_vault_individuals.feature
977
+ - features/customer_vault_invoices.feature
978
+ - features/customer_vault_links.feature
979
+ - features/customer_vault_origins.feature
980
+ - features/customer_vault_people.feature
981
+ - features/customer_vault_search.feature
982
+ - features/customer_vault_tasks.feature
983
+ - features/expense_gun_categories.feature
984
+ - features/expense_gun_expenses.feature
985
+ - features/flyboy_task_comments.feature
986
+ - features/flyboy_tasks.feature
987
+ - features/flyboy_tasks_summary.feature
988
+ - features/step_definitions/access_steps.rb
989
+ - features/step_definitions/alexandrie_steps.rb
990
+ - features/step_definitions/billing_machine_invoices_steps.rb
991
+ - features/step_definitions/billing_machine_multiple_vat.rb
992
+ - features/step_definitions/billing_machine_payment_terms_steps.rb
993
+ - features/step_definitions/billing_machine_quotations_steps.rb
994
+ - features/step_definitions/common_steps.rb
995
+ - features/step_definitions/customer_vault_activity_types_steps.rb
996
+ - features/step_definitions/customer_vault_corporations_steps.rb
997
+ - features/step_definitions/customer_vault_filters_steps.rb
998
+ - features/step_definitions/customer_vault_individuals_steps.rb
999
+ - features/step_definitions/customer_vault_invoices_steps.rb
1000
+ - features/step_definitions/customer_vault_links_steps.rb
1001
+ - features/step_definitions/customer_vault_origins_steps.rb
1002
+ - features/step_definitions/customer_vault_people_steps.rb
1003
+ - features/step_definitions/customer_vault_search_steps.rb
1004
+ - features/step_definitions/customer_vault_tasks_steps.rb
1005
+ - features/step_definitions/expense_gun_categories_steps.rb
1006
+ - features/step_definitions/expense_gun_expenses_steps.rb
1007
+ - features/step_definitions/flyboy_task_comments_steps.rb
1008
+ - features/step_definitions/flyboy_tasks_steps.rb
1009
+ - features/step_definitions/tasks_summary_steps.rb
1010
+ - features/step_definitions/users_management_step.rb
1011
+ - features/support/env.rb
1012
+ - features/users_management.feature
971
1013
  - spec/controllers/dorsale/alexandrie/attachments_controller_spec.rb
972
1014
  - spec/controllers/dorsale/billing_machine/invoices_controller_spec.rb
973
1015
  - spec/controllers/dorsale/billing_machine/quotations_controller_spec.rb
@@ -1052,48 +1094,3 @@ test_files:
1052
1094
  - spec/spec_helper.rb
1053
1095
  - spec/support/devise.rb
1054
1096
  - spec/support/message_delivery.rb
1055
- - features/access.feature
1056
- - features/billing_machine_invoices.feature
1057
- - features/billing_machine_multiple_vat.feature
1058
- - features/billing_machine_payment_terms.feature
1059
- - features/billing_machine_quotations.feature
1060
- - features/customer_vault_activity_types.feature
1061
- - features/customer_vault_corporations.feature
1062
- - features/customer_vault_filters.feature
1063
- - features/customer_vault_individuals.feature
1064
- - features/customer_vault_invoices.feature
1065
- - features/customer_vault_links.feature
1066
- - features/customer_vault_origins.feature
1067
- - features/customer_vault_people.feature
1068
- - features/customer_vault_search.feature
1069
- - features/customer_vault_tasks.feature
1070
- - features/expense_gun_categories.feature
1071
- - features/expense_gun_expenses.feature
1072
- - features/flyboy_task_comments.feature
1073
- - features/flyboy_tasks.feature
1074
- - features/flyboy_tasks_summary.feature
1075
- - features/step_definitions/access_steps.rb
1076
- - features/step_definitions/alexandrie_steps.rb
1077
- - features/step_definitions/billing_machine_invoices_steps.rb
1078
- - features/step_definitions/billing_machine_multiple_vat.rb
1079
- - features/step_definitions/billing_machine_payment_terms_steps.rb
1080
- - features/step_definitions/billing_machine_quotations_steps.rb
1081
- - features/step_definitions/common_steps.rb
1082
- - features/step_definitions/customer_vault_activity_types_steps.rb
1083
- - features/step_definitions/customer_vault_corporations_steps.rb
1084
- - features/step_definitions/customer_vault_filters_steps.rb
1085
- - features/step_definitions/customer_vault_individuals_steps.rb
1086
- - features/step_definitions/customer_vault_invoices_steps.rb
1087
- - features/step_definitions/customer_vault_links_steps.rb
1088
- - features/step_definitions/customer_vault_origins_steps.rb
1089
- - features/step_definitions/customer_vault_people_steps.rb
1090
- - features/step_definitions/customer_vault_search_steps.rb
1091
- - features/step_definitions/customer_vault_tasks_steps.rb
1092
- - features/step_definitions/expense_gun_categories_steps.rb
1093
- - features/step_definitions/expense_gun_expenses_steps.rb
1094
- - features/step_definitions/flyboy_task_comments_steps.rb
1095
- - features/step_definitions/flyboy_tasks_steps.rb
1096
- - features/step_definitions/tasks_summary_steps.rb
1097
- - features/step_definitions/users_management_step.rb
1098
- - features/support/env.rb
1099
- - features/users_management.feature