rippler 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/bin/rippler CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'bundler'
4
- Bundler.setup
5
4
 
6
- lib = File.expand_path('../lib', __FILE__)
5
+ lib = File.expand_path('../../lib', __FILE__)
6
+ Dir.chdir( lib ){ Bundler.setup }
7
7
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
8
8
 
9
9
  require 'rippler'
@@ -49,6 +49,7 @@ module Rippler
49
49
  TTBit rGwUWgN5BEg3QGNY3RX2HfYowjUTZdid3E
50
50
  Mjbmonetarymetals rNTXjBWitdKUxr6o1zyi4FsjQ8UeP3JCKd
51
51
  khal rpUjkUUcbteWbXrPt4aXAMwzotSPzQJHQt
52
+ Trading rNPHozULzm5nKavgXxbq8tcwAcxyhZpTBw
52
53
 
53
54
  arvicco rnZoUopPFXRSVGdeDkgbqdft8SbXfJxKYh
54
55
  paysafecardbitcoin rN4kvobWCZVSzgLmo27B4kMjakAL31pMSr
@@ -62,6 +63,7 @@ module Rippler
62
63
  Wolf0 rwcpov2ZZmPpo6sjeg4n2oZx94uAYBQ21o
63
64
  thepickingpair rht576qwyKXZ26JEGHYpC3N3atjNS8oM5j
64
65
  Luceo rGZL3cCV6Er5Tiag9tStGhseF4NDBxbxQr
66
+ Luceo-1 rJpuugf8o4NfvorsTGwGyyy11Hi3j9514H
65
67
  21after2 rwuoJnBP4kyfR6Bry8ruLNyxubuk37w6gi
66
68
  t.o.m. r4b5wQJL9qfqGZA6WQksE9spuYi4fmgDde
67
69
  octopus r33dwR8VbfDvHptF2AYzp9JHjR7iVetqM
@@ -106,6 +108,7 @@ module Rippler
106
108
  gbl08ma rsgg1U8UpYodp1GM3NDaYfMrZge97Gpvc9
107
109
  tosku rBs43YZMn5QsYY9jZYcG4C3egEebUfGWh3
108
110
  BitcoinG r3CxMDQFX1Atq1vQN5sqVsjm3rawGSwd32
111
+ Gzarcov rEg8hTqY7jhSkeFirfE5Fm7BF72WaaCnrB
109
112
 
110
113
  ]]
111
114
 
@@ -23,13 +23,13 @@ module Rippler
23
23
  case tx["TransactionType"]
24
24
  when "Payment"
25
25
  "PAY #{amount(tx['Amount'])} #{name(tx['Account'])} > #{name(tx['Destination'])}"
26
- # when "OfferCancel"
27
- # "CAN #{name(tx['Account'])} ##{tx['Sequence']}"
28
- # when "OfferCreate"
29
- # "OFR #{name(tx['Account'])} ##{tx['Sequence']} offers " +
30
- # "#{amount(tx['TakerGets'])} for #{amount(tx['TakerPays'])}"
31
- # when "TrustSet"
32
- # "TRS #{amount(tx['LimitAmount'])} #{name(tx['Account'])}"
26
+ when "OfferCancel"
27
+ "CAN #{name(tx['Account'])} ##{tx['Sequence']}"
28
+ when "OfferCreate"
29
+ "OFR #{name(tx['Account'])} ##{tx['Sequence']} offers " +
30
+ "#{amount(tx['TakerGets'])} for #{amount(tx['TakerPays'])}"
31
+ when "TrustSet"
32
+ "TRS #{amount(tx['LimitAmount'])} #{name(tx['Account'])}"
33
33
  else
34
34
  tx
35
35
  end
@@ -1,3 +1,3 @@
1
1
  module Rippler
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/rippler.rb CHANGED
@@ -60,15 +60,15 @@ module Rippler
60
60
  request( {command: "account_info", ident: MY_ACCT}.merge(params) )
61
61
  end
62
62
 
63
- def self.my_tx params
63
+ def self.history params
64
64
  reply = request( {command: "account_tx",
65
65
  account: MY_ACCT,
66
- ledger_min: 303000,
66
+ ledger_min: 310000,
67
67
  ledger_max: 329794,
68
68
  resume: 0,
69
69
  sort_asc: 1
70
70
  }.merge(params) ) #(optional)
71
71
  txs = reply["result"]["transactions"]
72
- txs.map {|t| Transaction.new(t).to_s}
72
+ txs.reverse.map {|t| Transaction.new(t).to_s}.push("Size: #{txs.size}")
73
73
  end
74
74
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rippler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: