vorpal 1.0.0 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2fdca5b34f5a1ac2b9b228849c53b8322e542ab9bc75a5c15a0c8003f1f1fd94
4
- data.tar.gz: aebdb05efdfd853644afa49bf101d845082a7d627e47c50bf609830be46901f0
3
+ metadata.gz: d2bd60707eb3762666ed0ada9c456b5d54fbc73ca5d56eda9febd1c540ffc754
4
+ data.tar.gz: a17bf33069fe5d44d2a9577da2d7e5457a18ab0703b7dfe14d67fc22f6f7d76c
5
5
  SHA512:
6
- metadata.gz: 1416691727efd279769865a4725949ff41965d120d6431a3737880936838e6760d857c3a5546b5b73774a1ea24cb1ef742d6f7cce6dfa0497de34739ba67b22a
7
- data.tar.gz: 117da60ac019fa9b373d7f45ad6893b24de5611533d348034ef4f4d978adc81468d3228d55adf8107482084b219c47509cb8fef69516ae0ccdea31f73e3a0390
6
+ metadata.gz: 8a9b2b133c7db7523153b290d3422e84db785856a12d37d863608f017366dd0f06ddad3e4f9b261e28a6c7cd66a72dc54c52b05425715146165d7573118b84bc
7
+ data.tar.gz: da8970a533f9fce8e3cd3b3bcdd2464abd2b6c8fa0cb06fd8ced941d6c61115cea3df3523679a01722dcd7e641503628b76140bd553b0e167623021bd7e937fe
data/.envrc ADDED
@@ -0,0 +1,4 @@
1
+ #@IgnoreInspection BashAddShebang
2
+ # Configuration for direnv (see https://github.com/direnv/direnv)
3
+
4
+ PATH_add bin
@@ -0,0 +1,34 @@
1
+ appraise "rails-4-1" do
2
+ ruby ">= 2.1.6"
3
+ gem "activerecord", "~> 4.1.0"
4
+ gem "pg", "~> 0.17.0"
5
+ gem "activerecord-import", "~> 0.10.0"
6
+ end
7
+
8
+ appraise "rails-4-2" do
9
+ ruby ">= 2.1.6"
10
+ gem "activerecord", "~> 4.2.0"
11
+ gem "pg", "~> 0.17.0"
12
+ gem "activerecord-import", "~> 0.10.0"
13
+ end
14
+
15
+ appraise "rails-5-0" do
16
+ ruby ">= 2.2.2"
17
+ gem "activerecord", "~> 5.0.0"
18
+ gem "pg", "~> 0.18.0"
19
+ gem "activerecord-import", "= 0.13.0"
20
+ end
21
+
22
+ appraise "rails-5-1" do
23
+ ruby ">= 2.2.2"
24
+ gem "activerecord", "~> 5.1.0"
25
+ gem "pg", "~> 0.18.0"
26
+ gem "activerecord-import", "= 0.13.0"
27
+ end
28
+
29
+ appraise "rails-5-2" do
30
+ ruby ">= 2.2.2"
31
+ gem "activerecord", "~> 5.2.0"
32
+ gem "pg", "~> 0.18.0"
33
+ gem "activerecord-import", "= 0.13.0"
34
+ end
data/README.md CHANGED
@@ -231,7 +231,26 @@ For example:
231
231
 
232
232
  **A.** You can use [ActiveModel::Serialization](http://api.rubyonrails.org/classes/ActiveModel/Serialization.html) or [ActiveModel::Serializers](https://github.com/rails-api/active_model_serializers) but they are not heartily recommended. The former is too coupled to the model and the latter is too coupled to Rails controllers. Vorpal uses [SimpleSerializer](https://github.com/nulogy/simple_serializer) for this purpose.
233
233
 
234
- ## Running Tests
234
+ ## Contributing
235
+
236
+ 1. Fork it ( https://github.com/nulogy/vorpal/fork )
237
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
238
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
239
+ 4. Push to the branch (`git push origin my-new-feature`)
240
+ 5. Create a new Pull Request
241
+
242
+ ### Setup DirEnv
243
+
244
+ Using this gem's bin stubs (contained in the `bin` dir) is much easier if [DirEnv](https://github.com/direnv/direnv) is installed.
245
+
246
+ On OSX using ZSH DirEnv can be installed like so:
247
+
248
+ 1. `brew install direnv`
249
+ 2. `echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc`
250
+
251
+ Please see the [DirEnv docs](https://direnv.net/) if your environment is different.
252
+
253
+ ### Running Tests
235
254
 
236
255
  1. Start a PostgreSQL server.
237
256
  2. Either:
@@ -239,16 +258,17 @@ For example:
239
258
  * Modify `spec/helpers/db_helpers.rb`.
240
259
  3. Run `rake` from the terminal.
241
260
 
242
- ## Contributors
261
+ ### Running Tests for the non-default versions of Rails
243
262
 
244
- * [Sean Kirby](https://github.com/sskirby)
245
- * [Paul Sobocinski](https://github.com/psobocinski)
246
- * [Jason Cheong-Kee-You](https://github.com/jchunky)
263
+ 1. Start a PostgreSQL server.
264
+ 2. Either:
265
+ * Create a DB user called `vorpal` with password `pass`. OR:
266
+ * Modify `spec/helpers/db_helpers.rb`.
267
+ 3. Run `appraisal <rails version> rake` from the terminal.
268
+ * Where `<rails version>` is one of the options defined in the `./Appraisal` file.
247
269
 
248
- ## Contributing
270
+ Please see the [Appraisal gem docs](https://github.com/thoughtbot/appraisal) for more information.
249
271
 
250
- 1. Fork it ( https://github.com/nulogy/vorpal/fork )
251
- 2. Create your feature branch (`git checkout -b my-new-feature`)
252
- 3. Commit your changes (`git commit -am 'Add some feature'`)
253
- 4. Push to the branch (`git push origin my-new-feature`)
254
- 5. Create a new Pull Request
272
+ ## Contributors
273
+
274
+ See who's [contributed](https://github.com/nulogy/vorpal/graphs/contributors)!
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'appraisal' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("appraisal", "appraisal")
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rake' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("rake", "rake")
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rspec' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("rspec-core", "rspec")
@@ -0,0 +1,11 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ ruby ">= 2.1.6"
6
+
7
+ gem "activerecord", "~> 4.1.0"
8
+ gem "pg", "~> 0.17.0"
9
+ gem "activerecord-import", "~> 0.10.0"
10
+
11
+ gemspec path: "../"
@@ -0,0 +1,92 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ vorpal (1.0.0)
5
+ activesupport
6
+ equalizer
7
+ simple_serializer (~> 1.0)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ activemodel (4.1.16)
13
+ activesupport (= 4.1.16)
14
+ builder (~> 3.1)
15
+ activerecord (4.1.16)
16
+ activemodel (= 4.1.16)
17
+ activesupport (= 4.1.16)
18
+ arel (~> 5.0.0)
19
+ activerecord-import (0.10.0)
20
+ activerecord (>= 3.0)
21
+ activesupport (4.1.16)
22
+ i18n (~> 0.6, >= 0.6.9)
23
+ json (~> 1.7, >= 1.7.7)
24
+ minitest (~> 5.1)
25
+ thread_safe (~> 0.1)
26
+ tzinfo (~> 1.1)
27
+ appraisal (2.2.0)
28
+ bundler
29
+ rake
30
+ thor (>= 0.14.0)
31
+ arel (5.0.1.20140414130214)
32
+ axiom-types (0.1.1)
33
+ descendants_tracker (~> 0.0.4)
34
+ ice_nine (~> 0.11.0)
35
+ thread_safe (~> 0.3, >= 0.3.1)
36
+ builder (3.2.3)
37
+ coercible (1.0.0)
38
+ descendants_tracker (~> 0.0.1)
39
+ concurrent-ruby (1.0.5)
40
+ descendants_tracker (0.0.4)
41
+ thread_safe (~> 0.3, >= 0.3.1)
42
+ diff-lcs (1.3)
43
+ equalizer (0.0.11)
44
+ i18n (0.9.5)
45
+ concurrent-ruby (~> 1.0)
46
+ ice_nine (0.11.2)
47
+ json (1.8.6)
48
+ minitest (5.11.3)
49
+ pg (0.17.1)
50
+ rake (10.5.0)
51
+ rspec (3.8.0)
52
+ rspec-core (~> 3.8.0)
53
+ rspec-expectations (~> 3.8.0)
54
+ rspec-mocks (~> 3.8.0)
55
+ rspec-core (3.8.0)
56
+ rspec-support (~> 3.8.0)
57
+ rspec-expectations (3.8.1)
58
+ diff-lcs (>= 1.2.0, < 2.0)
59
+ rspec-support (~> 3.8.0)
60
+ rspec-mocks (3.8.0)
61
+ diff-lcs (>= 1.2.0, < 2.0)
62
+ rspec-support (~> 3.8.0)
63
+ rspec-support (3.8.0)
64
+ simple_serializer (1.0.2)
65
+ thor (0.20.0)
66
+ thread_safe (0.3.6)
67
+ tzinfo (1.2.5)
68
+ thread_safe (~> 0.1)
69
+ virtus (1.0.5)
70
+ axiom-types (~> 0.1)
71
+ coercible (~> 1.0)
72
+ descendants_tracker (~> 0.0, >= 0.0.3)
73
+ equalizer (~> 0.0, >= 0.0.9)
74
+
75
+ PLATFORMS
76
+ ruby
77
+
78
+ DEPENDENCIES
79
+ activerecord (~> 4.1.0)
80
+ activerecord-import (~> 0.10.0)
81
+ appraisal (~> 2.2)
82
+ pg (~> 0.17.0)
83
+ rake (~> 10.0)
84
+ rspec (~> 3.0)
85
+ virtus (~> 1.0)
86
+ vorpal!
87
+
88
+ RUBY VERSION
89
+ ruby 2.3.3p222
90
+
91
+ BUNDLED WITH
92
+ 1.16.2
@@ -0,0 +1,11 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ ruby ">= 2.1.6"
6
+
7
+ gem "activerecord", "~> 4.2.0"
8
+ gem "pg", "~> 0.17.0"
9
+ gem "activerecord-import", "~> 0.10.0"
10
+
11
+ gemspec path: "../"
@@ -0,0 +1,90 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ vorpal (1.0.0)
5
+ activesupport
6
+ equalizer
7
+ simple_serializer (~> 1.0)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ activemodel (4.2.10)
13
+ activesupport (= 4.2.10)
14
+ builder (~> 3.1)
15
+ activerecord (4.2.10)
16
+ activemodel (= 4.2.10)
17
+ activesupport (= 4.2.10)
18
+ arel (~> 6.0)
19
+ activerecord-import (0.10.0)
20
+ activerecord (>= 3.0)
21
+ activesupport (4.2.10)
22
+ i18n (~> 0.7)
23
+ minitest (~> 5.1)
24
+ thread_safe (~> 0.3, >= 0.3.4)
25
+ tzinfo (~> 1.1)
26
+ appraisal (2.2.0)
27
+ bundler
28
+ rake
29
+ thor (>= 0.14.0)
30
+ arel (6.0.4)
31
+ axiom-types (0.1.1)
32
+ descendants_tracker (~> 0.0.4)
33
+ ice_nine (~> 0.11.0)
34
+ thread_safe (~> 0.3, >= 0.3.1)
35
+ builder (3.2.3)
36
+ coercible (1.0.0)
37
+ descendants_tracker (~> 0.0.1)
38
+ concurrent-ruby (1.0.5)
39
+ descendants_tracker (0.0.4)
40
+ thread_safe (~> 0.3, >= 0.3.1)
41
+ diff-lcs (1.3)
42
+ equalizer (0.0.11)
43
+ i18n (0.9.5)
44
+ concurrent-ruby (~> 1.0)
45
+ ice_nine (0.11.2)
46
+ minitest (5.11.3)
47
+ pg (0.17.1)
48
+ rake (10.5.0)
49
+ rspec (3.8.0)
50
+ rspec-core (~> 3.8.0)
51
+ rspec-expectations (~> 3.8.0)
52
+ rspec-mocks (~> 3.8.0)
53
+ rspec-core (3.8.0)
54
+ rspec-support (~> 3.8.0)
55
+ rspec-expectations (3.8.1)
56
+ diff-lcs (>= 1.2.0, < 2.0)
57
+ rspec-support (~> 3.8.0)
58
+ rspec-mocks (3.8.0)
59
+ diff-lcs (>= 1.2.0, < 2.0)
60
+ rspec-support (~> 3.8.0)
61
+ rspec-support (3.8.0)
62
+ simple_serializer (1.0.2)
63
+ thor (0.20.0)
64
+ thread_safe (0.3.6)
65
+ tzinfo (1.2.5)
66
+ thread_safe (~> 0.1)
67
+ virtus (1.0.5)
68
+ axiom-types (~> 0.1)
69
+ coercible (~> 1.0)
70
+ descendants_tracker (~> 0.0, >= 0.0.3)
71
+ equalizer (~> 0.0, >= 0.0.9)
72
+
73
+ PLATFORMS
74
+ ruby
75
+
76
+ DEPENDENCIES
77
+ activerecord (~> 4.2.0)
78
+ activerecord-import (~> 0.10.0)
79
+ appraisal (~> 2.2)
80
+ pg (~> 0.17.0)
81
+ rake (~> 10.0)
82
+ rspec (~> 3.0)
83
+ virtus (~> 1.0)
84
+ vorpal!
85
+
86
+ RUBY VERSION
87
+ ruby 2.3.3p222
88
+
89
+ BUNDLED WITH
90
+ 1.16.2
@@ -0,0 +1,11 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ ruby ">= 2.2.2"
6
+
7
+ gem "activerecord", "~> 5.0.0"
8
+ gem "pg", "~> 0.18.0"
9
+ gem "activerecord-import", "= 0.13.0"
10
+
11
+ gemspec path: "../"
@@ -0,0 +1,88 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ vorpal (1.0.0)
5
+ activesupport
6
+ equalizer
7
+ simple_serializer (~> 1.0)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ activemodel (5.0.7)
13
+ activesupport (= 5.0.7)
14
+ activerecord (5.0.7)
15
+ activemodel (= 5.0.7)
16
+ activesupport (= 5.0.7)
17
+ arel (~> 7.0)
18
+ activerecord-import (0.13.0)
19
+ activerecord (>= 3.0)
20
+ activesupport (5.0.7)
21
+ concurrent-ruby (~> 1.0, >= 1.0.2)
22
+ i18n (>= 0.7, < 2)
23
+ minitest (~> 5.1)
24
+ tzinfo (~> 1.1)
25
+ appraisal (2.2.0)
26
+ bundler
27
+ rake
28
+ thor (>= 0.14.0)
29
+ arel (7.1.4)
30
+ axiom-types (0.1.1)
31
+ descendants_tracker (~> 0.0.4)
32
+ ice_nine (~> 0.11.0)
33
+ thread_safe (~> 0.3, >= 0.3.1)
34
+ coercible (1.0.0)
35
+ descendants_tracker (~> 0.0.1)
36
+ concurrent-ruby (1.0.5)
37
+ descendants_tracker (0.0.4)
38
+ thread_safe (~> 0.3, >= 0.3.1)
39
+ diff-lcs (1.3)
40
+ equalizer (0.0.11)
41
+ i18n (1.1.0)
42
+ concurrent-ruby (~> 1.0)
43
+ ice_nine (0.11.2)
44
+ minitest (5.11.3)
45
+ pg (0.18.4)
46
+ rake (10.5.0)
47
+ rspec (3.8.0)
48
+ rspec-core (~> 3.8.0)
49
+ rspec-expectations (~> 3.8.0)
50
+ rspec-mocks (~> 3.8.0)
51
+ rspec-core (3.8.0)
52
+ rspec-support (~> 3.8.0)
53
+ rspec-expectations (3.8.1)
54
+ diff-lcs (>= 1.2.0, < 2.0)
55
+ rspec-support (~> 3.8.0)
56
+ rspec-mocks (3.8.0)
57
+ diff-lcs (>= 1.2.0, < 2.0)
58
+ rspec-support (~> 3.8.0)
59
+ rspec-support (3.8.0)
60
+ simple_serializer (1.0.2)
61
+ thor (0.20.0)
62
+ thread_safe (0.3.6)
63
+ tzinfo (1.2.5)
64
+ thread_safe (~> 0.1)
65
+ virtus (1.0.5)
66
+ axiom-types (~> 0.1)
67
+ coercible (~> 1.0)
68
+ descendants_tracker (~> 0.0, >= 0.0.3)
69
+ equalizer (~> 0.0, >= 0.0.9)
70
+
71
+ PLATFORMS
72
+ ruby
73
+
74
+ DEPENDENCIES
75
+ activerecord (~> 5.0.0)
76
+ activerecord-import (= 0.13.0)
77
+ appraisal (~> 2.2)
78
+ pg (~> 0.18.0)
79
+ rake (~> 10.0)
80
+ rspec (~> 3.0)
81
+ virtus (~> 1.0)
82
+ vorpal!
83
+
84
+ RUBY VERSION
85
+ ruby 2.3.3p222
86
+
87
+ BUNDLED WITH
88
+ 1.16.2
@@ -0,0 +1,11 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ ruby ">= 2.2.2"
6
+
7
+ gem "activerecord", "~> 5.1.0"
8
+ gem "pg", "~> 0.18.0"
9
+ gem "activerecord-import", "= 0.13.0"
10
+
11
+ gemspec path: "../"
@@ -0,0 +1,88 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ vorpal (1.0.0)
5
+ activesupport
6
+ equalizer
7
+ simple_serializer (~> 1.0)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ activemodel (5.1.6)
13
+ activesupport (= 5.1.6)
14
+ activerecord (5.1.6)
15
+ activemodel (= 5.1.6)
16
+ activesupport (= 5.1.6)
17
+ arel (~> 8.0)
18
+ activerecord-import (0.13.0)
19
+ activerecord (>= 3.0)
20
+ activesupport (5.1.6)
21
+ concurrent-ruby (~> 1.0, >= 1.0.2)
22
+ i18n (>= 0.7, < 2)
23
+ minitest (~> 5.1)
24
+ tzinfo (~> 1.1)
25
+ appraisal (2.2.0)
26
+ bundler
27
+ rake
28
+ thor (>= 0.14.0)
29
+ arel (8.0.0)
30
+ axiom-types (0.1.1)
31
+ descendants_tracker (~> 0.0.4)
32
+ ice_nine (~> 0.11.0)
33
+ thread_safe (~> 0.3, >= 0.3.1)
34
+ coercible (1.0.0)
35
+ descendants_tracker (~> 0.0.1)
36
+ concurrent-ruby (1.0.5)
37
+ descendants_tracker (0.0.4)
38
+ thread_safe (~> 0.3, >= 0.3.1)
39
+ diff-lcs (1.3)
40
+ equalizer (0.0.11)
41
+ i18n (1.1.0)
42
+ concurrent-ruby (~> 1.0)
43
+ ice_nine (0.11.2)
44
+ minitest (5.11.3)
45
+ pg (0.18.4)
46
+ rake (10.5.0)
47
+ rspec (3.8.0)
48
+ rspec-core (~> 3.8.0)
49
+ rspec-expectations (~> 3.8.0)
50
+ rspec-mocks (~> 3.8.0)
51
+ rspec-core (3.8.0)
52
+ rspec-support (~> 3.8.0)
53
+ rspec-expectations (3.8.1)
54
+ diff-lcs (>= 1.2.0, < 2.0)
55
+ rspec-support (~> 3.8.0)
56
+ rspec-mocks (3.8.0)
57
+ diff-lcs (>= 1.2.0, < 2.0)
58
+ rspec-support (~> 3.8.0)
59
+ rspec-support (3.8.0)
60
+ simple_serializer (1.0.2)
61
+ thor (0.20.0)
62
+ thread_safe (0.3.6)
63
+ tzinfo (1.2.5)
64
+ thread_safe (~> 0.1)
65
+ virtus (1.0.5)
66
+ axiom-types (~> 0.1)
67
+ coercible (~> 1.0)
68
+ descendants_tracker (~> 0.0, >= 0.0.3)
69
+ equalizer (~> 0.0, >= 0.0.9)
70
+
71
+ PLATFORMS
72
+ ruby
73
+
74
+ DEPENDENCIES
75
+ activerecord (~> 5.1.0)
76
+ activerecord-import (= 0.13.0)
77
+ appraisal (~> 2.2)
78
+ pg (~> 0.18.0)
79
+ rake (~> 10.0)
80
+ rspec (~> 3.0)
81
+ virtus (~> 1.0)
82
+ vorpal!
83
+
84
+ RUBY VERSION
85
+ ruby 2.3.3p222
86
+
87
+ BUNDLED WITH
88
+ 1.16.2
@@ -0,0 +1,11 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ ruby ">= 2.2.2"
6
+
7
+ gem "activerecord", "~> 5.2.0"
8
+ gem "pg", "~> 0.18.0"
9
+ gem "activerecord-import", "= 0.13.0"
10
+
11
+ gemspec path: "../"
@@ -0,0 +1,88 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ vorpal (1.0.0)
5
+ activesupport
6
+ equalizer
7
+ simple_serializer (~> 1.0)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ activemodel (5.2.1)
13
+ activesupport (= 5.2.1)
14
+ activerecord (5.2.1)
15
+ activemodel (= 5.2.1)
16
+ activesupport (= 5.2.1)
17
+ arel (>= 9.0)
18
+ activerecord-import (0.13.0)
19
+ activerecord (>= 3.0)
20
+ activesupport (5.2.1)
21
+ concurrent-ruby (~> 1.0, >= 1.0.2)
22
+ i18n (>= 0.7, < 2)
23
+ minitest (~> 5.1)
24
+ tzinfo (~> 1.1)
25
+ appraisal (2.2.0)
26
+ bundler
27
+ rake
28
+ thor (>= 0.14.0)
29
+ arel (9.0.0)
30
+ axiom-types (0.1.1)
31
+ descendants_tracker (~> 0.0.4)
32
+ ice_nine (~> 0.11.0)
33
+ thread_safe (~> 0.3, >= 0.3.1)
34
+ coercible (1.0.0)
35
+ descendants_tracker (~> 0.0.1)
36
+ concurrent-ruby (1.0.5)
37
+ descendants_tracker (0.0.4)
38
+ thread_safe (~> 0.3, >= 0.3.1)
39
+ diff-lcs (1.3)
40
+ equalizer (0.0.11)
41
+ i18n (1.1.0)
42
+ concurrent-ruby (~> 1.0)
43
+ ice_nine (0.11.2)
44
+ minitest (5.11.3)
45
+ pg (0.18.4)
46
+ rake (10.5.0)
47
+ rspec (3.8.0)
48
+ rspec-core (~> 3.8.0)
49
+ rspec-expectations (~> 3.8.0)
50
+ rspec-mocks (~> 3.8.0)
51
+ rspec-core (3.8.0)
52
+ rspec-support (~> 3.8.0)
53
+ rspec-expectations (3.8.1)
54
+ diff-lcs (>= 1.2.0, < 2.0)
55
+ rspec-support (~> 3.8.0)
56
+ rspec-mocks (3.8.0)
57
+ diff-lcs (>= 1.2.0, < 2.0)
58
+ rspec-support (~> 3.8.0)
59
+ rspec-support (3.8.0)
60
+ simple_serializer (1.0.2)
61
+ thor (0.20.0)
62
+ thread_safe (0.3.6)
63
+ tzinfo (1.2.5)
64
+ thread_safe (~> 0.1)
65
+ virtus (1.0.5)
66
+ axiom-types (~> 0.1)
67
+ coercible (~> 1.0)
68
+ descendants_tracker (~> 0.0, >= 0.0.3)
69
+ equalizer (~> 0.0, >= 0.0.9)
70
+
71
+ PLATFORMS
72
+ ruby
73
+
74
+ DEPENDENCIES
75
+ activerecord (~> 5.2.0)
76
+ activerecord-import (= 0.13.0)
77
+ appraisal (~> 2.2)
78
+ pg (~> 0.18.0)
79
+ rake (~> 10.0)
80
+ rspec (~> 3.0)
81
+ virtus (~> 1.0)
82
+ vorpal!
83
+
84
+ RUBY VERSION
85
+ ruby 2.3.3p222
86
+
87
+ BUNDLED WITH
88
+ 1.16.2
@@ -25,7 +25,7 @@ module Vorpal
25
25
  end
26
26
 
27
27
  def destroy(db_class, ids)
28
- db_class.delete_all(id: ids)
28
+ db_class.where(id: ids).delete_all
29
29
  end
30
30
 
31
31
  # Loads instances of the given class by primary key.
@@ -1,3 +1,3 @@
1
1
  module Vorpal
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -34,7 +34,7 @@ module DbHelpers
34
34
 
35
35
  # when you change a table's columns, set force to true to re-generate the table in the DB
36
36
  def define_table(table_name, columns, force)
37
- if !db_connection.table_exists?(table_name) || force
37
+ if table_name_is_free?(table_name) || force
38
38
  db_connection.create_table(table_name, force: true) do |t|
39
39
  columns.each do |name, type|
40
40
  t.send(type, name)
@@ -48,4 +48,19 @@ module DbHelpers
48
48
  self.table_name = table_name
49
49
  end
50
50
  end
51
- end
51
+
52
+ private
53
+
54
+ def table_name_is_free?(table_name)
55
+ if ActiveRecord::VERSION::MAJOR == 4 && ActiveRecord::VERSION::MINOR == 1
56
+ !db_connection.table_exists?(table_name)
57
+ elsif (ActiveRecord::VERSION::MAJOR == 4 && ActiveRecord::VERSION::MINOR == 2) ||
58
+ (ActiveRecord::VERSION::MAJOR == 5 && ActiveRecord::VERSION::MINOR == 0) ||
59
+ (ActiveRecord::VERSION::MAJOR == 5 && ActiveRecord::VERSION::MINOR == 1) ||
60
+ (ActiveRecord::VERSION::MAJOR == 5 && ActiveRecord::VERSION::MINOR == 2)
61
+ !db_connection.data_source_exists?(table_name)
62
+ else
63
+ raise "ActiveRecord Version #{ActiveRecord::VERSION::STRING} is not supported!"
64
+ end
65
+ end
66
+ end
@@ -90,6 +90,46 @@ describe 'performance' do
90
90
  # update 1.820000 0.210000 2.030000 ( 2.351518)
91
91
  # load 1.310000 0.010000 1.320000 ( 1.394192)
92
92
  # destroy 0.930000 0.010000 0.940000 ( 1.030910)
93
+ #
94
+ # Vorpal 1.0.0, Ruby 2.1.6, ActiveRecord 4.1.16, AR:Import 0.10.0
95
+ # user system total real
96
+ # create 0.980000 0.140000 1.120000 ( 1.671115)
97
+ # update 2.030000 0.250000 2.280000 ( 2.748697)
98
+ # load 1.230000 0.010000 1.240000 ( 1.395219)
99
+ # destroy 0.830000 0.010000 0.840000 ( 1.042960)
100
+ #
101
+ # Vorpal 1.0.0, Ruby 2.3.3, ActiveRecord 4.1.16, AR:Import 0.10.0
102
+ # user system total real
103
+ # create 0.940000 0.120000 1.060000 ( 1.579334)
104
+ # update 1.880000 0.250000 2.130000 ( 2.601979)
105
+ # load 1.130000 0.010000 1.140000 ( 1.292817)
106
+ # destroy 0.730000 0.000000 0.730000 ( 0.930980)
107
+ #
108
+ # Vorpal 1.0.0, Ruby 2.3.3, ActiveRecord 4.2.10, AR:Import 0.10.0
109
+ # user system total real
110
+ # create 1.230000 0.130000 1.360000 ( 1.864400)
111
+ # update 2.660000 0.260000 2.920000 ( 3.416604)
112
+ # load 1.310000 0.010000 1.320000 ( 1.479030)
113
+ # destroy 0.840000 0.010000 0.850000 ( 1.037512)
114
+ #
115
+ # Vorpal 1.0.0, Ruby 2.3.3, ActiveRecord 5.0.7, AR:Import 0.13.0
116
+ # user system total real
117
+ # create 0.960000 0.120000 1.080000 ( 1.631415)
118
+ # update 2.810000 0.270000 3.080000 ( 3.633569)
119
+ # load 1.340000 0.010000 1.350000 ( 1.510898)
120
+ # destroy 0.900000 0.010000 0.910000 ( 1.085288)
121
+ #
122
+ # Vorpal 1.0.0, Ruby 2.3.3, ActiveRecord 5.1.6, AR:Import 0.13.0
123
+ # create 0.960000 0.120000 1.080000 ( 1.588142)
124
+ # update 3.030000 0.290000 3.320000 ( 3.839557)
125
+ # load 1.340000 0.010000 1.350000 ( 1.509182)
126
+ # destroy 0.950000 0.010000 0.960000 ( 1.155866)
127
+ #
128
+ # Vorpal 1.0.0, Ruby 2.3.3, ActiveRecord 5.1.6, AR:Import 0.13.0
129
+ # create 0.920000 0.120000 1.040000 ( 1.534410)
130
+ # update 3.010000 0.290000 3.300000 ( 3.850101)
131
+ # load 1.380000 0.010000 1.390000 ( 1.561047)
132
+ # destroy 1.050000 0.010000 1.060000 ( 1.260379)
93
133
  it 'benchmarks all operations' do
94
134
  trees = build_trees(1000)
95
135
  Benchmark.bm(7) do |x|
@@ -18,16 +18,17 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.required_ruby_version = ">= 2.1.6"
22
-
23
21
  spec.add_runtime_dependency "simple_serializer", "~> 1.0"
24
22
  spec.add_runtime_dependency "equalizer"
25
23
  spec.add_runtime_dependency "activesupport"
26
24
 
27
25
  spec.add_development_dependency "rake", "~> 10.0"
28
26
  spec.add_development_dependency "rspec", "~> 3.0"
29
- spec.add_development_dependency "activerecord", "~> 4.0"
30
- spec.add_development_dependency "pg", "~> 0.17.0"
31
27
  spec.add_development_dependency "virtus", "~> 1.0"
28
+ spec.add_development_dependency "appraisal", "~> 2.2"
29
+
30
+ spec.required_ruby_version = ">= 2.1.6"
31
+ spec.add_development_dependency "activerecord", "~> 4.1.0"
32
+ spec.add_development_dependency "pg", "~> 0.17.0"
32
33
  spec.add_development_dependency "activerecord-import", "~> 0.10.0"
33
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vorpal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Kirby
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-26 00:00:00.000000000 Z
11
+ date: 2018-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simple_serializer
@@ -81,47 +81,61 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3.0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: activerecord
84
+ name: virtus
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '4.0'
89
+ version: '1.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '4.0'
96
+ version: '1.0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: pg
98
+ name: appraisal
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 0.17.0
103
+ version: '2.2'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 0.17.0
110
+ version: '2.2'
111
111
  - !ruby/object:Gem::Dependency
112
- name: virtus
112
+ name: activerecord
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '1.0'
117
+ version: 4.1.0
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '1.0'
124
+ version: 4.1.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: pg
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 0.17.0
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 0.17.0
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: activerecord-import
127
141
  requirement: !ruby/object:Gem::Requirement
@@ -140,19 +154,37 @@ description: An ORM framelet that fits on top of ActiveRecord to give you 'Data
140
154
  semantics.
141
155
  email:
142
156
  - seank@nulogy.com
143
- executables: []
157
+ executables:
158
+ - appraisal
159
+ - rake
160
+ - rspec
144
161
  extensions: []
145
162
  extra_rdoc_files: []
146
163
  files:
147
164
  - ".editorconfig"
165
+ - ".envrc"
148
166
  - ".gitignore"
149
167
  - ".rspec"
150
168
  - ".yardopts"
169
+ - Appraisals
151
170
  - CHANGELOG.md
152
171
  - Gemfile
153
172
  - LICENSE.txt
154
173
  - README.md
155
174
  - Rakefile
175
+ - bin/appraisal
176
+ - bin/rake
177
+ - bin/rspec
178
+ - gemfiles/rails_4_1.gemfile
179
+ - gemfiles/rails_4_1.gemfile.lock
180
+ - gemfiles/rails_4_2.gemfile
181
+ - gemfiles/rails_4_2.gemfile.lock
182
+ - gemfiles/rails_5_0.gemfile
183
+ - gemfiles/rails_5_0.gemfile.lock
184
+ - gemfiles/rails_5_1.gemfile
185
+ - gemfiles/rails_5_1.gemfile.lock
186
+ - gemfiles/rails_5_2.gemfile
187
+ - gemfiles/rails_5_2.gemfile.lock
156
188
  - lib/vorpal.rb
157
189
  - lib/vorpal/aggregate_mapper.rb
158
190
  - lib/vorpal/aggregate_traversal.rb
@@ -206,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
238
  version: '0'
207
239
  requirements: []
208
240
  rubyforge_project:
209
- rubygems_version: 2.7.6
241
+ rubygems_version: 2.7.3
210
242
  signing_key:
211
243
  specification_version: 4
212
244
  summary: Separate your domain model from your persistence mechanism.