eitil 1.1.1 → 1.1.2

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
  SHA256:
3
- metadata.gz: 2b08b15e6b8d62cb06ba02b964c2996d06a2ab6a0384a3a6767d11aab994284b
4
- data.tar.gz: e8bc13ea50e38201fae4272419b04f82c79ad6f2a4e7179055cc88bfcdff006a
3
+ metadata.gz: 1e3982f2e32bcdb5ed52c9e58a0a811278229b59fd6e2f33aed590f0b7489ca5
4
+ data.tar.gz: 2046136ba0059bc70a850744685406629e00571d793668303935451892b03740
5
5
  SHA512:
6
- metadata.gz: ff6a6f68bb479e8aa3c0e3ef71aedb34261da883913ca822d199527a605bd5bf0b94d62dff061ac5cfeea62e8e7f5cb9f39244813cdc9ba4af0bdf7b804ee1b4
7
- data.tar.gz: 11763dbe1d14866880c06827601a0f4bf0c7bcc7fa460e0d76a7ee40b9819ad04afe7bf0a7c0cce1cbd7fc90a638ec3b4c1d46e301c8a75eb847b0e5157beddb
6
+ metadata.gz: 938b21d23f8e02911df52706504d1448df1cb9ec4dadbc44ae73075a45d7555b98c8c6b8ff2ac44647fdefe76f70cf7068be3f8ed2a4a73ab1430830460a2334
7
+ data.tar.gz: cd61ca8e8d1a2fbc06a40c2af036be4fdd11b4785b34384344c442f454e40f441ee6550e557c1716c1f9671ecfeefb1ad816ba98ee62c34260f2e9e1d08b4980
@@ -17,6 +17,7 @@ require_relative "application_exporter/setters"
17
17
  require_relative "application_exporter/selectors"
18
18
  require_relative "application_exporter/lookups"
19
19
  require_relative "application_exporter/infos"
20
+ require_relative "application_exporter/log_state"
20
21
 
21
22
  # the AutoSum module, which is a seperately functioning module (service)
22
23
  require_relative "application_exporter/auto_sum"
@@ -34,6 +34,7 @@ module EitilIntegrate::RubyXL
34
34
 
35
35
  def process_export
36
36
  style_file
37
+ log_state
37
38
  save_file
38
39
  end
39
40
 
@@ -4,15 +4,13 @@
4
4
  require "eitil_core/setters/set_ivars"
5
5
  require "eitil_core/argument_helpers/all_kwargs_to_ivars"
6
6
 
7
- # EitilIntegrate::RubyXL::ApplicationExporter
8
-
9
7
  module EitilIntegrate
10
8
  module RubyXL
11
9
  class ApplicationExporter
12
10
 
13
11
  include ActionView::Helpers::NumberHelper
14
12
 
15
- attr_accessor :book, :sheet, :x, :y, :start_date, :end_date, :date_range
13
+ attr_accessor :book, :sheet, :x, :y, :start_date, :end_date, :date_range, :write_log
16
14
 
17
15
  def initialize(attributes={})
18
16
  all_kwargs_to_ivars binding, :attributes
@@ -0,0 +1,45 @@
1
+
2
+ # require "eitil_integrate/application_exporter/log_state"
3
+
4
+ module EitilIntegrate::RubyXL
5
+ class ApplicationExporter
6
+
7
+ private
8
+
9
+ def log_state
10
+
11
+ return unless write_log == true
12
+
13
+ # create_log_sheet
14
+ book.add_worksheet('log')
15
+
16
+ # manage sheets
17
+ previous_sheet = @sheet.sheet_name
18
+ @sheet = @book["log"]
19
+
20
+ # manage coordinates
21
+ previous_x = @x
22
+ @x = 0
23
+
24
+ # log everything we want to log
25
+ report_state
26
+
27
+ # restore what was previously active
28
+ @sheet = @book[previous_sheet]
29
+ @x = previous_x
30
+
31
+ end
32
+
33
+ def report_state
34
+ instance_variables.each do |ivar|
35
+
36
+ variable_name = ivar.to_s
37
+ variable_value = instance_variable_get(ivar).to_s
38
+
39
+ array_to_row [variable_name, variable_value]
40
+
41
+ end
42
+ end
43
+
44
+ end
45
+ end
data/lib/eitil/railtie.rb CHANGED
@@ -1,6 +1,4 @@
1
1
 
2
- require 'eitil/railtie'
3
-
4
2
  # Constants
5
3
 
6
4
  module Eitil
@@ -10,16 +8,20 @@ module Eitil
10
8
 
11
9
  end
12
10
 
13
-
14
11
  # Configuration
15
12
 
16
13
  module Eitil
17
14
 
18
15
  class Railtie < ::Rails::Railtie
19
16
 
20
- # Add lib dirs to $LOAD_PATH, making them available in your main app.
21
17
  Eitil::Layers.each do |layer|
18
+
19
+ # Add lib dirs to $LOAD_PATH, making them available in your main app.
22
20
  $LOAD_PATH << "#{Eitil::Root}/#{layer}/lib"
21
+
22
+ # Load railtie into main app, enabling on the fly inclusion of dispatches.
23
+ require "#{layer}/railtie"
24
+
23
25
  end
24
26
 
25
27
  end
data/lib/eitil/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Eitil
2
2
 
3
- VERSION = '1.1.1'
3
+ VERSION = '1.1.2'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eitil
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jurriaan Schrofer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-22 00:00:00.000000000 Z
11
+ date: 2021-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -138,6 +138,7 @@ files:
138
138
  - eitil_integrate/lib/eitil_integrate/application_exporter/helpers.rb
139
139
  - eitil_integrate/lib/eitil_integrate/application_exporter/infos.rb
140
140
  - eitil_integrate/lib/eitil_integrate/application_exporter/initialize.rb
141
+ - eitil_integrate/lib/eitil_integrate/application_exporter/log_state.rb
141
142
  - eitil_integrate/lib/eitil_integrate/application_exporter/lookups.rb
142
143
  - eitil_integrate/lib/eitil_integrate/application_exporter/selectors.rb
143
144
  - eitil_integrate/lib/eitil_integrate/application_exporter/setters.rb