Merge pull request #4485 from colindean/rename_bitcoin_wallet_id

change bitcoin_wallet_id to bitcoin_address
This commit is contained in:
Jonne Haß 2013-09-01 19:23:56 +02:00
commit 991a505439
8 changed files with 23 additions and 12 deletions

View file

@ -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)

View file

@ -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}
%input{:type => "text", :id => "bitcoin_address", :value => AppConfig.bitcoin_donation_address, :readonly => true}

View file

@ -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

View file

@ -58,7 +58,7 @@ defaults:
open: true
count: 25
paypal_hosted_button_id:
bitcoin_wallet_id:
bitcoin_address:
community_spotlight:
enable: false
suggest_email:

View file

@ -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

View file

@ -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
Then I should see the Bitcoin address

View file

@ -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

View file

@ -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