From 791e03c838ccb0f346e34b04838eedaeb5fcff36 Mon Sep 17 00:00:00 2001 From: thea Date: Tue, 8 Nov 2016 10:46:58 +0100 Subject: deleted unnecessary comments --- script/generate_bearer_token | 4 ---- 1 file changed, 4 deletions(-) diff --git a/script/generate_bearer_token b/script/generate_bearer_token index 3a09382..e6a22ea 100755 --- a/script/generate_bearer_token +++ b/script/generate_bearer_token @@ -60,10 +60,6 @@ else else puts "Please make sure that you created a secrets-file as described in the documentation or have given the correct directory. No secrets-file could be found." exit - # secrets_content = {"twitter"=>{"enabled"=>false, "twitter_handle"=>"", "bearer_token"=>"", "twitter_picture"=>nil}} - # secrets = {"development"=> secrets_content, "test"=>secrets_content} - # secrets = {"development"=> {"twitter"=>{"enabled"=>false, "twitter_handle"=>"", "bearer_token"=>"", "twitter_picture"=>nil}}, "test"=>{"twitter"=>{"enabled"=>false, "twitter_handle"=>"", "bearer_token"=>"", "twitter_picture"=>nil}}} - # File.new("#{options[:projectroot]}/leap_web/config/secrets.yml", "w") end if options[:twitterhandle].nil? then -- cgit v1.2.3 From fa9f61caa635beb7b12d913dcd8351caf04a2260 Mon Sep 17 00:00:00 2001 From: luca-marie Date: Fri, 23 Sep 2016 11:52:46 +0200 Subject: Doc updated on how to customize avatar picture in twitter feature; update error response messages; added 'config/customization/images' + link in 'config/initializer/customization.rb' --- app/helpers/twitter_helper.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/helpers/twitter_helper.rb b/app/helpers/twitter_helper.rb index 7ce28be..e44d883 100644 --- a/app/helpers/twitter_helper.rb +++ b/app/helpers/twitter_helper.rb @@ -22,7 +22,11 @@ module TwitterHelper def update_twitter_info twitter_user_info[0] = Time.now twitter_user_info[1] = twitter_client.user(twitter_handle).name +<<<<<<< 791e03c838ccb0f346e34b04838eedaeb5fcff36 twitter_user_info[2] = twitter_client.user_timeline(twitter_handle, {:count => 200}).select{ |tweet| tweet.text.start_with?('RT','@')==false} +======= + twitter_user_info[2] = twitter_client.user_timeline(twitter_handle).select{ |tweet| tweet.text.start_with?('RT','@')==false}.take(10) +>>>>>>> Doc updated on how to customize avatar picture in twitter feature; update error response messages; added 'config/customization/images' + link in 'config/initializer/customization.rb' if twitter_user_info[2] == nil error_handling twitter_user_info[3] = "The twitter handle does not exist or the account's tweets are protected. Please change the privacy settings accordingly or contact your provider-admin." -- cgit v1.2.3 From 5ac9cbfea145124f574238746c8badbd87cf71df Mon Sep 17 00:00:00 2001 From: luca-marie Date: Fri, 23 Sep 2016 15:46:25 +0200 Subject: increase number of fetched tweets to make sure 3 most recent tweets without RTs and @ are displayed --- app/helpers/twitter_helper.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/helpers/twitter_helper.rb b/app/helpers/twitter_helper.rb index e44d883..7ce28be 100644 --- a/app/helpers/twitter_helper.rb +++ b/app/helpers/twitter_helper.rb @@ -22,11 +22,7 @@ module TwitterHelper def update_twitter_info twitter_user_info[0] = Time.now twitter_user_info[1] = twitter_client.user(twitter_handle).name -<<<<<<< 791e03c838ccb0f346e34b04838eedaeb5fcff36 twitter_user_info[2] = twitter_client.user_timeline(twitter_handle, {:count => 200}).select{ |tweet| tweet.text.start_with?('RT','@')==false} -======= - twitter_user_info[2] = twitter_client.user_timeline(twitter_handle).select{ |tweet| tweet.text.start_with?('RT','@')==false}.take(10) ->>>>>>> Doc updated on how to customize avatar picture in twitter feature; update error response messages; added 'config/customization/images' + link in 'config/initializer/customization.rb' if twitter_user_info[2] == nil error_handling twitter_user_info[3] = "The twitter handle does not exist or the account's tweets are protected. Please change the privacy settings accordingly or contact your provider-admin." -- cgit v1.2.3 From 65846b33469278f0accbf7ea7f3d614f234b5b18 Mon Sep 17 00:00:00 2001 From: thea Date: Thu, 10 Nov 2016 15:41:09 +0100 Subject: fixed bugs: production settings were incorrectly set (bearer token + twitter handle) and incorrect root was given for File.open (leap_web was still in it) --- script/generate_bearer_token | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/generate_bearer_token b/script/generate_bearer_token index e6a22ea..7614f37 100755 --- a/script/generate_bearer_token +++ b/script/generate_bearer_token @@ -74,9 +74,9 @@ else secrets["development"]["twitter"]["bearer_token"] = $bearer_token secrets["test"]["twitter"]["bearer_token"] = $bearer_token - secrets["production"]["twitter"]["twitter_handle"] = $bearer_token + secrets["production"]["twitter"]["bearer_token"] = $bearer_token - File.open("#{options[:projectroot]}/leap_web/config/secrets.yml", "r+") do |file| + File.open("#{options[:projectroot]}/config/secrets.yml", "r+") do |file| file.write(secrets.to_yaml) end end -- cgit v1.2.3