Commit db0570da356665df8e9fc7363cab2aca25b3c572
1 parent
4fa137d0
Exists in
master
and in
2 other branches
Corrected sintax errors
Showing
8 changed files
with
17 additions
and
22 deletions
Show diff stats
Gemfile
... | ... | @@ -3,10 +3,9 @@ source "http://rubygems.org" |
3 | 3 | gemspec |
4 | 4 | |
5 | 5 | group :development, :test do |
6 | - gem 'guard' | |
7 | - gem 'guard-rspec' | |
8 | - gem 'guard-bundler' | |
9 | - gem 'rb-fsevent' | |
10 | - gem 'simplecov' | |
6 | + gem 'guard' | |
7 | + gem 'guard-rspec' | |
8 | + gem 'guard-bundler' | |
9 | + gem 'rb-fsevent' | |
10 | + gem 'simplecov' | |
11 | 11 | end |
12 | - | ... | ... |
Rakefile
lib/omniauth/remote_user.rb
lib/omniauth/strategies/remote_user.rb
lib/omniauth_remote_user.rb
lib/omniauth_remote_user/version.rb
references/teste.rb
1 | 1 | # references: http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTPHeader.html#method-i-add_field |
2 | -# import the netHTTP | |
2 | +# import the netHTTP | |
3 | 3 | require 'net/http' |
4 | 4 | |
5 | 5 | # uri get the url http headers |
... | ... | @@ -13,7 +13,7 @@ http_request.each_header { |header,value| puts header + " " + value } |
13 | 13 | #http_request.set_form_data({"REMOTE_USER" => "siqueira"}) |
14 | 14 | #http_request.set_form_data({"q" => "ruby", "lang" => "en"}, ';') |
15 | 15 | |
16 | -### add_field adicona um campo novo ou seja um novo HTTP_HEADER no nosso caso o REMOTE_USER | |
16 | +### add_field adicona um campo novo ou seja um novo HTTP_HEADER no nosso caso o REMOTE_USER | |
17 | 17 | http_request.add_field 'REMOTE_USER', 'siqueira' |
18 | 18 | |
19 | 19 | # Com o get_field podemos pegar o conteudo do header REMOTE_USER |
... | ... | @@ -22,8 +22,8 @@ puts http_request.get_fields('REMOTE_USER') |
22 | 22 | # => accept-encoding |
23 | 23 | # => accept |
24 | 24 | # => user-agent |
25 | -# => host | |
25 | +# => host | |
26 | 26 | |
27 | 27 | http_response = Net::HTTP.start(uri.hostname, uri.port) do |http| |
28 | - http.request(http_request) | |
28 | + http.request(http_request) | |
29 | 29 | end | ... | ... |