From 9d0c0011b7ad0a3ab292d72cbb0c23fae413885b Mon Sep 17 00:00:00 2001 From: Gerald Bauer Date: Sun, 1 Nov 2020 17:57:18 +0100 Subject: [PATCH] up --- README.md | 2 +- p2p/.gitignore | 35 +++++++++++++++++++++++++++++++++++ p2p/HISTORY.md | 3 +++ p2p/Manifest.txt | 6 ++++++ p2p/README.md | 29 +++++++++++++++++++++++++++++ p2p/Rakefile | 29 +++++++++++++++++++++++++++++ p2p/lib/p2p.rb | 11 +++++++++++ p2p/lib/p2p/version.rb | 23 +++++++++++++++++++++++ 8 files changed, 137 insertions(+), 1 deletion(-) create mode 100644 p2p/.gitignore create mode 100644 p2p/HISTORY.md create mode 100644 p2p/Manifest.txt create mode 100644 p2p/README.md create mode 100644 p2p/Rakefile create mode 100644 p2p/lib/p2p.rb create mode 100644 p2p/lib/p2p/version.rb diff --git a/README.md b/README.md index d6ab314..85ab8a8 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Gems: - [blockchain-lite](blockchain-lite) - build your own blockchain with crypto hashes - revolutionize the world with blockchains, blockchains, blockchains one block at a time - [merkletree](merkletree) - build your own crypto hash trees; named after Ralph Merkle who patented hash trees in 1979 (the patent expired in 2002); grow your own money on trees - [ledger-lite](ledger-lite) - hyper ledger book for the distributed blockchain internet era; add your transactions one block at a time; transfer crypto(currencie)s and balance the accounts - +- [p2p](p2p) - build your own peer-to-peer (p2p) networks; run your own peer-to-peer (p2p) nodes over HTTP diff --git a/p2p/.gitignore b/p2p/.gitignore new file mode 100644 index 0000000..28f4849 --- /dev/null +++ b/p2p/.gitignore @@ -0,0 +1,35 @@ +*.gem +*.rbc +/.config +/coverage/ +/InstalledFiles +/pkg/ +/spec/reports/ +/test/tmp/ +/test/version_tmp/ +/tmp/ + +## Specific to RubyMotion: +.dat* +.repl_history +build/ + +## Documentation cache and generated files: +/.yardoc/ +/_yardoc/ +/doc/ +/rdoc/ + +## Environment normalisation: +/.bundle/ +/vendor/bundle +/lib/bundler/man/ + +# for a library or gem, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# Gemfile.lock +# .ruby-version +# .ruby-gemset + +# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: +.rvmrc diff --git a/p2p/HISTORY.md b/p2p/HISTORY.md new file mode 100644 index 0000000..a59330a --- /dev/null +++ b/p2p/HISTORY.md @@ -0,0 +1,3 @@ +### 0.0.1 / 2018-01-27 + +* Everything is new. First release diff --git a/p2p/Manifest.txt b/p2p/Manifest.txt new file mode 100644 index 0000000..80379bb --- /dev/null +++ b/p2p/Manifest.txt @@ -0,0 +1,6 @@ +HISTORY.md +Manifest.txt +README.md +Rakefile +lib/p2p.rb +lib/p2p/version.rb diff --git a/p2p/README.md b/p2p/README.md new file mode 100644 index 0000000..69e7549 --- /dev/null +++ b/p2p/README.md @@ -0,0 +1,29 @@ +# Peer-to-Peer (P2P) + +build your own peer-to-peer (p2p) networks; run your own peer-to-peer (p2p) nodes over HTTP + + +## Usage + +to be done + + + + +## Install + +Just install the gem: + + $ gem install p2p + + +## License + +The `p2p` scripts are dedicated to the public domain. +Use it as you please with no restrictions whatsoever. + + +## Questions? Comments? + +Send them along to the [wwwmake forum](http://groups.google.com/group/wwwmake). +Thanks! diff --git a/p2p/Rakefile b/p2p/Rakefile new file mode 100644 index 0000000..867a8fb --- /dev/null +++ b/p2p/Rakefile @@ -0,0 +1,29 @@ +require 'hoe' +require './lib/p2p/version.rb' + +Hoe.spec 'p2p' do + + self.version = PeerToPeer::VERSION + + self.summary = "p2p - build your own peer-to-peer (p2p) networks; run your own peer-to-peer (p2p) nodes over HTTP" + self.description = summary + + self.urls = ['https://github.com/openblockchains/peer-to-peer.rb'] + + self.author = 'Gerald Bauer' + self.email = 'wwwmake@googlegroups.com' + + # switch extension to .markdown for gihub formatting + self.readme_file = 'README.md' + self.history_file = 'HISTORY.md' + + self.extra_deps = [ + ] + + self.licenses = ['Public Domain'] + + self.spec_extras = { + required_ruby_version: '>= 2.3' + } + +end diff --git a/p2p/lib/p2p.rb b/p2p/lib/p2p.rb new file mode 100644 index 0000000..d4808e4 --- /dev/null +++ b/p2p/lib/p2p.rb @@ -0,0 +1,11 @@ +# encoding: utf-8 + +require 'pp' + + +## our own code +require 'p2p/version' # note: let version always go first + + +pp PeerToPeer.banner +pp PeerToPeer.root diff --git a/p2p/lib/p2p/version.rb b/p2p/lib/p2p/version.rb new file mode 100644 index 0000000..78f70ea --- /dev/null +++ b/p2p/lib/p2p/version.rb @@ -0,0 +1,23 @@ +# encoding: utf-8 + + +module PeerToPeer + + MAJOR = 0 + MINOR = 0 + PATCH = 1 + VERSION = [MAJOR,MINOR,PATCH].join('.') + + def self.version + VERSION + end + + def self.banner + "p2p/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]" + end + + def self.root + "#{File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )}" + end + +end # module PeerToPeer