lasha 0.2.6 → 0.2.7

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lasha/version.rb +1 -1
  3. data/lib/lasha.rb +4 -6
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad04444d034b66f3cec747f25ded2198df2b3a4975daff4cb00b430b79a2f4b4
4
- data.tar.gz: ba6b70fc5ed4dd13e1cd99737f058b7e48ef8ba7a6db2abe24697359993ff7ca
3
+ metadata.gz: e129bf80b045a8204652ab9563b6b5013d79085076e1aa7b2d136c0fd195f348
4
+ data.tar.gz: 5ebe50a6e11ceedda1f557f2cc628c3e341c0ebafe167fdbe89792be0367a4a3
5
5
  SHA512:
6
- metadata.gz: e3515341339965949b13462ef8e4c452f57c567f06b07f3dc7baa6330450910ea320d5923773b273851b434b65b6cc282970057ac4c2810db2e38c1fa039bb87
7
- data.tar.gz: 0c80a65bfa2ea480d4c0b94dc4dec22f4b96efdb630d520382b79b6727a6153694e7c6f19d09ca54db7f78494176b58dc8a1341a2d7efede0f6bd2293edf4138
6
+ metadata.gz: d05c0043757063688ef52ad80b4afdd50cbec8de3738e3cd1841d1edfba2555a6dbb8dde67378f0074a81562bcc67afb3c6fc189e5aff859bc7b472eb6e4bae1
7
+ data.tar.gz: e3be2b56c4c34639c061f1dca1dcca0ce0e8ad953938ab56efedef2a5f3c9d0f22f3230404293168e6b0b353dc1fb5693501dd2191445085083332a552e951fd
data/lib/lasha/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lasha
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
data/lib/lasha.rb CHANGED
@@ -18,7 +18,7 @@ module Lasha
18
18
  attributes: attributes,
19
19
  actions: set_or_guess_actions(actions, controller)
20
20
  }
21
- raise ArgumentError if index_data_invalid?(**index_data_hash)
21
+ raise ArgumentError unless index_data_valid?(**index_data_hash)
22
22
 
23
23
  index_data_hash
24
24
  rescue ArgumentError => e
@@ -49,14 +49,13 @@ module Lasha
49
49
  end
50
50
  end
51
51
 
52
- def self.index_data_invalid?(**index_data_hash)
53
- truthy_array = []
52
+ def self.index_data_valid?(**index_data_hash)
54
53
  index_data_hash.each do |key, value|
55
54
  case key
56
55
  when :model
57
- truthy_array << (value.blank? || index_data_hash[:collection].blank?)
56
+ (value.present? || index_data_hash[:collection].present?)
58
57
  when :actions
59
- truthy_array << (value - @index_actions).any?
58
+ (value - @index_actions).blank?
60
59
  # when :namespace
61
60
  # truthy_array << false
62
61
  # when :collection
@@ -65,6 +64,5 @@ module Lasha
65
64
  # truthy_array << false
66
65
  end
67
66
  end
68
- truthy_array.include?(true)
69
67
  end
70
68
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lasha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lasha Abulashvili