glass-rails 0.1.1 → 0.1.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/lib/generators/glass.rb
CHANGED
@@ -2,7 +2,7 @@ require 'rails/generators/base'
|
|
2
2
|
|
3
3
|
module Glass
|
4
4
|
module Generators
|
5
|
-
class Base < Rails::Generators::
|
5
|
+
class Base < ::Rails::Generators::NamedBase #:nodoc:
|
6
6
|
def self.source_root
|
7
7
|
@_glass_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'glass', generator_name, 'templates'))
|
8
8
|
end
|
@@ -4,10 +4,14 @@ require 'rails/generators/migration'
|
|
4
4
|
|
5
5
|
module Glass
|
6
6
|
module Generators
|
7
|
-
class InstallGenerator < Base
|
8
|
-
include Rails::Generators::Migration
|
7
|
+
class InstallGenerator < ::Rails::Generators::Base
|
8
|
+
include ::Rails::Generators::Migration
|
9
9
|
argument :user_model, type: :string, default: "User"
|
10
10
|
|
11
|
+
def self.source_root
|
12
|
+
@source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
|
13
|
+
end
|
14
|
+
|
11
15
|
def create_configuration_file
|
12
16
|
copy_file("google-oauth.yml", "config/google-api-keys.yml")
|
13
17
|
end
|
@@ -4,8 +4,13 @@ require 'rails/generators/migration'
|
|
4
4
|
|
5
5
|
module Glass
|
6
6
|
module Generators
|
7
|
-
class ModelGenerator < Base
|
7
|
+
class ModelGenerator < ::Rails::Generators::Base
|
8
8
|
argument :model_name, type: :string
|
9
|
+
|
10
|
+
def self.source_root
|
11
|
+
@source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
|
12
|
+
end
|
13
|
+
|
9
14
|
def copy_glass_templates
|
10
15
|
unless File.directory?("app/models/glass/")
|
11
16
|
empty_directory("app/models/glass")
|
@@ -21,8 +21,11 @@ class Glass::<%= model_name.camelize %> < Glass::TimelineItem
|
|
21
21
|
|
22
22
|
|
23
23
|
|
24
|
-
def custom_action_handler
|
24
|
+
def custom_action_handler(response)
|
25
25
|
## logic for handling custom action
|
26
|
+
##
|
27
|
+
## response is a hash object which google sends back
|
28
|
+
## when the action is invoked
|
26
29
|
end
|
27
30
|
|
28
31
|
end
|
data/lib/glass/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glass-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-06-
|
13
|
+
date: 2013-06-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: railties
|