google_authentication 0.1.0 → 0.1.1
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/CHANGES.markdown +7 -0
- data/VERSION +1 -1
- data/google_authentication.gemspec +2 -1
- data/lib/google_authentication.rb +6 -1
- data/spec/google_authentication_spec.rb +6 -0
- metadata +3 -2
data/CHANGES.markdown
ADDED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{google_authentication}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Fabio Napoleoni"]
|
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
".document",
|
21
21
|
".rspec",
|
22
22
|
".rvmrc",
|
23
|
+
"CHANGES.markdown",
|
23
24
|
"Gemfile",
|
24
25
|
"Guardfile",
|
25
26
|
"LICENSE.txt",
|
@@ -29,7 +29,12 @@ module GoogleAuthentication
|
|
29
29
|
# to the application
|
30
30
|
# @return [bool] true iff the GoogleAuthentication model is already defined
|
31
31
|
def self.define_routes?
|
32
|
-
|
32
|
+
begin
|
33
|
+
Object.const_get(model_name.to_s.camelize)
|
34
|
+
rescue NameError
|
35
|
+
return false
|
36
|
+
end
|
37
|
+
return true
|
33
38
|
end
|
34
39
|
|
35
40
|
# Return a symbol which is used to build devise routes
|
@@ -13,6 +13,12 @@ describe GoogleAuthentication do
|
|
13
13
|
GoogleAuthentication.define_routes?.should be_true
|
14
14
|
end
|
15
15
|
|
16
|
+
it "should return true for a new class" do
|
17
|
+
class Car; end
|
18
|
+
GoogleAuthentication.stub(:model_name).and_return(:car)
|
19
|
+
GoogleAuthentication.define_routes?.should be_true
|
20
|
+
end
|
21
|
+
|
16
22
|
it "should return false with non existent class" do
|
17
23
|
GoogleAuthentication.stub(:model_name).and_return(:monster)
|
18
24
|
GoogleAuthentication.define_routes?.should be_false
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: google_authentication
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Fabio Napoleoni
|
@@ -180,6 +180,7 @@ files:
|
|
180
180
|
- .document
|
181
181
|
- .rspec
|
182
182
|
- .rvmrc
|
183
|
+
- CHANGES.markdown
|
183
184
|
- Gemfile
|
184
185
|
- Guardfile
|
185
186
|
- LICENSE.txt
|
@@ -268,7 +269,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
268
269
|
requirements:
|
269
270
|
- - ">="
|
270
271
|
- !ruby/object:Gem::Version
|
271
|
-
hash:
|
272
|
+
hash: -2474828222469363557
|
272
273
|
segments:
|
273
274
|
- 0
|
274
275
|
version: "0"
|