From 52ec1746c7fe9b47484d70e97116a6e9cba535b1 Mon Sep 17 00:00:00 2001 From: bill auger Date: Tue, 14 Oct 2014 18:11:26 +0000 Subject: [PATCH 1/3] allow config.yml to be loaded pre-processed --- config/application.rb | 3 ++- db/schema.rb | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config/application.rb b/config/application.rb index 59da21f9..56a5ea04 100644 --- a/config/application.rb +++ b/config/application.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index 9e9da2e7..cbbbdc9d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -176,6 +176,7 @@ add_index "tipping_policies_texts", ["user_id"], name: "index_tipping_policies_texts_on_user_id" create_table "tips", force: true do |t| + t.integer "user_id" t.integer "amount", limit: 8 t.integer "distribution_id" t.datetime "created_at" @@ -187,7 +188,6 @@ t.string "comment" t.integer "reason_id" t.string "reason_type" - t.integer "user_id" end add_index "tips", ["distribution_id"], name: "index_tips_on_distribution_id" @@ -196,6 +196,7 @@ add_index "tips", ["user_id"], name: "index_tips_on_user_id" create_table "users", force: true do |t| + t.string "email", default: "", null: false t.string "encrypted_password", default: "", null: false t.string "reset_password_token" t.datetime "reset_password_sent_at" @@ -207,6 +208,7 @@ t.string "last_sign_in_ip" t.datetime "created_at" t.datetime "updated_at" + t.string "nickname" t.string "name" t.string "image" t.string "bitcoin_address" @@ -219,13 +221,12 @@ t.datetime "confirmed_at" t.datetime "confirmation_sent_at" t.string "unconfirmed_email" - t.string "email" - t.string "nickname" t.boolean "disabled", default: false t.string "identifier", null: false end add_index "users", ["disabled"], name: "index_users_on_disabled" + add_index "users", ["email"], name: "index_users_on_email", unique: true add_index "users", ["identifier"], name: "index_users_on_identifier", unique: true add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true From 6b7052d26c49f64e355eeccab5519ed867fd08c4 Mon Sep 17 00:00:00 2001 From: bill auger Date: Tue, 14 Oct 2014 19:09:13 +0000 Subject: [PATCH 2/3] add the phantomjs testing requirement to README.md --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e90f04f5..cb49586c 100644 --- a/README.md +++ b/README.md @@ -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" From 29031dfe7dd037bcaf7706e9609cf729fead99a2 Mon Sep 17 00:00:00 2001 From: bill auger Date: Sun, 19 Oct 2014 15:03:56 +0000 Subject: [PATCH 3/3] add coverage/ to .gitinore * this dir exists on the tip4commit fork * added coverage/ to .gitinore to accomodate cross-development across forks --- .gitignore | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c74ce787..f0412bb9 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,8 @@ /config/database.yml /config/config.yml -/public/assets \ No newline at end of file +/public/assets + +# files from other forks +/coverage +