diff options
author | Jonne Haß <me@mrzyx.de> | 2013-09-01 21:23:56 +0400 |
---|---|---|
committer | Jonne Haß <me@mrzyx.de> | 2013-09-01 21:24:44 +0400 |
commit | 991a50543988400913def697b897ba772027183f (patch) | |
tree | dc0b5074dca41cbec60b93b3fdb2f31379ff0573 | |
parent | 99657947a9f37803964c39e1390f5c4bd4afe601 (diff) | |
parent | a4ce4404ff0135912a6fda1629525c9fe7230887 (diff) |
Merge pull request #4485 from colindean/rename_bitcoin_wallet_id
change bitcoin_wallet_id to bitcoin_address
-rw-r--r-- | Changelog.md | 1 | ||||
-rw-r--r-- | app/views/shared/_donatepod.html.haml | 5 | ||||
-rw-r--r-- | app/views/shared/_right_sections.html.haml | 2 | ||||
-rw-r--r-- | config/defaults.yml | 2 | ||||
-rw-r--r-- | config/diaspora.yml.example | 4 | ||||
-rw-r--r-- | features/desktop/donations.feature | 4 | ||||
-rw-r--r-- | features/step_definitions/custom_web_steps.rb | 6 | ||||
-rw-r--r-- | lib/configuration_methods.rb | 11 |
8 files changed, 23 insertions, 12 deletions
diff --git a/Changelog.md b/Changelog.md index 83d042fc5..a378355e7 100644 --- a/Changelog.md +++ b/Changelog.md @@ -3,6 +3,7 @@ ## Refactor * Move non-model federation stuff into lib/ [#4363](https://github.com/diaspora/diaspora/pull/4363) * Build a color palette to uniform color usage [#4437](https://github.com/diaspora/diaspora/pull/4437) [#4469](https://github.com/diaspora/diaspora/pull/4469) [#4479](https://github.com/diaspora/diaspora/pull/4479) +* Rename bitcoin_wallet_id setting to bitcoin_address [#4485](https://github.com/diaspora/diaspora/pull/4485) ## Bug fixes * Highlight down arrow at the user menu on hover [#4441](https://github.com/diaspora/diaspora/pull/4441) diff --git a/app/views/shared/_donatepod.html.haml b/app/views/shared/_donatepod.html.haml index fa0d815ef..89b1fe7f2 100644 --- a/app/views/shared/_donatepod.html.haml +++ b/app/views/shared/_donatepod.html.haml @@ -11,7 +11,6 @@ %option{:value => "Box o' Joe"} Box o' Joe : $20.00USD %input{:name => "currency_code", :type => "hidden", :value => "USD"} %input{:name => "submit", :type => "submit", :value => t('aspects.index.donate')} -- if AppConfig.settings.bitcoin_wallet_id.present? +- if AppConfig.bitcoin_donation_address Bitcoin: - %input{:type => "text", :id => "bitcoin_address", :value => AppConfig.settings.bitcoin_wallet_id, :readonly => true} -
\ No newline at end of file + %input{:type => "text", :id => "bitcoin_address", :value => AppConfig.bitcoin_donation_address, :readonly => true} diff --git a/app/views/shared/_right_sections.html.haml b/app/views/shared/_right_sections.html.haml index b0c34ba37..bd31ef980 100644 --- a/app/views/shared/_right_sections.html.haml +++ b/app/views/shared/_right_sections.html.haml @@ -67,7 +67,7 @@ .content != t('bookmarklet.explanation', :link => link_to(t('bookmarklet.post_something'), magic_bookmarklet_link)) -- if AppConfig.settings.paypal_hosted_button_id.present? || AppConfig.settings.bitcoin_wallet_id.present? +- if AppConfig.settings.paypal_hosted_button_id.present? || AppConfig.bitcoin_donation_address .section .title .icons-coffee diff --git a/config/defaults.yml b/config/defaults.yml index c8f8cfd43..9b319045a 100644 --- a/config/defaults.yml +++ b/config/defaults.yml @@ -58,7 +58,7 @@ defaults: open: true count: 25 paypal_hosted_button_id: - bitcoin_wallet_id: + bitcoin_address: community_spotlight: enable: false suggest_email: diff --git a/config/diaspora.yml.example b/config/diaspora.yml.example index 6b34c472f..83512a337 100644 --- a/config/diaspora.yml.example +++ b/config/diaspora.yml.example @@ -233,9 +233,9 @@ configuration: ## Section #paypal_hosted_button_id: "" ## Bitcoin donations - ## You can provide the bitcoin address here to kindly ask + ## You can provide a bitcoin address here to kindly ask ## your users for donations to run their pod. - #bitcoin_wallet_id: "" + #bitcoin_address: "" ## Community Spotlight ## The community spotlight gives new users a starting point on who diff --git a/features/desktop/donations.feature b/features/desktop/donations.feature index 1397681ca..fbaa253d8 100644 --- a/features/desktop/donations.feature +++ b/features/desktop/donations.feature @@ -11,6 +11,6 @@ Feature: donations And I sign in as "alice@alice.alice" Scenario: Bitcoin donations - Given I have configured a Bitcoin wallet + Given I have configured a Bitcoin address And I am on the home page - Then I should see the Bitcoin wallet ID
\ No newline at end of file + Then I should see the Bitcoin address diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb index fc2d65745..1844cc095 100644 --- a/features/step_definitions/custom_web_steps.rb +++ b/features/step_definitions/custom_web_steps.rb @@ -271,10 +271,10 @@ When /^I focus the "([^"]+)" field$/ do |field| find_field(field).click end -Given /^I have configured a Bitcoin wallet$/ do - AppConfig.settings.bitcoin_wallet_id = "AAAAAA" +Given /^I have configured a Bitcoin address$/ do + AppConfig.settings.bitcoin_address = "AAAAAA" end -Then /^I should see the Bitcoin wallet ID$/ do +Then /^I should see the Bitcoin address$/ do find("#bitcoin_address")['value'].should == "AAAAAA" end diff --git a/lib/configuration_methods.rb b/lib/configuration_methods.rb index 60bdda8bb..5cf20b907 100644 --- a/lib/configuration_methods.rb +++ b/lib/configuration_methods.rb @@ -109,6 +109,17 @@ module Configuration ActiveRecord::Base.connection.is_a?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter) end + def bitcoin_donation_address + if AppConfig.settings.bitcoin_wallet_id.present? + $stderr.puts "WARNING: bitcoin_wallet_id is now bitcoin_address. Change in diaspora.yml." + return AppConfig.settings.bitcoin_wallet_id + end + + if AppConfig.settings.bitcoin_address.present? + AppConfig.settings.bitcoin_address + end + end + private def get_git_info |