ledger-rest 2.0.0 → 2.0.1
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/ledger-rest.org +7 -2
- data/lib/ledger-rest/app.rb +5 -5
- data/lib/ledger-rest/ledger.rb +4 -4
- data/lib/ledger-rest/version.rb +1 -1
- metadata +2 -2
data/ledger-rest.org
CHANGED
@@ -2,8 +2,13 @@
|
|
2
2
|
** DONE move responsibilities into classes
|
3
3
|
CLOSED: [2012-11-22 Thu 19:03]
|
4
4
|
- State "DONE" from "TODO" [2012-11-22 Thu 19:03]
|
5
|
-
**
|
6
|
-
|
5
|
+
** DONE implement entry GET
|
6
|
+
CLOSED: [2012-11-24 Sat 01:26]
|
7
|
+
- State "DONE" from "TODO" [2012-11-24 Sat 01:26]
|
8
|
+
** DONE implement entry POST
|
9
|
+
CLOSED: [2012-11-24 Sat 01:26]
|
10
|
+
- State "DONE" from "TODO" [2012-11-24 Sat 01:26]
|
11
|
+
** NEXT implement ledger append
|
7
12
|
** TODO implement transactions GET method
|
8
13
|
Get all transactions.
|
9
14
|
** TODO implement transactions POST method
|
data/lib/ledger-rest/app.rb
CHANGED
@@ -15,6 +15,7 @@ module LedgerRest
|
|
15
15
|
CONFIG_FILE = "ledger-rest.yml"
|
16
16
|
|
17
17
|
configure do |c|
|
18
|
+
config = {}
|
18
19
|
begin
|
19
20
|
config = YAML.load_file(CONFIG_FILE)
|
20
21
|
config.symbolize_keys!
|
@@ -22,8 +23,8 @@ module LedgerRest
|
|
22
23
|
puts "Failed to load config."
|
23
24
|
end
|
24
25
|
|
25
|
-
Ledger.configure
|
26
|
-
Git.configure
|
26
|
+
Ledger.configure(config)
|
27
|
+
Git.configure(config)
|
27
28
|
end
|
28
29
|
|
29
30
|
get '/version' do
|
@@ -113,12 +114,11 @@ module LedgerRest
|
|
113
114
|
end
|
114
115
|
|
115
116
|
put '/transactions/:meta' do
|
116
|
-
|
117
|
+
"Not yet implemented!"
|
117
118
|
end
|
118
119
|
|
119
120
|
delete '/transactions/:meta' do
|
120
|
-
|
121
|
+
"Not yet implemented!"
|
121
122
|
end
|
122
|
-
|
123
123
|
end
|
124
124
|
end
|
data/lib/ledger-rest/ledger.rb
CHANGED
@@ -8,10 +8,10 @@ module LedgerRest
|
|
8
8
|
attr_accessor :rcfile, :bin, :file, :append_file, :home
|
9
9
|
|
10
10
|
def configure(options)
|
11
|
-
@bin = options[:ledger_bin] ||
|
12
|
-
@file = options[:ledger_file] || ENV['LEDGER_FILE']
|
13
|
-
@append_file = options[:ledger_append_file] || ENV['LEDGER_FILE']
|
14
|
-
@home = options[:ledger_home] || ''
|
11
|
+
@bin = options[:ledger_bin] || '/usr/bin/ledger'
|
12
|
+
@file = options[:ledger_file] || ENV['LEDGER_FILE'] || 'main.ledger'
|
13
|
+
@append_file = options[:ledger_append_file] || ENV['LEDGER_FILE'] || 'append.ledger'
|
14
|
+
@home = options[:ledger_home] || ''
|
15
15
|
end
|
16
16
|
|
17
17
|
# Execute ledger command with given parameters
|
data/lib/ledger-rest/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ledger-rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -59,7 +59,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
59
59
|
version: '0'
|
60
60
|
segments:
|
61
61
|
- 0
|
62
|
-
hash:
|
62
|
+
hash: 4145424214629847522
|
63
63
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
64
|
none: false
|
65
65
|
requirements:
|