wagons 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDE3ODViY2QwNDc1NzRlYzIyOWU1OTI1NDE5YzZlMGU0YTIxMDY4Nw==
4
+ NWQ2Nzc1MmJiZDAyMGIzODhkYjcxZjkxYzM4YzU1NTc0NGZjODVjNQ==
5
5
  data.tar.gz: !binary |-
6
- NDk2MzgzNzIxNWZkYzJmMDYyNjQ0MjBjNTQ2YjZiYTlkOWE3YzdhYw==
6
+ MzVlNmQ4MjNiYzM0YjM1ZjIzYTdjYzAzOGQ5NzFmMjFlM2QzMTY4MQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTE5OTA1OTBjMDBjMWMxMzI5OTlkNjcxZjlmYmM2ZDNjMmEzZjFiNDZhNDkz
10
- OWUyZDE3YjhjZWFiZWRjNzFkOTA4Y2VkZjU2NzY5MWY3ZTBhZWQ4MjU0OGFj
11
- ODVkZjE2YmNhOTQ5Y2NiM2JmMDg5Mzg1NmMyM2RlMjNlOGMyZDY=
9
+ ZmQxOTQyZmIwMzExYTUxMmVkMDE4ODg5ZmY4NWM3ZmNlMDU5Zjc3YTVjZmE0
10
+ YWRhMmFkNjllZWJjODUxNTU1Yzc3YTRhYWNkZTZlZTM2MGY3YTc2MTkyZDM2
11
+ NWQxNTE0Y2UxMTE5Mzk3Yjg1YjMyYmI5NDY2YzhiODcxZmZhY2Y=
12
12
  data.tar.gz: !binary |-
13
- YjBhYTFjNmQyYWFhZTQyOGEzYWU2OTJjNTYzMWEzODIwM2Q1MGI0ZWEzYzQ2
14
- MDAyZDcwYjdkZmFiNGUzMDUzOGNjYmE2ZTZhNzcxOGVlMjVkYWYwMWVhMmJl
15
- YmQyZTMzYTljYmExMzY1NDk5NjhmN2I3Y2UwNWY1NDE5NmM5NzI=
13
+ Mzg3NThjODk1YzBkOWRjOWQ5M2RlNjUzNzg0ZmJkMmY5YzM0OWRhN2NhNWQ2
14
+ MmViYTE0ZTc5YmFiMWI5MGM3NDcyZTRlMDUxMTViZWQ3MTgwN2ZlMGY0M2Vm
15
+ OTdhZjY0ZDcxZWM5YjJjYjRlYTQ4YmY3NGUwMzEzN2YwZWJlYWQ=
@@ -6,11 +6,25 @@ module Rails
6
6
  def ordered_railties_with_wagons
7
7
  @ordered_railties ||= ordered_railties_without_wagons.tap do |ordered|
8
8
  Wagons.all.each do |w|
9
- ordered.push(ordered.delete(w))
9
+ if Rails::VERSION::STRING < '4.1.6'
10
+ ordered.push(ordered.delete(w))
11
+ else
12
+ ordered.unshift(array_deep_delete(ordered, w))
13
+ end
10
14
  end
11
15
  end
12
16
  end
13
-
14
17
  alias_method_chain :ordered_railties, :wagons
18
+
19
+ private
20
+
21
+ def array_deep_delete(array, item)
22
+ array.delete(item) ||
23
+ array.select { |i| i.is_a?(Array) }.
24
+ collect { |i| array_deep_delete(i, item) }.
25
+ compact.
26
+ first
27
+ end
28
+
15
29
  end
16
30
  end
@@ -1,3 +1,3 @@
1
1
  module Wagons
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'
3
3
  end
@@ -26,14 +26,14 @@ module Wagons
26
26
 
27
27
  def find_extension_partials(key, folder = nil)
28
28
  folders = extension_folders.dup
29
- folders << folder if folder
29
+ folders << folder.to_s if folder
30
30
 
31
31
  files = find_extension_files(key, folders).sort_by { |f| File.basename(f) }
32
32
  files_to_partial_names(files)
33
33
  end
34
34
 
35
35
  def find_extension_files(key, folders)
36
- folder_pattern = glob_pattern(folders)
36
+ folder_pattern = glob_pattern(folders.uniq)
37
37
  formats = glob_pattern(lookup_context.formats)
38
38
  handlers = glob_pattern(lookup_context.handlers)
39
39
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /home/pzumkehr/src/ruby/wagons
3
3
  specs:
4
- wagons (0.3.1)
4
+ wagons (0.4.0)
5
5
  bundler (>= 1.1)
6
6
  rails (>= 3.2)
7
7
  seed-fu-ndo (>= 0.0.2)
@@ -19,27 +19,27 @@ PATH
19
19
  GEM
20
20
  remote: https://rubygems.org/
21
21
  specs:
22
- actionmailer (4.1.5)
23
- actionpack (= 4.1.5)
24
- actionview (= 4.1.5)
25
- mail (~> 2.5.4)
26
- actionpack (4.1.5)
27
- actionview (= 4.1.5)
28
- activesupport (= 4.1.5)
22
+ actionmailer (4.1.6)
23
+ actionpack (= 4.1.6)
24
+ actionview (= 4.1.6)
25
+ mail (~> 2.5, >= 2.5.4)
26
+ actionpack (4.1.6)
27
+ actionview (= 4.1.6)
28
+ activesupport (= 4.1.6)
29
29
  rack (~> 1.5.2)
30
30
  rack-test (~> 0.6.2)
31
- actionview (4.1.5)
32
- activesupport (= 4.1.5)
31
+ actionview (4.1.6)
32
+ activesupport (= 4.1.6)
33
33
  builder (~> 3.1)
34
34
  erubis (~> 2.7.0)
35
- activemodel (4.1.5)
36
- activesupport (= 4.1.5)
35
+ activemodel (4.1.6)
36
+ activesupport (= 4.1.6)
37
37
  builder (~> 3.1)
38
- activerecord (4.1.5)
39
- activemodel (= 4.1.5)
40
- activesupport (= 4.1.5)
38
+ activerecord (4.1.6)
39
+ activemodel (= 4.1.6)
40
+ activesupport (= 4.1.6)
41
41
  arel (~> 5.0.0)
42
- activesupport (4.1.5)
42
+ activesupport (4.1.6)
43
43
  i18n (~> 0.6, >= 0.6.9)
44
44
  json (~> 1.7, >= 1.7.7)
45
45
  minitest (~> 5.1)
@@ -51,32 +51,30 @@ GEM
51
51
  hike (1.2.3)
52
52
  i18n (0.6.11)
53
53
  json (1.8.1)
54
- mail (2.5.4)
55
- mime-types (~> 1.16)
56
- treetop (~> 1.4.8)
54
+ mail (2.6.1)
55
+ mime-types (>= 1.16, < 3)
57
56
  metaclass (0.0.4)
58
- mime-types (1.25.1)
59
- minitest (5.4.1)
57
+ mime-types (2.3)
58
+ minitest (5.4.2)
60
59
  mocha (1.1.0)
61
60
  metaclass (~> 0.0.1)
62
61
  multi_json (1.10.1)
63
- polyglot (0.3.5)
64
62
  rack (1.5.2)
65
63
  rack-test (0.6.2)
66
64
  rack (>= 1.0)
67
- rails (4.1.5)
68
- actionmailer (= 4.1.5)
69
- actionpack (= 4.1.5)
70
- actionview (= 4.1.5)
71
- activemodel (= 4.1.5)
72
- activerecord (= 4.1.5)
73
- activesupport (= 4.1.5)
65
+ rails (4.1.6)
66
+ actionmailer (= 4.1.6)
67
+ actionpack (= 4.1.6)
68
+ actionview (= 4.1.6)
69
+ activemodel (= 4.1.6)
70
+ activerecord (= 4.1.6)
71
+ activesupport (= 4.1.6)
74
72
  bundler (>= 1.3.0, < 2.0)
75
- railties (= 4.1.5)
73
+ railties (= 4.1.6)
76
74
  sprockets-rails (~> 2.0)
77
- railties (4.1.5)
78
- actionpack (= 4.1.5)
79
- activesupport (= 4.1.5)
75
+ railties (4.1.6)
76
+ actionpack (= 4.1.6)
77
+ activesupport (= 4.1.6)
80
78
  rake (>= 0.8.7)
81
79
  thor (>= 0.18.1, < 2.0)
82
80
  rake (10.3.2)
@@ -98,9 +96,6 @@ GEM
98
96
  thor (0.19.1)
99
97
  thread_safe (0.3.4)
100
98
  tilt (1.4.1)
101
- treetop (1.4.15)
102
- polyglot
103
- polyglot (>= 0.3.1)
104
99
  tzinfo (1.2.2)
105
100
  thread_safe (~> 0.1)
106
101
 
Binary file