tako 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +13 -1
- data/circle.yml +24 -0
- data/lib/tako/railties/databases.rake +3 -1
- data/lib/tako/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a82be704e2e0880ab3426fc9163a9f1250a7076d
|
4
|
+
data.tar.gz: e50d4657aaf871ef963667b7b698dd4ddec5e11c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a485cfdbee384d8a06c2f4e7fce0d1818563a5ffc78823298c223ceeafb6a1e76749ff07ca924fb8bf4bc532e99bb7036f6a4d2e38a646d1cb9b18a8f0317fc
|
7
|
+
data.tar.gz: 53581d736088ca0fd23dc166e70feeee0c68639bfda4ebd22f8046320329e68d4f1c265b6015954f9722c0e63eb491a37b09f5e14d6a8371cd5783e6fcaf2d2d
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# Tako
|
2
|
+
[](https://circleci.com/gh/the40san/tako/tree/master)
|
2
3
|
|
3
|
-
Provides
|
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
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.
|
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-
|
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
|