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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 61bbf42c9795d7449acaf0171775752ef96de3b6
4
- data.tar.gz: 06d671b4660cb1224e1d482ffdf04f376a367662
3
+ metadata.gz: c0f5ce570430d59d80adb0c80c02144826b29c56
4
+ data.tar.gz: 01bc0db97f5936efa41a5a8fe6808867f5947ddf
5
5
  SHA512:
6
- metadata.gz: de0011a3b116563c87d3f4c5cdf6c86b698f1b56e97c54d4125fb03adc5c1a15e7c9ba885776596e7c2bf5eb3cf5cd707dd55d701d9878e02ff34dba821d137a
7
- data.tar.gz: 54c5fe9754e9adacd46c8755868bf3a3c5484b6960bf08f002eddc82f50cf3e1f5d4728f5d2dd46b11a56a1a72e3894b7cf33ea608cc6a2253115382ed858894
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| hash[key] }
21
- direction == 'DESC' ? @values.reverse! : values
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: Dummy
1
+ name: Ashe Avenue Community
2
2
  storage:
3
3
  strategy: local
4
4
  objects:
5
- bagpipe:
5
+ project:
6
6
  fields:
7
7
  name: text
8
- weight: number
8
+ github: text
9
9
  description: longtext
10
- markup: html
11
- birthday: datetime
12
- has_stuff: boolean
13
- image: image
14
- vimeo_video: vimeo
15
- youtube_video: youtube
16
- other: file
10
+ section: text
11
+ position: number
12
+ size: text
@@ -0,0 +1,7 @@
1
+ db:
2
+ host: db.labs.asheavenue.com
3
+ port: 28015
4
+ db: ashecommunity
5
+ auth:
6
+ username: ashe
7
+ password: avenue
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.6
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.example
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.example
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
@@ -1,11 +0,0 @@
1
- db:
2
- host: <DB host>
3
- port: <DB port>
4
- db: <DB database>
5
- s3:
6
- key: <S3 key>
7
- secret: <S3 secret>
8
- bucket: <S3 bucket>
9
- auth:
10
- username: <Username>
11
- password: <Password>