headstart 0.11.1 → 0.11.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/generators/headstart/templates/_google_analytics.html.erb +11 -9
- data/lib/headstart/user.rb +7 -1
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.11.
|
1
|
+
0.11.2
|
@@ -1,11 +1,13 @@
|
|
1
1
|
<script type="text/javascript">
|
2
|
-
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
3
|
-
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
4
|
-
</script>
|
5
2
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
3
|
+
var _gaq = _gaq || [];
|
4
|
+
_gaq.push(['_setAccount', '<%= Settings.google_analytics %>']);
|
5
|
+
_gaq.push(['_trackPageview']);
|
6
|
+
|
7
|
+
(function() {
|
8
|
+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
9
|
+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
10
|
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
11
|
+
})();
|
12
|
+
|
13
|
+
</script>
|
data/lib/headstart/user.rb
CHANGED
@@ -58,7 +58,8 @@ module Headstart
|
|
58
58
|
validates_presence_of :password, :unless => :password_optional?
|
59
59
|
validates_confirmation_of :password, :unless => :password_optional?
|
60
60
|
|
61
|
-
validates_presence_of :first_name
|
61
|
+
validates_presence_of :first_name
|
62
|
+
validates_presence_of :first_name, :last_name, :if => :last_name_should_be_required?
|
62
63
|
end
|
63
64
|
end
|
64
65
|
end
|
@@ -79,6 +80,10 @@ module Headstart
|
|
79
80
|
end
|
80
81
|
|
81
82
|
module InstanceMethods
|
83
|
+
def last_name_should_be_required?
|
84
|
+
true
|
85
|
+
end
|
86
|
+
|
82
87
|
# Am I authenticated with given password?
|
83
88
|
#
|
84
89
|
# @param [String] plain-text password
|
@@ -238,6 +243,7 @@ module Headstart
|
|
238
243
|
end
|
239
244
|
|
240
245
|
module ClassMethods
|
246
|
+
|
241
247
|
# Authenticate with email and password.
|
242
248
|
#
|
243
249
|
# @param [String, String] email and password
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: headstart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 55
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 11
|
9
|
-
-
|
10
|
-
version: 0.11.
|
9
|
+
- 2
|
10
|
+
version: 0.11.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Bran Burridge
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-11-
|
18
|
+
date: 2010-11-12 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|