Welcome to AGSExplorer
AGSExplorer (agsexplorer.com) is an blockchain based AngelShares explorer. It's created to help donator to view real-time donation in BTC and PTS, help decide when and what amount to donate and check AGS balance. If you don't know what AngelShares is, please visit invictus-innovations.com/angelshares for more information.
This is a typical Rails application, it follows many conventions of Rails. Requires Ruby 1.9+.
1.Install Dependent Gems
2.Setup Configuration Files
# application configs cp config/app_config.rb.sample config/app_config.rb # database connection, by default postgresql db cp config/database.yml.sample config/database.yml # deployment recipe, rely on multiple-stage capistrano cp config/deploy/production.rb.sample config/deploy/production.rb
3.Run DB migrate
# migrate db structure bundle exec rake db:migrate
Blockchain data is previously powered by @Donschoe's AGS-PARSE v0.5 (github.com/donSchoe/ags-parser)
Now it's using optimized version of ags-parser, check it out at github.com/AlexChien/ags-parser
# wipe out db data and re-parse data from day1 bundle exec rake donation:reset
Useful Rake tasks
# wipe out db data and re-parse data from day1 bundle exec rake donation:reset # calcuate AGS reward for specific day, default yesterday bundle exec rake donation:calculate_ags_reward # calculate AGS reward from day1 till xx, default yesterday bundle exec rake donation:calculate_ags_reward_till
Whenever gem provides easy access to cron jobs, view config/schedule.rb for detail. Several cron jobs are created by default.
Every 1 minute, fetch new data and parse them.
Every 1 minute, fetch price ticker from bter.com for BTC/PTS/USD.
Every day and 00:02am, calculate yesterday's AGS reward for each donation.
Every day and 00:02am, calculate wallet's AGS balance.
1.A nginx conf sample can be found in config/deploy/nginx.conf.erb, view capistrano-nginx(github.com/ivalkeen/capistrano-nginx) for more information
cap production nginx:setup #setup nginx conf cap production nginx:reload #tell nginx to reload conf
2.Multiple-stage capistrano deployment, view capistano-multistage(github.com/TechnoGate/capistrano-multistage) for more information
cap production deploy # make full deployment on producton server cap staging deploy:restart #restart app on staging server
Create your feature branch (git checkout -b my-new-feature)
Commit your changes (git commit -am 'Added some feature')
Push to the branch (git push origin my-new-feature)
Create new Pull Request
Written in 2014 by Alex Chien (Boombastic), contact me at alexchien97[at]gmail.com. Licensed under the GPLv3.
Donations are welcome: