Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
Merge commit 'a161bb66a6ef413d3cbf7b932ad62c4c5b77242c' into tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JesusGautamah committed Jan 21, 2023
2 parents 1b57f96 + a161bb6 commit a9ae4e8
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 21 deletions.
4 changes: 4 additions & 0 deletions .env → .env_sample
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ CONTRACTS_LIMIT=2
SIGNATURES_LIMIT=5
REDIS_URL=redis://redis:6379
ENV_MACHINE=docker
GOOGLE_ANALYTICS_ID=UA-XXXXXXXX-X
FIRESTORE_PROJECT_ID=YOUR_FIRESTORE_PROJECT_ID
FIRESTORE_KEY_FILE=YOUR_FIRESTORE_KEY_FILE
FIRESTORE_KEY_FILE_PATH=YOUR_FIRESTORE_KEY_FILE_PATH

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@
/coverage
/coverage/*
osbc-*.gem
.env
/.env
/.env.*
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ gem "rails-controller-testing", "~> 1.0"
# Active Record Import
gem "activerecord-import"

# Google Firestore
gem "google-cloud-firestore", "~> 2.6"


# Use Sass to process CSS
# gem "sassc-rails"
Expand Down
61 changes: 61 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,57 @@ GEM
railties (>= 5.0.0)
faker (2.23.0)
i18n (>= 1.8.11, < 2)
faraday (2.7.4)
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.2)
faraday-retry (2.0.0)
faraday (~> 2.0)
gapic-common (0.16.0)
faraday (>= 1.9, < 3.a)
faraday-retry (>= 1.0, < 3.a)
google-protobuf (~> 3.14)
googleapis-common-protos (>= 1.3.12, < 2.a)
googleapis-common-protos-types (>= 1.3.1, < 2.a)
googleauth (~> 1.0)
grpc (~> 1.36)
globalid (1.0.1)
activesupport (>= 5.0)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.0)
google-cloud-firestore (2.8.0)
concurrent-ruby (~> 1.0)
google-cloud-core (~> 1.5)
google-cloud-firestore-v1 (~> 0.0)
rbtree (~> 0.4.2)
google-cloud-firestore-v1 (0.8.0)
gapic-common (>= 0.10, < 2.a)
google-cloud-errors (~> 1.0)
google-cloud-location (>= 0.0, < 2.a)
google-cloud-location (0.3.0)
gapic-common (>= 0.16.0, < 2.a)
google-cloud-errors (~> 1.0)
google-protobuf (3.21.12)
googleapis-common-protos (1.4.0)
google-protobuf (~> 3.14)
googleapis-common-protos-types (~> 1.2)
grpc (~> 1.27)
googleapis-common-protos-types (1.5.0)
google-protobuf (~> 3.14)
googleauth (1.3.0)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
grpc (1.50.0)
google-protobuf (~> 3.21)
googleapis-common-protos-types (~> 1.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
importmap-rails (1.1.5)
Expand All @@ -121,6 +170,7 @@ GEM
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
json (2.6.3)
jwt (2.6.0)
loofah (2.19.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
Expand All @@ -131,10 +181,12 @@ GEM
net-smtp
marcel (1.0.2)
matrix (0.4.2)
memoist (0.16.2)
method_source (1.0.0)
mini_mime (1.1.2)
minitest (5.17.0)
msgpack (1.6.0)
multi_json (1.15.0)
net-imap (0.3.4)
date
net-protocol
Expand All @@ -148,6 +200,7 @@ GEM
nokogiri (1.14.0-x86_64-linux)
racc (~> 1.4)
orm_adapter (0.5.0)
os (1.1.4)
parallel (1.22.1)
parser (3.2.0.0)
ast (~> 2.4.1)
Expand Down Expand Up @@ -191,6 +244,7 @@ GEM
zeitwerk (~> 2.5)
rainbow (3.1.1)
rake (13.0.6)
rbtree (0.4.6)
redis (4.8.0)
regexp_parser (2.6.2)
responders (3.0.1)
Expand Down Expand Up @@ -236,6 +290,7 @@ GEM
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
ruby-progressbar (1.11.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
selenium-webdriver (4.7.1)
rexml (~> 3.2, >= 3.2.5)
Expand All @@ -247,6 +302,11 @@ GEM
connection_pool (>= 2.2.5, < 3)
rack (~> 2.0)
redis (>= 4.5.0, < 5)
signet (0.17.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
Expand Down Expand Up @@ -313,6 +373,7 @@ DEPENDENCIES
devise (~> 4.8)
factory_bot_rails (~> 6.2)
faker (~> 2.23)
google-cloud-firestore (~> 2.6)
importmap-rails (~> 1.1)
jbuilder (~> 2.11)
pg (~> 1.4)
Expand Down
45 changes: 28 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,43 @@
# <img src="https://osbc-blockchain.herokuapp.com/assets/logo-70825bc795d25668cf4f11b06b990ed0d1c2cae887acce0625e5059226a7946a.png" width="25" height="25"> Outerspace Blockchain
<!-- Outerspace Logo -->

### This application is instable and under development.
### Please, use it with caution and at your own risk.
### A Ruby implementation of web blockchain framework.
#### Developed using TDD (Test Driven Development).
#### Github Actions CI/CD pipeline.
#### Chrome Selenium tests are used to test the blockchain in a browser and its interaction with the blockchain.
#### Chrome Selenium are included in the docker compose without any additional setup.
#### Firestore is used to store the blockchain.

#### Simplecov is used to test code coverage.

#### Rails Engine is used to create the blockchain.
#### Tailwind CSS is used to style the blockchain web interface.

#### Rspec is used to test the blockchain.

## Build Version: 0.1.9
### Last Update:
#### Edited Gemspec
#### Edited Readme
##### TODO
###### Add more tests
###### Add more features
###### Include pagination
###### Create Queries Folder
###### Test in kubernetes
###### Add more documentation
###### Add NFT Generator
###### Increase the environment variables for autoconfig
###### Add features to autogeneration of blockchain for better configuration
## Build Version: 0.2.0

## Todo
* [ ] Firebase integration (this will be use instead of Redis management)
* [ ] Add and correct tests
* [ ] Add and correct documentation
* [ ] Add user verification methods
* [ ] Better mobile layout
* [ ] Create the price visualization and the price history api
* [ ] Add more blockchain features
* [ ] Add more blockchain tests
* [ ] Add more blockchain documentation
* [ ] Add nft's classification class
* [ ] Add nft's modularization class
* [ ] Add nft's generator class
* [ ] Benchmark blockchain and mining
* [ ] Create a blockchain explorer
* [ ] Create a default blockchain wallet android app generator with flutter
* [ ] Create generators that will work with rails and flutter at the same time
* [ ] Create the user marketplace
* [ ] Integrate Blockchain Api in other projects

Kubernets integration will be worked on in the future.

## System dependencies
1. Docker
Expand All @@ -52,7 +64,6 @@ gem install osbc
```bash
osbc PATH
```

### Compile OSBC from source
========================
<!-- Compile OSBC from source -->
Expand Down
9 changes: 9 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= ENV['GOOGLE_ANALYTICS_ID'] %>"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', '<%= ENV['GOOGLE_ANALYTICS_ID'] %>');
</script>
<title>OuterspaceBlockchain</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
Expand Down
2 changes: 2 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

Rails.application.configure do
config.hosts << "lvh.me"
config.hosts << "outerspacecoding.com"
config.hosts << "osbc.outerspacecoding.com"
# Settings specified here will take precedence over those in config/application.rb.

# In the development environment your application's code is reloaded any time
Expand Down
8 changes: 4 additions & 4 deletions mining_concept.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@
}
],
"source": [
"key = '9e8b3f4bf92577861e06e3bc84a809794dd6a7ab9da1070a78eb763b3399595a'\n",
"secret = 'a239c12ecc42911ecbc3b23a9539976caaa60f7d40028dea17cb67cc538c21bd'\n",
"key = \n",
"secret = \n",
"\n",
"headers = {\n",
" 'X-API-KEY': key,\n",
Expand Down Expand Up @@ -245,7 +245,7 @@
}
],
"source": [
"hash_to_send = '99893b819abfa80498f244fddd080f570cecdc994199d5c6a8148141401cdff1'\n",
"hash_to_send = \n",
"\n",
"params = { 'user_confirmation_hash' : hash_to_send }\n",
"confirm_request = re.post('http://localhost/api/v1/confirm_block', headers=headers, params=params)\n",
Expand All @@ -270,7 +270,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.2"
"version": "3.9.2 (default, Feb 28 2021, 17:03:44) \n[GCC 10.2.1 20210110]"
},
"orig_nbformat": 4,
"vscode": {
Expand Down

0 comments on commit a9ae4e8

Please sign in to comment.