moneybook 0.2.4 → 0.2.5
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.
- data/VERSION +1 -1
- data/bin/moneybook +12 -0
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.5
|
data/bin/moneybook
CHANGED
@@ -144,6 +144,18 @@ def command_parse(options, filename)
|
|
144
144
|
current_comp_line += 1
|
145
145
|
reached_tail = true if options[:tail] && current_comp_line > number_of_computational_lines - options[:tail_number]
|
146
146
|
original_str = false
|
147
|
+
# eval math expressions in the form $3 + 4*12$
|
148
|
+
line.gsub!(/\$([^\$]*)\$/){
|
149
|
+
if intermediate && reached_tail then
|
150
|
+
puts "#{line.strip} ==> calc: #{$1} = #{eval $1}"
|
151
|
+
end
|
152
|
+
eval $1
|
153
|
+
}
|
154
|
+
# clear any end of line comment and print them if needed
|
155
|
+
temp=line.split('#')
|
156
|
+
line=temp[0].strip
|
157
|
+
puts "# "+temp[1..-1].join('#').strip if temp.length > 1 && intermediate && reached_tail
|
158
|
+
###
|
147
159
|
if temp=line.match(REGEXP_PAYBACK_LINE) then
|
148
160
|
original_str = line.strip
|
149
161
|
line = "PAYBACK (#{temp[1].to_s}) #{temp[2].to_s}"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moneybook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 5
|
10
|
+
version: 0.2.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- luca cioria
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-02-
|
18
|
+
date: 2011-02-23 00:00:00 +01:00
|
19
19
|
default_executable: moneybook
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|