Merge pull request #30 from tute/master
git ignores files deleted in pull#29
This commit is contained in:
commit
6c18d5b52c
|
@ -4,4 +4,7 @@
|
|||
/rdoc
|
||||
/test_app/db/schema.rb
|
||||
/test_app/db/migrate/*_create_impressions_table.rb
|
||||
/test_app/doc
|
||||
/test_app/test
|
||||
/test_app/vendor
|
||||
Gemfile.lock
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
module Impressionist
|
||||
module Impressionable
|
||||
|
||||
def self.included(base)
|
||||
base.extend ClassMethods
|
||||
base.send(:include, InstanceMethods)
|
||||
end
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
module ClassMethods
|
||||
attr_accessor :cache_options
|
||||
|
@ -28,7 +24,6 @@ module Impressionist
|
|||
end
|
||||
end
|
||||
|
||||
module InstanceMethods
|
||||
def impressionable?
|
||||
true
|
||||
end
|
||||
|
@ -66,6 +61,4 @@ module Impressionist
|
|||
impressionist_count({:start_date=>start_date, :end_date=>end_date, :filter=> :session_hash})
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
module ActiveRecord
|
||||
module Generators
|
||||
class ImpressionistGenerator < Rails::Generators::Base
|
||||
include Rails::Generators::Migration
|
||||
source_root File.join(File.dirname(__FILE__), 'templates')
|
||||
|
||||
def self.next_migration_number(dirname)
|
||||
sleep 1
|
||||
if ActiveRecord::Base.timestamped_migrations
|
||||
Time.now.utc.strftime("%Y%m%d%H%M%S")
|
||||
else
|
||||
"%.3d" % (current_migration_number(dirname) + 1)
|
||||
end
|
||||
end
|
||||
|
||||
def create_migration_file
|
||||
migration_template 'create_impressions_table.rb', 'db/migrate/create_impressions_table.rb'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,20 +0,0 @@
|
|||
require 'rails/generators'
|
||||
require 'rails/generators/migration'
|
||||
|
||||
class ImpressionistGenerator < Rails::Generators::Base
|
||||
include Rails::Generators::Migration
|
||||
source_root File.join(File.dirname(__FILE__), 'templates')
|
||||
|
||||
def self.next_migration_number(dirname)
|
||||
sleep 1
|
||||
if ActiveRecord::Base.timestamped_migrations
|
||||
Time.now.utc.strftime("%Y%m%d%H%M%S")
|
||||
else
|
||||
"%.3d" % (current_migration_number(dirname) + 1)
|
||||
end
|
||||
end
|
||||
|
||||
def create_migration_file
|
||||
migration_template 'create_impressions_table.rb', 'db/migrate/create_impressions_table.rb'
|
||||
end
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
module Impressionist
|
||||
module Generators
|
||||
class ImpressionistGenerator < Rails::Generators::Base
|
||||
hook_for :orm
|
||||
end
|
||||
end
|
||||
end
|
|
@ -2,11 +2,9 @@ source 'https://rubygems.org'
|
|||
|
||||
gem 'rails', '3.2.2'
|
||||
|
||||
# Bundle edge Rails instead:
|
||||
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
||||
|
||||
gem 'impressionist', :path => '../'
|
||||
|
||||
gem 'pg'
|
||||
gem 'sqlite3'
|
||||
|
||||
gem 'json'
|
||||
|
|
Loading…
Reference in New Issue