locomotivecms_mounter 1.3.3 → 1.4.0

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: fba92b79f7c5634dad8a25b2cd626b4d60959377
4
- data.tar.gz: 1e457ff3c0e2cc9d4cc3f73914cdcaa8114f0fe4
3
+ metadata.gz: caab5268ac3524697a7395ec50817b57f51f4e27
4
+ data.tar.gz: 776d65a016e1d1d0af94f88ad0b92e7e369d2b9a
5
5
  SHA512:
6
- metadata.gz: e6bb42cf4a43baabeb045abc64b96c1ba96322ce40f3e09a851db10d866579a7db0ce3e1de9947089222d39dc351c981fd7e01d98f3d40ecbad1741bb94eee73
7
- data.tar.gz: 928e94d41b783b8880214d363fb4a4d327f3d7fde06767c8d94a92c2cb6f7e899b6478e6a3174648a9c370221ff1380f9abcd73795f116b1c9c5716ea0d13311
6
+ metadata.gz: 1c0aaead15e32986a289265c2d60c2aee834548fe4ff013701f5355e3b17431d3f934750086fc1a7bdcd66aff34cc44f6ed1d8eba30891587197c1e54e48fb70
7
+ data.tar.gz: d4d3d644ae2d4f79d98177fda38998e5c7c24df5845f143756e143abbfe095c535704397e5274acfee485cbe581104b46ee0aadddc634591fe5742e761459155
@@ -91,7 +91,7 @@ module Locomotive
91
91
  # @return [ String ] The slug
92
92
  #
93
93
  def filepath_to_slug(filepath)
94
- File.basename(filepath).split('.').first.permalink(true)
94
+ File.basename(filepath).split('.').first.permalink
95
95
  end
96
96
 
97
97
  # From a filepath, parse the template inside.
@@ -5,8 +5,14 @@
5
5
  class String #:nodoc
6
6
 
7
7
  def permalink(underscore = false)
8
- permalink = self.to_ascii.parameterize
9
- underscore ? permalink.underscore : permalink
8
+ # if the slug includes one "_" at least, we consider that the "_" is used instead of "-".
9
+ _permalink = if !self.index('_').nil?
10
+ self.to_url(replace_whitespace_with: '_')
11
+ else
12
+ self.to_url
13
+ end
14
+
15
+ underscore ? _permalink.underscore : _permalink
10
16
  end
11
17
 
12
18
  def permalink!(underscore = false)
@@ -15,4 +21,20 @@ class String #:nodoc
15
21
 
16
22
  alias :parameterize! :permalink!
17
23
 
18
- end
24
+ end
25
+
26
+
27
+ # class String #:nodoc
28
+
29
+ # def permalink(underscore = false)
30
+ # permalink = self.to_ascii.parameterize
31
+ # underscore ? permalink.underscore : permalink
32
+ # end
33
+
34
+ # def permalink!(underscore = false)
35
+ # replace(self.permalink(underscore))
36
+ # end
37
+
38
+ # alias :parameterize! :permalink!
39
+
40
+ # end
@@ -2,7 +2,7 @@
2
2
  module Locomotive
3
3
  module Mounter #:nodoc
4
4
 
5
- VERSION = '1.3.3'
5
+ VERSION = '1.4.0'
6
6
 
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locomotivecms_mounter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Didier Lafforgue
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-25 00:00:00.000000000 Z
11
+ date: 2013-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tilt
@@ -72,28 +72,28 @@ dependencies:
72
72
  requirements:
73
73
  - - ~>
74
74
  - !ruby/object:Gem::Version
75
- version: 3.2.1
75
+ version: 3.2.12
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ~>
81
81
  - !ruby/object:Gem::Version
82
- version: 3.2.1
82
+ version: 3.2.12
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: compass
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ~>
88
88
  - !ruby/object:Gem::Version
89
- version: 0.12.1
89
+ version: 0.12.2
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ~>
95
95
  - !ruby/object:Gem::Version
96
- version: 0.12.1
96
+ version: 0.12.2
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: coffee-script
99
99
  requirement: !ruby/object:Gem::Requirement