tako 0.2.0 → 0.2.1

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: dff98c4a83f4ce6d0ed8154a4307b94c38589e1d
4
- data.tar.gz: d671907d64c06501c442293125f728fa2d13c517
3
+ metadata.gz: a82be704e2e0880ab3426fc9163a9f1250a7076d
4
+ data.tar.gz: e50d4657aaf871ef963667b7b698dd4ddec5e11c
5
5
  SHA512:
6
- metadata.gz: 188ddfbd46646a1103b29f2fd4391db979d89d5a23a1fbe36bb6181e36fc8db3afda0aea71dafdc520e4b79f392733895ddd05dd7e27ca21b55995e1417ddfb8
7
- data.tar.gz: 9f4f1f4f50d3e929a70ade86bc7cd22bd036c72d2c83ad4af4e0f6af05c3fba76aeed92c5f5cf38169bad925530c3168761844f61036edc721b45f83139b35bd
6
+ metadata.gz: 0a485cfdbee384d8a06c2f4e7fce0d1818563a5ffc78823298c223ceeafb6a1e76749ff07ca924fb8bf4bc532e99bb7036f6a4d2e38a646d1cb9b18a8f0317fc
7
+ data.tar.gz: 53581d736088ca0fd23dc166e70feeee0c68639bfda4ebd22f8046320329e68d4f1c265b6015954f9722c0e63eb491a37b09f5e14d6a8371cd5783e6fcaf2d2d
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Tako
2
+ [![CircleCI](https://circleci.com/gh/the40san/tako/tree/master.svg?style=svg)](https://circleci.com/gh/the40san/tako/tree/master)
2
3
 
3
- Provides Horizontal-Sharding for ActiveRecord.
4
+ Provides features for Database Sharding in ActiveRecord.
5
+ The main goal of tako is implementing sharding features with less ActiveRecord-dependent, catching up Rails version up.
4
6
  Rails 5 Ready.
5
7
 
6
8
  ## Installation
@@ -19,6 +21,12 @@ Or install it yourself as:
19
21
 
20
22
  $ gem install tako
21
23
 
24
+
25
+ ## Database migration (Rails)
26
+
27
+ $ bundle exec rake db:tako:create
28
+ $ bundle exec rake db:tako:migrate
29
+
22
30
  ## Usage
23
31
  ## How to use Tako?
24
32
  First, you need to create a config file, shards.yml, inside your config/ directory.
@@ -54,8 +62,12 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
54
62
  ### Run test
55
63
 
56
64
  Run `bundle exec rake` to run rspec
65
+
57
66
  Run `bundle exec rake` in `spec/dummy5` will run rspec with rails 5
58
67
 
68
+ Run `bundle exec rake` in `spec/dummy42` will run rspec with rails 4.2
69
+
70
+
59
71
  ## Contributing
60
72
 
61
73
  Bug reports and pull requests are welcome on GitHub at https://github.com/the40san/tako. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
data/circle.yml ADDED
@@ -0,0 +1,24 @@
1
+ machine:
2
+ ruby:
3
+ version: 2.3.1
4
+ environment:
5
+ RAILS_ENV: test
6
+
7
+ database:
8
+ override:
9
+ - cd spec/dummy5/ && bundle install
10
+ - cd spec/dummy5/ && bundle exec rake --trace db:create
11
+ - cd spec/dummy5/ && bundle exec rake --trace db:tako:create
12
+ - cd spec/dummy5/ && bundle exec rake --trace db:migrate
13
+ - cd spec/dummy5/ && bundle exec rake --trace db:tako:migrate
14
+ - cd spec/dummy42/ && bundle install
15
+ - cd spec/dummy42/ && bundle exec rake --trace db:create
16
+ - cd spec/dummy42/ && bundle exec rake --trace db:tako:create
17
+ - cd spec/dummy42/ && bundle exec rake --trace db:migrate
18
+ - cd spec/dummy42/ && bundle exec rake --trace db:tako:migrate
19
+
20
+ test:
21
+ override:
22
+ - CI=true bundle exec rake; test $? != 1
23
+ - cd spec/dummy5 && CI=true bundle exec rspec spec; test $? != 1
24
+ - cd spec/dummy42 && CI=true bundle exec rspec spec; test $? != 1
@@ -7,7 +7,9 @@ namespace :db do
7
7
  end
8
8
 
9
9
  task :check_protected_environments => [:environment, :load_config] do
10
- ActiveRecord::Tasks::DatabaseTasks.check_protected_environments!
10
+ if ActiveRecord::Tasks::DatabaseTasks.respond_to?(:check_protected_environments!)
11
+ ActiveRecord::Tasks::DatabaseTasks.check_protected_environments!
12
+ end
11
13
  end
12
14
 
13
15
  task :create do
data/lib/tako/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tako
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tako
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masashi AKISUE
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-30 00:00:00.000000000 Z
11
+ date: 2016-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -97,6 +97,7 @@ files:
97
97
  - Rakefile
98
98
  - bin/console
99
99
  - bin/setup
100
+ - circle.yml
100
101
  - lib/tako.rb
101
102
  - lib/tako/active_record_ext.rb
102
103
  - lib/tako/config.rb