From 2861a4b574203676a4b453635fd55a8aa7113588 Mon Sep 17 00:00:00 2001 From: "Gun.io Whitespace Robot" Date: Fri, 28 Oct 2011 13:25:36 -0400 Subject: [PATCH] Remove whitespace [Gun.io WhitespaceBot] --- LICENSE.txt | 18 ++++---- Rakefile | 20 ++++----- bin/createish | 2 +- gdata2.gemspec | 6 +-- lib/gdata/apps/email.rb | 4 +- lib/gdata/apps/provisioning.rb | 2 +- lib/timestamp.rb | 78 +++++++++++++++++----------------- 7 files changed, 65 insertions(+), 65 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 83b34b8..a915b60 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,14 +1,14 @@ Copyright 2008-2009 Jérôme Bousquié Copyright 2009 Montana State University -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Rakefile b/Rakefile index 1ef97b1..5493122 100644 --- a/Rakefile +++ b/Rakefile @@ -1,14 +1,14 @@ # -*- ruby -*- - + require 'rubygems' require 'hoe' require "spec/rake/spectask" require './lib/gdata' - + class Hoe def extra_deps; @extra_deps.reject { |x| Array(x).first == "hoe" } end end # copied from the Rakefile of the sup project - + Hoe.new('gdata2', "0.1") do |p| p.rubyforge_name = 'gdata2' p.author = 'Ivan R. Judson' @@ -19,8 +19,8 @@ Hoe.new('gdata2', "0.1") do |p| p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n") p.remote_rdoc_dir = '' end - - + + RDOC_OPTS = [ '--quiet', '--title', 'gdata2 APIs', @@ -30,7 +30,7 @@ RDOC_OPTS = [ '--tab-width', '2', '--line-numbers', ] - + Rake::RDocTask.new do |rdoc| rdoc.rdoc_dir = 'doc/' rdoc.options = RDOC_OPTS @@ -42,21 +42,21 @@ Rake::RDocTask.new do |rdoc| 'lib/**/*.rb' ] end - + # desc "Run all specs" # Spec::Rake::SpecTask.new do |t| # t.spec_files = FileList["spec/**/*_spec.rb"] # t.spec_opts = ["--options", "spec/spec.opts"] # end -# +# # desc "Run all specs and get coverage statistics" # Spec::Rake::SpecTask.new('spec:rcov') do |t| # t.spec_files = FileList["spec/**/*_spec.rb"] # t.rcov = true # t.spec_opts = ["--options", "spec/spec.opts"] # end -# +# # Rake::Task[:default].prerequisites.clear # task :default => :spec - + # vim: syntax=Ruby diff --git a/bin/createish b/bin/createish index bf6a2c5..5b4146c 100644 --- a/bin/createish +++ b/bin/createish @@ -1,6 +1,6 @@ in order to provision a person you need to set the google enabled flag in ~/rosterdb.sqlite and what campus you want them to be affiliated with - + sqlite3 ~/rosterdb.sqlite update USERS set google=1,bz=1 where netid like "k67j798"; .exit diff --git a/gdata2.gemspec b/gdata2.gemspec index 65fc81f..305502f 100644 --- a/gdata2.gemspec +++ b/gdata2.gemspec @@ -12,14 +12,14 @@ Gem::Specification.new do |s| s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt"] s.rdoc_options = ["--main", "README.txt"] s.remote_rdoc_dir = '' - s.files = ["CREDITS", "History.txt", "Manifest.txt", "README.txt", - "Rakefile", "TODO", "gdata2.gemspec", "lib/gdata.rb", + s.files = ["CREDITS", "History.txt", "Manifest.txt", "README.txt", + "Rakefile", "TODO", "gdata2.gemspec", "lib/gdata.rb", "lib/gdata/apps/provisioning.rb"] s.require_paths = ["lib"] s.rubyforge_project = "gdata2" s.rubygems_version = "1.3.1" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - + if s.respond_to? :specification_version then current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION s.specification_version = 2 diff --git a/lib/gdata/apps/email.rb b/lib/gdata/apps/email.rb index 0e97f6d..a819012 100644 --- a/lib/gdata/apps/email.rb +++ b/lib/gdata/apps/email.rb @@ -105,9 +105,9 @@ def create_send_as(name, address, replyTo=nil, makeDefault=false) if replyTo.nil? replyTo = address end - + self.elements["atom:entry"].add_element "apps:property", { "name" => "name", "value" => name } - self.elements["atom:entry"].add_element "apps:property", { "name" => "address", "value" => address } + self.elements["atom:entry"].add_element "apps:property", { "name" => "address", "value" => address } self.elements["atom:entry"].add_element "apps:property", { "name" => "replyTo", "value" => replyTo } self.elements["atom:entry"].add_element "apps:property", { "name" => "makeDefault", "value" => makeDefault.to_s } end diff --git a/lib/gdata/apps/provisioning.rb b/lib/gdata/apps/provisioning.rb index d8c8aa9..6202baf 100755 --- a/lib/gdata/apps/provisioning.rb +++ b/lib/gdata/apps/provisioning.rb @@ -192,7 +192,7 @@ def retrieve_nickname(nickname) # mynicks.each {|nick| puts nick.nickname } def retrieve_nicknames(username) xml_response = @apps.request(:nickname_retrieve_all_for_user, username, @headers) - + nicknames_feed = Feed.new(xml_response.elements["feed"], NicknameEntry) nicknames_feed = add_next_feeds(nicknames_feed, xml_response, NicknameEntry) end diff --git a/lib/timestamp.rb b/lib/timestamp.rb index 621d838..f3f3645 100644 --- a/lib/timestamp.rb +++ b/lib/timestamp.rb @@ -32,183 +32,183 @@ def time_stamp(time) end -# -# +# +# # RSPEC TESTS # -- -# +# # describe "time_ago_or_time_stamp helper method" do - # + # # it "should return '–' if time is nil" do # time = nil # time_distance_or_time_stamp(time).should =~ /–/ # end - # + # # it "should return detailed timestamp if distance > 2880 minutes and options[:show_time] = true" do # base_time = Time.utc(1966,"oct",25,05,35,0) # time = base_time + (2881*60) # time_distance_or_time_stamp(time, {:base_time => base_time, :show_time => true}).should =~ /Thu, 27 Oct 1966, 12:00am/ # end - # + # # it "should not return detailed timestamp if distance > 2880 minutes and options[:show_time] = false" do # base_time = Time.utc(1966,"oct",25,05,35,0) # time = base_time + (2881*60) # time_distance_or_time_stamp(time, {:base_time => base_time, :show_time => false}).should =~ /Thu, 27 Oct 1966/ # end - # + # # it "should not return detailed timestamp if distance > 2880 minutes and options[:show_time] is not specified" do # base_time = Time.utc(1966,"oct",25,05,35,0) # time = base_time + (2881*60) # time_distance_or_time_stamp(time, {:base_time => base_time}).should =~ /Thu, 27 Oct 1966/ # end - # + # # it "should return '1 second ago' when 1 second ago" do # time = 1.second.ago # time_distance_or_time_stamp(time).should =~ /1 second ago/ # end - # + # # it "should return '1 second from now' when 1 second from now" do # time = 1.second.from_now # time_distance_or_time_stamp(time).should =~ /1 second from now/ # end - # + # # it "should return '59 second ago' when 59 seconds ago" do # time = 59.seconds.ago # time_distance_or_time_stamp(time).should =~ /59 seconds ago/ # end - # + # # it "should return '59 second from now' when 59 seconds from now" do # time = 59.seconds.from_now # time_distance_or_time_stamp(time).should =~ /59 seconds from now/ # end - # + # # it "should return '1 minute ago' when 1 minute ago" do # time = 60.seconds.ago # time_distance_or_time_stamp(time).should =~ /1 minute ago/ # end - # + # # it "should return '1 minute from now' when 1 minute from now" do # time = 60.seconds.from_now # time_distance_or_time_stamp(time).should =~ /1 minute from now/ # end - # + # # it "should return '2 minutes ago' when 2 minutes ago" do # time = 2.minutes.ago # time_distance_or_time_stamp(time).should =~ /2 minutes ago/ # end - # + # # it "should return '2 minutes from now' when 2 minutes from now" do # time = 2.minutes.from_now # time_distance_or_time_stamp(time).should =~ /2 minutes from now/ # end - # + # # it "should return '59 minutes ago' when 59 minutes ago" do # time = 59.minutes.ago # time_distance_or_time_stamp(time).should =~ /59 minutes ago/ # end - # + # # it "should return '59 minutes from now' when 59 minutes from now" do # time = 59.minutes.from_now # time_distance_or_time_stamp(time).should =~ /59 minutes from now/ # end - # + # # it "should return '1 hour ago' when 1 hour ago" do # time = 1.hour.ago # time_distance_or_time_stamp(time).should =~ /1 hour ago/ # end - # + # # it "should return '1 hour from now' when 1 hour from now" do # time = 1.hour.from_now # time_distance_or_time_stamp(time).should =~ /1 hour from now/ # end - # + # # it "should return '23 hour ago' when 23 hours ago" do # time = 23.hours.ago # time_distance_or_time_stamp(time).should =~ /23 hours ago/ # end - # + # # it "should return '23 hour from now' when 23 hours from now" do # time = 23.hours.from_now # time_distance_or_time_stamp(time).should =~ /23 hours from now/ # end - # + # # it "should return '24 hours ago' when 24 hours ago" do # time = 24.hours.ago # time_distance_or_time_stamp(time).should =~ /24 hours ago/ # end - # + # # it "should return '24 hours from now' when 24 hours from now" do # time = 24.hours.from_now # time_distance_or_time_stamp(time).should =~ /24 hours from now/ # end - # + # # it "should return '1 day ago' when 25 hours ago" do # time = 25.hours.ago # time_distance_or_time_stamp(time).should =~ /1 day ago/ # end - # + # # it "should return '1 day from now' when 25 hours from now" do # time = 25.hours.from_now # time_distance_or_time_stamp(time).should =~ /1 day from now/ # end - # + # # it "should return '1 day ago' when 36 hours ago" do # time = 36.hours.ago # time_distance_or_time_stamp(time).should =~ /1 day ago/ # end - # + # # it "should return '1 day from now' when 36 hours from now" do # time = 36.hours.from_now # time_distance_or_time_stamp(time).should =~ /1 day from now/ # end - # + # # it "should return '2 days ago' when 37 hours ago" do # time = 37.hours.ago # time_distance_or_time_stamp(time).should =~ /2 days ago/ # end - # + # # it "should return '2 days from now' when 37 hours from now" do # time = 37.hours.from_now # time_distance_or_time_stamp(time).should =~ /2 days from now/ # end - # + # # it "should return '2 days ago' when 48 hours ago" do # time = 48.hours.ago # time_distance_or_time_stamp(time).should =~ /2 days ago/ # end - # + # # it "should return '2 days from now' when 48 hours from now" do # time = 48.hours.from_now # time_distance_or_time_stamp(time).should =~ /2 days from now/ # end - # + # # it "should return time_stamp without 'ago' when 49+ hours ago" do # time = 49.hours.ago # time_distance_or_time_stamp(time).should_not =~ /ago/ # end - # + # # it "should return time_stamp without 'from now' when 49+ hours from now" do # time = 49.hours.from_now # time_distance_or_time_stamp(time).should_not =~ /from now/ # end - # + # # it "should return time_stamp with only day & date when 49+ hours ago" do # time = Time.utc(1966,"oct",25,05,35,0) # time_distance_or_time_stamp(time).should =~ /Tue, 25 Oct 1966/ # end - # + # # it "should return time_stamp with only day & date when 49+ hours from now" do # time = Time.utc(2020,"oct",25,05,35,0) # time_distance_or_time_stamp(time).should =~ /Sun, 25 Oct 2020/ # end - # + # # end - # + # # describe "time_stamp helper method" do - # + # # it "should return a properly formatted timestamp" do # time = Time.utc(1966,"oct",25,05,35,0) # time_stamp(time).should =~ /Tue, 25 Oct 1966, 5:35am/ # end - # + # # end