fedux_org-stdlib 0.6.27 → 0.6.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/fedux_org_stdlib/file_template.rb +6 -10
- data/lib/fedux_org_stdlib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1005df158e4b102376f021e4cb5e60baa7b8dc38
|
4
|
+
data.tar.gz: ad437671387f459fb4c3ea01b0d53d089b4742a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce0c4e7b2055b1a90bb80ed3a9f57c1d03dd6cb68a6a2b9eb0c862f76c7ed76c5fc9acae745827cb56e5626df4c1b476d2e5340546e9074e2af5cd6bc3b77afd
|
7
|
+
data.tar.gz: 8477fed95d3a21663ba8d6ab169243fc67d7aa286d6f6b5cf15d5679af03a8605a93fed6d64ecdaed9bcd403ed5840f3822b6c8c61ca82575b22e75fc398e1d1
|
data/Gemfile.lock
CHANGED
@@ -53,7 +53,7 @@ module FeduxOrgStdlib
|
|
53
53
|
# option1: 'data2'
|
54
54
|
class FileTemplate
|
55
55
|
|
56
|
-
attr_reader :working_directory, :logger
|
56
|
+
attr_reader :working_directory, :logger, :file, :content
|
57
57
|
|
58
58
|
# Create a new instance of template
|
59
59
|
#
|
@@ -78,19 +78,19 @@ module FeduxOrgStdlib
|
|
78
78
|
@logger = logger
|
79
79
|
@working_directory = working_directory
|
80
80
|
|
81
|
-
file ||= _available_template_file
|
81
|
+
@file ||= _available_template_file
|
82
82
|
|
83
|
-
unless file
|
83
|
+
unless @file
|
84
84
|
logger.debug "No template file found at #{_allowed_template_file_paths.to_list}, therefor I'm going to use an empty template object instead."
|
85
|
-
@
|
85
|
+
@content = ''
|
86
86
|
|
87
87
|
return
|
88
88
|
end
|
89
89
|
|
90
90
|
begin
|
91
|
-
@
|
91
|
+
@content = File.read(@file).chomp
|
92
92
|
rescue StandardError => e
|
93
|
-
fail Exceptions::TemplateFileNotReadable, JSON.dump(message: e.message, file: file)
|
93
|
+
fail Exceptions::TemplateFileNotReadable, JSON.dump(message: e.message, file: @file)
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
@@ -101,10 +101,6 @@ module FeduxOrgStdlib
|
|
101
101
|
_allowed_template_file_paths[1]
|
102
102
|
end
|
103
103
|
|
104
|
-
def content
|
105
|
-
@__template
|
106
|
-
end
|
107
|
-
|
108
104
|
private
|
109
105
|
|
110
106
|
# The name of the template file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fedux_org-stdlib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max Meyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|