effective_qb_sync 1.0.4 → 1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5a113b291316d9de42ed93d109383c450f78350c
4
- data.tar.gz: a2abcdb6693ba01eca2bcdca3be61ee425a27cd4
3
+ metadata.gz: 097beccac064a814cbb2ce8e32c563b2d0fc25a1
4
+ data.tar.gz: 4149c1643c8ff8ec1e683aa1b4a0d9c75cd6e7fb
5
5
  SHA512:
6
- metadata.gz: ba160b6f7a40947fb73c7e4f65b214403c39ca3b744a6dcdc36a844f16cdbd36b65e9a247c49c873cd6688bd50c4e0869f6debdd1e80d12ad573659e5869aa8c
7
- data.tar.gz: 369745e8a4689be8f02714552583c9c7d9c0dbff590f25904481ca2382f4c3461f646d0da91d501b320600ce459e55383d9d40e2ac6eede5661f0d1d3236e4ad
6
+ metadata.gz: a6b8bc2c86d80c2db2dd09a296d527aae4af98e0fe72d1e39c5d79c760a6b89c02445f75f295204f67ad5acb338ded91776997bbd89e0b604679ae27b37247ee
7
+ data.tar.gz: 1dd57a222f8af77c56fd5bbd5a47dbcc2127e0f79209cab032b04cb53589dab2b013934ebed93d80fa2af13770f7178705f77df2732d179afc0c51dba8116335
@@ -6,7 +6,7 @@ module Admin
6
6
  layout (EffectiveQbSync.layout.kind_of?(Hash) ? EffectiveQbSync.layout[:admin_qb_tickets] : EffectiveQbSync.layout)
7
7
 
8
8
  def index
9
- @datatable = Effective::Datatables::QbSyncs.new() if defined?(EffectiveDatatables)
9
+ @datatable = Effective::Datatables::QbSyncs.new()
10
10
  @page_title = 'Quickbooks Synchronizations'
11
11
  end
12
12
 
@@ -1,6 +1,6 @@
1
- %h2.effective-qb-sync-page-title= (@page_title || 'Quickbooks Synchronizations')
1
+ %h1.effective-admin-heading= @page_title
2
2
 
3
- %p.text-right.effective-qb-sync-page-action
3
+ %p.text-right.effective-admin-actions
4
4
  = link_to 'Quickbooks Setup Instructions', effective_qb_sync.instructions_admin_qb_syncs_path, class: 'btn btn-primary'
5
5
 
6
6
  %hr
@@ -15,10 +15,8 @@
15
15
 
16
16
  %hr
17
17
 
18
- - if @datatable.nil?
19
- %p Please install #{link_to 'effective_datatables', 'https://github.com/code-and-effect/effective_datatables'} to see this page.
20
- - elsif @datatable.present?
21
- = render_datatable @datatable
18
+ - if @datatable.present?
19
+ = render_datatable(@datatable)
22
20
  - else
23
21
  %p There are no Quickbook Syncs present
24
22
 
@@ -45,7 +45,7 @@
45
45
  %li Re-run the QuickBooks Sync
46
46
 
47
47
  - else
48
- %li This is an error without a predefined resolution. Please wait for AgileStyle to follow up with you.
48
+ %li This is an error without a predefined resolution.
49
49
 
50
50
  -# Common error messages for reference:
51
51
 
@@ -1,5 +1,3 @@
1
- # EffectiveQbSync Rails Engine
2
-
3
1
  EffectiveQbSync.setup do |config|
4
2
  # Configure Database Tables
5
3
  config.qb_requests_table_name = :qb_requests
@@ -26,7 +24,7 @@ EffectiveQbSync.setup do |config|
26
24
  #
27
25
  # Or disable the check completely:
28
26
  # config.authorization_method = false
29
- config.authorization_method = Proc.new { |controller, action, resource| true }
27
+ config.authorization_method = Proc.new { |controller, action, resource| authorize!(action, resource) } # CanCanCan
30
28
 
31
29
  # All EffectiveQbSync controllers will use this layout
32
30
  config.layout = 'application'
@@ -34,9 +34,7 @@ module EffectiveQbSync
34
34
  end
35
35
 
36
36
  def self.permitted_params
37
- [
38
- :note
39
- ]
37
+ [:note]
40
38
  end
41
39
 
42
40
  end
@@ -14,7 +14,7 @@ module EffectiveQbSync
14
14
  if Rails.env.development?
15
15
  Rails.application.eager_load!
16
16
 
17
- invalids = ActsAsPurchasable.descendants.reject { |klass| (klass.new().try(:qb_item_name).present? rescue false) }
17
+ invalids = (ActsAsPurchasable.descendants || []).reject { |klass| (klass.new().try(:qb_item_name).present? rescue false) }
18
18
 
19
19
  if invalids.present?
20
20
  puts "WARNING: (effective_qb_sync) expected acts_as_purchasable objects #{invalids.map(&:to_s).to_sentence} .qb_item_name() to be present."
@@ -1,3 +1,3 @@
1
1
  module EffectiveQbSync
2
- VERSION = '1.0.4'.freeze
2
+ VERSION = '1.1.0'.freeze
3
3
  end
@@ -35,8 +35,9 @@ module EffectiveQbSync
35
35
  @qb_logs_table_name = ':' + EffectiveQbSync.qb_logs_table_name.to_s
36
36
  @qb_order_items_table_name = ':' + EffectiveQbSync.qb_order_items_table_name.to_s
37
37
 
38
- migration_template '../../../db/migrate/01_create_effective_qb_sync.rb.erb', 'db/migrate/create_effective_qb_sync.rb'
38
+ migration_template ('../' * 3) + 'db/migrate/01_create_effective_qb_sync.rb.erb', 'db/migrate/create_effective_qb_sync.rb'
39
39
  end
40
+
40
41
  end
41
42
  end
42
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_qb_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-08 00:00:00.000000000 Z
11
+ date: 2016-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -136,6 +136,20 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: 2.0.0
139
+ - !ruby/object:Gem::Dependency
140
+ name: effective_datatables
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: 2.0.0
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: 2.0.0
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: factory_girl_rails
141
155
  requirement: !ruby/object:Gem::Requirement