Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi! I cleaned up your code for you! #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc

# Logs and databases #
######################
*.log

# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
2 changes: 1 addition & 1 deletion app/helpers/api_request_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def request_content_types(default = nil)
end
buffer
end

def access_tokens_for_select
options = @access_tokens.collect{|at| [ at.to_s, at.id ]}
options << [ "Two-Legged Request", "two-legged" ]
Expand Down
2 changes: 1 addition & 1 deletion app/models/access_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def to_oauth_access_token
consumer = self.service_provider.to_oauth_consumer
OAuth::AccessToken.from_hash(consumer, { :oauth_token => self.oauth_token, :oauth_token_secret => self.oauth_token_secret})
end

def to_s(with_service_provider = false)
string = "#{self.label} (#{self.oauth_token[0..5]})"
if with_service_provider
Expand Down
2 changes: 1 addition & 1 deletion app/views/api_request/make_request.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<strong>HTTP Method</strong>
<div class="api_result"><%= @api_request.method.to_s %></div>

<strong>Request Body</strong>
<div class="api_result"><%=h @api_request.postdata(true) %></div>

Expand Down
2 changes: 1 addition & 1 deletion app/views/service_providers/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<% form_for(@service_provider) do |f| %>
<%= f.error_messages %>
<%= render :partial => "form", :locals => {:f => f} %>

<p>
<%= f.submit 'Create' %>
</p>
Expand Down
2 changes: 1 addition & 1 deletion app/views/the_dance/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<ul>
<% service_provider.access_tokens.each do | access_token | %>
<li><%= link_to access_token.to_s, {:controller => "api_request", :action => "index", :access_token_id => access_token.id, :service_provider_id => service_provider.id }, :title => "Click to start using this access token" %></li>
<% end %>
<% end %>
</ul>
</div>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/inflections.rb
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/session_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Your secret key for verifying cookie session data integrity.
# If you change this key, all old sessions 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.
ActionController::Base.session = {
:key => '_oauth-dancer_session',
Expand Down
6 changes: 3 additions & 3 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

# Sample resource route with sub-resources:
# map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller

# Sample resource route with more complex sub-resources
# map.resources :products do |products|
# products.resources :comments
Expand Down Expand Up @@ -60,5 +60,5 @@
# PUT /service_providers/:id(.:format) {:action=>"update", :controller=>"service_providers"}
# DELETE /service_providers/:id(.:format) {:action=>"destroy", :controller=>"service_providers"}
# root / {:action=>"index", :controller=>"home"}
# /:controller/:action/:id
# /:controller/:action/:id(.:format)
# /:controller/:action/:id
# /:controller/:action/:id(.:format)
2 changes: 1 addition & 1 deletion db/migrate/20100225193633_create_service_providers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def self.up
t.string :default_response_content_type, :default => "application/x-www-form-urlencoded; charset=utf-8"
t.string :default_request_content_type, :default => "application/x-www-form-urlencoded; charset=utf-8"
t.string :oauth_scheme, :default => "header"
t.boolean :use_out_of_band, :default => false
t.boolean :use_out_of_band, :default => false
t.boolean :use_post_for_authentication_steps, :default => true
t.timestamps
end
Expand Down
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file is auto-generated from the current state of the database. Instead of editing this file,
# This file is auto-generated from the current state of the database. Instead of editing this file,
# please use the migrations feature of Active Record to incrementally modify your database, and
# then regenerate this schema definition.
#
Expand Down
2 changes: 1 addition & 1 deletion db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
#
# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
# Major.create(:name => 'Daley', :city => cities.first)
6 changes: 3 additions & 3 deletions public/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ table td { text-align: left; padding: 2px 2px 2px 2px;}

div.api_result { margin-left: 10px; margin-bottom:10px;}

div#home-instructions {
position: relative;
div#home-instructions {
position: relative;
background: black url("/images/oauth-dance.jpg") no-repeat fixed top left;
width: 100%;
height: 595px;
color:white;
color:white;

}

Expand Down
2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ActiveSupport::TestCase
# don't care one way or the other, switching from MyISAM to InnoDB tables
# is recommended.
#
# The only drawback to using transactional fixtures is when you actually
# The only drawback to using transactional fixtures is when you actually
# need to test transactions. Since your test is bracketed by a transaction,
# any transactions started in your code will be automatically rolled back.
self.use_transactional_fixtures = true
Expand Down
42 changes: 21 additions & 21 deletions vendor/gems/coderay-0.9.1/.specification
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
--- !ruby/object:Gem::Specification
--- !ruby/object:Gem::Specification
name: coderay
version: !ruby/object:Gem::Version
version: !ruby/object:Gem::Version
prerelease: false
segments:
segments:
- 0
- 9
- 1
version: 0.9.1
platform: ruby
authors:
authors:
- murphy
autorequire:
autorequire:
bindir: bin
cert_chain: []

date: 2009-12-31 00:00:00 -08:00
default_executable:
default_executable:
dependencies: []

description: " CodeRay is a Ruby library for syntax highlighting.\n I try to make CodeRay easy to use and intuitive, but at the same time\n fully featured, complete, fast and efficient.\n\n Usage is simple:\n CodeRay.scan(code, :ruby).div\n"
email: murphy@rubychan.de
executables:
executables:
- coderay
- coderay_stylesheet
extensions: []

extra_rdoc_files:
extra_rdoc_files:
- ./lib/README
- ./FOLDERS
files:
files:
- ./lib/coderay/duo.rb
- ./lib/coderay/encoder.rb
- ./lib/coderay/encoders/_map.rb
Expand Down Expand Up @@ -99,35 +99,35 @@ has_rdoc: true
homepage: http://coderay.rubychan.de
licenses: []

post_install_message:
rdoc_options:
post_install_message:
rdoc_options:
- -SNw2
- -mlib/README
- -a
- -t CodeRay Documentation
require_paths:
require_paths:
- lib
required_ruby_version: !ruby/object:Gem::Requirement
requirements:
required_ruby_version: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
segments:
- !ruby/object:Gem::Version
segments:
- 1
- 8
- 2
version: 1.8.2
required_rubygems_version: !ruby/object:Gem::Requirement
requirements:
required_rubygems_version: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
segments:
- !ruby/object:Gem::Version
segments:
- 0
version: "0"
requirements: []

rubyforge_project: coderay
rubygems_version: 1.3.6
signing_key:
signing_key:
specification_version: 3
summary: CodeRay is a fast syntax highlighter engine for many languages.
test_files: []
Expand Down
2 changes: 1 addition & 1 deletion vendor/gems/coderay-0.9.1/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.

1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
Expand Down
4 changes: 2 additions & 2 deletions vendor/gems/coderay-0.9.1/lib/README
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ CodeRay needs Ruby 1.8.6 or later. It also runs with Ruby 1.9.1+ and JRuby 1.1+.
(Forgive me, but this is not highlighted.)

require 'coderay'

tokens = CodeRay.scan "puts 'Hello, world!'", :ruby
page = tokens.html :line_numbers => :inline, :wrap => :page
puts page
Expand Down Expand Up @@ -92,7 +92,7 @@ Please report errors in this documentation to <murphy rubychan de>.
* The folks at redmine.org - thank you for using and fixing CodeRay!
* matz and all Ruby gods and gurus
* The inventors of: the computer, the internet, the true color display, HTML &
CSS, VIM, Ruby, pizza, microwaves, guitars, scouting, programming, anime,
CSS, VIM, Ruby, pizza, microwaves, guitars, scouting, programming, anime,
manga, coke and green ice tea.

Where would we be without all those people?
Expand Down
Loading