Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
geraldb committed Nov 1, 2020
1 parent 35fe33b commit 9d0c001
Show file tree
Hide file tree
Showing 8 changed files with 137 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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



Expand Down
35 changes: 35 additions & 0 deletions p2p/.gitignore
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions p2p/HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### 0.0.1 / 2018-01-27

* Everything is new. First release
6 changes: 6 additions & 0 deletions p2p/Manifest.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
HISTORY.md
Manifest.txt
README.md
Rakefile
lib/p2p.rb
lib/p2p/version.rb
29 changes: 29 additions & 0 deletions p2p/README.md
Original file line number Diff line number Diff line change
@@ -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!
29 changes: 29 additions & 0 deletions p2p/Rakefile
Original file line number Diff line number Diff line change
@@ -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 = '[email protected]'

# 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
11 changes: 11 additions & 0 deletions p2p/lib/p2p.rb
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions p2p/lib/p2p/version.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9d0c001

Please sign in to comment.