brainstem 2.2.0 → 2.3.0

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
  SHA1:
3
- metadata.gz: be36bdc7fac874075d12f3fc38f599db5b212521
4
- data.tar.gz: 34d5b34f8f0ff187174aa72e7cab77de068d31fe
3
+ metadata.gz: 6c4ef646937471e3b40be68a1ff71f4faf4cdd63
4
+ data.tar.gz: 1fadd886ec5c7125858223abbe7be3d620dad232
5
5
  SHA512:
6
- metadata.gz: c89e79f9afe533a869501ede83e86ad4cbeba0dbb08c6a29d57b4dbac437e3a7072e672fc807ec517225b67f5aefdc42d0ebaba68cdc713505cd460f02b1a3bb
7
- data.tar.gz: d9a506a58f9fd81d58ae3546dd88dce4e7f6fd836661673915402c54ee0d6a3235def1abddafe465cff485daf7e1f911a7b5bdad0b539a623590c6dbe11a3db7
6
+ metadata.gz: 076d515bc2db2839b04a764bffd19b4505a3c600cdd83819bb01cbae337bdc42f93802cdc13c662ca60a7d5e32f1dff3a8d9a0bde800021795888e48bbdda6fc
7
+ data.tar.gz: 6bf6f7174b79e66141cd080463ec5a16f6ebd99bf9bbf1dace67a067c6f72530df4b9d992ce720ac824b63e37418f411e963aab72b7b3bf1cd71f227919d01c1
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ + **2.3.0** - _10/09/2019_
4
+ ### Version Support
5
+ - Add official Rails 6.0 compatibility
6
+ - Drop support for Rails 4.1 and below
7
+
8
+ ### Bugfixes
9
+ - Address deprecation warnings for Rails 6 by wrapping raw sql in `Arel.sql`
10
+
3
11
  + **2.2.0** - _08/15/2019_
4
12
  ### Bugfixes
5
13
  - Add support for API documentation generation in Rails 5.x
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brainstem (2.2.0)
5
- activerecord (>= 4.1)
6
- activesupport (>= 4.1)
4
+ brainstem (2.3.0)
5
+ activerecord (>= 4.2)
6
+ activesupport (>= 4.2)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
@@ -38,21 +38,21 @@ GEM
38
38
  concurrent-ruby (1.1.5)
39
39
  crass (1.0.4)
40
40
  database_cleaner (1.7.0)
41
- db-query-matchers (0.9.0)
42
- activesupport (>= 4.0, <= 6.0)
41
+ db-query-matchers (0.10.0)
42
+ activesupport (>= 4.0, < 7)
43
43
  rspec (~> 3.0)
44
44
  diff-lcs (1.3)
45
- erubi (1.8.0)
46
- i18n (1.6.0)
45
+ erubi (1.9.0)
46
+ i18n (1.7.0)
47
47
  concurrent-ruby (~> 1.0)
48
- loofah (2.2.3)
48
+ loofah (2.3.0)
49
49
  crass (~> 1.0.2)
50
50
  nokogiri (>= 1.5.9)
51
51
  method_source (0.9.2)
52
52
  mini_portile2 (2.4.0)
53
- minitest (5.11.3)
53
+ minitest (5.12.2)
54
54
  mysql2 (0.4.10)
55
- nokogiri (1.10.3)
55
+ nokogiri (1.10.4)
56
56
  mini_portile2 (~> 2.4.0)
57
57
  pry (0.12.2)
58
58
  coderay (~> 1.1.0)
@@ -65,24 +65,24 @@ GEM
65
65
  rails-dom-testing (2.0.3)
66
66
  activesupport (>= 4.2.0)
67
67
  nokogiri (>= 1.6)
68
- rails-html-sanitizer (1.1.0)
69
- loofah (~> 2.2, >= 2.2.2)
70
- rake (12.3.3)
68
+ rails-html-sanitizer (1.3.0)
69
+ loofah (~> 2.3)
70
+ rake (13.0.0)
71
71
  redcarpet (3.5.0)
72
72
  rr (1.2.1)
73
- rspec (3.8.0)
74
- rspec-core (~> 3.8.0)
75
- rspec-expectations (~> 3.8.0)
76
- rspec-mocks (~> 3.8.0)
77
- rspec-core (3.8.2)
78
- rspec-support (~> 3.8.0)
79
- rspec-expectations (3.8.4)
73
+ rspec (3.9.0)
74
+ rspec-core (~> 3.9.0)
75
+ rspec-expectations (~> 3.9.0)
76
+ rspec-mocks (~> 3.9.0)
77
+ rspec-core (3.9.0)
78
+ rspec-support (~> 3.9.0)
79
+ rspec-expectations (3.9.0)
80
80
  diff-lcs (>= 1.2.0, < 2.0)
81
- rspec-support (~> 3.8.0)
82
- rspec-mocks (3.8.1)
81
+ rspec-support (~> 3.9.0)
82
+ rspec-mocks (3.9.0)
83
83
  diff-lcs (>= 1.2.0, < 2.0)
84
- rspec-support (~> 3.8.0)
85
- rspec-support (3.8.2)
84
+ rspec-support (~> 3.9.0)
85
+ rspec-support (3.9.0)
86
86
  sqlite3 (1.4.1)
87
87
  thread_safe (0.3.6)
88
88
  tzinfo (1.2.5)
@@ -103,9 +103,9 @@ DEPENDENCIES
103
103
  rake
104
104
  redcarpet
105
105
  rr
106
- rspec (~> 3.5)
106
+ rspec (~> 3.9)
107
107
  sqlite3
108
108
  yard
109
109
 
110
110
  BUNDLED WITH
111
- 1.17.3
111
+ 2.0.2
data/README.md CHANGED
@@ -4,7 +4,7 @@ If you're upgrading from an older version of Brainstem, please see [Upgrading Fr
4
4
 
5
5
  [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mavenlink/brainstem?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
6
6
 
7
- [![Build Status](https://travis-ci.org/mavenlink/brainstem.png)](https://travis-ci.org/mavenlink/brainstem)
7
+ [![Build Status](https://travis-ci.org/mavenlink/brainstem.svg?branch=master)](https://travis-ci.org/mavenlink/brainstem)
8
8
 
9
9
  Brainstem is designed to power rich APIs in Rails. The Brainstem gem provides a presenter library that handles
10
10
  converting ActiveRecord objects into structured JSON and a set of API abstractions that allow users to request sorts,
@@ -19,13 +19,13 @@ Gem::Specification.new do |gem|
19
19
 
20
20
  gem.executables << 'brainstem'
21
21
 
22
- gem.add_dependency "activerecord", ">= 4.1"
23
- gem.add_dependency "activesupport", ">= 4.1"
22
+ gem.add_dependency "activerecord", ">= 4.2"
23
+ gem.add_dependency "activesupport", ">= 4.2"
24
24
 
25
25
  gem.add_development_dependency "rake"
26
26
  gem.add_development_dependency "redcarpet" # for markdown in yard
27
27
  gem.add_development_dependency "rr"
28
- gem.add_development_dependency "rspec", "~> 3.5"
28
+ gem.add_development_dependency "rspec", "~> 3.9"
29
29
  gem.add_development_dependency "sqlite3"
30
30
  gem.add_development_dependency "mysql2", "0.4.10"
31
31
  gem.add_development_dependency "database_cleaner"
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec path: "../"
4
+
5
+ gem "activerecord", "~> 4.2.0"
6
+ gem "activesupport", "~> 4.2.0"
7
+ gem "sqlite3", "~> 1.3.0"
@@ -0,0 +1,117 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ brainstem (2.3.0)
5
+ activerecord (>= 4.2)
6
+ activesupport (>= 4.2)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionpack (4.2.11.1)
12
+ actionview (= 4.2.11.1)
13
+ activesupport (= 4.2.11.1)
14
+ rack (~> 1.6)
15
+ rack-test (~> 0.6.2)
16
+ rails-dom-testing (~> 1.0, >= 1.0.5)
17
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
18
+ actionview (4.2.11.1)
19
+ activesupport (= 4.2.11.1)
20
+ builder (~> 3.1)
21
+ erubis (~> 2.7.0)
22
+ rails-dom-testing (~> 1.0, >= 1.0.5)
23
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
24
+ activemodel (4.2.11.1)
25
+ activesupport (= 4.2.11.1)
26
+ builder (~> 3.1)
27
+ activerecord (4.2.11.1)
28
+ activemodel (= 4.2.11.1)
29
+ activesupport (= 4.2.11.1)
30
+ arel (~> 6.0)
31
+ activesupport (4.2.11.1)
32
+ i18n (~> 0.7)
33
+ minitest (~> 5.1)
34
+ thread_safe (~> 0.3, >= 0.3.4)
35
+ tzinfo (~> 1.1)
36
+ arel (6.0.4)
37
+ builder (3.2.3)
38
+ coderay (1.1.2)
39
+ concurrent-ruby (1.1.5)
40
+ crass (1.0.4)
41
+ database_cleaner (1.7.0)
42
+ db-query-matchers (0.10.0)
43
+ activesupport (>= 4.0, < 7)
44
+ rspec (~> 3.0)
45
+ diff-lcs (1.3)
46
+ erubis (2.7.0)
47
+ i18n (0.9.5)
48
+ concurrent-ruby (~> 1.0)
49
+ loofah (2.3.0)
50
+ crass (~> 1.0.2)
51
+ nokogiri (>= 1.5.9)
52
+ method_source (0.9.2)
53
+ mini_portile2 (2.4.0)
54
+ minitest (5.12.2)
55
+ mysql2 (0.4.10)
56
+ nokogiri (1.10.4)
57
+ mini_portile2 (~> 2.4.0)
58
+ pry (0.12.2)
59
+ coderay (~> 1.1.0)
60
+ method_source (~> 0.9.0)
61
+ pry-nav (0.3.0)
62
+ pry (>= 0.9.10, < 0.13.0)
63
+ rack (1.6.11)
64
+ rack-test (0.6.3)
65
+ rack (>= 1.0)
66
+ rails-deprecated_sanitizer (1.0.3)
67
+ activesupport (>= 4.2.0.alpha)
68
+ rails-dom-testing (1.0.9)
69
+ activesupport (>= 4.2.0, < 5.0)
70
+ nokogiri (~> 1.6)
71
+ rails-deprecated_sanitizer (>= 1.0.1)
72
+ rails-html-sanitizer (1.3.0)
73
+ loofah (~> 2.3)
74
+ rake (13.0.0)
75
+ redcarpet (3.5.0)
76
+ rr (1.2.1)
77
+ rspec (3.9.0)
78
+ rspec-core (~> 3.9.0)
79
+ rspec-expectations (~> 3.9.0)
80
+ rspec-mocks (~> 3.9.0)
81
+ rspec-core (3.9.0)
82
+ rspec-support (~> 3.9.0)
83
+ rspec-expectations (3.9.0)
84
+ diff-lcs (>= 1.2.0, < 2.0)
85
+ rspec-support (~> 3.9.0)
86
+ rspec-mocks (3.9.0)
87
+ diff-lcs (>= 1.2.0, < 2.0)
88
+ rspec-support (~> 3.9.0)
89
+ rspec-support (3.9.0)
90
+ sqlite3 (1.3.13)
91
+ thread_safe (0.3.6)
92
+ tzinfo (1.2.5)
93
+ thread_safe (~> 0.1)
94
+ yard (0.9.20)
95
+
96
+ PLATFORMS
97
+ ruby
98
+
99
+ DEPENDENCIES
100
+ actionpack
101
+ activerecord (~> 4.2.0)
102
+ activesupport (~> 4.2.0)
103
+ brainstem!
104
+ database_cleaner
105
+ db-query-matchers
106
+ mysql2 (= 0.4.10)
107
+ pry
108
+ pry-nav
109
+ rake
110
+ redcarpet
111
+ rr
112
+ rspec (~> 3.9)
113
+ sqlite3 (~> 1.3.0)
114
+ yard
115
+
116
+ BUNDLED WITH
117
+ 2.0.2
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec path: "../"
4
+
5
+ gem "activerecord", "~> 5.0.0"
6
+ gem "activesupport", "~> 5.0.0"
7
+ gem "sqlite3", "~> 1.3.0"
@@ -0,0 +1,113 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ brainstem (2.3.0)
5
+ activerecord (>= 4.2)
6
+ activesupport (>= 4.2)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionpack (5.0.7.2)
12
+ actionview (= 5.0.7.2)
13
+ activesupport (= 5.0.7.2)
14
+ rack (~> 2.0)
15
+ rack-test (~> 0.6.3)
16
+ rails-dom-testing (~> 2.0)
17
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
18
+ actionview (5.0.7.2)
19
+ activesupport (= 5.0.7.2)
20
+ builder (~> 3.1)
21
+ erubis (~> 2.7.0)
22
+ rails-dom-testing (~> 2.0)
23
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
24
+ activemodel (5.0.7.2)
25
+ activesupport (= 5.0.7.2)
26
+ activerecord (5.0.7.2)
27
+ activemodel (= 5.0.7.2)
28
+ activesupport (= 5.0.7.2)
29
+ arel (~> 7.0)
30
+ activesupport (5.0.7.2)
31
+ concurrent-ruby (~> 1.0, >= 1.0.2)
32
+ i18n (>= 0.7, < 2)
33
+ minitest (~> 5.1)
34
+ tzinfo (~> 1.1)
35
+ arel (7.1.4)
36
+ builder (3.2.3)
37
+ coderay (1.1.2)
38
+ concurrent-ruby (1.1.5)
39
+ crass (1.0.4)
40
+ database_cleaner (1.7.0)
41
+ db-query-matchers (0.10.0)
42
+ activesupport (>= 4.0, < 7)
43
+ rspec (~> 3.0)
44
+ diff-lcs (1.3)
45
+ erubis (2.7.0)
46
+ i18n (1.7.0)
47
+ concurrent-ruby (~> 1.0)
48
+ loofah (2.3.0)
49
+ crass (~> 1.0.2)
50
+ nokogiri (>= 1.5.9)
51
+ method_source (0.9.2)
52
+ mini_portile2 (2.4.0)
53
+ minitest (5.12.2)
54
+ mysql2 (0.4.10)
55
+ nokogiri (1.10.4)
56
+ mini_portile2 (~> 2.4.0)
57
+ pry (0.12.2)
58
+ coderay (~> 1.1.0)
59
+ method_source (~> 0.9.0)
60
+ pry-nav (0.3.0)
61
+ pry (>= 0.9.10, < 0.13.0)
62
+ rack (2.0.7)
63
+ rack-test (0.6.3)
64
+ rack (>= 1.0)
65
+ rails-dom-testing (2.0.3)
66
+ activesupport (>= 4.2.0)
67
+ nokogiri (>= 1.6)
68
+ rails-html-sanitizer (1.3.0)
69
+ loofah (~> 2.3)
70
+ rake (13.0.0)
71
+ redcarpet (3.5.0)
72
+ rr (1.2.1)
73
+ rspec (3.9.0)
74
+ rspec-core (~> 3.9.0)
75
+ rspec-expectations (~> 3.9.0)
76
+ rspec-mocks (~> 3.9.0)
77
+ rspec-core (3.9.0)
78
+ rspec-support (~> 3.9.0)
79
+ rspec-expectations (3.9.0)
80
+ diff-lcs (>= 1.2.0, < 2.0)
81
+ rspec-support (~> 3.9.0)
82
+ rspec-mocks (3.9.0)
83
+ diff-lcs (>= 1.2.0, < 2.0)
84
+ rspec-support (~> 3.9.0)
85
+ rspec-support (3.9.0)
86
+ sqlite3 (1.3.13)
87
+ thread_safe (0.3.6)
88
+ tzinfo (1.2.5)
89
+ thread_safe (~> 0.1)
90
+ yard (0.9.20)
91
+
92
+ PLATFORMS
93
+ ruby
94
+
95
+ DEPENDENCIES
96
+ actionpack
97
+ activerecord (~> 5.0.0)
98
+ activesupport (~> 5.0.0)
99
+ brainstem!
100
+ database_cleaner
101
+ db-query-matchers
102
+ mysql2 (= 0.4.10)
103
+ pry
104
+ pry-nav
105
+ rake
106
+ redcarpet
107
+ rr
108
+ rspec (~> 3.9)
109
+ sqlite3 (~> 1.3.0)
110
+ yard
111
+
112
+ BUNDLED WITH
113
+ 2.0.2
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec path: "../"
4
+
5
+ gem "activerecord", "~> 5.1.0"
6
+ gem "activesupport", "~> 5.1.0"
@@ -0,0 +1,113 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ brainstem (2.3.0)
5
+ activerecord (>= 4.2)
6
+ activesupport (>= 4.2)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionpack (5.1.7)
12
+ actionview (= 5.1.7)
13
+ activesupport (= 5.1.7)
14
+ rack (~> 2.0)
15
+ rack-test (>= 0.6.3)
16
+ rails-dom-testing (~> 2.0)
17
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
18
+ actionview (5.1.7)
19
+ activesupport (= 5.1.7)
20
+ builder (~> 3.1)
21
+ erubi (~> 1.4)
22
+ rails-dom-testing (~> 2.0)
23
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
24
+ activemodel (5.1.7)
25
+ activesupport (= 5.1.7)
26
+ activerecord (5.1.7)
27
+ activemodel (= 5.1.7)
28
+ activesupport (= 5.1.7)
29
+ arel (~> 8.0)
30
+ activesupport (5.1.7)
31
+ concurrent-ruby (~> 1.0, >= 1.0.2)
32
+ i18n (>= 0.7, < 2)
33
+ minitest (~> 5.1)
34
+ tzinfo (~> 1.1)
35
+ arel (8.0.0)
36
+ builder (3.2.3)
37
+ coderay (1.1.2)
38
+ concurrent-ruby (1.1.5)
39
+ crass (1.0.4)
40
+ database_cleaner (1.7.0)
41
+ db-query-matchers (0.10.0)
42
+ activesupport (>= 4.0, < 7)
43
+ rspec (~> 3.0)
44
+ diff-lcs (1.3)
45
+ erubi (1.9.0)
46
+ i18n (1.7.0)
47
+ concurrent-ruby (~> 1.0)
48
+ loofah (2.3.0)
49
+ crass (~> 1.0.2)
50
+ nokogiri (>= 1.5.9)
51
+ method_source (0.9.2)
52
+ mini_portile2 (2.4.0)
53
+ minitest (5.12.2)
54
+ mysql2 (0.4.10)
55
+ nokogiri (1.10.4)
56
+ mini_portile2 (~> 2.4.0)
57
+ pry (0.12.2)
58
+ coderay (~> 1.1.0)
59
+ method_source (~> 0.9.0)
60
+ pry-nav (0.3.0)
61
+ pry (>= 0.9.10, < 0.13.0)
62
+ rack (2.0.7)
63
+ rack-test (1.1.0)
64
+ rack (>= 1.0, < 3)
65
+ rails-dom-testing (2.0.3)
66
+ activesupport (>= 4.2.0)
67
+ nokogiri (>= 1.6)
68
+ rails-html-sanitizer (1.3.0)
69
+ loofah (~> 2.3)
70
+ rake (13.0.0)
71
+ redcarpet (3.5.0)
72
+ rr (1.2.1)
73
+ rspec (3.9.0)
74
+ rspec-core (~> 3.9.0)
75
+ rspec-expectations (~> 3.9.0)
76
+ rspec-mocks (~> 3.9.0)
77
+ rspec-core (3.9.0)
78
+ rspec-support (~> 3.9.0)
79
+ rspec-expectations (3.9.0)
80
+ diff-lcs (>= 1.2.0, < 2.0)
81
+ rspec-support (~> 3.9.0)
82
+ rspec-mocks (3.9.0)
83
+ diff-lcs (>= 1.2.0, < 2.0)
84
+ rspec-support (~> 3.9.0)
85
+ rspec-support (3.9.0)
86
+ sqlite3 (1.4.1)
87
+ thread_safe (0.3.6)
88
+ tzinfo (1.2.5)
89
+ thread_safe (~> 0.1)
90
+ yard (0.9.20)
91
+
92
+ PLATFORMS
93
+ ruby
94
+
95
+ DEPENDENCIES
96
+ actionpack
97
+ activerecord (~> 5.1.0)
98
+ activesupport (~> 5.1.0)
99
+ brainstem!
100
+ database_cleaner
101
+ db-query-matchers
102
+ mysql2 (= 0.4.10)
103
+ pry
104
+ pry-nav
105
+ rake
106
+ redcarpet
107
+ rr
108
+ rspec (~> 3.9)
109
+ sqlite3
110
+ yard
111
+
112
+ BUNDLED WITH
113
+ 2.0.2
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec path: "../"
4
+
5
+ gem "activerecord", "~> 5.2.0"
6
+ gem "activesupport", "~> 5.2.0"
@@ -0,0 +1,113 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ brainstem (2.3.0)
5
+ activerecord (>= 4.2)
6
+ activesupport (>= 4.2)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionpack (5.2.3)
12
+ actionview (= 5.2.3)
13
+ activesupport (= 5.2.3)
14
+ rack (~> 2.0)
15
+ rack-test (>= 0.6.3)
16
+ rails-dom-testing (~> 2.0)
17
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
18
+ actionview (5.2.3)
19
+ activesupport (= 5.2.3)
20
+ builder (~> 3.1)
21
+ erubi (~> 1.4)
22
+ rails-dom-testing (~> 2.0)
23
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
24
+ activemodel (5.2.3)
25
+ activesupport (= 5.2.3)
26
+ activerecord (5.2.3)
27
+ activemodel (= 5.2.3)
28
+ activesupport (= 5.2.3)
29
+ arel (>= 9.0)
30
+ activesupport (5.2.3)
31
+ concurrent-ruby (~> 1.0, >= 1.0.2)
32
+ i18n (>= 0.7, < 2)
33
+ minitest (~> 5.1)
34
+ tzinfo (~> 1.1)
35
+ arel (9.0.0)
36
+ builder (3.2.3)
37
+ coderay (1.1.2)
38
+ concurrent-ruby (1.1.5)
39
+ crass (1.0.4)
40
+ database_cleaner (1.7.0)
41
+ db-query-matchers (0.10.0)
42
+ activesupport (>= 4.0, < 7)
43
+ rspec (~> 3.0)
44
+ diff-lcs (1.3)
45
+ erubi (1.9.0)
46
+ i18n (1.7.0)
47
+ concurrent-ruby (~> 1.0)
48
+ loofah (2.3.0)
49
+ crass (~> 1.0.2)
50
+ nokogiri (>= 1.5.9)
51
+ method_source (0.9.2)
52
+ mini_portile2 (2.4.0)
53
+ minitest (5.12.2)
54
+ mysql2 (0.4.10)
55
+ nokogiri (1.10.4)
56
+ mini_portile2 (~> 2.4.0)
57
+ pry (0.12.2)
58
+ coderay (~> 1.1.0)
59
+ method_source (~> 0.9.0)
60
+ pry-nav (0.3.0)
61
+ pry (>= 0.9.10, < 0.13.0)
62
+ rack (2.0.7)
63
+ rack-test (1.1.0)
64
+ rack (>= 1.0, < 3)
65
+ rails-dom-testing (2.0.3)
66
+ activesupport (>= 4.2.0)
67
+ nokogiri (>= 1.6)
68
+ rails-html-sanitizer (1.3.0)
69
+ loofah (~> 2.3)
70
+ rake (13.0.0)
71
+ redcarpet (3.5.0)
72
+ rr (1.2.1)
73
+ rspec (3.9.0)
74
+ rspec-core (~> 3.9.0)
75
+ rspec-expectations (~> 3.9.0)
76
+ rspec-mocks (~> 3.9.0)
77
+ rspec-core (3.9.0)
78
+ rspec-support (~> 3.9.0)
79
+ rspec-expectations (3.9.0)
80
+ diff-lcs (>= 1.2.0, < 2.0)
81
+ rspec-support (~> 3.9.0)
82
+ rspec-mocks (3.9.0)
83
+ diff-lcs (>= 1.2.0, < 2.0)
84
+ rspec-support (~> 3.9.0)
85
+ rspec-support (3.9.0)
86
+ sqlite3 (1.4.1)
87
+ thread_safe (0.3.6)
88
+ tzinfo (1.2.5)
89
+ thread_safe (~> 0.1)
90
+ yard (0.9.20)
91
+
92
+ PLATFORMS
93
+ ruby
94
+
95
+ DEPENDENCIES
96
+ actionpack
97
+ activerecord (~> 5.2.0)
98
+ activesupport (~> 5.2.0)
99
+ brainstem!
100
+ database_cleaner
101
+ db-query-matchers
102
+ mysql2 (= 0.4.10)
103
+ pry
104
+ pry-nav
105
+ rake
106
+ redcarpet
107
+ rr
108
+ rspec (~> 3.9)
109
+ sqlite3
110
+ yard
111
+
112
+ BUNDLED WITH
113
+ 2.0.2
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec path: "../"
4
+
5
+ gem "activerecord", "~> 6.0.0"
6
+ gem "activesupport", "~> 6.0.0"
@@ -0,0 +1,113 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ brainstem (2.3.0)
5
+ activerecord (>= 4.2)
6
+ activesupport (>= 4.2)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionpack (6.0.0)
12
+ actionview (= 6.0.0)
13
+ activesupport (= 6.0.0)
14
+ rack (~> 2.0)
15
+ rack-test (>= 0.6.3)
16
+ rails-dom-testing (~> 2.0)
17
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
18
+ actionview (6.0.0)
19
+ activesupport (= 6.0.0)
20
+ builder (~> 3.1)
21
+ erubi (~> 1.4)
22
+ rails-dom-testing (~> 2.0)
23
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
24
+ activemodel (6.0.0)
25
+ activesupport (= 6.0.0)
26
+ activerecord (6.0.0)
27
+ activemodel (= 6.0.0)
28
+ activesupport (= 6.0.0)
29
+ activesupport (6.0.0)
30
+ concurrent-ruby (~> 1.0, >= 1.0.2)
31
+ i18n (>= 0.7, < 2)
32
+ minitest (~> 5.1)
33
+ tzinfo (~> 1.1)
34
+ zeitwerk (~> 2.1, >= 2.1.8)
35
+ builder (3.2.3)
36
+ coderay (1.1.2)
37
+ concurrent-ruby (1.1.5)
38
+ crass (1.0.4)
39
+ database_cleaner (1.7.0)
40
+ db-query-matchers (0.10.0)
41
+ activesupport (>= 4.0, < 7)
42
+ rspec (~> 3.0)
43
+ diff-lcs (1.3)
44
+ erubi (1.9.0)
45
+ i18n (1.7.0)
46
+ concurrent-ruby (~> 1.0)
47
+ loofah (2.3.0)
48
+ crass (~> 1.0.2)
49
+ nokogiri (>= 1.5.9)
50
+ method_source (0.9.2)
51
+ mini_portile2 (2.4.0)
52
+ minitest (5.12.2)
53
+ mysql2 (0.4.10)
54
+ nokogiri (1.10.4)
55
+ mini_portile2 (~> 2.4.0)
56
+ pry (0.12.2)
57
+ coderay (~> 1.1.0)
58
+ method_source (~> 0.9.0)
59
+ pry-nav (0.3.0)
60
+ pry (>= 0.9.10, < 0.13.0)
61
+ rack (2.0.7)
62
+ rack-test (1.1.0)
63
+ rack (>= 1.0, < 3)
64
+ rails-dom-testing (2.0.3)
65
+ activesupport (>= 4.2.0)
66
+ nokogiri (>= 1.6)
67
+ rails-html-sanitizer (1.3.0)
68
+ loofah (~> 2.3)
69
+ rake (13.0.0)
70
+ redcarpet (3.5.0)
71
+ rr (1.2.1)
72
+ rspec (3.9.0)
73
+ rspec-core (~> 3.9.0)
74
+ rspec-expectations (~> 3.9.0)
75
+ rspec-mocks (~> 3.9.0)
76
+ rspec-core (3.9.0)
77
+ rspec-support (~> 3.9.0)
78
+ rspec-expectations (3.9.0)
79
+ diff-lcs (>= 1.2.0, < 2.0)
80
+ rspec-support (~> 3.9.0)
81
+ rspec-mocks (3.9.0)
82
+ diff-lcs (>= 1.2.0, < 2.0)
83
+ rspec-support (~> 3.9.0)
84
+ rspec-support (3.9.0)
85
+ sqlite3 (1.4.1)
86
+ thread_safe (0.3.6)
87
+ tzinfo (1.2.5)
88
+ thread_safe (~> 0.1)
89
+ yard (0.9.20)
90
+ zeitwerk (2.2.0)
91
+
92
+ PLATFORMS
93
+ ruby
94
+
95
+ DEPENDENCIES
96
+ actionpack
97
+ activerecord (~> 6.0.0)
98
+ activesupport (~> 6.0.0)
99
+ brainstem!
100
+ database_cleaner
101
+ db-query-matchers
102
+ mysql2 (= 0.4.10)
103
+ pry
104
+ pry-nav
105
+ rake
106
+ redcarpet
107
+ rr
108
+ rspec (~> 3.9)
109
+ sqlite3
110
+ yard
111
+
112
+ BUNDLED WITH
113
+ 2.0.2
@@ -1,4 +1,5 @@
1
1
  require 'active_support/configurable'
2
+ require 'active_support/core_ext/string/strip'
2
3
 
3
4
  module Brainstem
4
5
  module ApiDocs
@@ -42,7 +42,7 @@ module Brainstem
42
42
 
43
43
  def get_ids_sql(scope)
44
44
  if Brainstem.mysql_use_calc_found_rows && ActiveRecord::Base.connection.instance_values["config"][:adapter] =~ /mysql/i
45
- ids = scope.pluck("SQL_CALC_FOUND_ROWS #{scope.table_name}.id")
45
+ ids = scope.pluck(Arel.sql("SQL_CALC_FOUND_ROWS #{scope.table_name}.id"))
46
46
  @last_count = ActiveRecord::Base.connection.execute("SELECT FOUND_ROWS()").first.first
47
47
  else
48
48
  ids = scope.pluck("#{scope.table_name}.id")
@@ -1,3 +1,3 @@
1
1
  module Brainstem
2
- VERSION = "2.2.0"
2
+ VERSION = "2.3.0"
3
3
  end
@@ -584,7 +584,7 @@ module Brainstem
584
584
 
585
585
  context "when not nodoc" do
586
586
  it "evaluates the proc in the controller's context and lists it as a nested param" do
587
- mock.proxy(const).brainstem_model_name
587
+ mock.proxy(const).brainstem_model_name.at_least(1)
588
588
 
589
589
  result = subject.params_configuration_tree
590
590
  expect(result.keys).to eq(%w(widget))
@@ -1,5 +1,5 @@
1
1
  require 'spec_helper'
2
- require 'action_controller/metal/strong_parameters'
2
+ require 'action_controller'
3
3
 
4
4
  describe Brainstem::ControllerMethods do
5
5
  class TasksController
@@ -62,7 +62,7 @@ describe Brainstem::ControllerMethods do
62
62
 
63
63
  it "passes through the controller params" do
64
64
  @controller.brainstem_present_object(Workspace.find(1))
65
- expect(@controller.call_results[:options][:params]).to eq(@controller.params.merge(:only => '1'))
65
+ expect(@controller.call_results[:options][:params].with_indifferent_access).to eq(@controller.params.merge('only' => '1').to_unsafe_h)
66
66
  end
67
67
 
68
68
  it "passes through supplied options" do
@@ -1037,7 +1037,7 @@ describe Brainstem::Presenter do
1037
1037
 
1038
1038
  it 'does not add a fallback deterministic sort, and you deserve whatever fate befalls you' do
1039
1039
  sql = presenter.apply_ordering_to_scope(scope, order).to_sql.squish
1040
- expect(sql).to match(/SELECT [`"]workspaces[`"]\.\* FROM [`"]workspaces[`"] WHERE [`"]workspaces[`"]\.[`"]type[`"] IN \('Cthulhu'\) ORDER BY workspaces\.updated_at asc/i)
1040
+ expect(sql).to match(/SELECT [`"]workspaces[`"]\.\* FROM [`"]workspaces[`"] WHERE [`"]workspaces[`"]\.[`"]type[`"] (IN \('Cthulhu'\)|= 'Cthulhu') ORDER BY workspaces\.updated_at asc/i)
1041
1041
  end
1042
1042
  end
1043
1043
  end
@@ -93,7 +93,7 @@ describe Brainstem::QueryStrategies::FilterAndSearch do
93
93
  not_to make_database_queries({ count: 1, matching: "SELECT COUNT(*) FROM" })
94
94
 
95
95
  expect { run_query }.
96
- to make_database_queries({ count: 1, matching: "SELECT DISTINCT SQL_CALC_FOUND_ROWS cheeses.id FROM" }).
96
+ to make_database_queries({ count: 1, matching: /SELECT\s+DISTINCT SQL_CALC_FOUND_ROWS cheeses.id FROM/ }).
97
97
  and make_database_queries({ count: 1, matching: "SELECT FOUND_ROWS()" })
98
98
 
99
99
  _, count = run_query
@@ -111,7 +111,7 @@ describe Brainstem::QueryStrategies::FilterAndSearch do
111
111
  to make_database_queries({ count: 1, matching: "SELECT COUNT(*) FROM" })
112
112
 
113
113
  expect { run_query }.
114
- not_to make_database_queries({ count: 1, matching: "SELECT DISTINCT SQL_CALC_FOUND_ROWS cheeses.id FROM" })
114
+ not_to make_database_queries({ count: 1, matching: /SELECT\s+DISTINCT SQL_CALC_FOUND_ROWS cheeses.id FROM/ })
115
115
 
116
116
  expect { run_query }.
117
117
  not_to make_database_queries({ count: 1, matching: "SELECT FOUND_ROWS()" })
@@ -61,7 +61,7 @@ describe Brainstem::QueryStrategies::FilterOrSearch do
61
61
  not_to make_database_queries({ count: 1, matching: "SELECT COUNT(*) FROM" })
62
62
 
63
63
  expect { subject.execute(Workspace.unscoped) }.
64
- to make_database_queries({ count: 1, matching: "SELECT DISTINCT SQL_CALC_FOUND_ROWS workspaces.id FROM" }).
64
+ to make_database_queries({ count: 1, matching: /SELECT\s+DISTINCT SQL_CALC_FOUND_ROWS workspaces.id FROM/ }).
65
65
  and make_database_queries({ count: 1, matching: "SELECT FOUND_ROWS()" })
66
66
 
67
67
  _, count = subject.execute(Workspace.unscoped)
@@ -79,7 +79,7 @@ describe Brainstem::QueryStrategies::FilterOrSearch do
79
79
  to make_database_queries({ count: 1, matching: "SELECT COUNT(distinct `workspaces`.id) FROM" })
80
80
 
81
81
  expect { subject.execute(Workspace.unscoped) }.
82
- not_to make_database_queries({ count: 1, matching: "SELECT DISTINCT SQL_CALC_FOUND_ROWS workspaces.id FROM" })
82
+ not_to make_database_queries({ count: 1, matching: /SELECT\s+DISTINCT SQL_CALC_FOUND_ROWS workspaces.id FROM/ })
83
83
 
84
84
  expect { subject.execute(Workspace.unscoped) }.
85
85
  not_to make_database_queries({ count: 1, matching: "SELECT FOUND_ROWS()" })
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brainstem
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mavenlink
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-14 00:00:00.000000000 Z
11
+ date: 2019-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4.1'
19
+ version: '4.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '4.1'
26
+ version: '4.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '4.1'
33
+ version: '4.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '4.1'
40
+ version: '4.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3.5'
89
+ version: '3.9'
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: '3.5'
96
+ version: '3.9'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: sqlite3
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -232,6 +232,16 @@ files:
232
232
  - docs/executable_ascii.txt
233
233
  - docs/oas_2_docgen.png
234
234
  - docs/oas_2_docgen_ascii.txt
235
+ - gemfiles/activerecord4_2.gemfile
236
+ - gemfiles/activerecord4_2.gemfile.lock
237
+ - gemfiles/activerecord5_0.gemfile
238
+ - gemfiles/activerecord5_0.gemfile.lock
239
+ - gemfiles/activerecord5_1.gemfile
240
+ - gemfiles/activerecord5_1.gemfile.lock
241
+ - gemfiles/activerecord5_2.gemfile
242
+ - gemfiles/activerecord5_2.gemfile.lock
243
+ - gemfiles/activerecord6_0.gemfile
244
+ - gemfiles/activerecord6_0.gemfile.lock
235
245
  - lib/brainstem.rb
236
246
  - lib/brainstem/api_docs.rb
237
247
  - lib/brainstem/api_docs/abstract_collection.rb