dailycred 0.1.35 → 0.1.36

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. data/README.md +24 -2
  2. data/dailycred.gemspec +1 -1
  3. data/dummy/.gitignore +15 -0
  4. data/dummy/Gemfile +52 -0
  5. data/dummy/Guardfile +31 -0
  6. data/dummy/README.rdoc +261 -0
  7. data/dummy/Rakefile +7 -0
  8. data/dummy/app/assets/images/rails.png +0 -0
  9. data/dummy/app/assets/javascripts/application.js +15 -0
  10. data/dummy/app/assets/javascripts/posts.js.coffee +3 -0
  11. data/dummy/app/assets/stylesheets/application.css +13 -0
  12. data/dummy/app/assets/stylesheets/posts.css.scss +3 -0
  13. data/dummy/app/assets/stylesheets/scaffolds.css.scss +69 -0
  14. data/dummy/app/controllers/application_controller.rb +15 -0
  15. data/dummy/app/controllers/posts_controller.rb +85 -0
  16. data/dummy/app/helpers/application_helper.rb +2 -0
  17. data/dummy/app/helpers/posts_helper.rb +2 -0
  18. data/dummy/app/mailers/.gitkeep +0 -0
  19. data/dummy/app/models/.gitkeep +0 -0
  20. data/dummy/app/models/post.rb +3 -0
  21. data/dummy/app/models/user.rb +3 -0
  22. data/dummy/app/views/layouts/application.html.erb +14 -0
  23. data/dummy/app/views/posts/_form.html.erb +21 -0
  24. data/dummy/app/views/posts/edit.html.erb +6 -0
  25. data/dummy/app/views/posts/index.html.erb +23 -0
  26. data/dummy/app/views/posts/new.html.erb +5 -0
  27. data/dummy/app/views/posts/show.html.erb +10 -0
  28. data/dummy/config/application.rb +62 -0
  29. data/dummy/config/boot.rb +6 -0
  30. data/dummy/config/database.yml +25 -0
  31. data/dummy/config/environment.rb +5 -0
  32. data/dummy/config/environments/development.rb +37 -0
  33. data/dummy/config/environments/production.rb +67 -0
  34. data/dummy/config/environments/test.rb +37 -0
  35. data/dummy/config/initializers/backtrace_silencers.rb +7 -0
  36. data/dummy/config/initializers/inflections.rb +15 -0
  37. data/dummy/config/initializers/mime_types.rb +5 -0
  38. data/dummy/config/initializers/omniauth.rb +9 -0
  39. data/dummy/config/initializers/secret_token.rb +7 -0
  40. data/dummy/config/initializers/session_store.rb +8 -0
  41. data/dummy/config/initializers/wrap_parameters.rb +14 -0
  42. data/dummy/config/locales/en.yml +5 -0
  43. data/dummy/config/routes.rb +61 -0
  44. data/dummy/config.ru +4 -0
  45. data/dummy/db/migrate/20120925172903_create_users.rb +68 -0
  46. data/dummy/db/migrate/20120926012555_create_posts.rb +9 -0
  47. data/dummy/db/schema.rb +44 -0
  48. data/dummy/db/seeds.rb +7 -0
  49. data/dummy/lib/assets/.gitkeep +0 -0
  50. data/dummy/lib/tasks/.gitkeep +0 -0
  51. data/dummy/log/.gitkeep +0 -0
  52. data/dummy/public/404.html +26 -0
  53. data/dummy/public/422.html +26 -0
  54. data/dummy/public/500.html +25 -0
  55. data/dummy/public/favicon.ico +0 -0
  56. data/dummy/public/index.html +241 -0
  57. data/dummy/public/robots.txt +5 -0
  58. data/dummy/script/rails +6 -0
  59. data/dummy/test/fixtures/.gitkeep +0 -0
  60. data/dummy/test/fixtures/posts.yml +7 -0
  61. data/dummy/test/fixtures/users.yml +3 -0
  62. data/dummy/test/functional/.gitkeep +0 -0
  63. data/dummy/test/functional/posts_controller_test.rb +51 -0
  64. data/dummy/test/integration/.gitkeep +0 -0
  65. data/dummy/test/performance/browsing_test.rb +12 -0
  66. data/dummy/test/test_helper.rb +62 -0
  67. data/dummy/test/unit/.gitkeep +0 -0
  68. data/dummy/test/unit/helpers/posts_helper_test.rb +4 -0
  69. data/dummy/test/unit/post_test.rb +7 -0
  70. data/dummy/test/unit/user_test.rb +72 -0
  71. data/dummy/vendor/assets/javascripts/.gitkeep +0 -0
  72. data/dummy/vendor/assets/stylesheets/.gitkeep +0 -0
  73. data/dummy/vendor/plugins/.gitkeep +0 -0
  74. data/lib/dailycred/acts_as_dailycred.rb +40 -3
  75. data/lib/dailycred/client.rb +3 -1
  76. data/lib/dailycred/engine.rb +2 -1
  77. data/lib/generators/dailycred_generator.rb +1 -1
  78. data/lib/generators/templates/migration_create_user.rb +6 -2
  79. data/lib/omniauth/strategies/dailycred.rb +2 -5
  80. data/spec/support/dailycred_spec.rb +1 -1
  81. metadata +73 -2
@@ -16,9 +16,6 @@ module OmniAuth
16
16
  :token_url => '/oauth/access_token'
17
17
  }
18
18
 
19
- # parameters to expect and return from dailycred responses
20
- ATTRIBUTES = ["email", "username", "created", "verified", "admin", "referred_by", "tags", "referred"]
21
-
22
19
  # allows parameters to be passed through
23
20
  AUTH_PARAMS = ["action","identity_provider","referrer"]
24
21
 
@@ -64,8 +61,8 @@ module OmniAuth
64
61
  @duser = {'token' => access_token.token}
65
62
  @duser['provider'] = 'dailycred'
66
63
  @duser['uid'] = json['id'] || json['user_id']
67
- OmniAuth::Strategies::Dailycred::ATTRIBUTES.each do |attr|
68
- @duser[attr] = json[attr]
64
+ json.each do |k,v|
65
+ @duser[k] = v
69
66
  end
70
67
  json["identities"].each do |k, v|
71
68
  @duser[k] = v
@@ -55,7 +55,7 @@ describe Dailycred::Client do
55
55
  end
56
56
 
57
57
  it "resets a password" do
58
- json = json_response @dc.passReset("useruseruseruser@gmail.com")
58
+ json = json_response @dc.reset_password("useruseruseruser@gmail.com")
59
59
  json["worked"].should == true
60
60
  end
61
61
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dailycred
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.35
4
+ version: 0.1.36
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-25 00:00:00.000000000 Z
12
+ date: 2012-09-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omniauth
@@ -77,6 +77,77 @@ files:
77
77
  - docs/lib/omniauth-dailycred/version.html
78
78
  - docs/lib/omniauth/strategies/dailycred.html
79
79
  - docs/lib/user/user.html
80
+ - dummy/.gitignore
81
+ - dummy/Gemfile
82
+ - dummy/Guardfile
83
+ - dummy/README.rdoc
84
+ - dummy/Rakefile
85
+ - dummy/app/assets/images/rails.png
86
+ - dummy/app/assets/javascripts/application.js
87
+ - dummy/app/assets/javascripts/posts.js.coffee
88
+ - dummy/app/assets/stylesheets/application.css
89
+ - dummy/app/assets/stylesheets/posts.css.scss
90
+ - dummy/app/assets/stylesheets/scaffolds.css.scss
91
+ - dummy/app/controllers/application_controller.rb
92
+ - dummy/app/controllers/posts_controller.rb
93
+ - dummy/app/helpers/application_helper.rb
94
+ - dummy/app/helpers/posts_helper.rb
95
+ - dummy/app/mailers/.gitkeep
96
+ - dummy/app/models/.gitkeep
97
+ - dummy/app/models/post.rb
98
+ - dummy/app/models/user.rb
99
+ - dummy/app/views/layouts/application.html.erb
100
+ - dummy/app/views/posts/_form.html.erb
101
+ - dummy/app/views/posts/edit.html.erb
102
+ - dummy/app/views/posts/index.html.erb
103
+ - dummy/app/views/posts/new.html.erb
104
+ - dummy/app/views/posts/show.html.erb
105
+ - dummy/config.ru
106
+ - dummy/config/application.rb
107
+ - dummy/config/boot.rb
108
+ - dummy/config/database.yml
109
+ - dummy/config/environment.rb
110
+ - dummy/config/environments/development.rb
111
+ - dummy/config/environments/production.rb
112
+ - dummy/config/environments/test.rb
113
+ - dummy/config/initializers/backtrace_silencers.rb
114
+ - dummy/config/initializers/inflections.rb
115
+ - dummy/config/initializers/mime_types.rb
116
+ - dummy/config/initializers/omniauth.rb
117
+ - dummy/config/initializers/secret_token.rb
118
+ - dummy/config/initializers/session_store.rb
119
+ - dummy/config/initializers/wrap_parameters.rb
120
+ - dummy/config/locales/en.yml
121
+ - dummy/config/routes.rb
122
+ - dummy/db/migrate/20120925172903_create_users.rb
123
+ - dummy/db/migrate/20120926012555_create_posts.rb
124
+ - dummy/db/schema.rb
125
+ - dummy/db/seeds.rb
126
+ - dummy/lib/assets/.gitkeep
127
+ - dummy/lib/tasks/.gitkeep
128
+ - dummy/log/.gitkeep
129
+ - dummy/public/404.html
130
+ - dummy/public/422.html
131
+ - dummy/public/500.html
132
+ - dummy/public/favicon.ico
133
+ - dummy/public/index.html
134
+ - dummy/public/robots.txt
135
+ - dummy/script/rails
136
+ - dummy/test/fixtures/.gitkeep
137
+ - dummy/test/fixtures/posts.yml
138
+ - dummy/test/fixtures/users.yml
139
+ - dummy/test/functional/.gitkeep
140
+ - dummy/test/functional/posts_controller_test.rb
141
+ - dummy/test/integration/.gitkeep
142
+ - dummy/test/performance/browsing_test.rb
143
+ - dummy/test/test_helper.rb
144
+ - dummy/test/unit/.gitkeep
145
+ - dummy/test/unit/helpers/posts_helper_test.rb
146
+ - dummy/test/unit/post_test.rb
147
+ - dummy/test/unit/user_test.rb
148
+ - dummy/vendor/assets/javascripts/.gitkeep
149
+ - dummy/vendor/assets/stylesheets/.gitkeep
150
+ - dummy/vendor/plugins/.gitkeep
80
151
  - lib/dailycred.rb
81
152
  - lib/dailycred/acts_as_dailycred.rb
82
153
  - lib/dailycred/client.rb