seek_party 0.0.3 → 0.0.4

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: bd01bd1bb2d9d6a147901d752704a95fede83e2e36594a99d6c88e1c8785661b
4
- data.tar.gz: 49598f17de968766008e4a8ecec0abf77f69221afe137c5be578c7fbdb7e3478
3
+ metadata.gz: b8565511402cda8b89f140b67567ae208e672ff6591220a9506702cd2820b6e3
4
+ data.tar.gz: 458b43c84c360bd598bbd0fce878a87a6cb3e9b917289ddbbe07ace23ba81ce8
5
5
  SHA512:
6
- metadata.gz: c5c80726313dad975cc05bf938c144df0e5ccfa10eafd3d3cbaec8f5045e4cc033ea386c7e045f0a08b6a4d4703d70b8a8383db1b0764577ba1cb6d08cf9eb8f
7
- data.tar.gz: 853228f2fffbdc90121f416ba8bdddb76157e1bab720e424947b5da28709168a10ef78331ba9820b5145dfb9fc27280223de1062a01f883613ed388d4afdbec5
6
+ metadata.gz: ba5f61e2af960ab8332301f40c1d4aac22bcee9463c863068a9ebb05eb3e4cdae925f63a3d1a07694ae8adb1f392143c3d04574c9d368a0eb5c108555f64824f
7
+ data.tar.gz: 9e04fe9a7d92f9264768db3474fa75847446c80812e59c46276b513bbb7eba656374f5e92120cf57a1fe99a082be8e522eddbebeabaff738f084dd75f3626509
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- seek_party (0.0.3)
4
+ seek_party (0.0.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # SeekParty - Searches made easy
2
2
 
3
+ [![Build Status](https://travis-ci.org/caws/seek_party.svg?branch=master)](https://travis-ci.org/caws/seek_party)
4
+ [![Maintainability](https://api.codeclimate.com/v1/badges/a05e479c6f535645d307/maintainability)](https://codeclimate.com/github/caws/seek_party/maintainability)
5
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/a05e479c6f535645d307/test_coverage)](https://codeclimate.com/github/caws/seek_party/test_coverage)
6
+
3
7
  ### What is this?
4
8
 
5
9
  Have you ever had to write a search functionality for a web application and found yourself
@@ -33,8 +37,6 @@ Below is what's currently doable:
33
37
  PS: The DEFAULT_BLACK_LIST contains the attributes :id, :created_at and :updated_at. You can pass your own
34
38
  DEFAULT_BLACK_LIST when calling the #search method from your model, but I recommend using the WHITE_LIST,
35
39
  as SeekParty will then only generate queries using the column names present there.
36
- You should also keep in mind that when building the queries, seek_party tries to pluralize your table name in order to refer to the table
37
- columns by their full name (ex: 'your_table.your_column_name').
38
40
 
39
41
  ## Getting started
40
42
 
@@ -23,7 +23,7 @@ module SeekParty
23
23
  def check_attributes(another_model)
24
24
  return nil if another_model.nil?
25
25
 
26
- sp_attribute = SPAttribute.new(table_name: pluralize_and_snake_case_class_name)
26
+ sp_attribute = SPAttribute.new(table_name: get_table_name)
27
27
 
28
28
  another_model.attributes.keys.each do |attribute|
29
29
  next unless another_model.has_attribute? attribute
@@ -45,8 +45,8 @@ module SeekParty
45
45
  @black_list.include? attribute_name
46
46
  end
47
47
 
48
- def pluralize_and_snake_case_class_name
49
- @inspected_class.name.pluralize.underscore
48
+ def get_table_name
49
+ @inspected_class.table_name.underscore
50
50
  end
51
51
  end
52
52
  end
@@ -1,3 +1,3 @@
1
1
  module SeekParty
2
- VERSION = '0.0.3'.freeze
2
+ VERSION = '0.0.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seek_party
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Washington