dailycred 0.1.461 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +2 -2
- data/README.md +43 -15
- data/Rakefile +2 -2
- data/app/controllers/sessions_controller.rb +1 -1
- data/app/views/sessions/info.html.erb +2 -2
- data/config/routes.rb +4 -4
- data/dailycred.gemspec +1 -1
- data/dummy-preauth/.gitignore +16 -0
- data/dummy-preauth/Gemfile +42 -0
- data/dummy-preauth/README.rdoc +28 -0
- data/dummy-preauth/Rakefile +6 -0
- data/dummy-preauth/app/assets/images/rails.png +0 -0
- data/dummy-preauth/app/assets/javascripts/application.js +16 -0
- data/{dummy/app/assets/javascripts/posts.js.coffee → dummy-preauth/app/assets/javascripts/welcome.js.coffee} +1 -1
- data/dummy-preauth/app/assets/stylesheets/application.css +13 -0
- data/{dummy/app/assets/stylesheets/posts.css.scss → dummy-preauth/app/assets/stylesheets/welcome.css.scss} +1 -1
- data/dummy-preauth/app/controllers/application_controller.rb +6 -0
- data/{dummy/app/mailers/.gitkeep → dummy-preauth/app/controllers/concerns/.keep} +0 -0
- data/dummy-preauth/app/controllers/sessions_controller.rb +34 -0
- data/dummy-preauth/app/controllers/users_controller.rb +30 -0
- data/dummy-preauth/app/controllers/welcome_controller.rb +9 -0
- data/dummy-preauth/app/helpers/application_helper.rb +2 -0
- data/dummy-preauth/app/helpers/sessions_helper.rb +2 -0
- data/dummy-preauth/app/helpers/users_helper.rb +2 -0
- data/dummy-preauth/app/helpers/welcome_helper.rb +2 -0
- data/{dummy/app/models/.gitkeep → dummy-preauth/app/mailers/.keep} +0 -0
- data/{dummy/lib/assets/.gitkeep → dummy-preauth/app/models/.keep} +0 -0
- data/{dummy/lib/tasks/.gitkeep → dummy-preauth/app/models/concerns/.keep} +0 -0
- data/dummy-preauth/app/models/user.rb +34 -0
- data/dummy-preauth/app/views/layouts/application.html.erb +14 -0
- data/dummy-preauth/app/views/sessions/new.html.erb +15 -0
- data/dummy-preauth/app/views/users/_form.html.erb +20 -0
- data/dummy-preauth/app/views/users/edit.html.erb +3 -0
- data/dummy-preauth/app/views/users/new.html.erb +5 -0
- data/dummy-preauth/app/views/welcome/index.html.erb +2 -0
- data/dummy-preauth/bin/bundle +3 -0
- data/dummy-preauth/bin/rails +4 -0
- data/dummy-preauth/bin/rake +4 -0
- data/dummy-preauth/config.ru +4 -0
- data/dummy-preauth/config/application.rb +22 -0
- data/dummy-preauth/config/boot.rb +4 -0
- data/dummy-preauth/config/database.yml +25 -0
- data/dummy-preauth/config/environment.rb +5 -0
- data/dummy-preauth/config/environments/development.rb +27 -0
- data/dummy-preauth/config/environments/production.rb +80 -0
- data/dummy-preauth/config/environments/test.rb +36 -0
- data/dummy-preauth/config/initializers/backtrace_silencers.rb +7 -0
- data/dummy-preauth/config/initializers/filter_parameter_logging.rb +4 -0
- data/dummy-preauth/config/initializers/inflections.rb +16 -0
- data/dummy-preauth/config/initializers/mime_types.rb +5 -0
- data/dummy-preauth/config/initializers/omniauth.rb +9 -0
- data/dummy-preauth/config/initializers/secret_token.rb +12 -0
- data/dummy-preauth/config/initializers/session_store.rb +3 -0
- data/dummy-preauth/config/initializers/wrap_parameters.rb +14 -0
- data/dummy-preauth/config/locales/en.yml +23 -0
- data/dummy-preauth/config/routes.rb +57 -0
- data/dummy-preauth/db/migrate/20130423011519_create_users.rb +15 -0
- data/dummy-preauth/db/migrate/20130423011738_add_uuid_to_users.rb +5 -0
- data/dummy-preauth/db/schema.rb +26 -0
- data/dummy-preauth/db/seeds.rb +7 -0
- data/{dummy/log/.gitkeep → dummy-preauth/lib/assets/.keep} +0 -0
- data/dummy-preauth/lib/controller_authentication.rb +48 -0
- data/{dummy/test/fixtures/.gitkeep → dummy-preauth/lib/tasks/.keep} +0 -0
- data/{dummy/test/functional/.gitkeep → dummy-preauth/log/.keep} +0 -0
- data/dummy-preauth/public/404.html +27 -0
- data/dummy-preauth/public/422.html +26 -0
- data/dummy-preauth/public/500.html +26 -0
- data/{dummy/test/integration/.gitkeep → dummy-preauth/public/favicon.ico} +0 -0
- data/dummy-preauth/public/robots.txt +5 -0
- data/{dummy/test/unit/.gitkeep → dummy-preauth/test/controllers/.keep} +0 -0
- data/dummy-preauth/test/controllers/welcome_controller_test.rb +9 -0
- data/{dummy/vendor/assets/javascripts/.gitkeep → dummy-preauth/test/fixtures/.keep} +0 -0
- data/dummy-preauth/test/fixtures/users.yml +12 -0
- data/dummy-preauth/test/functional/sessions_controller_test.rb +22 -0
- data/dummy-preauth/test/functional/users_controller_test.rb +51 -0
- data/{dummy/vendor/assets/stylesheets/.gitkeep → dummy-preauth/test/helpers/.keep} +0 -0
- data/dummy-preauth/test/helpers/welcome_helper_test.rb +4 -0
- data/{dummy/vendor/plugins/.gitkeep → dummy-preauth/test/integration/.keep} +0 -0
- data/dummy-preauth/test/mailers/.keep +0 -0
- data/dummy-preauth/test/models/.keep +0 -0
- data/dummy-preauth/test/test_helper.rb +15 -0
- data/dummy-preauth/test/unit/user_test.rb +86 -0
- data/dummy-preauth/vendor/assets/javascripts/.keep +0 -0
- data/dummy-preauth/vendor/assets/stylesheets/.keep +0 -0
- data/dummy/.gitignore +3 -2
- data/dummy/Gemfile +14 -28
- data/dummy/README.rdoc +15 -248
- data/dummy/Rakefile +0 -1
- data/dummy/app/assets/javascripts/application.js +2 -1
- data/dummy/app/controllers/application_controller.rb +5 -4
- data/dummy/app/controllers/concerns/.keep +0 -0
- data/dummy/app/mailers/.keep +0 -0
- data/dummy/app/models/.keep +0 -0
- data/dummy/app/models/concerns/.keep +0 -0
- data/dummy/app/views/layouts/application.html.erb +2 -6
- data/dummy/bin/bundle +3 -0
- data/dummy/bin/rails +4 -0
- data/dummy/bin/rake +4 -0
- data/dummy/config/application.rb +2 -42
- data/dummy/config/boot.rb +0 -2
- data/dummy/config/environment.rb +2 -2
- data/dummy/config/environments/development.rb +9 -19
- data/dummy/config/environments/production.rb +40 -27
- data/dummy/config/environments/test.rb +12 -13
- data/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/dummy/config/initializers/inflections.rb +6 -5
- data/dummy/config/initializers/omniauth.rb +9 -2
- data/dummy/config/initializers/secret_token.rb +6 -1
- data/dummy/config/initializers/session_store.rb +1 -6
- data/dummy/config/initializers/wrap_parameters.rb +6 -6
- data/dummy/config/locales/en.yml +20 -2
- data/dummy/config/routes.rb +15 -26
- data/dummy/db/migrate/{20120925172903_create_users.rb → 20130417131939_create_users.rb} +7 -11
- data/dummy/db/schema.rb +9 -19
- data/dummy/lib/assets/.keep +0 -0
- data/dummy/lib/tasks/.keep +0 -0
- data/dummy/log/.keep +0 -0
- data/dummy/public/404.html +2 -1
- data/dummy/public/422.html +1 -1
- data/dummy/public/500.html +2 -1
- data/dummy/public/robots.txt +1 -1
- data/dummy/test/controllers/.keep +0 -0
- data/dummy/test/fixtures/.keep +0 -0
- data/dummy/test/helpers/.keep +0 -0
- data/dummy/test/integration/.keep +0 -0
- data/dummy/test/mailers/.keep +0 -0
- data/dummy/test/models/.keep +0 -0
- data/dummy/test/test_helper.rb +11 -58
- data/dummy/vendor/assets/javascripts/.keep +0 -0
- data/dummy/vendor/assets/stylesheets/.keep +0 -0
- data/lib/dailycred.rb +2 -2
- data/lib/dailycred/acts_as_dailycred.rb +4 -17
- data/lib/dailycred/client.rb +1 -0
- data/lib/dailycred/engine.rb +3 -2
- data/lib/dailycred/helper.rb +4 -4
- data/lib/dailycred/middleware.rb +5 -2
- data/lib/dailycred/version.rb +1 -1
- data/lib/generators/dailycred_generator.rb +17 -8
- data/lib/generators/templates/migration_create_user.rb +3 -9
- data/lib/omniauth/strategies/dailycred.rb +2 -0
- data/spec/helper_spec.rb +1 -3
- data/test/generator_test.rb +4 -3
- metadata +103 -52
- data/dummy/Guardfile +0 -31
- data/dummy/app/assets/stylesheets/scaffolds.css.scss +0 -69
- data/dummy/app/controllers/posts_controller.rb +0 -86
- data/dummy/app/helpers/posts_helper.rb +0 -2
- data/dummy/app/models/post.rb +0 -3
- data/dummy/app/views/posts/_form.html.erb +0 -21
- data/dummy/app/views/posts/edit.html.erb +0 -6
- data/dummy/app/views/posts/index.html.erb +0 -23
- data/dummy/app/views/posts/new.html.erb +0 -5
- data/dummy/app/views/posts/show.html.erb +0 -10
- data/dummy/db/migrate/20120926012555_create_posts.rb +0 -9
- data/dummy/db/migrate/20121002192037_update_users_2.rb +0 -70
- data/dummy/db/migrate/20121108192739_add_column_to_posts.rb +0 -5
- data/dummy/public/index.html +0 -241
- data/dummy/script/rails +0 -6
- data/dummy/test/fixtures/posts.yml +0 -7
- data/dummy/test/fixtures/users.yml +0 -3
- data/dummy/test/functional/posts_controller_test.rb +0 -51
- data/dummy/test/performance/browsing_test.rb +0 -12
- data/dummy/test/unit/helpers/posts_helper_test.rb +0 -4
- data/dummy/test/unit/post_test.rb +0 -7
- data/dummy/test/unit/user_test.rb +0 -77
- data/spec/omniauth/strategies/dailycred_spec.rb +0 -64
data/lib/dailycred/helper.rb
CHANGED
@@ -30,12 +30,12 @@ module Dailycred
|
|
30
30
|
|
31
31
|
def connect_path(params={})
|
32
32
|
url = "#{request.protocol}#{request.host_with_port}/auth/dailycred"
|
33
|
-
|
33
|
+
params_array = []
|
34
34
|
params.each do |k,v|
|
35
|
-
|
35
|
+
params_array << "#{k}=#{v.to_s}"
|
36
36
|
end
|
37
|
-
url += "?" if
|
38
|
-
url +=
|
37
|
+
url += "?" if params_array.size > 0
|
38
|
+
url += params_array.join("&")
|
39
39
|
end
|
40
40
|
|
41
41
|
def connect_user provider, user=nil
|
data/lib/dailycred/middleware.rb
CHANGED
@@ -25,7 +25,7 @@ module Dailycred
|
|
25
25
|
@response = [body]
|
26
26
|
end
|
27
27
|
end
|
28
|
-
|
28
|
+
@env['rack.session']['omniauth.state'] ||= SecureRandom.hex(24)
|
29
29
|
[@status, @headers, @response]
|
30
30
|
end
|
31
31
|
|
@@ -34,13 +34,16 @@ module Dailycred
|
|
34
34
|
def render_dailycred_scripts
|
35
35
|
str =<<-EOT
|
36
36
|
<!-- dailycred -->
|
37
|
+
#{'<script src="https://login.persona.org/include.js"></script>' if @opts[:persona_audience]}
|
37
38
|
<script type="text/javascript">
|
38
39
|
(function() {
|
39
40
|
var dc, url;
|
40
41
|
window.dc_opts = {
|
41
42
|
clientId: "#{@client_id}",
|
42
|
-
home: "#{@opts[:url]}"
|
43
|
+
home: "#{@opts[:url]}",
|
44
|
+
state: "#{@env['rack.session']['omniauth.state']}"
|
43
45
|
#{", type: \"#{@status.to_s}\"" if @status == 500 || @status == 400}
|
46
|
+
#{", personaAudience: \"#{@opts[:persona_audience]}\"" if @opts[:persona_audience]}
|
44
47
|
};
|
45
48
|
dc = document.createElement("script");
|
46
49
|
url = dc_opts.home + "/public/js/cred.coffee";
|
data/lib/dailycred/version.rb
CHANGED
@@ -10,6 +10,11 @@ class DailycredGenerator < Rails::Generators::Base
|
|
10
10
|
|
11
11
|
argument :client_id, :type => :string, :default => CLIENT_ID_DEFAULT, :banner => 'dailycred_client_id'
|
12
12
|
argument :secret_key, :type => :string, :default => CLIENT_SECRET_DEFAULT, :banner => 'dailycred_secret_key'
|
13
|
+
class_option :bootstrap, :type => :boolean, :default => true,
|
14
|
+
:description => "Indicates whether you want to generate the user model (with migration)
|
15
|
+
and mount the engine's sessions_controller.
|
16
|
+
Use --skip-bootstrap if you want are adding this to project that aleady has authentication."
|
17
|
+
|
13
18
|
|
14
19
|
APP_ROUTES_LINES =<<-EOS
|
15
20
|
mount Dailycred::Engine => '/auth', :as => 'dailycred_engine'
|
@@ -35,14 +40,18 @@ class DailycredGenerator < Rails::Generators::Base
|
|
35
40
|
template "omniauth.rb", "config/initializers/omniauth.rb"
|
36
41
|
# get client info from login if they didnt specify info
|
37
42
|
puts "Please manually configure your API keys in config/initializers/omniauth.rb"
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
43
|
+
if options.bootstrap?
|
44
|
+
# application controller
|
45
|
+
insert_into_file "app/controllers/application_controller.rb", APP_CONTROLLER_LINES, :after => /class ApplicationController\n|class ApplicationController .*\n/
|
46
|
+
# user model
|
47
|
+
copy_file "user.rb", "app/models/user.rb"
|
48
|
+
# user migration
|
49
|
+
copy_file "migration_create_user.rb", "db/migrate/#{Time.now.strftime('%Y%m%d%H%M%S')}_create_users.rb"
|
50
|
+
# confiffg/routes
|
51
|
+
inject_into_file "config/routes.rb", APP_ROUTES_LINES, :after => ".draw do\n"
|
52
|
+
else
|
53
|
+
puts "Make sure you implement your omniauth callback. For directions visit https://github.com/intridea/omniauth#integrating-omniauth-into-your-application"
|
54
|
+
end
|
46
55
|
end
|
47
56
|
|
48
57
|
private
|
@@ -10,16 +10,13 @@ class CreateUsers < ActiveRecord::Migration
|
|
10
10
|
t.boolean :admin
|
11
11
|
t.string :referred_by
|
12
12
|
t.string :token
|
13
|
-
t.text :facebook
|
14
13
|
t.text :tags
|
15
14
|
t.text :referred
|
16
|
-
t.text :google
|
17
|
-
t.text :twitter
|
18
|
-
t.text :github
|
19
15
|
t.text :access_tokens
|
20
16
|
t.boolean :subscribed
|
21
17
|
t.string :display
|
22
18
|
t.text :identities
|
19
|
+
t.datetime :created
|
23
20
|
|
24
21
|
t.timestamps
|
25
22
|
end
|
@@ -28,20 +25,17 @@ class CreateUsers < ActiveRecord::Migration
|
|
28
25
|
safe_column :users, :uid, :string
|
29
26
|
safe_column :users, :email, :string
|
30
27
|
safe_column :users, :username, :string
|
31
|
-
safe_column :users, :verified, :
|
28
|
+
safe_column :users, :verified, :boolean
|
32
29
|
safe_column :users, :admin, :boolean
|
33
30
|
safe_column :users, :referred, :string
|
34
31
|
safe_column :users, :token, :string
|
35
|
-
safe_column :users, :facebook, :text
|
36
32
|
safe_column :users, :tags, :text
|
37
33
|
safe_column :users, :referred, :text
|
38
|
-
safe_column :users, :google, :text
|
39
|
-
safe_column :users, :twitter, :text
|
40
|
-
safe_column :users, :github, :text
|
41
34
|
safe_column :users, :access_tokens, :text
|
42
35
|
safe_column :users, :display, :string
|
43
36
|
safe_column :users, :subscribed, :boolean
|
44
37
|
safe_column :users, :identities, :text
|
38
|
+
safe_column :users, :created, :datetime
|
45
39
|
end
|
46
40
|
end
|
47
41
|
|
@@ -69,6 +69,8 @@ module OmniAuth
|
|
69
69
|
@duser[k][:access_token] = json["access_tokens"][k]
|
70
70
|
end if !json["identities"].nil?
|
71
71
|
pp @duser if options[:verbose]
|
72
|
+
created = json['created'] / 1000
|
73
|
+
@duser['created'] = DateTime.strptime(created.to_s, '%s')
|
72
74
|
@duser.delete("id")
|
73
75
|
|
74
76
|
@duser
|
data/spec/helper_spec.rb
CHANGED
@@ -3,14 +3,12 @@
|
|
3
3
|
require 'simplecov'
|
4
4
|
SimpleCov.start
|
5
5
|
require 'rspec'
|
6
|
-
require 'rack/test'
|
6
|
+
# require 'rack/test'
|
7
7
|
require 'omniauth'
|
8
8
|
require 'dailycred'
|
9
9
|
|
10
10
|
Dir[File.expand_path('../support/**/*', __FILE__)].each { |f| require f }
|
11
11
|
|
12
|
-
require 'omniauth/strategies/dailycred_spec'
|
13
|
-
|
14
12
|
RSpec.configure do |config|
|
15
13
|
config.include Rack::Test::Methods
|
16
14
|
config.extend OmniAuth::Test::StrategyMacros, :type => :strategy
|
data/test/generator_test.rb
CHANGED
@@ -45,6 +45,10 @@ class GeneratorTest < Rails::Generators::TestCase
|
|
45
45
|
assert_credentials "aaa", "bbb"
|
46
46
|
end
|
47
47
|
|
48
|
+
test "generator works when skipping bootstrap" do
|
49
|
+
test_generator ["aaa", "bbb", "--skip-bootstrap"]
|
50
|
+
end
|
51
|
+
|
48
52
|
# test "generator works with login" do
|
49
53
|
# generator_class.any_instance.stubs(:get_input).returns(["localtest@dailycred.com","password"])
|
50
54
|
# test_generator
|
@@ -70,9 +74,6 @@ class GeneratorTest < Rails::Generators::TestCase
|
|
70
74
|
end
|
71
75
|
|
72
76
|
assert_migration "db/migrate/create_users.rb" do |migration|
|
73
|
-
assert migration.include? ":twitter"
|
74
|
-
assert migration.include? ":github"
|
75
|
-
assert migration.include? ":google"
|
76
77
|
end
|
77
78
|
end
|
78
79
|
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dailycred
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Hank Stoever
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-04-23 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: omniauth
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ! '>='
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ! '>='
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: omniauth-oauth2
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ! '>='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ! '>='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -78,31 +73,101 @@ files:
|
|
78
73
|
- docs/lib/omniauth-dailycred/version.html
|
79
74
|
- docs/lib/omniauth/strategies/dailycred.html
|
80
75
|
- docs/lib/user/user.html
|
76
|
+
- dummy-preauth/.gitignore
|
77
|
+
- dummy-preauth/Gemfile
|
78
|
+
- dummy-preauth/README.rdoc
|
79
|
+
- dummy-preauth/Rakefile
|
80
|
+
- dummy-preauth/app/assets/images/rails.png
|
81
|
+
- dummy-preauth/app/assets/javascripts/application.js
|
82
|
+
- dummy-preauth/app/assets/javascripts/welcome.js.coffee
|
83
|
+
- dummy-preauth/app/assets/stylesheets/application.css
|
84
|
+
- dummy-preauth/app/assets/stylesheets/welcome.css.scss
|
85
|
+
- dummy-preauth/app/controllers/application_controller.rb
|
86
|
+
- dummy-preauth/app/controllers/concerns/.keep
|
87
|
+
- dummy-preauth/app/controllers/sessions_controller.rb
|
88
|
+
- dummy-preauth/app/controllers/users_controller.rb
|
89
|
+
- dummy-preauth/app/controllers/welcome_controller.rb
|
90
|
+
- dummy-preauth/app/helpers/application_helper.rb
|
91
|
+
- dummy-preauth/app/helpers/sessions_helper.rb
|
92
|
+
- dummy-preauth/app/helpers/users_helper.rb
|
93
|
+
- dummy-preauth/app/helpers/welcome_helper.rb
|
94
|
+
- dummy-preauth/app/mailers/.keep
|
95
|
+
- dummy-preauth/app/models/.keep
|
96
|
+
- dummy-preauth/app/models/concerns/.keep
|
97
|
+
- dummy-preauth/app/models/user.rb
|
98
|
+
- dummy-preauth/app/views/layouts/application.html.erb
|
99
|
+
- dummy-preauth/app/views/sessions/new.html.erb
|
100
|
+
- dummy-preauth/app/views/users/_form.html.erb
|
101
|
+
- dummy-preauth/app/views/users/edit.html.erb
|
102
|
+
- dummy-preauth/app/views/users/new.html.erb
|
103
|
+
- dummy-preauth/app/views/welcome/index.html.erb
|
104
|
+
- dummy-preauth/bin/bundle
|
105
|
+
- dummy-preauth/bin/rails
|
106
|
+
- dummy-preauth/bin/rake
|
107
|
+
- dummy-preauth/config.ru
|
108
|
+
- dummy-preauth/config/application.rb
|
109
|
+
- dummy-preauth/config/boot.rb
|
110
|
+
- dummy-preauth/config/database.yml
|
111
|
+
- dummy-preauth/config/environment.rb
|
112
|
+
- dummy-preauth/config/environments/development.rb
|
113
|
+
- dummy-preauth/config/environments/production.rb
|
114
|
+
- dummy-preauth/config/environments/test.rb
|
115
|
+
- dummy-preauth/config/initializers/backtrace_silencers.rb
|
116
|
+
- dummy-preauth/config/initializers/filter_parameter_logging.rb
|
117
|
+
- dummy-preauth/config/initializers/inflections.rb
|
118
|
+
- dummy-preauth/config/initializers/mime_types.rb
|
119
|
+
- dummy-preauth/config/initializers/omniauth.rb
|
120
|
+
- dummy-preauth/config/initializers/secret_token.rb
|
121
|
+
- dummy-preauth/config/initializers/session_store.rb
|
122
|
+
- dummy-preauth/config/initializers/wrap_parameters.rb
|
123
|
+
- dummy-preauth/config/locales/en.yml
|
124
|
+
- dummy-preauth/config/routes.rb
|
125
|
+
- dummy-preauth/db/migrate/20130423011519_create_users.rb
|
126
|
+
- dummy-preauth/db/migrate/20130423011738_add_uuid_to_users.rb
|
127
|
+
- dummy-preauth/db/schema.rb
|
128
|
+
- dummy-preauth/db/seeds.rb
|
129
|
+
- dummy-preauth/lib/assets/.keep
|
130
|
+
- dummy-preauth/lib/controller_authentication.rb
|
131
|
+
- dummy-preauth/lib/tasks/.keep
|
132
|
+
- dummy-preauth/log/.keep
|
133
|
+
- dummy-preauth/public/404.html
|
134
|
+
- dummy-preauth/public/422.html
|
135
|
+
- dummy-preauth/public/500.html
|
136
|
+
- dummy-preauth/public/favicon.ico
|
137
|
+
- dummy-preauth/public/robots.txt
|
138
|
+
- dummy-preauth/test/controllers/.keep
|
139
|
+
- dummy-preauth/test/controllers/welcome_controller_test.rb
|
140
|
+
- dummy-preauth/test/fixtures/.keep
|
141
|
+
- dummy-preauth/test/fixtures/users.yml
|
142
|
+
- dummy-preauth/test/functional/sessions_controller_test.rb
|
143
|
+
- dummy-preauth/test/functional/users_controller_test.rb
|
144
|
+
- dummy-preauth/test/helpers/.keep
|
145
|
+
- dummy-preauth/test/helpers/welcome_helper_test.rb
|
146
|
+
- dummy-preauth/test/integration/.keep
|
147
|
+
- dummy-preauth/test/mailers/.keep
|
148
|
+
- dummy-preauth/test/models/.keep
|
149
|
+
- dummy-preauth/test/test_helper.rb
|
150
|
+
- dummy-preauth/test/unit/user_test.rb
|
151
|
+
- dummy-preauth/vendor/assets/javascripts/.keep
|
152
|
+
- dummy-preauth/vendor/assets/stylesheets/.keep
|
81
153
|
- dummy/.gitignore
|
82
154
|
- dummy/Gemfile
|
83
|
-
- dummy/Guardfile
|
84
155
|
- dummy/README.rdoc
|
85
156
|
- dummy/Rakefile
|
86
157
|
- dummy/app/assets/images/rails.png
|
87
158
|
- dummy/app/assets/javascripts/application.js
|
88
|
-
- dummy/app/assets/javascripts/posts.js.coffee
|
89
159
|
- dummy/app/assets/stylesheets/application.css
|
90
|
-
- dummy/app/assets/stylesheets/posts.css.scss
|
91
|
-
- dummy/app/assets/stylesheets/scaffolds.css.scss
|
92
160
|
- dummy/app/controllers/application_controller.rb
|
93
|
-
- dummy/app/controllers/
|
161
|
+
- dummy/app/controllers/concerns/.keep
|
94
162
|
- dummy/app/helpers/application_helper.rb
|
95
|
-
- dummy/app/
|
96
|
-
- dummy/app/
|
97
|
-
- dummy/app/models/.
|
98
|
-
- dummy/app/models/post.rb
|
163
|
+
- dummy/app/mailers/.keep
|
164
|
+
- dummy/app/models/.keep
|
165
|
+
- dummy/app/models/concerns/.keep
|
99
166
|
- dummy/app/models/user.rb
|
100
167
|
- dummy/app/views/layouts/application.html.erb
|
101
|
-
- dummy/
|
102
|
-
- dummy/
|
103
|
-
- dummy/
|
104
|
-
- dummy/app/views/posts/new.html.erb
|
105
|
-
- dummy/app/views/posts/show.html.erb
|
168
|
+
- dummy/bin/bundle
|
169
|
+
- dummy/bin/rails
|
170
|
+
- dummy/bin/rake
|
106
171
|
- dummy/config.ru
|
107
172
|
- dummy/config/application.rb
|
108
173
|
- dummy/config/boot.rb
|
@@ -112,6 +177,7 @@ files:
|
|
112
177
|
- dummy/config/environments/production.rb
|
113
178
|
- dummy/config/environments/test.rb
|
114
179
|
- dummy/config/initializers/backtrace_silencers.rb
|
180
|
+
- dummy/config/initializers/filter_parameter_logging.rb
|
115
181
|
- dummy/config/initializers/inflections.rb
|
116
182
|
- dummy/config/initializers/mime_types.rb
|
117
183
|
- dummy/config/initializers/omniauth.rb
|
@@ -120,37 +186,26 @@ files:
|
|
120
186
|
- dummy/config/initializers/wrap_parameters.rb
|
121
187
|
- dummy/config/locales/en.yml
|
122
188
|
- dummy/config/routes.rb
|
123
|
-
- dummy/db/migrate/
|
124
|
-
- dummy/db/migrate/20120926012555_create_posts.rb
|
125
|
-
- dummy/db/migrate/20121002192037_update_users_2.rb
|
126
|
-
- dummy/db/migrate/20121108192739_add_column_to_posts.rb
|
189
|
+
- dummy/db/migrate/20130417131939_create_users.rb
|
127
190
|
- dummy/db/schema.rb
|
128
191
|
- dummy/db/seeds.rb
|
129
|
-
- dummy/lib/assets/.
|
130
|
-
- dummy/lib/tasks/.
|
131
|
-
- dummy/log/.
|
192
|
+
- dummy/lib/assets/.keep
|
193
|
+
- dummy/lib/tasks/.keep
|
194
|
+
- dummy/log/.keep
|
132
195
|
- dummy/public/404.html
|
133
196
|
- dummy/public/422.html
|
134
197
|
- dummy/public/500.html
|
135
198
|
- dummy/public/favicon.ico
|
136
|
-
- dummy/public/index.html
|
137
199
|
- dummy/public/robots.txt
|
138
|
-
- dummy/
|
139
|
-
- dummy/test/fixtures/.
|
140
|
-
- dummy/test/
|
141
|
-
- dummy/test/
|
142
|
-
- dummy/test/
|
143
|
-
- dummy/test/
|
144
|
-
- dummy/test/integration/.gitkeep
|
145
|
-
- dummy/test/performance/browsing_test.rb
|
200
|
+
- dummy/test/controllers/.keep
|
201
|
+
- dummy/test/fixtures/.keep
|
202
|
+
- dummy/test/helpers/.keep
|
203
|
+
- dummy/test/integration/.keep
|
204
|
+
- dummy/test/mailers/.keep
|
205
|
+
- dummy/test/models/.keep
|
146
206
|
- dummy/test/test_helper.rb
|
147
|
-
- dummy/
|
148
|
-
- dummy/
|
149
|
-
- dummy/test/unit/post_test.rb
|
150
|
-
- dummy/test/unit/user_test.rb
|
151
|
-
- dummy/vendor/assets/javascripts/.gitkeep
|
152
|
-
- dummy/vendor/assets/stylesheets/.gitkeep
|
153
|
-
- dummy/vendor/plugins/.gitkeep
|
207
|
+
- dummy/vendor/assets/javascripts/.keep
|
208
|
+
- dummy/vendor/assets/stylesheets/.keep
|
154
209
|
- lib/dailycred.rb
|
155
210
|
- lib/dailycred/acts_as_dailycred.rb
|
156
211
|
- lib/dailycred/client.rb
|
@@ -171,40 +226,36 @@ files:
|
|
171
226
|
- lib/omniauth/strategies/dailycred.rb
|
172
227
|
- script/download_info.rb
|
173
228
|
- spec/helper_spec.rb
|
174
|
-
- spec/omniauth/strategies/dailycred_spec.rb
|
175
229
|
- spec/support/dailycred_spec.rb
|
176
230
|
- spec/support/shared_examples.rb
|
177
231
|
- test/generator_test.rb
|
178
232
|
- test/test_helper.rb
|
179
|
-
homepage: https://
|
233
|
+
homepage: https://github.com/dailycred/dailycred
|
180
234
|
licenses: []
|
235
|
+
metadata: {}
|
181
236
|
post_install_message:
|
182
237
|
rdoc_options: []
|
183
238
|
require_paths:
|
184
239
|
- lib
|
185
240
|
required_ruby_version: !ruby/object:Gem::Requirement
|
186
|
-
none: false
|
187
241
|
requirements:
|
188
242
|
- - ! '>='
|
189
243
|
- !ruby/object:Gem::Version
|
190
244
|
version: '0'
|
191
245
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
192
|
-
none: false
|
193
246
|
requirements:
|
194
247
|
- - ! '>='
|
195
248
|
- !ruby/object:Gem::Version
|
196
249
|
version: '0'
|
197
250
|
requirements: []
|
198
251
|
rubyforge_project:
|
199
|
-
rubygems_version:
|
252
|
+
rubygems_version: 2.0.3
|
200
253
|
signing_key:
|
201
|
-
specification_version:
|
254
|
+
specification_version: 4
|
202
255
|
summary: ''
|
203
256
|
test_files:
|
204
257
|
- spec/helper_spec.rb
|
205
|
-
- spec/omniauth/strategies/dailycred_spec.rb
|
206
258
|
- spec/support/dailycred_spec.rb
|
207
259
|
- spec/support/shared_examples.rb
|
208
260
|
- test/generator_test.rb
|
209
261
|
- test/test_helper.rb
|
210
|
-
has_rdoc:
|
data/dummy/Guardfile
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# A sample Guardfile
|
2
|
-
# More info at https://github.com/guard/guard#readme
|
3
|
-
|
4
|
-
guard :test do
|
5
|
-
watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
|
6
|
-
watch(%r{^test/.+_test\.rb$})
|
7
|
-
watch('test/test_helper.rb') { "test" }
|
8
|
-
watch(%r{/test\/unit\/(.+)_test.rb/})
|
9
|
-
watch('../lib/dailycred/acts_as_dailycred.rb') { "test/unit/user_test.rb"}
|
10
|
-
Dir[File.expand_path('../../lib/dailycred/*.rb', __FILE__)].each do |f|
|
11
|
-
watch(f) {"test/unit/user_test.rb"}
|
12
|
-
end
|
13
|
-
|
14
|
-
# Rails example
|
15
|
-
watch(%r{^app/models/(.+)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" }
|
16
|
-
watch(%r{^app/controllers/(.+)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" }
|
17
|
-
watch(%r{^app/views/.+\.rb$}) { "test/integration" }
|
18
|
-
watch('app/controllers/application_controller.rb') { ["test/functional", "test/integration"] }
|
19
|
-
end
|
20
|
-
|
21
|
-
guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do
|
22
|
-
watch('config/application.rb')
|
23
|
-
watch('config/environment.rb')
|
24
|
-
watch('config/environments/test.rb')
|
25
|
-
watch(%r{^config/initializers/.+\.rb$})
|
26
|
-
watch('Gemfile')
|
27
|
-
watch('Gemfile.lock')
|
28
|
-
watch('spec/spec_helper.rb') { :rspec }
|
29
|
-
watch('test/test_helper.rb') { :test_unit }
|
30
|
-
watch(%r{features/support/}) { :cucumber }
|
31
|
-
end
|