bitcoin 0.1.2 → 0.2.0
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.
- metadata +17 -288
- data/.rspec +0 -1
- data/.rvmrc +0 -1
- data/Gemfile +0 -4
- data/Gemfile.lock +0 -98
- data/Guardfile +0 -38
- data/README.markdown +0 -24
- data/Rakefile +0 -1
- data/bin/rbcoin +0 -8
- data/bitcoin.gemspec +0 -40
- data/config/cucumber.yml +0 -5
- data/config/darcs.boring +0 -121
- data/doc/DEFINITION_OF_DONE.markdown +0 -12
- data/doc/HISTORY.markdown +0 -19
- data/doc/LICENCE.markdown +0 -25
- data/doc/TODO.markdown +0 -31
- data/doc/UBIQUITOUS_LANGUAGE.markdown +0 -15
- data/features/descriptions/command_help.feature +0 -31
- data/features/descriptions/satoshi_wallet/add_address.feature +0 -49
- data/features/descriptions/satoshi_wallet/show_addresses.feature +0 -18
- data/features/descriptions/satoshi_wallet/show_version.feature +0 -17
- data/features/descriptions/satoshi_wallet/subcommand_help.feature +0 -20
- data/features/fixtures/ABOUT_FIXTURES.markdown +0 -6
- data/features/fixtures/addressbook_wallet.dat +0 -0
- data/features/fixtures/new_wallet.dat +0 -0
- data/features/step_definitions/command_steps.rb +0 -3
- data/features/step_definitions/wallet_steps.rb +0 -11
- data/features/support/env.rb +0 -9
- data/lib/bitcoin.rb +0 -5
- data/lib/bitcoin/cli.rb +0 -35
- data/lib/bitcoin/commands.rb +0 -3
- data/lib/bitcoin/commands/help_command.rb +0 -32
- data/lib/bitcoin/commands/satoshi_wallet.rb +0 -11
- data/lib/bitcoin/commands/satoshi_wallet/add_address_command.rb +0 -61
- data/lib/bitcoin/commands/satoshi_wallet/show_addresses_command.rb +0 -16
- data/lib/bitcoin/commands/satoshi_wallet/show_version_command.rb +0 -15
- data/lib/bitcoin/commands/satoshi_wallet_command.rb +0 -37
- data/lib/bitcoin/commands/satoshi_wallet_command_environment.rb +0 -28
- data/lib/bitcoin/console/capturing_stream_bundle.rb +0 -42
- data/lib/bitcoin/console/stream_bundle.rb +0 -21
- data/lib/bitcoin/data_access/satoshi/bdb_satoshi_wallet_repository.rb +0 -155
- data/lib/bitcoin/data_access/satoshi/satoshi_version.rb +0 -58
- data/lib/bitcoin/data_access/satoshi/satoshi_wallet.rb +0 -39
- data/lib/bitcoin/domain/address_book.rb +0 -19
- data/lib/bitcoin/domain/bitcoin_address.rb +0 -33
- data/lib/bitcoin/filesystem/empty_temp_dir.rb +0 -74
- data/lib/bitcoin/rspec/argument_matchers.rb +0 -1
- data/lib/bitcoin/rspec/argument_matchers/block_evaluating_to_matcher.rb +0 -23
- data/lib/bitcoin/rspec/directory_helpers.rb +0 -22
- data/lib/bitcoin/version.rb +0 -3
- data/spec/bitcoin/cli_spec.rb +0 -128
- data/spec/bitcoin/commands/help_command_spec.rb +0 -53
- data/spec/bitcoin/commands/satoshi_wallet/add_address_command_spec.rb +0 -149
- data/spec/bitcoin/commands/satoshi_wallet/show_addresses_command_spec.rb +0 -26
- data/spec/bitcoin/commands/satoshi_wallet/show_version_command_spec.rb +0 -26
- data/spec/bitcoin/commands/satoshi_wallet_command_environment_spec.rb +0 -76
- data/spec/bitcoin/commands/satoshi_wallet_command_spec.rb +0 -73
- data/spec/bitcoin/console/_contracts/stream_bundle_contract.rb +0 -29
- data/spec/bitcoin/console/capturing_stream_bundle_spec.rb +0 -74
- data/spec/bitcoin/console/stream_bundle_spec.rb +0 -13
- data/spec/bitcoin/data_access/satoshi/bdb_satoshi_wallet_repository_spec.rb +0 -78
- data/spec/bitcoin/data_access/satoshi/satoshi_version_spec.rb +0 -112
- data/spec/bitcoin/data_access/satoshi/satoshi_wallet_spec.rb +0 -102
- data/spec/bitcoin/domain/address_book_spec.rb +0 -63
- data/spec/bitcoin/domain/bitcoin_address_spec.rb +0 -52
- data/spec/bitcoin/filesystem/empty_temp_dir_spec.rb +0 -170
- data/spec/bitcoin/rspec/argument_matchers/block_evaluating_to_matcher_spec.rb +0 -36
- data/spec/spec_helper.rb +0 -29
data/README.markdown
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# Bitcoin
|
2
|
-
|
3
|
-
A [Bitcoin][bitcoin] client written in Ruby
|
4
|
-
|
5
|
-
This is very early stages - I haven't yet spent much time on it, but I
|
6
|
-
have explored the Bitcoin Berkeley DB database format to some extent,
|
7
|
-
and the first phase is to be able to read (and write) enough from standard
|
8
|
-
wallets to be a useful management tool.
|
9
|
-
|
10
|
-
For licence and other documentation, see the "doc" folder
|
11
|
-
|
12
|
-
## Installation
|
13
|
-
|
14
|
-
You need Berkeley DB 4.7 installed. To get this through MacPorts:
|
15
|
-
|
16
|
-
sudo port install db47
|
17
|
-
|
18
|
-
The BDB gem dependency should then compile.
|
19
|
-
|
20
|
-
## Contact
|
21
|
-
|
22
|
-
I can be reached by email at <ash.moran@patchspace.co.uk>
|
23
|
-
|
24
|
-
[bitcoin]: http://www.bitcoin.org/
|
data/Rakefile
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require 'bundler/gem_tasks'
|
data/bin/rbcoin
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
$:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib')
|
4
|
-
|
5
|
-
require 'bitcoin/cli'
|
6
|
-
require 'bitcoin/console/stream_bundle'
|
7
|
-
|
8
|
-
exit Bitcoin::CLI.new(Bitcoin::Console::StreamBundle.new(STDIN, STDOUT, STDERR)).run(ARGV.dup)
|
data/bitcoin.gemspec
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
$:.push File.expand_path("../lib", __FILE__)
|
3
|
-
require "bitcoin/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |s|
|
6
|
-
s.name = "bitcoin"
|
7
|
-
s.version = Bitcoin::VERSION
|
8
|
-
s.authors = [ "Ash Moran", "Andy Shipman" ]
|
9
|
-
s.email = %w[ ash.moran@patchspace.co.uk andy@cllearview.com ]
|
10
|
-
s.homepage = "http://rbcoin.org/"
|
11
|
-
s.summary = "bitcoin-#{Bitcoin::VERSION}"
|
12
|
-
s.description = "Bitcoin client"
|
13
|
-
|
14
|
-
# s.rubyforge_project = "bitcoin"
|
15
|
-
|
16
|
-
s.add_dependency("sbdb", ">= 0.0.12.2")
|
17
|
-
s.add_dependency("lstrip-on-steroids", ">= 1.0.0")
|
18
|
-
|
19
|
-
s.add_development_dependency("rake")
|
20
|
-
s.add_development_dependency("cucumber")
|
21
|
-
s.add_development_dependency("aruba")
|
22
|
-
s.add_development_dependency("rspec")
|
23
|
-
s.add_development_dependency("fuubar")
|
24
|
-
s.add_development_dependency("guard")
|
25
|
-
s.add_development_dependency("guard-rspec")
|
26
|
-
s.add_development_dependency("guard-cucumber")
|
27
|
-
s.add_development_dependency("guard-bundler")
|
28
|
-
s.add_development_dependency("rb-fsevent")
|
29
|
-
s.add_development_dependency("growl")
|
30
|
-
s.add_development_dependency("fakefs")
|
31
|
-
s.add_development_dependency("awesome_print")
|
32
|
-
s.add_development_dependency("looksee")
|
33
|
-
s.add_development_dependency("growl_notify")
|
34
|
-
|
35
|
-
# `darcs show files` lists directories unlike `git ls-files`, so we exclude them here
|
36
|
-
s.files = `darcs show files`.split("\n").select { |file| File.file?(file) }
|
37
|
-
s.test_files = `darcs show files {features,spec}/*`.split("\n").select { |file| File.file?(file) }
|
38
|
-
s.executables = `darcs show files bin/*`.split("\n").select { |file| File.file?(file) }.map { |file| File.basename(file) }
|
39
|
-
s.require_paths = ["lib"]
|
40
|
-
end
|
data/config/cucumber.yml
DELETED
data/config/darcs.boring
DELETED
@@ -1,121 +0,0 @@
|
|
1
|
-
# Boring file regexps:
|
2
|
-
|
3
|
-
### compiler and interpreter intermediate files
|
4
|
-
# haskell (ghc) interfaces
|
5
|
-
\.hi$
|
6
|
-
\.hi-boot$
|
7
|
-
\.o-boot$
|
8
|
-
# object files
|
9
|
-
\.o$
|
10
|
-
\.o\.cmd$
|
11
|
-
# profiling haskell
|
12
|
-
\.p_hi$
|
13
|
-
\.p_o$
|
14
|
-
# haskell program coverage resp. profiling info
|
15
|
-
\.tix$
|
16
|
-
\.prof$
|
17
|
-
# fortran module files
|
18
|
-
\.mod$
|
19
|
-
# linux kernel
|
20
|
-
\.ko\.cmd$
|
21
|
-
\.mod\.c$
|
22
|
-
(^|/)\.tmp_versions($|/)
|
23
|
-
# *.ko files aren't boring by default because they might
|
24
|
-
# be Korean translations rather than kernel modules
|
25
|
-
# \.ko$
|
26
|
-
# python, emacs, java byte code
|
27
|
-
\.py[co]$
|
28
|
-
\.elc$
|
29
|
-
\.class$
|
30
|
-
# objects and libraries; lo and la are libtool things
|
31
|
-
\.(obj|a|exe|so|lo|la)$
|
32
|
-
# compiled zsh configuration files
|
33
|
-
\.zwc$
|
34
|
-
# Common LISP output files for CLISP and CMUCL
|
35
|
-
\.(fas|fasl|sparcf|x86f)$
|
36
|
-
|
37
|
-
### build and packaging systems
|
38
|
-
# cabal intermediates
|
39
|
-
\.installed-pkg-config
|
40
|
-
\.setup-config
|
41
|
-
# standard cabal build dir, might not be boring for everybody
|
42
|
-
# ^dist(/|$)
|
43
|
-
# autotools
|
44
|
-
(^|/)autom4te\.cache($|/)
|
45
|
-
(^|/)config\.(log|status)$
|
46
|
-
# microsoft web expression, visual studio metadata directories
|
47
|
-
\_vti_cnf$
|
48
|
-
\_vti_pvt$
|
49
|
-
# gentoo tools
|
50
|
-
\.revdep-rebuild.*
|
51
|
-
# generated dependencies
|
52
|
-
^\.depend$
|
53
|
-
|
54
|
-
### version control systems
|
55
|
-
# cvs
|
56
|
-
(^|/)CVS($|/)
|
57
|
-
\.cvsignore$
|
58
|
-
# cvs, emacs locks
|
59
|
-
^\.#
|
60
|
-
# rcs
|
61
|
-
(^|/)RCS($|/)
|
62
|
-
,v$
|
63
|
-
# subversion
|
64
|
-
(^|/)\.svn($|/)
|
65
|
-
# mercurial
|
66
|
-
(^|/)\.hg($|/)
|
67
|
-
# git
|
68
|
-
(^|/)\.git($|/)
|
69
|
-
# bzr
|
70
|
-
\.bzr$
|
71
|
-
# sccs
|
72
|
-
(^|/)SCCS($|/)
|
73
|
-
# darcs
|
74
|
-
(^|/)_darcs($|/)
|
75
|
-
(^|/)\.darcsrepo($|/)
|
76
|
-
^\.darcs-temp-mail$
|
77
|
-
-darcs-backup[[:digit:]]+$
|
78
|
-
# gnu arch
|
79
|
-
(^|/)(\+|,)
|
80
|
-
(^|/)vssver\.scc$
|
81
|
-
\.swp$
|
82
|
-
(^|/)MT($|/)
|
83
|
-
(^|/)\{arch\}($|/)
|
84
|
-
(^|/).arch-ids($|/)
|
85
|
-
# bitkeeper
|
86
|
-
(^|/)BitKeeper($|/)
|
87
|
-
(^|/)ChangeSet($|/)
|
88
|
-
|
89
|
-
### miscellaneous
|
90
|
-
# backup files
|
91
|
-
~$
|
92
|
-
\.bak$
|
93
|
-
\.BAK$
|
94
|
-
# patch originals and rejects
|
95
|
-
\.orig$
|
96
|
-
\.rej$
|
97
|
-
# X server
|
98
|
-
\..serverauth.*
|
99
|
-
# image spam
|
100
|
-
\#
|
101
|
-
(^|/)Thumbs\.db$
|
102
|
-
# vi, emacs tags
|
103
|
-
(^|/)(tags|TAGS)$
|
104
|
-
#(^|/)\.[^/]
|
105
|
-
# core dumps
|
106
|
-
(^|/|\.)core$
|
107
|
-
# partial broken files (KIO copy operations)
|
108
|
-
\.part$
|
109
|
-
# waf files, see http://code.google.com/p/waf/
|
110
|
-
(^|/)\.waf-[[:digit:].]+-[[:digit:]]+($|/)
|
111
|
-
(^|/)\.lock-wscript$
|
112
|
-
# mac os finder
|
113
|
-
(^|/)\.DS_Store$
|
114
|
-
|
115
|
-
### Bitcoin gem additions
|
116
|
-
pkg$
|
117
|
-
^tmp/.*
|
118
|
-
^bitcoinrb_db_tmp$
|
119
|
-
^scratch\.rb$
|
120
|
-
^features/fixtures/real_wallet.dat$
|
121
|
-
^.*\.gem$
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# Bitcoin Definition of Done
|
2
|
-
|
3
|
-
A feature in the Bitcoin client will be considered done under normal
|
4
|
-
circumstances if it meets the following criteria:
|
5
|
-
|
6
|
-
* There is a Cucumber feature describing it
|
7
|
-
* The feature covers the command line interface
|
8
|
-
* There is a command-line interface for it
|
9
|
-
* The command-line interface is documented in the internal help
|
10
|
-
* All realistic input-related error conditions are handled
|
11
|
-
* All realistic runtime errors are handled
|
12
|
-
* The feature behaves in a suitably similar way to the Satoshi client
|
data/doc/HISTORY.markdown
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# Bitcoin gem history
|
2
|
-
|
3
|
-
## 0.1.2 (2011-08-29)
|
4
|
-
|
5
|
-
### New features
|
6
|
-
|
7
|
-
* `rbcoin satoshi-wallet add-address` command
|
8
|
-
* `rbcoin satoshi-wallet show-addresses` command
|
9
|
-
|
10
|
-
## 0.1.1 (2011-08-22)
|
11
|
-
|
12
|
-
### New features
|
13
|
-
|
14
|
-
* `rbcoin satoshi-wallet show-version` command
|
15
|
-
* `rbcoin help` command shows WIP help, not everything described is implemented
|
16
|
-
|
17
|
-
## 0.1.0 (2011-07-21)
|
18
|
-
|
19
|
-
Initial "release". Doesn't actually do anything yet :-)
|
data/doc/LICENCE.markdown
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
Copyright 2011 Ash Moran <ash.moran@patchspace.co.uk>. All rights reserved.
|
2
|
-
|
3
|
-
Redistribution and use in source and binary forms, with or without modification, are
|
4
|
-
permitted provided that the following conditions are met:
|
5
|
-
|
6
|
-
1. Redistributions of source code must retain the above copyright notice, this list of
|
7
|
-
conditions and the following disclaimer.
|
8
|
-
|
9
|
-
2. Redistributions in binary form must reproduce the above copyright notice, this list
|
10
|
-
of conditions and the following disclaimer in the documentation and/or other materials
|
11
|
-
provided with the distribution.
|
12
|
-
|
13
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
14
|
-
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
15
|
-
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
16
|
-
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
17
|
-
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
18
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
19
|
-
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
20
|
-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
21
|
-
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
22
|
-
|
23
|
-
The views and conclusions contained in the software and documentation are those of the
|
24
|
-
authors and should not be interpreted as representing official policies, either expressed
|
25
|
-
or implied, of the copyright holder.
|
data/doc/TODO.markdown
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# TODO
|
2
|
-
|
3
|
-
## Satoshi code
|
4
|
-
|
5
|
-
* Investigate `read_compact_size`
|
6
|
-
|
7
|
-
## Features
|
8
|
-
|
9
|
-
* Flags to `rbcoin satoshi-wallet show-addresses`: --all, --sending --receiving
|
10
|
-
|
11
|
-
## Usability
|
12
|
-
|
13
|
-
* Berkeley DB error handling
|
14
|
-
* Character encoding (assuming UTF8 everywhere)
|
15
|
-
* Zsh command completion
|
16
|
-
* Handle mismatched wallet versions
|
17
|
-
* Offer a read-only mode for satoshi-wallet commands
|
18
|
-
* Subcommand help for `rbcoin satoshi-wallet`
|
19
|
-
|
20
|
-
## Design
|
21
|
-
|
22
|
-
* OCP-compliant command system
|
23
|
-
|
24
|
-
## Specs
|
25
|
-
|
26
|
-
* A contract that commands return 0/1 on success/failure
|
27
|
-
* A contract that commands terminate with a newline
|
28
|
-
|
29
|
-
## Security
|
30
|
-
|
31
|
-
* Prevent data being written to swap
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# RbCoin Ubiquitous Language
|
2
|
-
|
3
|
-
## Bitcoin
|
4
|
-
|
5
|
-
Terms defined here should be used consistently throughout the application user
|
6
|
-
interface, documentation and code
|
7
|
-
|
8
|
-
* Satoshi Client: The original Bitcoin client, referred to as the "Satoshi client" for clarity
|
9
|
-
* Satoshi Wallet: The wallet.dat file used by the Satoshi Client (a Berkeley DB file)
|
10
|
-
* Address: A Bitcoin address
|
11
|
-
* Tip Jar: A Bitcoin address published onymously, usually to collect anonymous tips
|
12
|
-
|
13
|
-
## Technical
|
14
|
-
|
15
|
-
* Value Object: an immutable object (Domain Driven Design sense)
|
@@ -1,31 +0,0 @@
|
|
1
|
-
Feature: Command help
|
2
|
-
In order to avoid being frustrated by being unable to interact with the application
|
3
|
-
As a user
|
4
|
-
I want to be told when I make a mistake
|
5
|
-
|
6
|
-
Scenario: `rbcoin`
|
7
|
-
When I successfully run `rbcoin`
|
8
|
-
Then the output should contain:
|
9
|
-
"""
|
10
|
-
Usage: rbcoin COMMAND ...
|
11
|
-
|
12
|
-
Commands:
|
13
|
-
help Display help about rbcoin and rbcoin commands
|
14
|
-
satoshi-wallet Manipulate the wallet.dat file of the original client
|
15
|
-
|
16
|
-
Use "rbcoin COMMAND --help" or "rbcoin help COMMAND" for help on a single command
|
17
|
-
Use "rbcoin --version" to see the rbcoin version number
|
18
|
-
Use "rbcoin --exact-version" to see the all version details (with dependencies)
|
19
|
-
"""
|
20
|
-
|
21
|
-
Scenario: `rbcoin help`
|
22
|
-
When I successfully run `rbcoin help`
|
23
|
-
Then the output should contain "Usage: rbcoin COMMAND ..."
|
24
|
-
|
25
|
-
Scenario: Invalid command
|
26
|
-
When I run `rbcoin thiscommanddoesnotexist`
|
27
|
-
Then it should fail with:
|
28
|
-
"""
|
29
|
-
rbcoin failed: No such command "thiscommanddoesnotexist"
|
30
|
-
Try: `rbcoin help`
|
31
|
-
"""
|
@@ -1,49 +0,0 @@
|
|
1
|
-
Feature: satoshi-wallet add-address
|
2
|
-
In order to reduce the risk of using RbCoin
|
3
|
-
As a Bitcoin owner
|
4
|
-
I want to be able to add new Addresses into a Satoshi Wallet
|
5
|
-
|
6
|
-
Scenario: Add new address
|
7
|
-
Given a new Satoshi Wallet "new_wallet.dat"
|
8
|
-
When I successfully run `rbcoin satoshi-wallet add-address new_wallet.dat 14Z1mazY4HfysZyMaKudFr63EwHqQT2njz "Bitcoin Monitor"`
|
9
|
-
Then the output should contain "Address added successfully"
|
10
|
-
When I successfully run `rbcoin satoshi-wallet show-addresses new_wallet.dat`
|
11
|
-
Then the output should contain:
|
12
|
-
"""
|
13
|
-
# All addresses in new_wallet.dat
|
14
|
-
14Z1mazY4HfysZyMaKudFr63EwHqQT2njz Bitcoin Monitor
|
15
|
-
"""
|
16
|
-
|
17
|
-
Scenario: Invalid address
|
18
|
-
Given a new Satoshi Wallet "new_wallet.dat"
|
19
|
-
When I run `rbcoin satoshi-wallet add-address new_wallet.dat 1thisisaninvalidaddress "Bitcoin Monitor"`
|
20
|
-
Then the command should fail
|
21
|
-
And the stderr should contain:
|
22
|
-
"""
|
23
|
-
The address "1thisisaninvalidaddress" is not a valid Bitcoin address
|
24
|
-
The address was not added to the wallet
|
25
|
-
"""
|
26
|
-
|
27
|
-
Scenario: Missing arguments
|
28
|
-
Given a new Satoshi Wallet "new_wallet.dat"
|
29
|
-
When I run `rbcoin satoshi-wallet add-address new_wallet.dat 14Z1mazY4HfysZyMaKudFr63EwHqQT2njz`
|
30
|
-
Then the command should fail
|
31
|
-
And the stderr should contain:
|
32
|
-
"""
|
33
|
-
You must provide both a Bitcoin address and a name to add to a wallet
|
34
|
-
No changes were made to the wallet
|
35
|
-
"""
|
36
|
-
|
37
|
-
Scenario: Too many arguments
|
38
|
-
Given a new Satoshi Wallet "new_wallet.dat"
|
39
|
-
When I run `rbcoin satoshi-wallet add-address new_wallet.dat 14Z1mazY4HfysZyMaKudFr63EwHqQT2njz My name without quotes`
|
40
|
-
Then the command should fail
|
41
|
-
And the stderr should contain:
|
42
|
-
"""
|
43
|
-
Received too many arguments
|
44
|
-
|
45
|
-
To make sure the name is formatted correctly we ask you to use use quotes
|
46
|
-
around the name, e.g.: "My name without quotes"
|
47
|
-
|
48
|
-
No changes were made to the wallet
|
49
|
-
"""
|
@@ -1,18 +0,0 @@
|
|
1
|
-
Feature: satoshi-wallet show-addresses
|
2
|
-
In order to enable easily transitioning from the Satoshi Client
|
3
|
-
As a Bitcoin owner
|
4
|
-
I want to inspect the contents of my Satoshi Wallet
|
5
|
-
|
6
|
-
Scenario: Viewing all addresses
|
7
|
-
# addressbook_wallet.dat is a wallet with some known addresses but no transactions
|
8
|
-
Given a new Satoshi Wallet "addressbook_wallet.dat"
|
9
|
-
When I successfully run `rbcoin satoshi-wallet show-addresses addressbook_wallet.dat`
|
10
|
-
# I don't know what drives the address book order yet - I think it's the address itself
|
11
|
-
Then the output should contain:
|
12
|
-
"""
|
13
|
-
# All addresses in addressbook_wallet.dat
|
14
|
-
13f2t2WKnCZh1rZbDhdUKB6fY1rZNWZVzd Receiving address 2
|
15
|
-
14Z1mazY4HfysZyMaKudFr63EwHqQT2njz Bitcoin Monitor
|
16
|
-
16kzGRdP8LToECecna3EynghiApUM9duLw Receiving address 1
|
17
|
-
1Nqr3MqVyUp6k3o3QPePAdn4Yg4tzgB9kw Bitcoincharts
|
18
|
-
"""
|
@@ -1,17 +0,0 @@
|
|
1
|
-
Feature: satoshi-wallet show-version
|
2
|
-
In order to enable easily transitioning from the Satoshi Client
|
3
|
-
As a Bitcoin owner
|
4
|
-
I want to inspect the contents of my Satoshi Wallet
|
5
|
-
|
6
|
-
Scenario: Valid wallet file
|
7
|
-
# Which just so happens to be a 0.3.24 file...
|
8
|
-
Given a new Satoshi Wallet "new_wallet.dat"
|
9
|
-
When I successfully run `rbcoin satoshi-wallet show-version new_wallet.dat`
|
10
|
-
Then the output should contain "0.3.24"
|
11
|
-
|
12
|
-
Scenario: Missing wallet file
|
13
|
-
When I run `rbcoin satoshi-wallet show-version this_wallet_does_not_exist.dat`
|
14
|
-
Then it should fail with:
|
15
|
-
"""
|
16
|
-
Couldn't find wallet file: this_wallet_does_not_exist.dat
|
17
|
-
"""
|
@@ -1,20 +0,0 @@
|
|
1
|
-
Feature: Subcommand help for `rbcoin satoshi-wallet`
|
2
|
-
In order to avoid being frustrated by being unable to interact with the application
|
3
|
-
As a user
|
4
|
-
I want to be told when I make a mistake
|
5
|
-
|
6
|
-
Scenario: `rbcoin satoshi-wallet unknown-subcommand`
|
7
|
-
When I run `rbcoin satoshi-wallet unknown-subcommand`
|
8
|
-
Then the command should fail
|
9
|
-
And the stderr should contain:
|
10
|
-
"""
|
11
|
-
Unknown satoshi-wallet subcommand: "unknown-subcommand"
|
12
|
-
"""
|
13
|
-
|
14
|
-
# Scenario: `rbcoin help satoshi-wallet`
|
15
|
-
# When I successfully run `rbcoin satoshi-wallet help`
|
16
|
-
# Then the output should contain "Usage: TODO"
|
17
|
-
#
|
18
|
-
# Scenario: `rbcoin satoshi-wallet --help`
|
19
|
-
# When I successfully run `rbcoin satoshi-wallet --help`
|
20
|
-
# Then the output should contain "Usage: TODO"
|