eitil 1.1.1 → 1.1.2
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 +4 -4
- data/eitil_integrate/lib/eitil_integrate/application_exporter.rb +1 -0
- data/eitil_integrate/lib/eitil_integrate/application_exporter/default_export.rb +1 -0
- data/eitil_integrate/lib/eitil_integrate/application_exporter/initialize.rb +1 -3
- data/eitil_integrate/lib/eitil_integrate/application_exporter/log_state.rb +45 -0
- data/lib/eitil/railtie.rb +6 -4
- data/lib/eitil/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e3982f2e32bcdb5ed52c9e58a0a811278229b59fd6e2f33aed590f0b7489ca5
|
4
|
+
data.tar.gz: 2046136ba0059bc70a850744685406629e00571d793668303935451892b03740
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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"
|
@@ -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
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.
|
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-
|
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
|