apicasso 0.3.0 → 0.3.1

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: 3c6d432afe67cca704d339c891ac884b6e92281d
4
- data.tar.gz: 5f43122803cb5023721c481f61dca62f0da374c3
3
+ metadata.gz: 020372bc5a9da131f6341df4e4e09079e8681299
4
+ data.tar.gz: b4c25ade40c56715879a9e03581374137b3a8ea7
5
5
  SHA512:
6
- metadata.gz: 719bdb51c25ed44d9fdd023ed219f7e41ec344d04b4362e9909080f80a9cc881e95eddefa9fc20d81ab6f73f4fc2d8f19527733feac5a1264eddd46b8faee9f0
7
- data.tar.gz: bd1b8533d846a8dd174737a5ded6dfeadfea1092f0dbea442a706b239ba9b7c0199f3145157fe39cdad0d79daaab60f61982bd59fdff424f14346a64208b00c6
6
+ metadata.gz: 1b0e28ec733dd871b34d31c7b7e0cdacb28cd239ee0805b51fd69ead0a4912ea48f0566bc698c1653a1b86b36683b0bf3418959dae18e55e6516090e01431a2d
7
+ data.tar.gz: 2363d2d74553dfde4b707e9eb4bc8d8ef75fb7cdb5937530288e2b0010407681311ecab7db122dfc71c7d8ebde3d62319c723ae097eeb8fb56689b391c45baeb
@@ -30,16 +30,16 @@ module Orderable
30
30
  # Parsing of attributes to avoid empty starts in case browser passes "+" as " "
31
31
  def parse_attr(attr)
32
32
  return attr.gsub(/^\ (.*)/, '\1') if attr.starts_with?(' ')
33
- return attr[1..-1] if attr.starts_with?('+') || attr.starts_with?('-')
33
+ return attr[1..-1] if attr.match?(/\A[+-]/)
34
34
  attr
35
35
  end
36
36
 
37
37
  # Ordering sign parse, which separates
38
38
  def parse_sign(attr)
39
- attr =~ /\A[+-]/ ? attr.slice!(0) : '+'
39
+ attr.match?(/\A[+-]/) ? attr.slice!(0) : '+'
40
40
  end
41
41
 
42
42
  def model
43
- (params[:resource] || params[:nested] || controller_name).classify.constantize
43
+ (params[:nested] || params[:resource] || controller_name).classify.constantize
44
44
  end
45
45
  end
@@ -1,3 +1,3 @@
1
1
  module Apicasso
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apicasso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Bellincanta