rad_core_rails 0.8.5 → 0.8.6

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: 94385bc06e9963131ae34f6bb60e292d1d17843e33ec172d6b77208d62a8fd42
4
- data.tar.gz: e7633994fc346ba6a735201173be955121b5d53b9147eefb433ae99864e5fc6f
3
+ metadata.gz: b17f485067f34bebbd35a7fcab545dcf81273201bdeff52fdfc9bf4f730c064d
4
+ data.tar.gz: 9fa40daaa31729315ae09af260478b9ee50f109a1867ff9fea46d016e5162c6e
5
5
  SHA512:
6
- metadata.gz: 8dde266785258fbd7c1f94c9c40769498693f06ba0a4bff7a6787d5e9b6c8cf7ac4986277ea6bd22ecff9079708584473fbf47078a3215c3eb6e469a3ed88cfa
7
- data.tar.gz: adb7160fc0842d87a3653583134678e407c4364f72d400045a19621a8eb2bd584be5079f2e43fd176846b5dd3e248ccf9ba90ff36be1dec9adc28ac9f2440cfb
6
+ metadata.gz: b0f1f03e5b71cf858a9517a9b9e2b7d51187cba5dcd04119683103ca3218f8a90a60c92a82350b261e968d817d61a1539500a3a792166140585c602378fb9005
7
+ data.tar.gz: dd746c29acad9bb3ea5c4443cc9d7567773a3999f7173b9bd5eaed0b49323f1aab85ff3ab4d58db4122300180abeadd7101c89384a9f64bd9a756c86b144e4f1
data/.rspec CHANGED
@@ -1,3 +1,3 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml CHANGED
@@ -1,6 +1,6 @@
1
- ---
2
- language: ruby
3
- cache: bundler
4
- rvm:
5
- - 2.4.5
1
+ ---
2
+ language: ruby
3
+ cache: bundler
4
+ rvm:
5
+ - 2.4.5
6
6
  - 2.7.0
data/CODE_OF_CONDUCT.md CHANGED
@@ -1,74 +1,74 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at sancho.ck@gmail.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [https://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: https://contributor-covenant.org
74
- [version]: https://contributor-covenant.org/version/1/4/
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at sancho.ck@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [https://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: https://contributor-covenant.org
74
+ [version]: https://contributor-covenant.org/version/1/4/
data/Gemfile CHANGED
@@ -5,9 +5,18 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
5
5
  # Specify your gem's dependencies in new_gem.gemspec
6
6
  gemspec
7
7
 
8
+ gem "activesupport", '>= 4.2'
9
+ gem "activemodel", '>= 4.2'
10
+ gem "activerecord", '>= 4.2'
11
+ gem "actionpack", '>= 4.2'
12
+ gem "bundler", '>= 1.17.3'
13
+ gem "rake"
14
+
8
15
  group :test do
9
16
  gem 'byebug'
10
17
  gem 'pg'
11
18
  gem 'database_cleaner-active_record'
12
- gem "factory_bot_rails"
19
+ gem 'factory_bot_rails'
20
+ gem 'rspec-rails'
21
+ gem 'shoulda-matchers', '>= 4.0'
13
22
  end
data/LICENSE.txt CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2020 Oleksandr Poltavets
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 Oleksandr Poltavets
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -1,31 +1,31 @@
1
- module RadCoreRails
2
- module SearchTerms
3
- extend ActiveSupport::Concern
4
-
5
- class_methods do
6
- def _terms(column, search = '')
7
- if search.present?
8
- if column.is_a?(Array)
9
- terms = []
10
- search.split(' ').each do |term|
11
- columns = []
12
- column.each do |col|
13
- columns.push("(replace(lower(#{Arel.sql(col)}), ' ', '') ILIKE '%#{Arel.sql(term.downcase)}%')")
14
- end
15
- terms.push '(' + columns.join(' OR ') + ')'
16
- end
17
- '(' + terms.join(' AND ') + ')'
18
- else
19
- terms = []
20
- search.split(' ').each do |term|
21
- terms.push("(replace(lower(#{Arel.sql(column)}), ' ', '') ILIKE '%#{Arel.sql(term.downcase)}%')")
22
- end
23
- '(' + terms.join(' AND ') + ')'
24
- end
25
- else
26
- '1 = 1'
27
- end
28
- end
29
- end
30
- end
1
+ module RadCoreRails
2
+ module SearchTerms
3
+ extend ActiveSupport::Concern
4
+
5
+ class_methods do
6
+ def _terms(column, search = '')
7
+ if search.present?
8
+ if column.is_a?(Array)
9
+ terms = []
10
+ search.split(' ').each do |term|
11
+ columns = []
12
+ column.each do |col|
13
+ columns.push("(replace(lower(#{Arel.sql(col)}), ' ', '') ILIKE '%#{Arel.sql(term.downcase)}%')")
14
+ end
15
+ terms.push '(' + columns.join(' OR ') + ')'
16
+ end
17
+ '(' + terms.join(' AND ') + ')'
18
+ else
19
+ terms = []
20
+ search.split(' ').each do |term|
21
+ terms.push("(replace(lower(#{Arel.sql(column)}), ' ', '') ILIKE '%#{Arel.sql(term.downcase)}%')")
22
+ end
23
+ '(' + terms.join(' AND ') + ')'
24
+ end
25
+ else
26
+ '1 = 1'
27
+ end
28
+ end
29
+ end
30
+ end
31
31
  end
@@ -1,14 +1,14 @@
1
- # frozen_string_literal: true
2
- module RadCoreRails
3
- module Sortable
4
- extend ActiveSupport::Concern
5
-
6
- included do
7
- scope :sort_order, ->(column, direction) { order(self.sort_column(column, direction)) }
8
-
9
- def self.sort_column(column, direction)
10
- "#{Arel.sql(column)} #{sort_direction(direction)}"
11
- end
12
- end
13
- end
14
- end
1
+ # frozen_string_literal: true
2
+ module RadCoreRails
3
+ module Sortable
4
+ extend ActiveSupport::Concern
5
+
6
+ included do
7
+ scope :sort_order, ->(column, direction) { order(self.sort_column(column, direction)) }
8
+
9
+ def self.sort_column(column, direction)
10
+ "#{Arel.sql(column)} #{sort_direction(direction)}"
11
+ end
12
+ end
13
+ end
14
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RadCoreRails
4
- VERSION = '0.8.5'
4
+ VERSION = '0.8.6'
5
5
  end
@@ -27,18 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
28
  spec.require_paths = ["lib"]
29
29
 
30
- # spec.add_dependency "rails", '>= 4.2'
31
- spec.add_dependency "activesupport", '>= 4.2'
32
- spec.add_dependency "activemodel", '>= 4.2'
33
- spec.add_dependency "activerecord", '>= 4.2'
34
-
35
- spec.add_development_dependency "actionpack", '>= 4.2'
36
- spec.add_development_dependency "bundler", '>= 1.17.3'
37
- spec.add_development_dependency "rake"
38
- spec.add_development_dependency "rspec-rails"
39
- spec.add_development_dependency "factory_bot_rails"
40
- spec.add_development_dependency "shoulda-matchers", '>= 4.0'
41
- spec.add_development_dependency 'pg', '>= 0.19'
42
- spec.add_development_dependency 'railties', '>= 5'
43
- # spec.add_development_dependency "simplecov", '~> 0.17', '>= 0.18.5'
30
+ spec.add_dependency "activesupport"
31
+ spec.add_dependency "activemodel"
32
+ spec.add_dependency "activerecord"
44
33
  end
metadata CHANGED
@@ -1,93 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rad_core_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.5
4
+ version: 0.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleksandr Poltavets, James Marrs
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-25 00:00:00.000000000 Z
11
+ date: 2021-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '4.2'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '4.2'
27
- - !ruby/object:Gem::Dependency
28
- name: activemodel
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '4.2'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '4.2'
41
- - !ruby/object:Gem::Dependency
42
- name: activerecord
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '4.2'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '4.2'
55
- - !ruby/object:Gem::Dependency
56
- name: actionpack
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '4.2'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '4.2'
69
- - !ruby/object:Gem::Dependency
70
- name: bundler
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: 1.17.3
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: 1.17.3
83
- - !ruby/object:Gem::Dependency
84
- name: rake
85
15
  requirement: !ruby/object:Gem::Requirement
86
16
  requirements:
87
17
  - - ">="
88
18
  - !ruby/object:Gem::Version
89
19
  version: '0'
90
- type: :development
20
+ type: :runtime
91
21
  prerelease: false
92
22
  version_requirements: !ruby/object:Gem::Requirement
93
23
  requirements:
@@ -95,13 +25,13 @@ dependencies:
95
25
  - !ruby/object:Gem::Version
96
26
  version: '0'
97
27
  - !ruby/object:Gem::Dependency
98
- name: rspec-rails
28
+ name: activemodel
99
29
  requirement: !ruby/object:Gem::Requirement
100
30
  requirements:
101
31
  - - ">="
102
32
  - !ruby/object:Gem::Version
103
33
  version: '0'
104
- type: :development
34
+ type: :runtime
105
35
  prerelease: false
106
36
  version_requirements: !ruby/object:Gem::Requirement
107
37
  requirements:
@@ -109,61 +39,19 @@ dependencies:
109
39
  - !ruby/object:Gem::Version
110
40
  version: '0'
111
41
  - !ruby/object:Gem::Dependency
112
- name: factory_bot_rails
42
+ name: activerecord
113
43
  requirement: !ruby/object:Gem::Requirement
114
44
  requirements:
115
45
  - - ">="
116
46
  - !ruby/object:Gem::Version
117
47
  version: '0'
118
- type: :development
48
+ type: :runtime
119
49
  prerelease: false
120
50
  version_requirements: !ruby/object:Gem::Requirement
121
51
  requirements:
122
52
  - - ">="
123
53
  - !ruby/object:Gem::Version
124
54
  version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: shoulda-matchers
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '4.0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '4.0'
139
- - !ruby/object:Gem::Dependency
140
- name: pg
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- version: '0.19'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: '0.19'
153
- - !ruby/object:Gem::Dependency
154
- name: railties
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '5'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '5'
167
55
  description: RadCoreRails lib
168
56
  email:
169
57
  - sancho.ck@gmail.com
@@ -201,7 +89,7 @@ metadata:
201
89
  homepage_uri: https://github.com/jamesmarrs/rad-core-rails
202
90
  source_code_uri: https://rubygems.org/gems/rad_core_rails
203
91
  changelog_uri: https://rubygems.org/gems/rad_core_rails
204
- post_install_message:
92
+ post_install_message:
205
93
  rdoc_options: []
206
94
  require_paths:
207
95
  - lib
@@ -217,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
217
105
  version: '0'
218
106
  requirements: []
219
107
  rubygems_version: 3.1.2
220
- signing_key:
108
+ signing_key:
221
109
  specification_version: 4
222
110
  summary: RadCoreRails
223
111
  test_files: []