plain_query 0.0.1 → 0.1.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
  SHA256:
3
- metadata.gz: 61ae47934ae841a4229172526bf21e44e8f038a297596624102035277b7daf0a
4
- data.tar.gz: 0f70b4d457dddb4a01f971afa7e229589178c9200ed785bf97258bbbf8f179d4
3
+ metadata.gz: bd8f5297c612866609495705363e33a5b04d43acfc4169b6db99ac7fd831a58c
4
+ data.tar.gz: 7a8adf2c33adbd013d68e1989970385834861e6c3d474d88785f94bb473501c9
5
5
  SHA512:
6
- metadata.gz: c1c425097bdd73f3d10fe3c29ae62cbb6410073fb3263ed9be355fa16459f916ec0b41c50a3bd9e8dbedf9da23c19d85ebd056795e141268b2925d40ab6a5fad
7
- data.tar.gz: df14cce0826761f2c136ace6409ade132925b04a641d890359534d7eb89585188e25dd9f3eb97110e496755ee79baf6d7f39ed77bcc4f8012217e8e8da63b11d
6
+ metadata.gz: 95163e316ad68b4c3dd0141030ccc5e58c6de3514aca0658bcb556d4494d42cdd6260a62f4e8e58206e3a804ed3f7ac26eb976c3272c8b5ad700cecf7ea16399
7
+ data.tar.gz: 31f79976ab181c103bd62823c0be4e4978da81925beb9a885515970cd0301a5a1f86dd280b079d7660af771c0d4c33032d8924edf1ec68b987b91787ed444c78
data/README.md CHANGED
@@ -22,6 +22,14 @@ Or install it yourself as:
22
22
 
23
23
  $ gem install plain_query
24
24
 
25
+ ## Why it may be usefull to you
26
+ 1. Creates standard for database query logic
27
+ 2. Keeps query logic in one place
28
+ 3. Removes query logic from models
29
+ 4. Makes complicated queries easy to build, read and change
30
+ 5. Queries are really flexible and modular
31
+ 6. Queries are compatible with standard Rails model scopes
32
+
25
33
  ## Usage
26
34
  ### Setting up a query object
27
35
  For setting up a query object you need to inherit your query class from PlainQuery.
@@ -127,20 +135,16 @@ class User < ActiveRecord::Base
127
135
  end
128
136
  ```
129
137
 
130
- ## Development
131
-
132
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
133
-
134
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
135
-
136
138
  ## Contributing
137
139
 
138
140
  Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/plain_query. 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.
139
141
 
142
+ 1. Fork it
143
+ 2. Create your feature branch (git checkout -b my-new-feature)
144
+ 3. Commit your changes (git commit -am 'Add some feature')
145
+ 4. Push to the branch (git push origin my-new-feature)
146
+ 5. Create new Pull Request
147
+
140
148
  ## License
141
149
 
142
150
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
143
-
144
- ## Code of Conduct
145
-
146
- Everyone interacting in the PlainQuery project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/plain_query/blob/master/CODE_OF_CONDUCT.md).
@@ -1,3 +1,3 @@
1
1
  class PlainQuery
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
data/plain_query.gemspec CHANGED
@@ -13,9 +13,8 @@ Gem::Specification.new do |spec|
13
13
  spec.description = %q{PlainQuery is a simple gem that helps you write clear and flexible query objects}
14
14
  spec.homepage = "https://github.com/gl-pv/plain_query"
15
15
  spec.license = "MIT"
16
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.4.0')
16
17
 
17
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
- # to allow pushing to a single host or delete this section to allow pushing to any host.
19
18
  if spec.respond_to?(:metadata)
20
19
  spec.metadata["homepage_uri"] = spec.homepage
21
20
  spec.metadata["source_code_uri"] = "https://github.com/gl-pv/plain_query"
@@ -33,7 +32,11 @@ Gem::Specification.new do |spec|
33
32
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
34
33
  spec.require_paths = ["lib"]
35
34
 
35
+ spec.add_dependency 'activerecord', '>= 4.2'
36
+
36
37
  spec.add_development_dependency "bundler", "~> 1.17"
37
38
  spec.add_development_dependency "rake", "~> 10.0"
38
39
  spec.add_development_dependency "rspec", "~> 3.0"
40
+ spec.add_development_dependency 'database_cleaner-active_record', '~> 1.8.0'
41
+ spec.add_development_dependency 'sqlite3', '~> 1.4.2'
39
42
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plain_query
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - gl-pv
@@ -10,6 +10,20 @@ bindir: exe
10
10
  cert_chain: []
11
11
  date: 2022-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activerecord
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'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +66,34 @@ dependencies:
52
66
  - - "~>"
53
67
  - !ruby/object:Gem::Version
54
68
  version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: database_cleaner-active_record
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 1.8.0
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 1.8.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: sqlite3
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 1.4.2
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 1.4.2
55
97
  description: PlainQuery is a simple gem that helps you write clear and flexible query
56
98
  objects
57
99
  email:
@@ -88,7 +130,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
88
130
  requirements:
89
131
  - - ">="
90
132
  - !ruby/object:Gem::Version
91
- version: '0'
133
+ version: 2.4.0
92
134
  required_rubygems_version: !ruby/object:Gem::Requirement
93
135
  requirements:
94
136
  - - ">="