headstart 0.11.1 → 0.11.2

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.11.1
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
- <script type="text/javascript">
7
- try {
8
- var pageTracker = _gat._getTracker("<%= Settings.google_analytics %>");
9
- pageTracker._trackPageview();
10
- } catch(err) {}
11
- </script>
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>
@@ -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, :last_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: 49
4
+ hash: 55
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 11
9
- - 1
10
- version: 0.11.1
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-08 00:00:00 -05:00
18
+ date: 2010-11-12 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency