Permalink
Browse files

Cleanup EOL whitespace

  • Loading branch information...
1 parent e720859 commit dbe5e78164d0957228580a0c2641f7afb2f34d58 @sferik sferik committed Jul 16, 2011
@@ -1,6 +1,6 @@
class Api::DeprecatedController < ApplicationController
def index
- render :status => :forbidden, :text => %{
+ render :status => :forbidden, :text => %{
This version of the Gemcutter plugin has been deprecated.
Please install the latest version using: gem update gemcutter
}
@@ -12,7 +12,7 @@ def show
end
protected
-
+
def find_rubygem
@rubygem = Rubygem.find_by_name(params[:rubygem_id])
end
@@ -70,7 +70,7 @@ def to_s
def use_gem_dependency
if gem_dependency.class != Gem::Dependency
- errors.add :rubygem, "Please use Gem::Dependency to specify dependencies."
+ errors.add :rubygem, "Please use Gem::Dependency to specify dependencies."
false
end
end
View
@@ -4,7 +4,7 @@ class User < ActiveRecord::Base
is_gravtastic :default => "retro"
attr_accessible :bio, :email, :handle, :location, :password,
- :password_confirmation, :website
+ :password_confirmation, :website
has_many :rubygems, :through => :ownerships,
:conditions => { 'ownerships.approved' => true }
View
@@ -10,7 +10,7 @@
set(:rails_env) { "#{stage}"}
# Note that this requires you run 'ssh-add' on your workstation in order to
-# add your private key to the ssh agent. If that's not good for you, just uncomment the
+# add your private key to the ssh agent. If that's not good for you, just uncomment the
# "set :deploy_via, :copy" and comment "set :deploy_via, :remote_cache"
set :scm, :git
set :repository, "git://github.com/rubygems/#{application}"
@@ -1,6 +1,6 @@
# Be sure to restart your server when you modify this file.
-# Add new inflection rules using the following format
+# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
@@ -2,6 +2,6 @@
# Your secret key for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
-# Make sure the secret is at least 30 characters and all random,
+# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
Rails.application.config.secret_token = '53336f5ffda880aa2f6d5fbb7603b6df4d975408afbf44642d342547c25f92265eb01c34b118ee7fa87475f69949b07b292d95276aae2f6bda029ea25d28dc28'
@@ -13,8 +13,8 @@ def self.up
end
end
-
+
def self.down
- drop_table :delayed_jobs
+ drop_table :delayed_jobs
end
-end
+end
@@ -15,7 +15,7 @@
:email => email,
:password => password,
:password_confirmation => password)
-end
+end
Given /^I am signed up and confirmed as "(.*)\/(.*)"$/ do |email, password|
@me = user = Factory(:email_confirmed_user,
@@ -2,7 +2,7 @@
attribute = humanized_attribute.downcase.gsub(/\s/, '_')
previous_value = @me.send(attribute)
new_value = @me.reload.send(attribute)
- assert_not_equal previous_value, new_value,
+ assert_not_equal previous_value, new_value,
"New value for #{humanized_attribute} expected but it hasn't changed!"
assert_match new_value, response.body
end
@@ -183,7 +183,7 @@ def with_scope(locator)
end
end
end
-
+
Then /^(?:|I )should be on (.+)$/ do |page_name|
current_path = URI.parse(current_url).path
if current_path.respond_to? :should
@@ -197,8 +197,8 @@ def with_scope(locator)
query = URI.parse(current_url).query
actual_params = query ? CGI.parse(query) : {}
expected_params = {}
- expected_pairs.rows_hash.each_pair{|k,v| expected_params[k] = v.split(',')}
-
+ expected_pairs.rows_hash.each_pair{|k,v| expected_params[k] = v.split(',')}
+
if actual_params.respond_to? :should
actual_params.should == expected_params
else
@@ -1,6 +1,6 @@
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
-# It is recommended to regenerate this file in the future when you upgrade to a
-# newer version of cucumber-rails. Consider adding your own code to a new file
+# It is recommended to regenerate this file in the future when you upgrade to a
+# newer version of cucumber-rails. Consider adding your own code to a new file
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
# files.
@@ -13,8 +13,8 @@
Capybara.default_selector = :css
# By default, any exception happening in your Rails application will bubble up
-# to Cucumber so that your scenario will fail. This is a different from how
-# your application behaves in the production environment, where an error page will
+# to Cucumber so that your scenario will fail. This is a different from how
+# your application behaves in the production environment, where an error page will
# be rendered instead.
#
# Sometimes we want to override this default behaviour and allow Rails to rescue
@@ -18,7 +18,7 @@ def arguments
def usage
"#{program_name} GEM -v VERSION [-p PLATFORM] [--undo]"
end
-
+
def initialize
super 'yank', description
add_version_option("remove")
@@ -32,7 +32,7 @@ def execute
sign_in
version = get_version_from_requirements(options[:version])
platform = get_platform_from_requirements(options)
-
+
if !version.nil?
if options[:undo]
unyank_gem(version, platform)
@@ -49,12 +49,12 @@ def yank_gem(version, platform)
say "Yanking gem from RubyGems.org..."
yank_api_request(:delete, version, platform, "api/v1/gems/yank")
end
-
+
def unyank_gem(version, platform)
say "Unyanking gem from RubyGems.org..."
yank_api_request(:put, version, platform, "api/v1/gems/unyank")
end
-
+
private
def yank_api_request(method, version, platform, api)
name = get_one_gem_name
@@ -72,7 +72,7 @@ def get_version_from_requirements(requirements)
nil
end
end
-
+
def get_platform_from_requirements(requirements)
Gem.platforms[1].to_s if requirements.key? :added_platform
end
@@ -34,7 +34,7 @@ class YankCommandTest < CommandTest
command.say("Successfully yanked")
end
end
-
+
should 'invoke yank_gem' do
stub(@command).yank_gem(@version, @platform)
@command.execute
@@ -50,7 +50,7 @@ class YankCommandTest < CommandTest
assert_requested(:delete, @api,
:headers => { 'Authorization' => 'key' })
end
-
+
context 'with a platform specified' do
setup do
stub_api_key("key")
@@ -59,15 +59,15 @@ class YankCommandTest < CommandTest
stub_request(:delete, @api).to_return(:body => "Successfully yanked")
@command.handle_options([@gem, "-v", @version, "-p", @platform])
end
-
+
should 'say gem was yanked' do
@command.execute
assert_received(@command) do |command|
command.say("Yanking gem from Gemcutter...")
command.say("Successfully yanked")
end
end
-
+
should 'invoke yank_gem' do
stub(@command).yank_gem(@version, @platform)
@command.execute
@@ -76,17 +76,17 @@ class YankCommandTest < CommandTest
end
end
end
-
+
end
-
+
context 'unyanking a gem' do
setup do
stub_api_key("key")
@api = "https://rubygems.org/api/v1/gems/unyank"
stub_request(:put, @api).to_return(:body => "Successfully unyanked")
@command.handle_options([@gem, "-v", @version, "--undo"])
end
-
+
should 'say gem was unyanked' do
@command.execute
assert_received(@command) do |command|
@@ -102,15 +102,15 @@ class YankCommandTest < CommandTest
command.unyank_gem(@version, @platform)
end
end
-
+
should 'put to api' do
@command.execute
assert_requested(:put, @api, :times => 1)
assert_requested(:put, @api, :headers => { 'Authorization' => 'key' })
end
end
-
-
+
+
context 'with a platform specified' do
setup do
stub_api_key("key")
@@ -119,15 +119,15 @@ class YankCommandTest < CommandTest
stub_request(:put, @api).to_return(:body => "Successfully unyanked")
@command.handle_options([@gem, "-v", @version, "-p", @platform, "--undo"])
end
-
+
should 'say gem was unyanked' do
@command.execute
assert_received(@command) do |command|
command.say("Re-indexing gem")
command.say("Successfully unyanked")
end
end
-
+
should 'invoke unyank_gem' do
stub(@command).unyank_gem(@version, @platform)
@command.execute
@@ -136,7 +136,7 @@ class YankCommandTest < CommandTest
end
end
end
-
+
end
end
@@ -1,6 +1,6 @@
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
-# It is recommended to regenerate this file in the future when you upgrade to a
-# newer version of cucumber-rails. Consider adding your own code to a new file
+# It is recommended to regenerate this file in the future when you upgrade to a
+# newer version of cucumber-rails. Consider adding your own code to a new file
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
# files.
@@ -25,7 +25,7 @@ class Api::V1::ApiKeysControllerTest < ActionController::TestCase
context "on GET to show with unconfirmed user" do
setup do
@user = Factory(:user)
- @request.env["HTTP_AUTHORIZATION"] = "Basic " +
+ @request.env["HTTP_AUTHORIZATION"] = "Basic " +
Base64::encode64("#{@user.email}:#{@user.password}")
get :show
end
@@ -38,7 +38,7 @@ class Api::V1::ApiKeysControllerTest < ActionController::TestCase
context "on GET to show with bad credentials" do
setup do
@user = Factory(:user)
- @request.env["HTTP_AUTHORIZATION"] = "Basic " +
+ @request.env["HTTP_AUTHORIZATION"] = "Basic " +
Base64::encode64("bad:creds")
get :show
end
@@ -51,7 +51,7 @@ class Api::V1::ApiKeysControllerTest < ActionController::TestCase
context "on GET to show with confirmed user" do
setup do
@user = Factory(:email_confirmed_user)
- @request.env["HTTP_AUTHORIZATION"] = "Basic " +
+ @request.env["HTTP_AUTHORIZATION"] = "Basic " +
Base64::encode64("#{@user.email}:#{@user.password}")
get :show
end
@@ -60,7 +60,7 @@ class Api::V1::ApiKeysControllerTest < ActionController::TestCase
assert_equal @user.api_key, @response.body
end
end
-
+
context "on PUT to reset with signed in user" do
setup do
@user = Factory(:email_confirmed_user)
@@ -76,7 +76,7 @@ class Api::V1::ApiKeysControllerTest < ActionController::TestCase
assert_redirected_to edit_profile_path
end
end
-
+
context "on PUT to reset with no signed in user" do
setup do
put :reset
@@ -4,7 +4,7 @@ class Api::V1::RubygemsControllerTest < ActionController::TestCase
should "route old paths to new controller" do
get_route = {:controller => 'api/v1/rubygems', :action => 'show', :id => "rails", :format => "json"}
assert_recognizes(get_route, '/api/v1/gems/rails.json')
-
+
post_route = {:controller => 'api/v1/rubygems', :action => 'create'}
assert_recognizes(post_route, :path => '/api/v1/gems', :method => :post)
end
@@ -6,7 +6,7 @@ def get_index(version)
end
def get_search(version, from, to)
- get :search, :version_id => "#{version.full_name}.json",
+ get :search, :version_id => "#{version.full_name}.json",
:from => from.to_date.to_s,
:to => to.to_date.to_s
end
@@ -127,7 +127,7 @@ def get_search(version, from, to)
context "for an unknown gem" do
setup do
- get :index, :version_id => "nonexistent_gem",
+ get :index, :version_id => "nonexistent_gem",
:from => @one_hundred_days_ago,
:to => @one_hundred_eighty_nine_days_ago
end
@@ -44,12 +44,12 @@ class HomeControllerTest < ActionController::TestCase
should "not redirect to the SSL path" do
assert_template 'index'
end
-
+
should "contain HTTPS links to sign in and sign up" do
assert_select "a[href=?]", new_session_url(:protocol => 'https')
assert_select "a[href=?]", new_user_url(:protocol => 'https')
end
-
+
end
context "on GET to index with a non-ssl request when signed in" do

0 comments on commit dbe5e78

Please sign in to comment.