Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add cross-fork development support files #112

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,10 @@

/config/database.yml
/config/config.yml
/db/seeds.rb

/public/assets

# files from other forks
/coverage

/public/assets
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,17 @@ cp config/config.yml{.example,}
bundle exec rake db:migrate
```

* Make sure `ppcoind` is running with RPC enabled

* Run the server
* Install phantomjs >= 1.8.1 in order to run the cucumber tests

* Make sure `ppcoind` is running with RPC enabled - (see the [ppcoin repo](https://github.com/ppcoin/ppcoin/wiki/Installation))

* Run the server
```
bundle exec rails server
```

* Connect to the server at http://localhost:3000/


To update the project balances run this command:
```
bundle exec rails runner "BalanceUpdater.work"
Expand Down
3 changes: 2 additions & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env)

CONFIG ||= YAML::load(File.open("config/config.yml"))
# load config.yaml preprocessed
CONFIG ||= YAML::load(ERB.new(File.read("config/config.yml")).result)

COIN = 1000000 # ppcoin/src/util.h

Expand Down
174 changes: 174 additions & 0 deletions config/cross-fork-dev/Gemfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
=begin
** DO NOT COMMIT THIS FILE IN THE RAILS ROOT DIR **
bundle then then restore the original
(see: config/cross-fork-dev/cross-fork-dev-REAMDE.md)
cd RAILS_ROOT
mv Gemfile ./Gemfile.bak
cp config/cross-fork-dev/Gemfile.dev ./Gemfile
bundle install --without production mysql postgresql
mv Gemfile.bak ./Gemfile
=end


source 'https://rubygems.org'

ruby '2.0.0'

gem 'rails', '4.0.2'
gem 'mysql2', group: :production
gem 'sass-rails', '~> 4.0.0'
gem 'haml-rails', '~> 0.5.3'
gem 'less-rails', '~> 2.4.2'
gem 'kaminari', '~> 0.15.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'therubyracer', '~> 0.12.0', platforms: :ruby
gem 'jquery-rails', '~> 3.0.4'
gem 'turbolinks', '~> 2.2.0'
gem 'jquery-turbolinks'
gem 'jbuilder', '~> 1.5.3'
gem 'airbrake', '~> 3.1.15'
gem 'devise', '~> 3.2.2'
gem 'omniauth', '~> 1.1.4'
gem 'omniauth-github', github: 'alexandrz/omniauth-github', branch: 'provide_emails'
gem 'octokit', '~> 2.7.0'
gem 'sawyer', '~> 0.5.2'
gem 'twitter_bootstrap_form_for', github: 'stouset/twitter_bootstrap_form_for'
gem 'twitter-bootstrap-rails', github: 'seyhunak/twitter-bootstrap-rails', branch: 'bootstrap3'
# sigmike 'bootstrap_form' bugfix added in https://github.com/tip4commit/tip4commit/pull/74
# has been merged upstream https://github.com/bootstrap-ruby/rails-bootstrap-forms/pull/76
#gem 'bootstrap_form', github: 'sigmike/rails-bootstrap-forms', branch: 'removed_for_on_radio_label'
gem 'bootstrap_form', github: 'bootstrap-ruby/rails-bootstrap-forms'
gem 'sdoc', group: :doc, require: false
gem 'cancancan'
gem 'dusen'
gem 'render_csv'
gem 'demoji'

gem "http_accept_language"
gem 'rails-i18n'
gem "i18n-js"
gem 'kaminari-i18n'
gem 'devise-i18n'

group :development do
gem 'capistrano', '~> 3.0.1'
gem 'capistrano-rvm', '~> 0.1.0', github: 'capistrano/rvm'
gem 'capistrano-bundler', '>= 1.1.0'
gem 'capistrano-rails', '~> 1.1.0'
gem 'debugger', '~> 1.6.5'
end

group :development, :test do
gem 'sqlite3', '~> 1.3.8'
gem 'factory_girl_rails', '~> 4.3.0'
gem 'rspec-rails', '~> 3.0.0.beta'
end

group :test do
gem 'simplecov'
gem 'shoulda-matchers', '~> 2.5.0'
gem 'cucumber-rails', require: false
gem 'database_cleaner'
end







# peer4commit

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'

# Databases
gem 'sqlite3', '~> 1.3.8' , group: :development
gem 'mysql2', group: :mysql
gem 'pg', group: :postgresql

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
gem 'haml-rails', '~> 0.5.3'
gem "less-rails", '~> 2.4.2'

gem 'twitter-bootstrap-rails', github: 'seyhunak/twitter-bootstrap-rails', branch: 'bootstrap3'

gem 'kaminari', '~> 0.15.0'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', '~> 0.12.0', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails', '~> 3.0.4'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks', '~> 2.2.0'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.5.3'

group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end

gem 'devise', '~> 3.2.2'
gem 'omniauth', '~> 1.1.4'
gem 'omniauth-github', github: 'alexandrz/omniauth-github', branch: 'provide_emails'
gem 'cancancan'
gem 'twitter_bootstrap_form_for', github: 'stouset/twitter_bootstrap_form_for'

gem 'octokit', '~> 2.7.0'

# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# Use unicorn as the app server
# gem 'unicorn'

# Use debugger
# gem 'debugger', group: [:development, :test]

group :development do
gem 'capistrano', '~> 3.0.1'
gem 'capistrano-rvm', '~> 0.1.0', github: 'capistrano/rvm'
gem 'capistrano-bundler', '>= 1.1.0'
gem 'capistrano-rails', '~> 1.1.0'
gem 'quiet_assets'
end

gem 'airbrake', '~> 3.1.15'
gem 'httparty'
gem 'whenever'
gem 'rqrcode-rails3'
gem 'exception_notification'
gem 'rack-canonical-host'
gem 'bootstrap_form', github: 'bootstrap-ruby/rails-bootstrap-forms'
gem 'html_pipeline_rails'
gem 'rails_autolink'
gem 'redcarpet'
gem 'sanitize'
gem 'twitter-typeahead-rails'
gem 'commontator', '~> 4.6.0'
gem 'compass-rails'

group :test do
gem 'cucumber-rails', :require => false
# database_cleaner is not required, but highly recommended
gem 'database_cleaner'
gem 'rspec-rails', '~> 3.0.0.beta'
gem 'factory_girl_rails', '~> 4.3.0'
gem 'poltergeist'
gem 'timecop'
gem 'capybara-screenshot'
end
116 changes: 116 additions & 0 deletions config/cross-fork-dev/config.yml.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@

<%
# list local feature branches in their appropriate *_BRANCHES lists below
MY_BRANCHES = %w{master}
TIP4COMMIT_BRANCHES = %w{tip4commit-master tip4commit-new-feature}
PEER4COMMIT_BRANCHES = %w{peer4commit-master peer4commit-new-feature}
PRIME4COMMIT_BRANCHES = %w{prime4commit-master peer4commit-new-feature}
BRANCHES_LISTS_FILENAME = 'config/config.yml' # DEBUG

BRANCH_NAME = `git rev-parse --abbrev-ref HEAD`.strip
IS_MYFORK = MY_BRANCHES.include? BRANCH_NAME
IS_TIP4COMMIT_FORK = TIP4COMMIT_BRANCHES.include? BRANCH_NAME
IS_PEER4COMMIT_FORK = PEER4COMMIT_BRANCHES.include? BRANCH_NAME
IS_PRIME4COMMIT_FORK = PRIME4COMMIT_BRANCHES.include? BRANCH_NAME
%>


<% if IS_MY_FORK %>
<% puts "no app config defined for local branch: '#{BRANCH_NAME}'" %>
<% elsif IS_TIP4COMMIT_FORK %>
github:
key: "111111111111"
secret: "111111111111"
auto_paginate: false
pages: 3
project_pages: {}

blockchain_info:
guid: "111111111111"
password: "111111111111"
callback_secret: "111111111111"

tip: 0.01
min_payout: 100000
our_fee: 0.05

deposit_address: 1M4bS4gPyA6Kb8w7aXsgth9oUZWcRk73tQ

address_versions: # 0/5 for bitcoin addresses, 111/196 for testnet, see chainparams.cpp
- 0
- 5


<% elsif IS_PEER4COMMIT_FORK %>
github:
key: "111111111111"
secret: "111111111111"

daemon:
username: rpcuser
password: rpcpassword
host: localhost
port: 9904
path: /path/to/ppcoin/src/ppcoind

tip: 0.01
min_payout: 1.0 # in PPC
our_fee: 0.05
tipper_delay: "1.hour"

address_versions: # 55/117 for peercoin, 111/196 for testnet, see base58.h
- 111
- 196

# canonical_host: peer4commit.example.com # will redirect all other hostnames to this one


<% elsif IS_PRIME4COMMIT_FORK %>
github:
key: "111111111111"
secret: "111111111111"

daemon:
username: rpcuser
password: rpcpassword
host: localhost
port: 9914
path: /path/to/primecoin/src/primecoind

tip: 0.01
min_payout: 1.0 # in XPM
our_fee: 0.05
tipper_delay: "1.hour"

address_versions: # 23/83 for primecoin, 111/196 for testnet, see base58.h
- 111
- 196

# canonical_host: prime4commit.example.com # will redirect all other hostnames to this one


<% else %>
<% puts "ERROR: config/config.yml - no app config defined for branch: '#{BRANCH_NAME}'" +
" - you must add it to one of the *_BRANCHES lists in #{BRANCHES_LISTS_FILENAME}" %>
<% end %>


devise:
secret: "111111111111"

application:
secret: "111111111111"

smtp_settings:
address: smtp.gmail.com
port: 587
domain: example.com
user_name: example@example.com
password: MY_PASSWORD
authentication: plain
enable_starttls_auto: true

# Uncomment to use airbrake/errbit
# airbrake:
# api_key: 111111111111
# host: errbit.tip4commit.com
Loading