sortify 0.1.1 → 0.1.2

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: 3bb9b394d937118fbf5e0f2222d11b5bcaa3d7a8
4
- data.tar.gz: b26dde80e4cd1a48a7abcd2e72a01d3a510c08ee
3
+ metadata.gz: 60aacb876a73fc6b01d0ae3e7806a79f2408994e
4
+ data.tar.gz: 309bd3fbe11408c9944aeb9461c1f76c2db816ff
5
5
  SHA512:
6
- metadata.gz: 0634c7b7de9c65a0a806e47ca830d8d22351e6b8c571b9091637ebc92e90552039be11394df802fe7a9bca6a24bf270a239937367edf61b70d3e317a65a68497
7
- data.tar.gz: 7ddab951613d58e7c903852e230ac49b728957545dec41bd27ed8b46576ebea1fb8ab705e70e0a15411740e07265b7f3794db1c8e36c058074a7a5782644c3a6
6
+ metadata.gz: c7353b80842ba1cb33383e5e69a6034818a9a9714700e0a840d6996cee9bd84d610c39d8064456fef245680d2e86e0148fadcc9b039889bfb0e249734696560d
7
+ data.tar.gz: ca67f51574dde755b7f50f0c8b78967dc306929e5aa70657a9d19ca86cb7b1b5047c9c6867b2626ac2f4f27bf39169c5a06adcf937bb1adce1e5d4b1e8248643
data/README.md CHANGED
@@ -8,15 +8,15 @@
8
8
  Sortify helps you handle user-provided sort options in Rails apps.
9
9
 
10
10
  > #### :warning: **Warning**:
11
- > Sortify is in the very early stages of development right now, has no tests and could introduce breaking changes. Use at your own risk.
11
+ > Sortify is in the very early stages of development right now, has few tests and could introduce breaking changes. Use at your own risk.
12
12
 
13
13
  ## Getting Started
14
14
 
15
15
  To get started, add sortify to your gemfile:
16
16
 
17
- `gem 'sortify', github: 'meltheadorable/github', branch: 'develop'`
17
+ `gem 'sortify'`
18
18
 
19
- You can then run `bundle install` to fetch the current development version.
19
+ Then run `bundle install` to fetch the current version.
20
20
 
21
21
  ## Usage
22
22
 
@@ -1,3 +1,3 @@
1
1
  module Sortify
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/sortify.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Sortify
2
2
  def sort_option(name, body)
3
3
  @sort_options ||= []
4
- name = name.to_sym
4
+ name = name.to_sym
5
5
 
6
6
  begin
7
7
  scope name, body
@@ -20,8 +20,8 @@ module Sortify
20
20
  return @sort_options
21
21
  end
22
22
 
23
- def sortify(sort_option)
24
- sort_option = sort_option.to_sym
23
+ def sortify(sort_option = "")
24
+ sort_option = sort_option.to_sym unless sort_option == nil
25
25
 
26
26
  if @sort_options.include? sort_option
27
27
  self.send(sort_option)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sortify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Melody