Skip to content

Commit

Permalink
Merge pull request #24 from brunofrank/modernize
Browse files Browse the repository at this point in the history
Update the gem to the current state of the world :)
  • Loading branch information
donv authored Dec 11, 2017
2 parents 908f7f9 + 64f5a4a commit 9bb9210
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.gem
/Gemfile.lock
test/cti_plugin.sqlite3
11 changes: 9 additions & 2 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
Change log
----------

* Now you can inherits from and to modules like inherits_from 'Module::Model', see the the name of field
must be module_model_id:integer thanks for Marc Remolt (https://github.com/mremolt).
### 1.3.1

* Removed 'set_primary_key' deprecation warning
* Make the gem depencies explicit and require ActiveRecord 4.x or 5.0


### 1.3.0
* Now you can inherits from and to modules like inherits_from 'Module::Model', see the the name of
field must be module_model_id:integer thanks for Marc Remolt (https://github.com/mremolt).
* Unit test


Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'bundler'
require 'bundler/setup'
require 'rake/testtask'
Bundler::GemHelper.install_tasks

Expand Down
8 changes: 7 additions & 1 deletion class-table-inheritance.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,10 @@ Gem::Specification.new do |s|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
end

s.add_runtime_dependency 'activerecord', '>=4', '<5.1'

s.add_development_dependency 'minitest-reporters','~>1.1'
s.add_development_dependency 'rake', '>=11'
s.add_development_dependency 'sqlite3', '~>1.3'
end
2 changes: 1 addition & 1 deletion test/class_table_inheritance_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'test_helper'

class ClassTableInheritanceTest < Test::Unit::TestCase
class ClassTableInheritanceTest < Minitest::Test

def test_create
name = 'Bike'
Expand Down
5 changes: 4 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
require 'rubygems'
require 'test/unit'
require 'minitest/autorun'
require 'minitest/reporters'
require 'active_record'
require 'class-table-inheritance'
require 'yaml'

Minitest::Reporters.use!

database = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml'))
ActiveRecord::Base.establish_connection(database['sqlite3'])
load(File.dirname(__FILE__) + "/schema.rb") if !File.exists?(database['sqlite3'][:database])
Expand Down

0 comments on commit 9bb9210

Please sign in to comment.