erb_to_slim 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +22 -0
- data/README.md +49 -28
- data/lib/erb_to_slim/version.rb +11 -4
- metadata +10 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50034702114fb1e16f423ff36806dabab2390660
|
4
|
+
data.tar.gz: c703e97295d1915bb8e46c4b14c3c1e9c28b70c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b576e8eeb7ae1b044f22e03a6caaef5224e2248be4a84dd020665e03af59b745e01e75681c2defa3222713cef1298cee9cc567a9d6530785f1da170045962f03
|
7
|
+
data.tar.gz: c4eb934a33793c37e9224f74368a2f69bb85c2a82357d6997402635069503da3b42fc0c5d096fcac7339a7a2455bff5c7054675b3bc82b91c4262080944c5643
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Billy.Zheng
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,45 +1,66 @@
|
|
1
|
-
# ErbToSlim
|
1
|
+
# ErbToSlim [![Build Status](https://travis-ci.org/zw963/erb_to_slim.svg?branch=master)](https://travis-ci.org/zw963/erb_to_slim) [![Gem Version](https://badge.fury.io/rb/erb_to_slim.svg)](http://badge.fury.io/rb/erb_to_slim)
|
2
2
|
|
3
3
|
The most stupid ERB to Slim Converter.
|
4
4
|
|
5
|
+
## Philosophy
|
6
|
+
|
7
|
+
Convert `html.erb` to `html.slim` directly with REGEXP.
|
8
|
+
|
9
|
+
* Minimum modified, no indentation or outline changed.
|
10
|
+
* No any gem dependency, YEAH!
|
11
|
+
|
12
|
+
## Getting Started
|
13
|
+
|
14
|
+
Install via Rubygems
|
15
|
+
|
16
|
+
$ gem install erb_to_slim
|
17
|
+
|
18
|
+
OR ...
|
19
|
+
|
20
|
+
Add to your Gemfile
|
21
|
+
|
22
|
+
gem 'erb_to_slim'
|
23
|
+
|
5
24
|
## Usage
|
6
|
-
```sh
|
7
|
-
$ gem install erb_to_slim
|
8
|
-
```
|
9
25
|
|
10
|
-
Goto
|
26
|
+
Goto your's project views directory.
|
11
27
|
|
12
|
-
|
13
|
-
$ erb_to_slim
|
14
|
-
```
|
28
|
+
$ erb_to_slim
|
15
29
|
|
16
|
-
|
17
|
-
|
30
|
+
This will convert all `*.html.erb` to `*.html.slim` under current directory recursively.
|
31
|
+
old file will backup as `*.html.erb.bak`.
|
18
32
|
|
19
|
-
##
|
33
|
+
## Support
|
20
34
|
|
21
|
-
|
22
|
-
|
35
|
+
* MRI 1.9+
|
36
|
+
* Rubinius 2.2+
|
23
37
|
|
24
|
-
|
25
|
-
* Minimum modified, not change indentation/outline.
|
26
|
-
* No any gem dependency, YEAH!
|
38
|
+
You need Ruby 1.9+ to support the newest regular expression syntax.
|
27
39
|
|
28
40
|
## Limitations
|
29
|
-
* Only support html.erb format.
|
30
|
-
* This gem just do match and replace with REGEXP, not do any syntactic analysis or
|
31
|
-
|
32
|
-
* This gem is not test fully, consider all cases is not possible.
|
33
|
-
|
34
|
-
|
41
|
+
* Only support html.erb format.
|
42
|
+
* This gem just do match and replace with REGEXP, not do any syntactic analysis or
|
43
|
+
indent detection, so, before process, please format ERB file with your's favorate editor.
|
44
|
+
* This gem is not test fully, consider all cases is not possible.
|
45
|
+
So, before you try, ensure about you well understood Slim,
|
46
|
+
and can fix any unexpected error manually.
|
47
|
+
|
48
|
+
## History
|
35
49
|
|
36
|
-
|
50
|
+
See [CHANGELOG](https://github.com/zw963/erb_to_slim/blob/master/CHANGELOG) for details.
|
37
51
|
|
38
|
-
|
52
|
+
## Contributing
|
39
53
|
|
40
|
-
|
41
|
-
https://github.com/zw963/erb_to_slim
|
54
|
+
* [Bug reports](https://github.com/zw963/erb_to_slim/issues)
|
55
|
+
* [Source](https://github.com/zw963/erb_to_slim)
|
56
|
+
* Patches:
|
57
|
+
* Fork on Github.
|
58
|
+
* Run `gem install --dev erb_to_slim` or `bundle`.
|
59
|
+
* Create your feature branch: `git checkout -b my-new-feature`.
|
60
|
+
* Commit your changes: `git commit -am 'Add some feature'`.
|
61
|
+
* Push to the branch: `git push origin my-new-feature`.
|
62
|
+
* Send a pull request :D.
|
42
63
|
|
43
|
-
##
|
44
|
-
If you found any bug, please file an issue at [github](https://github.com/zw963/erb_to_slim/issues).
|
64
|
+
## license
|
45
65
|
|
66
|
+
Released under the MIT license, See [LICENSE](https://github.com/zw963/erb_to_slim/blob/master/LICENSE) for details.
|
data/lib/erb_to_slim/version.rb
CHANGED
metadata
CHANGED
@@ -1,30 +1,30 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: erb_to_slim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Billy(zw963)
|
7
|
+
- Billy.Zheng(zw963)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: ritual
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
description: Erb to Slim
|
27
|
+
description: Convert Erb to Slim directly with REGEXP.
|
28
28
|
email:
|
29
29
|
- zw963@163.com
|
30
30
|
executables:
|
@@ -32,6 +32,7 @@ executables:
|
|
32
32
|
extensions: []
|
33
33
|
extra_rdoc_files: []
|
34
34
|
files:
|
35
|
+
- LICENSE
|
35
36
|
- README.md
|
36
37
|
- bin/erb_to_slim
|
37
38
|
- lib/erb_to_slim.rb
|
@@ -40,7 +41,8 @@ files:
|
|
40
41
|
- lib/erb_to_slim/pattern.rb
|
41
42
|
- lib/erb_to_slim/version.rb
|
42
43
|
homepage: http://github.com/zw963/erb_to_slim
|
43
|
-
licenses:
|
44
|
+
licenses:
|
45
|
+
- MIT
|
44
46
|
metadata: {}
|
45
47
|
post_install_message:
|
46
48
|
rdoc_options: []
|