kilt-cms 0.9.6 → 0.9.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kilt/object_collection.rb +17 -2
- data/test/dummy/config/kilt/config.yml +6 -10
- data/test/dummy/config/kilt/creds.yml +7 -0
- metadata +3 -3
- data/test/dummy/config/kilt/creds.yml.example +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0f5ce570430d59d80adb0c80c02144826b29c56
|
4
|
+
data.tar.gz: 01bc0db97f5936efa41a5a8fe6808867f5947ddf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0837171d4236bc04565fa5c18a4f4f124fed7b19575b1c72e772decbc429cba49b25031bb5542c01c069302be7446bf9ab700b858d5576014f8feae4aa8ab69
|
7
|
+
data.tar.gz: a0d48412893fba694a77f7dad35239a0662a562da6ddfb31ad5466b8483fa41a8490a3e35fb77e2d539f588d10aa10dccc70fd4b206e9bbb78c3adadeea171a2
|
@@ -17,8 +17,12 @@ module Kilt
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def order(key = 'name', direction = 'ASC')
|
20
|
-
@values = @values.sort_by { |hash|
|
21
|
-
|
20
|
+
@values = @values.sort_by { |hash|
|
21
|
+
is_int?(hash[key]) ? hash[key].to_i : hash[key]
|
22
|
+
}
|
23
|
+
if direction == 'DESC'
|
24
|
+
@values.reverse!
|
25
|
+
end
|
22
26
|
return self
|
23
27
|
end
|
24
28
|
|
@@ -49,5 +53,16 @@ module Kilt
|
|
49
53
|
def empty?
|
50
54
|
@values.empty?
|
51
55
|
end
|
56
|
+
|
57
|
+
private
|
58
|
+
|
59
|
+
def is_int?(str)
|
60
|
+
begin
|
61
|
+
!!Integer(str)
|
62
|
+
rescue ArgumentError, TypeError
|
63
|
+
false
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
52
67
|
end
|
53
68
|
end
|
@@ -1,16 +1,12 @@
|
|
1
|
-
name:
|
1
|
+
name: Ashe Avenue Community
|
2
2
|
storage:
|
3
3
|
strategy: local
|
4
4
|
objects:
|
5
|
-
|
5
|
+
project:
|
6
6
|
fields:
|
7
7
|
name: text
|
8
|
-
|
8
|
+
github: text
|
9
9
|
description: longtext
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
image: image
|
14
|
-
vimeo_video: vimeo
|
15
|
-
youtube_video: youtube
|
16
|
-
other: file
|
10
|
+
section: text
|
11
|
+
position: number
|
12
|
+
size: text
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kilt-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ashe Avenue
|
@@ -274,7 +274,7 @@ files:
|
|
274
274
|
- test/dummy/config/initializers/session_store.rb
|
275
275
|
- test/dummy/config/initializers/wrap_parameters.rb
|
276
276
|
- test/dummy/config/kilt/config.yml
|
277
|
-
- test/dummy/config/kilt/creds.yml
|
277
|
+
- test/dummy/config/kilt/creds.yml
|
278
278
|
- test/dummy/config/routes.rb
|
279
279
|
- test/dummy/config.ru
|
280
280
|
- test/dummy/log/development.log
|
@@ -402,7 +402,7 @@ test_files:
|
|
402
402
|
- test/dummy/config/initializers/session_store.rb
|
403
403
|
- test/dummy/config/initializers/wrap_parameters.rb
|
404
404
|
- test/dummy/config/kilt/config.yml
|
405
|
-
- test/dummy/config/kilt/creds.yml
|
405
|
+
- test/dummy/config/kilt/creds.yml
|
406
406
|
- test/dummy/config/routes.rb
|
407
407
|
- test/dummy/config.ru
|
408
408
|
- test/dummy/log/development.log
|