thincloud-auth 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/generators/thincloud/auth/auth_generator.rb +6 -6
- data/lib/generators/thincloud/auth/templates/{sessions_controller_spec.rb → sessions_controller_test.rb} +1 -1
- data/lib/generators/thincloud/auth/templates/{user_authentication_spec.rb → user_authentication_test.rb} +1 -1
- data/lib/generators/thincloud/auth/templates/users_controller_spec.rb +1 -1
- data/lib/thincloud/auth/version.rb +1 -1
- metadata +4 -4
@@ -9,10 +9,10 @@ module Thincloud
|
|
9
9
|
|
10
10
|
def auth
|
11
11
|
copy_file "sessions_controller.rb", "app/controllers/sessions_controller.rb"
|
12
|
-
copy_file "
|
12
|
+
copy_file "sessions_controller_test.rb", "test/controllers/sessions_controller_test.rb"
|
13
13
|
|
14
14
|
copy_file "users_controller.rb", "app/controllers/users_controller.rb"
|
15
|
-
copy_file "
|
15
|
+
copy_file "users_controller_test.rb", "test/controllers/users_controller_test.rb"
|
16
16
|
|
17
17
|
empty_directory "app/views/sessions"
|
18
18
|
copy_file "login.html.erb", "app/views/sessions/new.html.erb"
|
@@ -20,15 +20,15 @@ module Thincloud
|
|
20
20
|
empty_directory "app/views/users"
|
21
21
|
copy_file "signup.html.erb", "app/views/users/new.html.erb"
|
22
22
|
|
23
|
-
|
24
|
-
|
23
|
+
user_test_path = Rails.root.join("test/models/user_test.rb")
|
24
|
+
test_existed = File.exist?(user_test_path)
|
25
25
|
generate "model", "user email password_digest --skip-test"
|
26
|
-
File.unlink
|
26
|
+
File.unlink user_test_path unless test_existed
|
27
27
|
inject_into_class("app/models/user.rb", User) do
|
28
28
|
" attr_accessible :password, :password_confirmation\n"
|
29
29
|
end
|
30
30
|
|
31
|
-
copy_file "
|
31
|
+
copy_file "user_authentication_test.rb", "test/models/user_authentication_test.rb"
|
32
32
|
|
33
33
|
route 'get "signup", to: "users#new", as: "signup"'
|
34
34
|
route 'get "login", to: "sessions#new", as: "login"'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thincloud-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
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-08
|
12
|
+
date: 2012-09-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: warden
|
@@ -59,9 +59,9 @@ files:
|
|
59
59
|
- lib/generators/thincloud/auth/templates/initializer.rb
|
60
60
|
- lib/generators/thincloud/auth/templates/login.html.erb
|
61
61
|
- lib/generators/thincloud/auth/templates/sessions_controller.rb
|
62
|
-
- lib/generators/thincloud/auth/templates/
|
62
|
+
- lib/generators/thincloud/auth/templates/sessions_controller_test.rb
|
63
63
|
- lib/generators/thincloud/auth/templates/signup.html.erb
|
64
|
-
- lib/generators/thincloud/auth/templates/
|
64
|
+
- lib/generators/thincloud/auth/templates/user_authentication_test.rb
|
65
65
|
- lib/generators/thincloud/auth/templates/users_controller.rb
|
66
66
|
- lib/generators/thincloud/auth/templates/users_controller_spec.rb
|
67
67
|
- lib/thincloud-auth.rb
|