jive-oauth_token 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c374f060f9b09c2cfe07ce8647f702fb62194aff
4
- data.tar.gz: 37ebd1585e50383ac229953edf0348621c2795cb
3
+ metadata.gz: b01ca7c7dc01b55786783953b6aabe24bda64d5b
4
+ data.tar.gz: bd41455a447c753d549b374adc56e3d08748abf0
5
5
  SHA512:
6
- metadata.gz: f043dc3904efa98a050827b72db055d9d759112766885626d2b941a08aa079ee7708143004644a3ec48b8c86761b3da13b855bc8b3779744dea262451313fdfa
7
- data.tar.gz: 5554e285fec16b591460278b1b78177cd2d8c3dd9a0bd48045307279e5786a84e827d82af70065df871f441189914862245bdb9581ffd4be7330edd22a9cdc51
6
+ metadata.gz: a66c6663e8ec95c9549a02d3ab0f41823a382d59c2e2acd782bcf19104853a29c2b6350b2276681bee0e0f3e5ef0182db3e75fef50fb76575b2807c3c9cfa1fb
7
+ data.tar.gz: f5868d1a9be01b70db72481c7efcc984021cab559f83fd49585f694d0c87b1fdfb66b96823949aa9394e79dcb5b90a9a32482e1612bdd17bcb2b9ccb7c5fbb72
@@ -5,7 +5,7 @@ require "rails/generators/active_record"
5
5
 
6
6
  # Extend the HasDynamicColumnsGenerator so that it creates an AR migration
7
7
  module Jive
8
- module OauthToken
8
+ class OauthToken < ActiveRecord::Base
9
9
  class ActiveRecordGenerator < ::Jive::OauthToken::Generator
10
10
  include Rails::Generators::Migration
11
11
  extend NextMigrationVersion
@@ -1,5 +1,5 @@
1
1
  module Jive
2
- module OauthToken
2
+ class OauthToken < ActiveRecord::Base
3
3
  module NextMigrationVersion
4
4
  # while methods have moved around this has been the implementation
5
5
  # since ActiveRecord 3.0
@@ -2,7 +2,7 @@ require 'rails/generators/base'
2
2
  require 'jive/oauth_token/compatibility'
3
3
 
4
4
  module Jive
5
- module OauthToken
5
+ class OauthToken < ActiveRecord::Base
6
6
  class Generator < Rails::Generators::Base
7
7
  source_paths << File.join(File.dirname(__FILE__), 'templates')
8
8
  end
@@ -0,0 +1,9 @@
1
+ module Jive
2
+ class OauthToken < ActiveRecord::Base
3
+ module ClassMethods
4
+ def self.extended(base)
5
+ base.belongs_to :owner, :polymorphic => true
6
+ end
7
+ end
8
+ end
9
+ end
@@ -1,7 +1,7 @@
1
1
  require 'jive/oauth_token/version'
2
2
 
3
3
  module Jive
4
- module OauthToken
4
+ class OauthToken < ActiveRecord::Base
5
5
  module Compatibility
6
6
  if ActiveSupport::VERSION::MAJOR >= 4
7
7
  require 'active_support/proxy_object'
@@ -0,0 +1,9 @@
1
+ module Jive
2
+ class OauthToken < ActiveRecord::Base
3
+ module InstanceMethods
4
+ def self.included(base)
5
+ base.table_name = "jive_oauth_tokens"
6
+ end
7
+ end
8
+ end
9
+ end
@@ -1,5 +1,7 @@
1
+ require "active_record"
2
+
1
3
  module Jive
2
- module OauthToken
3
- VERSION = "0.0.2"
4
- end
4
+ class OauthToken < ActiveRecord::Base
5
+ VERSION = "0.0.3"
6
+ end
5
7
  end
@@ -4,11 +4,14 @@ require "active_record"
4
4
 
5
5
  require "jive/oauth_token/version"
6
6
  require "jive/oauth_token/compatibility"
7
- require "jive/oauth_token/model"
8
7
 
8
+ require "jive/oauth_token/class_methods"
9
+ require "jive/oauth_token/instance_methods"
9
10
 
10
11
  module Jive
11
- module OauthToken
12
- # Your code goes here...
13
- end
12
+ class OauthToken < ActiveRecord::Base
13
+ end
14
14
  end
15
+
16
+ Jive::OauthToken.send :include, Jive::OauthToken::InstanceMethods
17
+ Jive::OauthToken.send :extend, Jive::OauthToken::ClassMethods
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jive-oauth_token
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Butch Marshall
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-01 00:00:00.000000000 Z
11
+ date: 2016-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -150,8 +150,9 @@ files:
150
150
  - lib/generators/jive/oauth_token/oauth_token_generator.rb
151
151
  - lib/generators/jive/oauth_token/templates/migration_0.1.0.rb
152
152
  - lib/jive/oauth_token.rb
153
+ - lib/jive/oauth_token/class_methods.rb
153
154
  - lib/jive/oauth_token/compatibility.rb
154
- - lib/jive/oauth_token/model.rb
155
+ - lib/jive/oauth_token/instance_methods.rb
155
156
  - lib/jive/oauth_token/version.rb
156
157
  homepage: https://github.com/butchmarshall/ruby-jive-oauth_token
157
158
  licenses:
@@ -1,8 +0,0 @@
1
- module Jive
2
- module OauthToken
3
- class Model < ActiveRecord::Base
4
- self.table_name = :jive_oauth_tokens
5
- belongs_to :owner, :polymorphic => true
6
- end
7
- end
8
- end