Skip to content

Commit

Permalink
Update dependancies and update acts as taggable on to 3.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronzdavis committed Mar 11, 2016
1 parent 07c9122 commit ddf3bd6
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

gem 'spree', github: 'spree/spree', branch: '3-0-stable'
gem 'spree_core', '3.0.6.1'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '3-0-stable'

gemspec
8 changes: 4 additions & 4 deletions db/migrate/20130128124852_acts_as_taggable_on_migration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ def self.up

# You should make sure that the column created is
# long enough to store the required class names.
t.references :taggable, :polymorphic => true
t.references :tagger, :polymorphic => true
t.references :taggable, polymorphic: true
t.references :tagger, polymorphic: true

# Limit is created to prevent MySQL error on index
# length for MyISAM table type: http://bit.ly/vgW2Ql
t.string :context, :limit => 128
t.string :context, limit: 128

t.datetime :created_at
end
Expand All @@ -27,4 +27,4 @@ def self.down
drop_table :taggings
drop_table :tags
end
end
end
8 changes: 4 additions & 4 deletions db/migrate/20140901055150_add_missing_unique_indices.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ def self.up
remove_index :taggings, :tag_id
remove_index :taggings, [:taggable_id, :taggable_type, :context]
add_index :taggings,
[:tag_id, :taggable_id, :taggable_type, :context, :tagger_id, :tagger_type],
unique: true, name: 'taggings_idx'
end
[:tag_id, :taggable_id, :taggable_type, :context, :tagger_id, :tagger_type],
unique: true, name: 'taggings_idx'
end

def self.down
remove_index :tags, :name
Expand All @@ -16,4 +16,4 @@ def self.down
add_index :taggings, :tag_id
add_index :taggings, [:taggable_id, :taggable_type, :context]
end
end
end
14 changes: 14 additions & 0 deletions db/migrate/20140901055151_add_taggings_counter_cache_to_tags.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
class AddTaggingsCounterCacheToTags < ActiveRecord::Migration
def self.up
add_column :tags, :taggings_count, :integer, default: 0

ActsAsTaggableOn::Tag.reset_column_information
ActsAsTaggableOn::Tag.find_each do |tag|
ActsAsTaggableOn::Tag.reset_counters(tag.id, :taggings)
end
end

def self.down
remove_column :tags, :taggings_count
end
end
9 changes: 9 additions & 0 deletions db/migrate/20140901055152_add_missing_taggable_index.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class AddMissingTaggableIndex < ActiveRecord::Migration
def self.up
add_index :taggings, [:taggable_id, :taggable_type, :context]
end

def self.down
remove_index :taggings, [:taggable_id, :taggable_type, :context]
end
end
9 changes: 9 additions & 0 deletions db/migrate/20140901055153_change_collation_for_tag_names.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This migration is added to circumvent issue #623 and have special characters
# work properly
class ChangeCollationForTagNames < ActiveRecord::Migration
def up
if ActsAsTaggableOn::Utils.using_mysql?
execute("ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE utf8_bin;")
end
end
end
4 changes: 2 additions & 2 deletions spree_blogging_spree.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Gem::Specification.new do |s|
s.require_path = 'lib'
s.requirements << 'none'

s.add_dependency 'spree_core', '~> 3.0.0.rc5'
s.add_dependency 'acts-as-taggable-on', '~> 3.5'
s.add_dependency 'spree_core', '~> 3.0.6.1'
s.add_dependency 'acts-as-taggable-on', '~> 3.5.0'

s.add_development_dependency 'capybara', '~> 2.2.1'
s.add_development_dependency 'coffee-rails', '~> 4.0.0'
Expand Down

0 comments on commit ddf3bd6

Please sign in to comment.