omniauth-mercadolibre 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/.rspec +2 -0
  4. data/.ruby-gemset +1 -0
  5. data/.ruby-version +1 -0
  6. data/.rvmrc +1 -0
  7. data/CHANGELOG.md +13 -0
  8. data/Gemfile +12 -0
  9. data/Guardfile +10 -0
  10. data/MIT-LICENSE +20 -0
  11. data/README.md +198 -0
  12. data/Rakefile +25 -0
  13. data/lib/omniauth-mercadolibre.rb +2 -0
  14. data/lib/omniauth-mercadolibre/version.rb +5 -0
  15. data/lib/omniauth/strategies/mercadolibre.rb +80 -0
  16. data/omniauth-mercadolibre.gemspec +26 -0
  17. data/omniauth-mercadolibre.sublime-project +9 -0
  18. data/spec/fixtures/vcr_cassettes/callback_phase.yml +113 -0
  19. data/spec/fixtures/vcr_cassettes/request_phase.yml +58 -0
  20. data/spec/omniauth/strategies/mercado_libre_spec.rb +453 -0
  21. data/spec/spec_helper.rb +15 -0
  22. data/test/dump/.gitignore +16 -0
  23. data/test/dump/Gemfile +48 -0
  24. data/test/dump/README.rdoc +28 -0
  25. data/test/dump/Rakefile +6 -0
  26. data/test/dump/app/assets/images/.keep +0 -0
  27. data/test/dump/app/assets/javascripts/application.js +16 -0
  28. data/test/dump/app/assets/javascripts/home.js.coffee +3 -0
  29. data/test/dump/app/assets/stylesheets/application.css +13 -0
  30. data/test/dump/app/assets/stylesheets/home.css.scss +3 -0
  31. data/test/dump/app/controllers/application_controller.rb +5 -0
  32. data/test/dump/app/controllers/concerns/.keep +0 -0
  33. data/test/dump/app/controllers/home_controller.rb +4 -0
  34. data/test/dump/app/controllers/users/omniauth_callbacks_controller.rb +14 -0
  35. data/test/dump/app/helpers/application_helper.rb +2 -0
  36. data/test/dump/app/helpers/home_helper.rb +2 -0
  37. data/test/dump/app/mailers/.keep +0 -0
  38. data/test/dump/app/models/.keep +0 -0
  39. data/test/dump/app/models/concerns/.keep +0 -0
  40. data/test/dump/app/models/user.rb +31 -0
  41. data/test/dump/app/views/home/index.html.erb +7 -0
  42. data/test/dump/app/views/layouts/application.html.erb +14 -0
  43. data/test/dump/bin/bundle +3 -0
  44. data/test/dump/bin/rails +4 -0
  45. data/test/dump/bin/rake +4 -0
  46. data/test/dump/config.ru +4 -0
  47. data/test/dump/config/application.rb +28 -0
  48. data/test/dump/config/boot.rb +4 -0
  49. data/test/dump/config/database.yml +25 -0
  50. data/test/dump/config/environment.rb +5 -0
  51. data/test/dump/config/environments/development.rb +29 -0
  52. data/test/dump/config/environments/production.rb +80 -0
  53. data/test/dump/config/environments/test.rb +36 -0
  54. data/test/dump/config/initializers/backtrace_silencers.rb +7 -0
  55. data/test/dump/config/initializers/devise.rb +256 -0
  56. data/test/dump/config/initializers/filter_parameter_logging.rb +4 -0
  57. data/test/dump/config/initializers/inflections.rb +16 -0
  58. data/test/dump/config/initializers/mime_types.rb +5 -0
  59. data/test/dump/config/initializers/secret_token.rb +12 -0
  60. data/test/dump/config/initializers/session_store.rb +3 -0
  61. data/test/dump/config/initializers/wrap_parameters.rb +14 -0
  62. data/test/dump/config/locales/devise.en.yml +59 -0
  63. data/test/dump/config/locales/en.yml +23 -0
  64. data/test/dump/config/routes.rb +9 -0
  65. data/test/dump/db/migrate/20140120110923_devise_create_users.rb +46 -0
  66. data/test/dump/db/schema.rb +36 -0
  67. data/test/dump/db/seeds.rb +7 -0
  68. data/test/dump/lib/assets/.keep +0 -0
  69. data/test/dump/lib/tasks/.keep +0 -0
  70. data/test/dump/log/.keep +0 -0
  71. data/test/dump/public/404.html +58 -0
  72. data/test/dump/public/422.html +58 -0
  73. data/test/dump/public/500.html +57 -0
  74. data/test/dump/public/favicon.ico +0 -0
  75. data/test/dump/public/robots.txt +5 -0
  76. data/test/dump/vendor/assets/javascripts/.keep +0 -0
  77. data/test/dump/vendor/assets/stylesheets/.keep +0 -0
  78. metadata +215 -0
@@ -0,0 +1,9 @@
1
+ Dump::Application.routes.draw do
2
+ devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
3
+
4
+ # The priority is based upon order of creation: first created -> highest priority.
5
+ # See how all your routes lay out with "rake routes".
6
+
7
+ # You can have the root of your site routed with "root"
8
+ root 'home#index'
9
+ end
@@ -0,0 +1,46 @@
1
+ class DeviseCreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table(:users) do |t|
4
+ ## Database authenticatable
5
+ t.string :email, :null => false, :default => ""
6
+ t.string :encrypted_password, :null => false, :default => ""
7
+
8
+ ## Recoverable
9
+ t.string :reset_password_token
10
+ t.datetime :reset_password_sent_at
11
+
12
+ ## Rememberable
13
+ t.datetime :remember_created_at
14
+
15
+ ## Trackable
16
+ t.integer :sign_in_count, :default => 0, :null => false
17
+ t.datetime :current_sign_in_at
18
+ t.datetime :last_sign_in_at
19
+ t.string :current_sign_in_ip
20
+ t.string :last_sign_in_ip
21
+
22
+ ## Confirmable
23
+ # t.string :confirmation_token
24
+ # t.datetime :confirmed_at
25
+ # t.datetime :confirmation_sent_at
26
+ # t.string :unconfirmed_email # Only if using reconfirmable
27
+
28
+ ## Lockable
29
+ # t.integer :failed_attempts, :default => 0, :null => false # Only if lock strategy is :failed_attempts
30
+ # t.string :unlock_token # Only if unlock strategy is :email or :both
31
+ # t.datetime :locked_at
32
+
33
+
34
+ # Omniauth
35
+ t.string :provider
36
+ t.string :uid
37
+
38
+ t.timestamps
39
+ end
40
+
41
+ add_index :users, :email, :unique => true
42
+ add_index :users, :reset_password_token, :unique => true
43
+ # add_index :users, :confirmation_token, :unique => true
44
+ # add_index :users, :unlock_token, :unique => true
45
+ end
46
+ end
@@ -0,0 +1,36 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20140120110923) do
15
+
16
+ create_table "users", force: true do |t|
17
+ t.string "email", default: "", null: false
18
+ t.string "encrypted_password", default: "", null: false
19
+ t.string "reset_password_token"
20
+ t.datetime "reset_password_sent_at"
21
+ t.datetime "remember_created_at"
22
+ t.integer "sign_in_count", default: 0, null: false
23
+ t.datetime "current_sign_in_at"
24
+ t.datetime "last_sign_in_at"
25
+ t.string "current_sign_in_ip"
26
+ t.string "last_sign_in_ip"
27
+ t.string "provider"
28
+ t.string "uid"
29
+ t.datetime "created_at"
30
+ t.datetime "updated_at"
31
+ end
32
+
33
+ add_index "users", ["email"], name: "index_users_on_email", unique: true
34
+ add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
35
+
36
+ end
@@ -0,0 +1,7 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7
+ # Mayor.create(name: 'Emanuel', city: cities.first)
File without changes
File without changes
File without changes
@@ -0,0 +1,58 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/404.html -->
52
+ <div class="dialog">
53
+ <h1>The page you were looking for doesn't exist.</h1>
54
+ <p>You may have mistyped the address or the page may have moved.</p>
55
+ </div>
56
+ <p>If you are the application owner check the logs for more information.</p>
57
+ </body>
58
+ </html>
@@ -0,0 +1,58 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/422.html -->
52
+ <div class="dialog">
53
+ <h1>The change you wanted was rejected.</h1>
54
+ <p>Maybe you tried to change something you didn't have access to.</p>
55
+ </div>
56
+ <p>If you are the application owner check the logs for more information.</p>
57
+ </body>
58
+ </html>
@@ -0,0 +1,57 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/500.html -->
52
+ <div class="dialog">
53
+ <h1>We're sorry, but something went wrong.</h1>
54
+ </div>
55
+ <p>If you are the application owner check the logs for more information.</p>
56
+ </body>
57
+ </html>
File without changes
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-agent: *
5
+ # Disallow: /
File without changes
File without changes
metadata ADDED
@@ -0,0 +1,215 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniauth-mercadolibre
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Gullit Miranda
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-01-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: omniauth
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: omniauth-oauth2
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.1'
34
+ - - '>='
35
+ - !ruby/object:Gem::Version
36
+ version: 1.1.2
37
+ type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: '1.1'
44
+ - - '>='
45
+ - !ruby/object:Gem::Version
46
+ version: 1.1.2
47
+ - !ruby/object:Gem::Dependency
48
+ name: rspec
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: '2.14'
54
+ - - '>='
55
+ - !ruby/object:Gem::Version
56
+ version: 2.14.1
57
+ type: :development
58
+ prerelease: false
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ~>
62
+ - !ruby/object:Gem::Version
63
+ version: '2.14'
64
+ - - '>='
65
+ - !ruby/object:Gem::Version
66
+ version: 2.14.1
67
+ - !ruby/object:Gem::Dependency
68
+ name: rack-test
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ~>
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ type: :development
75
+ prerelease: false
76
+ version_requirements: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ~>
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ - !ruby/object:Gem::Dependency
82
+ name: simplecov
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ~>
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ~>
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ - !ruby/object:Gem::Dependency
96
+ name: webmock
97
+ requirement: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ~>
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ~>
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
109
+ description: A MercadoLibre OAuth2 strategy for OmniAuth 1.x
110
+ email:
111
+ - gullitmiranda@requestdev.com.br
112
+ executables: []
113
+ extensions: []
114
+ extra_rdoc_files: []
115
+ files:
116
+ - .gitignore
117
+ - .rspec
118
+ - .ruby-gemset
119
+ - .ruby-version
120
+ - .rvmrc
121
+ - CHANGELOG.md
122
+ - Gemfile
123
+ - Guardfile
124
+ - MIT-LICENSE
125
+ - README.md
126
+ - Rakefile
127
+ - lib/omniauth-mercadolibre.rb
128
+ - lib/omniauth-mercadolibre/version.rb
129
+ - lib/omniauth/strategies/mercadolibre.rb
130
+ - omniauth-mercadolibre.gemspec
131
+ - omniauth-mercadolibre.sublime-project
132
+ - spec/fixtures/vcr_cassettes/callback_phase.yml
133
+ - spec/fixtures/vcr_cassettes/request_phase.yml
134
+ - spec/omniauth/strategies/mercado_libre_spec.rb
135
+ - spec/spec_helper.rb
136
+ - test/dump/.gitignore
137
+ - test/dump/Gemfile
138
+ - test/dump/README.rdoc
139
+ - test/dump/Rakefile
140
+ - test/dump/app/assets/images/.keep
141
+ - test/dump/app/assets/javascripts/application.js
142
+ - test/dump/app/assets/javascripts/home.js.coffee
143
+ - test/dump/app/assets/stylesheets/application.css
144
+ - test/dump/app/assets/stylesheets/home.css.scss
145
+ - test/dump/app/controllers/application_controller.rb
146
+ - test/dump/app/controllers/concerns/.keep
147
+ - test/dump/app/controllers/home_controller.rb
148
+ - test/dump/app/controllers/users/omniauth_callbacks_controller.rb
149
+ - test/dump/app/helpers/application_helper.rb
150
+ - test/dump/app/helpers/home_helper.rb
151
+ - test/dump/app/mailers/.keep
152
+ - test/dump/app/models/.keep
153
+ - test/dump/app/models/concerns/.keep
154
+ - test/dump/app/models/user.rb
155
+ - test/dump/app/views/home/index.html.erb
156
+ - test/dump/app/views/layouts/application.html.erb
157
+ - test/dump/bin/bundle
158
+ - test/dump/bin/rails
159
+ - test/dump/bin/rake
160
+ - test/dump/config.ru
161
+ - test/dump/config/application.rb
162
+ - test/dump/config/boot.rb
163
+ - test/dump/config/database.yml
164
+ - test/dump/config/environment.rb
165
+ - test/dump/config/environments/development.rb
166
+ - test/dump/config/environments/production.rb
167
+ - test/dump/config/environments/test.rb
168
+ - test/dump/config/initializers/backtrace_silencers.rb
169
+ - test/dump/config/initializers/devise.rb
170
+ - test/dump/config/initializers/filter_parameter_logging.rb
171
+ - test/dump/config/initializers/inflections.rb
172
+ - test/dump/config/initializers/mime_types.rb
173
+ - test/dump/config/initializers/secret_token.rb
174
+ - test/dump/config/initializers/session_store.rb
175
+ - test/dump/config/initializers/wrap_parameters.rb
176
+ - test/dump/config/locales/devise.en.yml
177
+ - test/dump/config/locales/en.yml
178
+ - test/dump/config/routes.rb
179
+ - test/dump/db/migrate/20140120110923_devise_create_users.rb
180
+ - test/dump/db/schema.rb
181
+ - test/dump/db/seeds.rb
182
+ - test/dump/lib/assets/.keep
183
+ - test/dump/lib/tasks/.keep
184
+ - test/dump/log/.keep
185
+ - test/dump/public/404.html
186
+ - test/dump/public/422.html
187
+ - test/dump/public/500.html
188
+ - test/dump/public/favicon.ico
189
+ - test/dump/public/robots.txt
190
+ - test/dump/vendor/assets/javascripts/.keep
191
+ - test/dump/vendor/assets/stylesheets/.keep
192
+ homepage: https://github.com/gullitmiranda/omniauth-mercadolibre
193
+ licenses: []
194
+ metadata: {}
195
+ post_install_message:
196
+ rdoc_options: []
197
+ require_paths:
198
+ - lib
199
+ required_ruby_version: !ruby/object:Gem::Requirement
200
+ requirements:
201
+ - - '>='
202
+ - !ruby/object:Gem::Version
203
+ version: '0'
204
+ required_rubygems_version: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - '>='
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ requirements: []
210
+ rubyforge_project:
211
+ rubygems_version: 2.2.1
212
+ signing_key:
213
+ specification_version: 4
214
+ summary: A MercadoLibre OAuth2 strategy for OmniAuth 1.x
215
+ test_files: []