zold 0.11 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ce4ce27a96a2d3e7a2963085d9e8491e05da7ad
4
- data.tar.gz: 9d076c04d1069838250f23e2aadeaab2fe82885b
3
+ metadata.gz: a4a46ff8dfd2a4472ff5d8f9fb520a94d0ad81a5
4
+ data.tar.gz: bde2bcb8514a8dde05c336ac86174251f16345fe
5
5
  SHA512:
6
- metadata.gz: 7d31759b7f5e16ed3701b05a97599dbf65172afc36ff72f7df85892cf123cd8c0cda09565b60ebe433c0593b56be397a73c19ddf30bc48097dee91b1eb9d40cc
7
- data.tar.gz: 2fa2524412411a98fdf9c90e34655913e83e2081c1fe1db1873ed6a7cf2d0d8ea80a26053018889ad82779817c3252f2e3d1f39d3bb703e6d83fa55157f93bac
6
+ metadata.gz: 3dd9aab9858124ca278be87f6a750d8252a02fb83a33599bfb86db6388419c37d5720ca7455d1bbbf326db5c99439a2b32e998b499f9f0d98643c2a62072690e
7
+ data.tar.gz: d4b0462fd4b2abcdd728d10e630914a84f997808cad6734d796f780fed7cbbe689b8fedc19267adadf2b31e7ecc49a48317c9b661acce3f9fed07a321f00476e
data/bin/zold-nohup CHANGED
@@ -1,4 +1,6 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env ruby
2
+ # encoding: utf-8
3
+ #
2
4
  # Copyright (c) 2018 Yegor Bugayenko
3
5
  #
4
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -19,6 +21,10 @@
19
21
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
22
  # SOFTWARE.
21
23
 
22
- args=$@
24
+ if ARGV.include?('--skip-install')
25
+ cmd = 'echo re-run'
26
+ else
27
+ cmd = 'gem install zold'
28
+ end
23
29
 
24
- nohup bash -c 'while zold ${args}; do gem install zold; done'
30
+ `nohup bash -c 'while zold #{ARGV.join(' ')}; do #{cmd}; done'`
data/features/cli.feature CHANGED
@@ -15,3 +15,6 @@ Feature: Command Line Processing
15
15
  When I run bin/zold with "--trace --public-key=id_rsa.pub create"
16
16
  Then Exit code is zero
17
17
 
18
+ Scenario: Failure through nohup
19
+ When I run bin/zold-nohup with "badcommand --skip-install"
20
+ Then Exit code is zero
@@ -4,7 +4,7 @@ Feature: Gem Package
4
4
 
5
5
  Scenario: Gem can be packaged
6
6
  Given It is Unix
7
- Given I have a "execs.rb" file with content:
7
+ Given I have "execs.rb" file with content:
8
8
  """
9
9
  #!/usr/bin/env ruby
10
10
  require 'rubygems'
@@ -15,6 +15,8 @@ Feature: Gem Package
15
15
  """
16
16
  When I run bash with:
17
17
  """
18
+ set -x
19
+ set -e
18
20
  cd zold
19
21
  gem build zold.gemspec
20
22
  gem specification --ruby zold-*.gem > ../spec.rb
@@ -37,12 +37,25 @@ After do
37
37
  FileUtils.rm_rf(@dir) if File.exist?(@dir)
38
38
  end
39
39
 
40
- When(%r{^I run bin/zold with "([^"]*)"$}) do |arg|
40
+ When(%r{^I run ([a-z/-]+) with "([^"]*)"$}) do |cmd, args|
41
41
  home = File.join(File.dirname(__FILE__), '../..')
42
- @stdout = `ruby -I#{home}/lib #{home}/bin/zold #{arg}`
42
+ @stdout = `ruby -I#{home}/lib #{home}/#{cmd} #{args}`
43
43
  @exitstatus = $CHILD_STATUS.exitstatus
44
44
  end
45
45
 
46
+ When(/^I run bash with:$/) do |text|
47
+ FileUtils.copy_entry(@cwd, File.join(@dir, 'zold'))
48
+ @stdout = `#{text}`
49
+ @exitstatus = $CHILD_STATUS.exitstatus
50
+ end
51
+
52
+ When(/^I have "([^"]*)" file with content:$/) do |file, text|
53
+ FileUtils.mkdir_p(File.dirname(file)) unless File.exist?(file)
54
+ File.open(file, 'w:ASCII-8BIT') do |f|
55
+ f.write(text.gsub(/\\xFF/, 0xFF.chr))
56
+ end
57
+ end
58
+
46
59
  Then(/^Stdout contains "([^"]*)"$/) do |txt|
47
60
  raise "STDOUT doesn't contain '#{txt}':\n#{@stdout}" unless @stdout.include?(txt)
48
61
  end
data/lib/zold/version.rb CHANGED
@@ -23,5 +23,5 @@
23
23
  # Copyright:: Copyright (c) 2018 Yegor Bugayenko
24
24
  # License:: MIT
25
25
  module Zold
26
- VERSION = '0.11'.freeze
26
+ VERSION = '0.11.1'.freeze
27
27
  end
data/zold.gemspec CHANGED
@@ -28,18 +28,28 @@ Gem::Specification.new do |s|
28
28
  s.specification_version = 2 if s.respond_to? :specification_version=
29
29
  s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
30
30
  s.rubygems_version = '2.2'
31
- s.required_ruby_version = '>= 2.2'
31
+ s.required_ruby_version = '~>2.2'
32
32
  s.name = 'zold'
33
33
  s.version = Zold::VERSION
34
34
  s.license = 'MIT'
35
- s.summary = 'ZOLD, a cryptocurrency'
36
- s.description = 'Non-blockchain cryptocurrency'
35
+ s.summary = 'A fast cryptocurrency for micro payments'
36
+ s.description = 'In the last few years digital currencies have successfully demonstrated
37
+ their ability to become an alternative financial instrument in many
38
+ different markets. Most of the technologies available at the moment are
39
+ based on the principles of Blockchain architecture, including
40
+ dominating currencies like Bitcoin and Etherium. Despite its
41
+ popularity, Blockchain is not the best possible solution for all scenarios.
42
+ One such example is for fast micro-payments.
43
+ Zold is an experimental alternative that enables distributed transactions between
44
+ anonymous users, making micro-payments financially feasible.
45
+ It borrows the proof-of-work principle from Bitcoin,
46
+ and suggests a different architecture for digital wallet maintenance.'
37
47
  s.authors = ['Yegor Bugayenko']
38
48
  s.email = 'yegor256@gmail.com'
39
49
  s.homepage = 'http://github.com/zold-io/zold'
40
50
  s.files = `git ls-files`.split($RS)
41
51
  s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
42
- s.test_files = s.files.grep(%r{^(test|spec|features|wp)/})
52
+ s.test_files = s.files.grep(%r{^(test|features)/})
43
53
  s.rdoc_options = ['--charset=UTF-8']
44
54
  s.extra_rdoc_files = ['README.md', 'LICENSE.txt']
45
55
  s.add_runtime_dependency 'concurrent-ruby', '~>1.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zold
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.11'
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-06 00:00:00.000000000 Z
11
+ date: 2018-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -262,7 +262,18 @@ dependencies:
262
262
  - - '='
263
263
  - !ruby/object:Gem::Version
264
264
  version: 3.4.2
265
- description: Non-blockchain cryptocurrency
265
+ description: |-
266
+ In the last few years digital currencies have successfully demonstrated
267
+ their ability to become an alternative financial instrument in many
268
+ different markets. Most of the technologies available at the moment are
269
+ based on the principles of Blockchain architecture, including
270
+ dominating currencies like Bitcoin and Etherium. Despite its
271
+ popularity, Blockchain is not the best possible solution for all scenarios.
272
+ One such example is for fast micro-payments.
273
+ Zold is an experimental alternative that enables distributed transactions between
274
+ anonymous users, making micro-payments financially feasible.
275
+ It borrows the proof-of-work principle from Bitcoin,
276
+ and suggests a different architecture for digital wallet maintenance.
266
277
  email: yegor256@gmail.com
267
278
  executables:
268
279
  - zold
@@ -399,7 +410,7 @@ require_paths:
399
410
  - lib
400
411
  required_ruby_version: !ruby/object:Gem::Requirement
401
412
  requirements:
402
- - - ">="
413
+ - - "~>"
403
414
  - !ruby/object:Gem::Version
404
415
  version: '2.2'
405
416
  required_rubygems_version: !ruby/object:Gem::Requirement
@@ -412,7 +423,7 @@ rubyforge_project:
412
423
  rubygems_version: 2.6.8
413
424
  signing_key:
414
425
  specification_version: 2
415
- summary: ZOLD, a cryptocurrency
426
+ summary: A fast cryptocurrency for micro payments
416
427
  test_files:
417
428
  - features/cli.feature
418
429
  - features/gem_package.feature