zold 0.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.
- checksums.yaml +7 -0
- data/.0pdd.yml +9 -0
- data/.gitattributes +7 -0
- data/.gitignore +7 -0
- data/.pdd +7 -0
- data/.rubocop.yml +16 -0
- data/.rultor.yml +30 -0
- data/.simplecov +40 -0
- data/.travis.yml +13 -0
- data/CONTRIBUTING.md +19 -0
- data/Gemfile +24 -0
- data/LICENSE.txt +21 -0
- data/README.md +150 -0
- data/Rakefile +77 -0
- data/appveyor.yml +21 -0
- data/bin/zold +49 -0
- data/cucumber.yml +3 -0
- data/features/cli.feature +13 -0
- data/features/gem_package.feature +24 -0
- data/features/step_definitions/steps.rb +70 -0
- data/features/support/env.rb +24 -0
- data/lib/zold.rb +32 -0
- data/lib/zold/version.rb +29 -0
- data/test/test__helper.rb +33 -0
- data/test/test_zold.rb +37 -0
- data/zold.gemspec +60 -0
- metadata +232 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: a31ffbe0a5aa434edf77c7160338f190d0608bb5
|
|
4
|
+
data.tar.gz: 9e88cdff31b362c4ff091157eb93777a3993dde1
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 2ca4c5dc162c81757ec65e5ad4fc0415d2fc632d792f48788518db40ac76922a9f9b9a006a0d8b8de5078e76668edbee543a5fe35aa4553a38e390c31f3588b4
|
|
7
|
+
data.tar.gz: 404532fe1ec32e7545416cfeb8640ce095e5ae45410d9c8965de905784d8b99832b3465a63c0ae64ae22587c8e2c593ba7f9df6f1e467e63bfb512bbd8b00916
|
data/.0pdd.yml
ADDED
data/.gitattributes
ADDED
data/.gitignore
ADDED
data/.pdd
ADDED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
AllCops:
|
|
2
|
+
Exclude:
|
|
3
|
+
- 'bin/**/*'
|
|
4
|
+
- 'assets/**/*'
|
|
5
|
+
DisplayCopNames: true
|
|
6
|
+
|
|
7
|
+
Metrics/CyclomaticComplexity:
|
|
8
|
+
Max: 10
|
|
9
|
+
Metrics/MethodLength:
|
|
10
|
+
Enabled: false
|
|
11
|
+
Style/MultilineMethodCallIndentation:
|
|
12
|
+
Enabled: false
|
|
13
|
+
Metrics/AbcSize:
|
|
14
|
+
Enabled: false
|
|
15
|
+
Metrics/BlockLength:
|
|
16
|
+
Max: 50
|
data/.rultor.yml
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
assets:
|
|
2
|
+
rubygems.yml: zerocracy/home#assets/rubygems.yml
|
|
3
|
+
s3cfg: zerocracy/home#assets/s3cfg
|
|
4
|
+
install: |
|
|
5
|
+
sudo apt-get -y update
|
|
6
|
+
sudo gem install pdd
|
|
7
|
+
release:
|
|
8
|
+
script: |-
|
|
9
|
+
bundle install
|
|
10
|
+
rake
|
|
11
|
+
rm -rf *.gem
|
|
12
|
+
sed -i "s/1\.0\.snapshot/${tag}/g" lib/zold/version.rb
|
|
13
|
+
git add lib/zold/version.rb
|
|
14
|
+
git commit -m "version set to ${tag}"
|
|
15
|
+
gem build zold.gemspec
|
|
16
|
+
chmod 0600 ../rubygems.yml
|
|
17
|
+
gem push *.gem --config-file ../rubygems.yml
|
|
18
|
+
commanders:
|
|
19
|
+
- yegor256
|
|
20
|
+
architect:
|
|
21
|
+
- yegor256
|
|
22
|
+
merge:
|
|
23
|
+
script: |-
|
|
24
|
+
bundle install
|
|
25
|
+
rake
|
|
26
|
+
pdd
|
|
27
|
+
deploy:
|
|
28
|
+
script: |-
|
|
29
|
+
echo "There is nothing to deploy"
|
|
30
|
+
exit -1
|
data/.simplecov
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
#
|
|
3
|
+
# Copyright (c) 2018 Zerocracy, Inc.
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
if Gem.win_platform? then
|
|
24
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
|
25
|
+
SimpleCov::Formatter::HTMLFormatter
|
|
26
|
+
]
|
|
27
|
+
SimpleCov.start do
|
|
28
|
+
add_filter "/test/"
|
|
29
|
+
add_filter "/features/"
|
|
30
|
+
end
|
|
31
|
+
else
|
|
32
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
|
|
33
|
+
[SimpleCov::Formatter::HTMLFormatter]
|
|
34
|
+
)
|
|
35
|
+
SimpleCov.start do
|
|
36
|
+
add_filter "/test/"
|
|
37
|
+
add_filter "/features/"
|
|
38
|
+
minimum_coverage 80
|
|
39
|
+
end
|
|
40
|
+
end
|
data/.travis.yml
ADDED
data/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Fork and clone the repository:
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
git clone git@github.com:your-username/zold.git
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
Make changes and run Rake:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
rake
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Commit changes, please add issue reference in commit message:
|
|
14
|
+
`#<issue> <message>`
|
|
15
|
+
|
|
16
|
+
Push changes to your fork and create a pull request.
|
|
17
|
+
|
|
18
|
+
We will review your changes and apply them to the master branch shortly,
|
|
19
|
+
provided they don't violate our quality standards.
|
data/Gemfile
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2018 Zerocracy, Inc.
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
source 'https://rubygems.org'
|
|
24
|
+
gemspec
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 Zerocracy, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the 'Software'), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
<img src="http://www.zold.io/logo.svg" width="64px" height="64px"/>
|
|
2
|
+
|
|
3
|
+
**NOTICE**: It's an experiment and a very early draft! Please, feel free to
|
|
4
|
+
submit your ideas or pull requests.
|
|
5
|
+
|
|
6
|
+
ZOLD is a crypto currency.
|
|
7
|
+
|
|
8
|
+
ZOLD is going to solve these problems:
|
|
9
|
+
|
|
10
|
+
* Blockchain is slow and [doesn't scale](https://en.wikipedia.org/wiki/Bitcoin_scalability_problem)
|
|
11
|
+
* Crypto mining makes strangers rich
|
|
12
|
+
* High volatility makes cryptos suitable only for the black market
|
|
13
|
+
|
|
14
|
+
ZOLD is:
|
|
15
|
+
|
|
16
|
+
* Fast
|
|
17
|
+
* Scalable
|
|
18
|
+
* Anonymous
|
|
19
|
+
* As stable as USD
|
|
20
|
+
|
|
21
|
+
ZOLD principles include:
|
|
22
|
+
|
|
23
|
+
* There is only one issuer: [Zerocracy, Inc.](http://www.zerocracy.com)
|
|
24
|
+
* The only way to get ZOLD is to earn it (or to buy from someone)
|
|
25
|
+
* [Zerocracy](http://www.zerocracy.com) guarantees to buy back for $1/ZOLD
|
|
26
|
+
* No history of transactions
|
|
27
|
+
* Consistency is guaranteed by protocols, not data
|
|
28
|
+
* The entire code base is open source
|
|
29
|
+
* The network of communicating nodes maintains wallets of users
|
|
30
|
+
* At least 16 redundant copies of each wallet must exist
|
|
31
|
+
* Each node has a trust level, as an integer (negatives mean no trust)
|
|
32
|
+
* Each node earns 0.16% of each transaction it processes
|
|
33
|
+
* Nodes lose trust when the information they provide can't be proven by other nodes
|
|
34
|
+
* The list of 16 highly trusted "backbone" nodes is hardcoded in this Git repository
|
|
35
|
+
* The wallet no.0 belongs to [Zerocracy](http://www.zerocracy.com) and may have a negative balance
|
|
36
|
+
|
|
37
|
+
## How to Use
|
|
38
|
+
|
|
39
|
+
Install [Rubygems](https://rubygems.org/pages/download) and then run:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
gem install zold
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Then, either run it as a node:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
zold run
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Or do one of the following:
|
|
52
|
+
|
|
53
|
+
* `zold create` creates a new wallet (you have to provide PGP keys)
|
|
54
|
+
* `zold pay` sends a payment
|
|
55
|
+
* `zold check` checks the balance of a wallet
|
|
56
|
+
|
|
57
|
+
For more options just run:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
zold --help
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Architecture
|
|
64
|
+
|
|
65
|
+
Each running node contains a list of wallets; each wallet contains:
|
|
66
|
+
|
|
67
|
+
* ID: unsigned 64-bit integer
|
|
68
|
+
* Public PGP key of the owner: 256 bytes (2048 bits)
|
|
69
|
+
* Balance: signed 128-bit integer (in 10<sup>-12</sup>)
|
|
70
|
+
* Version: unsigned 64-bit integer
|
|
71
|
+
|
|
72
|
+
The wallet with the largest `version` number contains the current balance.
|
|
73
|
+
|
|
74
|
+
There is a [3PC](https://en.wikipedia.org/wiki/Three-phase_commit_protocol)
|
|
75
|
+
protocol to make payments:
|
|
76
|
+
|
|
77
|
+
1. A node locks a place in a distributed payment queue.
|
|
78
|
+
|
|
79
|
+
2. The node confirms the payment.
|
|
80
|
+
|
|
81
|
+
3. Other nodes modify balances of sender's and recepient's wallets.
|
|
82
|
+
|
|
83
|
+
**Phase I**.
|
|
84
|
+
Each node maintains a queue of payments, where each payment includes:
|
|
85
|
+
|
|
86
|
+
* Payment ID: unsigned 32-bit integer unique for the node
|
|
87
|
+
* Sender wallet ID and version
|
|
88
|
+
* Recepient wallet ID and version
|
|
89
|
+
* Processor wallet ID and version
|
|
90
|
+
* Amount
|
|
91
|
+
* PGP sign of the sender
|
|
92
|
+
* List of friend IPs and their payment IDs in their queues
|
|
93
|
+
|
|
94
|
+
When a lock request arrives, the node asks its most trustable "friends" (other nodes) to
|
|
95
|
+
lock a place in their queues and then compares their responses. If the three versions
|
|
96
|
+
they managed to lock are not exactly the same, it asks them
|
|
97
|
+
to try to lock again. The process repeats, until all friends' replies are similar.
|
|
98
|
+
|
|
99
|
+
To find the current balance of three wallets, each friend asks its friends around.
|
|
100
|
+
|
|
101
|
+
**Phase II**.
|
|
102
|
+
The node sends a confirmation request to its friends, which includes
|
|
103
|
+
their payment IDs.
|
|
104
|
+
|
|
105
|
+
**Phase III**.
|
|
106
|
+
Each node modifies the balances in its local list of wallets and responds
|
|
107
|
+
with a payment confirmation status. The payment gets removed from the queue.
|
|
108
|
+
|
|
109
|
+
## Consistency and Security
|
|
110
|
+
|
|
111
|
+
The list of friends is hard-coded in the software. It includes only the
|
|
112
|
+
nodes that are trusted by the creators of this software. The list may be
|
|
113
|
+
extended in runtime, using the statistics of the most actively contributing
|
|
114
|
+
nodes.
|
|
115
|
+
|
|
116
|
+
If, at Phase I, some node doesn't synchronize its responses with other
|
|
117
|
+
nodes in more than eight attempts, it loses its trust level.
|
|
118
|
+
|
|
119
|
+
To avoid long-lasting locks of the queue, a payment is removed from the
|
|
120
|
+
queue if it stays there for longer than 60 seconds.
|
|
121
|
+
|
|
122
|
+
## Concerns
|
|
123
|
+
|
|
124
|
+
A DoS attack to the distribution payment queue is a potential threat.
|
|
125
|
+
|
|
126
|
+
Maybe it will be necessary to pay volunteers for the nodes they
|
|
127
|
+
keep online 24x7.
|
|
128
|
+
|
|
129
|
+
## License (MIT)
|
|
130
|
+
|
|
131
|
+
Copyright (c) 2018 Zerocracy, Inc.
|
|
132
|
+
|
|
133
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
134
|
+
of this software and associated documentation files (the 'Software'), to deal
|
|
135
|
+
in the Software without restriction, including without limitation the rights
|
|
136
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
137
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
138
|
+
furnished to do so, subject to the following conditions:
|
|
139
|
+
|
|
140
|
+
The above copyright notice and this permission notice shall be included in all
|
|
141
|
+
copies or substantial portions of the Software.
|
|
142
|
+
|
|
143
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
144
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
145
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
|
|
146
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
147
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
148
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
149
|
+
SOFTWARE.
|
|
150
|
+
|
data/Rakefile
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2018 Zerocracy, Inc.
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
require 'rubygems'
|
|
24
|
+
require 'rake'
|
|
25
|
+
require 'rdoc'
|
|
26
|
+
require 'rake/clean'
|
|
27
|
+
|
|
28
|
+
def name
|
|
29
|
+
@name ||= File.basename(Dir['*.gemspec'].first, '.*')
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def version
|
|
33
|
+
Gem::Specification.load(Dir['*.gemspec'].first).version
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
task default: %i[clean test features rubocop copyright]
|
|
37
|
+
|
|
38
|
+
require 'rake/testtask'
|
|
39
|
+
desc 'Run all unit tests'
|
|
40
|
+
Rake::TestTask.new(:test) do |test|
|
|
41
|
+
Rake::Cleaner.cleanup_files(['coverage'])
|
|
42
|
+
test.libs << 'lib' << 'test'
|
|
43
|
+
test.pattern = 'test/**/test_*.rb'
|
|
44
|
+
test.verbose = false
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
require 'rdoc/task'
|
|
48
|
+
desc 'Build RDoc documentation'
|
|
49
|
+
Rake::RDocTask.new do |rdoc|
|
|
50
|
+
rdoc.rdoc_dir = 'rdoc'
|
|
51
|
+
rdoc.title = "#{name} #{version}"
|
|
52
|
+
rdoc.rdoc_files.include('README*')
|
|
53
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
require 'rubocop/rake_task'
|
|
57
|
+
desc 'Run RuboCop on all directories'
|
|
58
|
+
RuboCop::RakeTask.new(:rubocop) do |task|
|
|
59
|
+
task.fail_on_error = true
|
|
60
|
+
task.requires << 'rubocop-rspec'
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
require 'cucumber/rake/task'
|
|
64
|
+
Cucumber::Rake::Task.new(:features) do
|
|
65
|
+
Rake::Cleaner.cleanup_files(['coverage'])
|
|
66
|
+
end
|
|
67
|
+
Cucumber::Rake::Task.new(:'features:html') do |t|
|
|
68
|
+
t.profile = 'html_report'
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
task :copyright do
|
|
72
|
+
sh "grep -q -r '#{Date.today.strftime('%Y')}' \
|
|
73
|
+
--include '*.rb' \
|
|
74
|
+
--include '*.txt' \
|
|
75
|
+
--include 'Rakefile' \
|
|
76
|
+
."
|
|
77
|
+
end
|
data/appveyor.yml
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
version: '{build}'
|
|
2
|
+
skip_tags: true
|
|
3
|
+
clone_depth: 10
|
|
4
|
+
branches:
|
|
5
|
+
only:
|
|
6
|
+
- master
|
|
7
|
+
except:
|
|
8
|
+
- gh-pages
|
|
9
|
+
os: Windows Server 2012
|
|
10
|
+
install:
|
|
11
|
+
- cmd: SET PATH=C:\Ruby23-x64\bin;%PATH%
|
|
12
|
+
- cmd: ruby --version
|
|
13
|
+
- cmd: git --version
|
|
14
|
+
build_script:
|
|
15
|
+
- bundle update
|
|
16
|
+
- bundle install
|
|
17
|
+
test_script:
|
|
18
|
+
- rake
|
|
19
|
+
cache:
|
|
20
|
+
- C:\Ruby200\bin -> zold.gemspec
|
|
21
|
+
- C:\Ruby200\lib\ruby\gems\2.0.0 -> zold.gemspec
|
data/bin/zold
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# encoding: utf-8
|
|
3
|
+
#
|
|
4
|
+
# Copyright (c) 2018 Zerocracy, Inc.
|
|
5
|
+
#
|
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
|
8
|
+
# in the Software without restriction, including without limitation the rights
|
|
9
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
# furnished to do so, subject to the following conditions:
|
|
12
|
+
#
|
|
13
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
# copies or substantial portions of the Software.
|
|
15
|
+
#
|
|
16
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
# SOFTWARE.
|
|
23
|
+
|
|
24
|
+
STDOUT.sync = true
|
|
25
|
+
|
|
26
|
+
require 'slop'
|
|
27
|
+
require_relative '../lib/zold'
|
|
28
|
+
require_relative '../lib/zold/version'
|
|
29
|
+
|
|
30
|
+
opts = Slop.parse(ARGV, strict: true, help: true) do |o|
|
|
31
|
+
o.banner = "Usage (#{Zold::VERSION}): zold [options] command"
|
|
32
|
+
o.bool '-h', '--help', 'Show these instructions'
|
|
33
|
+
o.bool '-v', '--version', 'Show current version'
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
if opts.help?
|
|
37
|
+
puts opts
|
|
38
|
+
exit
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
if opts.version?
|
|
42
|
+
puts Zold::VERSION
|
|
43
|
+
exit
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
Encoding.default_external = Encoding::UTF_8
|
|
47
|
+
Encoding.default_internal = Encoding::UTF_8
|
|
48
|
+
|
|
49
|
+
# to be implemented...
|
data/cucumber.yml
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Feature: Command Line Processing
|
|
2
|
+
As an payment originator I want to be able to use
|
|
3
|
+
Zold as a command line tool
|
|
4
|
+
|
|
5
|
+
Scenario: Help can be printed
|
|
6
|
+
When I run bin/zold with "-h"
|
|
7
|
+
Then Exit code is zero
|
|
8
|
+
And Stdout contains "--help"
|
|
9
|
+
|
|
10
|
+
Scenario: Version can be printed
|
|
11
|
+
When I run bin/zold with "--version"
|
|
12
|
+
Then Exit code is zero
|
|
13
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
Feature: Gem Package
|
|
2
|
+
As a source code writer I want to be able to
|
|
3
|
+
package the Gem into .gem file
|
|
4
|
+
|
|
5
|
+
Scenario: Gem can be packaged
|
|
6
|
+
Given It is Unix
|
|
7
|
+
Given I have a "execs.rb" file with content:
|
|
8
|
+
"""
|
|
9
|
+
#!/usr/bin/env ruby
|
|
10
|
+
require 'rubygems'
|
|
11
|
+
spec = Gem::Specification::load('./spec.rb')
|
|
12
|
+
if spec.executables.empty?
|
|
13
|
+
fail 'no executables: ' + File.read('./spec.rb')
|
|
14
|
+
end
|
|
15
|
+
"""
|
|
16
|
+
When I run bash with:
|
|
17
|
+
"""
|
|
18
|
+
cd zold
|
|
19
|
+
gem build zold.gemspec
|
|
20
|
+
gem specification --ruby zold-*.gem > ../spec.rb
|
|
21
|
+
cd ..
|
|
22
|
+
ruby execs.rb
|
|
23
|
+
"""
|
|
24
|
+
Then Exit code is zero
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2018 Zerocracy, Inc.
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
require 'tmpdir'
|
|
24
|
+
require 'slop'
|
|
25
|
+
require 'English'
|
|
26
|
+
require_relative '../../lib/zold'
|
|
27
|
+
|
|
28
|
+
Before do
|
|
29
|
+
@cwd = Dir.pwd
|
|
30
|
+
@dir = Dir.mktmpdir('test')
|
|
31
|
+
FileUtils.mkdir_p(@dir) unless File.exist?(@dir)
|
|
32
|
+
Dir.chdir(@dir)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
After do
|
|
36
|
+
Dir.chdir(@cwd)
|
|
37
|
+
FileUtils.rm_rf(@dir) if File.exist?(@dir)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
When(%r{^I run bin/zold with "([^"]*)"$}) do |arg|
|
|
41
|
+
home = File.join(File.dirname(__FILE__), '../..')
|
|
42
|
+
@stdout = `ruby -I#{home}/lib #{home}/bin/zold #{arg}`
|
|
43
|
+
@exitstatus = $CHILD_STATUS.exitstatus
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
Then(/^Stdout contains "([^"]*)"$/) do |txt|
|
|
47
|
+
unless @stdout.include?(txt)
|
|
48
|
+
raise "STDOUT doesn't contain '#{txt}':\n#{@stdout}"
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
Then(/^Stdout is empty$/) do
|
|
53
|
+
raise "STDOUT is not empty:\n#{@stdout}" unless @stdout == ''
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
Then(/^Exit code is zero$/) do
|
|
57
|
+
raise "Non-zero exit #{@exitstatus}:\n#{@stdout}" unless @exitstatus.zero?
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
Then(/^Exit code is not zero$/) do
|
|
61
|
+
raise 'Zero exit code' if @exitstatus.zero?
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
Given(/^It is Unix$/) do
|
|
65
|
+
pending if Gem.win_platform?
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
Given(/^It is Windows$/) do
|
|
69
|
+
pending unless Gem.win_platform?
|
|
70
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2018 Zerocracy, Inc.
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
require 'simplecov'
|
|
24
|
+
require_relative '../../lib/zold'
|
data/lib/zold.rb
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2018 Zerocracy, Inc.
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
require 'rainbow'
|
|
24
|
+
require_relative 'zold/version'
|
|
25
|
+
|
|
26
|
+
# Zold main module.
|
|
27
|
+
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
28
|
+
# Copyright:: Copyright (c) 2018 Zerocracy, Inc.
|
|
29
|
+
# License:: MIT
|
|
30
|
+
module Zold
|
|
31
|
+
# to be implemented...
|
|
32
|
+
end
|
data/lib/zold/version.rb
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2018 Zerocracy, Inc.
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
# Zold main module.
|
|
24
|
+
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
25
|
+
# Copyright:: Copyright (c) 2018 Zerocracy, Inc.
|
|
26
|
+
# License:: MIT
|
|
27
|
+
module Zold
|
|
28
|
+
VERSION = '0.0.1'.freeze
|
|
29
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2018 Zerocracy, Inc.
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
STDOUT.sync = true
|
|
24
|
+
|
|
25
|
+
require 'simplecov'
|
|
26
|
+
SimpleCov.start
|
|
27
|
+
if ENV['CI'] == 'true'
|
|
28
|
+
require 'codecov'
|
|
29
|
+
SimpleCov.formatter = SimpleCov::Formatter::Codecov
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
require 'minitest/autorun'
|
|
33
|
+
require_relative '../lib/zold'
|
data/test/test_zold.rb
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2018 Zerocracy, Inc.
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
require 'minitest/autorun'
|
|
24
|
+
require 'tmpdir'
|
|
25
|
+
require_relative '../lib/zold'
|
|
26
|
+
|
|
27
|
+
# Zold main module test.
|
|
28
|
+
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
29
|
+
# Copyright:: Copyright (c) 2018 Zerocracy, Inc.
|
|
30
|
+
# License:: MIT
|
|
31
|
+
class TestZold < Minitest::Test
|
|
32
|
+
def test_basic
|
|
33
|
+
Dir.mktmpdir 'test' do |dir|
|
|
34
|
+
# tbd...
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
data/zold.gemspec
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2018 Zerocracy, Inc.
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
require 'English'
|
|
24
|
+
|
|
25
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
26
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
27
|
+
require_relative 'lib/zold/version'
|
|
28
|
+
|
|
29
|
+
Gem::Specification.new do |s|
|
|
30
|
+
s.specification_version = 2 if s.respond_to? :specification_version=
|
|
31
|
+
if s.respond_to? :required_rubygems_version=
|
|
32
|
+
s.required_rubygems_version = Gem::Requirement.new('>= 0')
|
|
33
|
+
end
|
|
34
|
+
s.rubygems_version = '2.2.2'
|
|
35
|
+
s.required_ruby_version = '>= 1.9.3'
|
|
36
|
+
s.name = 'zold'
|
|
37
|
+
s.version = Zold::VERSION
|
|
38
|
+
s.license = 'MIT'
|
|
39
|
+
s.summary = 'ZOLD, a cryptocurrency'
|
|
40
|
+
s.description = 'Non-blockchain cryptocurrency'
|
|
41
|
+
s.authors = ['Yegor Bugayenko']
|
|
42
|
+
s.email = 'yegor256@gmail.com'
|
|
43
|
+
s.homepage = 'http://github.com/yegor256/zold'
|
|
44
|
+
s.files = `git ls-files`.split($RS)
|
|
45
|
+
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
46
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
|
47
|
+
s.rdoc_options = ['--charset=UTF-8']
|
|
48
|
+
s.extra_rdoc_files = ['README.md', 'LICENSE.txt']
|
|
49
|
+
s.add_runtime_dependency 'nokogiri', '~>1.8'
|
|
50
|
+
s.add_runtime_dependency 'slop', '~>4.4'
|
|
51
|
+
s.add_runtime_dependency 'rainbow', '~>2.2'
|
|
52
|
+
s.add_development_dependency 'rake', '12.0.0'
|
|
53
|
+
s.add_development_dependency 'codecov', '0.1.10'
|
|
54
|
+
s.add_development_dependency 'rdoc', '4.2.0'
|
|
55
|
+
s.add_development_dependency 'cucumber', '1.3.17'
|
|
56
|
+
s.add_development_dependency 'minitest', '5.5.0'
|
|
57
|
+
s.add_development_dependency 'rubocop', '~>0.49.0'
|
|
58
|
+
s.add_development_dependency 'rubocop-rspec', '1.5.1'
|
|
59
|
+
s.add_development_dependency 'rspec-rails', '3.1.0'
|
|
60
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: zold
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Yegor Bugayenko
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2018-01-30 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: nokogiri
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '1.8'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '1.8'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: slop
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '4.4'
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '4.4'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rainbow
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '2.2'
|
|
48
|
+
type: :runtime
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '2.2'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: rake
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - '='
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: 12.0.0
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - '='
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: 12.0.0
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: codecov
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - '='
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: 0.1.10
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - '='
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: 0.1.10
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: rdoc
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - '='
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: 4.2.0
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - '='
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: 4.2.0
|
|
97
|
+
- !ruby/object:Gem::Dependency
|
|
98
|
+
name: cucumber
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - '='
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: 1.3.17
|
|
104
|
+
type: :development
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - '='
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: 1.3.17
|
|
111
|
+
- !ruby/object:Gem::Dependency
|
|
112
|
+
name: minitest
|
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
|
114
|
+
requirements:
|
|
115
|
+
- - '='
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: 5.5.0
|
|
118
|
+
type: :development
|
|
119
|
+
prerelease: false
|
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
+
requirements:
|
|
122
|
+
- - '='
|
|
123
|
+
- !ruby/object:Gem::Version
|
|
124
|
+
version: 5.5.0
|
|
125
|
+
- !ruby/object:Gem::Dependency
|
|
126
|
+
name: rubocop
|
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
|
128
|
+
requirements:
|
|
129
|
+
- - "~>"
|
|
130
|
+
- !ruby/object:Gem::Version
|
|
131
|
+
version: 0.49.0
|
|
132
|
+
type: :development
|
|
133
|
+
prerelease: false
|
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
+
requirements:
|
|
136
|
+
- - "~>"
|
|
137
|
+
- !ruby/object:Gem::Version
|
|
138
|
+
version: 0.49.0
|
|
139
|
+
- !ruby/object:Gem::Dependency
|
|
140
|
+
name: rubocop-rspec
|
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
|
142
|
+
requirements:
|
|
143
|
+
- - '='
|
|
144
|
+
- !ruby/object:Gem::Version
|
|
145
|
+
version: 1.5.1
|
|
146
|
+
type: :development
|
|
147
|
+
prerelease: false
|
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
149
|
+
requirements:
|
|
150
|
+
- - '='
|
|
151
|
+
- !ruby/object:Gem::Version
|
|
152
|
+
version: 1.5.1
|
|
153
|
+
- !ruby/object:Gem::Dependency
|
|
154
|
+
name: rspec-rails
|
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
|
156
|
+
requirements:
|
|
157
|
+
- - '='
|
|
158
|
+
- !ruby/object:Gem::Version
|
|
159
|
+
version: 3.1.0
|
|
160
|
+
type: :development
|
|
161
|
+
prerelease: false
|
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
163
|
+
requirements:
|
|
164
|
+
- - '='
|
|
165
|
+
- !ruby/object:Gem::Version
|
|
166
|
+
version: 3.1.0
|
|
167
|
+
description: Non-blockchain cryptocurrency
|
|
168
|
+
email: yegor256@gmail.com
|
|
169
|
+
executables:
|
|
170
|
+
- zold
|
|
171
|
+
extensions: []
|
|
172
|
+
extra_rdoc_files:
|
|
173
|
+
- README.md
|
|
174
|
+
- LICENSE.txt
|
|
175
|
+
files:
|
|
176
|
+
- ".0pdd.yml"
|
|
177
|
+
- ".gitattributes"
|
|
178
|
+
- ".gitignore"
|
|
179
|
+
- ".pdd"
|
|
180
|
+
- ".rubocop.yml"
|
|
181
|
+
- ".rultor.yml"
|
|
182
|
+
- ".simplecov"
|
|
183
|
+
- ".travis.yml"
|
|
184
|
+
- CONTRIBUTING.md
|
|
185
|
+
- Gemfile
|
|
186
|
+
- LICENSE.txt
|
|
187
|
+
- README.md
|
|
188
|
+
- Rakefile
|
|
189
|
+
- appveyor.yml
|
|
190
|
+
- bin/zold
|
|
191
|
+
- cucumber.yml
|
|
192
|
+
- features/cli.feature
|
|
193
|
+
- features/gem_package.feature
|
|
194
|
+
- features/step_definitions/steps.rb
|
|
195
|
+
- features/support/env.rb
|
|
196
|
+
- lib/zold.rb
|
|
197
|
+
- lib/zold/version.rb
|
|
198
|
+
- test/test__helper.rb
|
|
199
|
+
- test/test_zold.rb
|
|
200
|
+
- zold.gemspec
|
|
201
|
+
homepage: http://github.com/yegor256/zold
|
|
202
|
+
licenses:
|
|
203
|
+
- MIT
|
|
204
|
+
metadata: {}
|
|
205
|
+
post_install_message:
|
|
206
|
+
rdoc_options:
|
|
207
|
+
- "--charset=UTF-8"
|
|
208
|
+
require_paths:
|
|
209
|
+
- lib
|
|
210
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
211
|
+
requirements:
|
|
212
|
+
- - ">="
|
|
213
|
+
- !ruby/object:Gem::Version
|
|
214
|
+
version: 1.9.3
|
|
215
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
216
|
+
requirements:
|
|
217
|
+
- - ">="
|
|
218
|
+
- !ruby/object:Gem::Version
|
|
219
|
+
version: '0'
|
|
220
|
+
requirements: []
|
|
221
|
+
rubyforge_project:
|
|
222
|
+
rubygems_version: 2.6.8
|
|
223
|
+
signing_key:
|
|
224
|
+
specification_version: 2
|
|
225
|
+
summary: ZOLD, a cryptocurrency
|
|
226
|
+
test_files:
|
|
227
|
+
- features/cli.feature
|
|
228
|
+
- features/gem_package.feature
|
|
229
|
+
- features/step_definitions/steps.rb
|
|
230
|
+
- features/support/env.rb
|
|
231
|
+
- test/test__helper.rb
|
|
232
|
+
- test/test_zold.rb
|