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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +22 -0
  3. data/README.md +49 -28
  4. data/lib/erb_to_slim/version.rb +11 -4
  5. metadata +10 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b5558c095d05d53e92b24fdae5ba091761dcd8b
4
- data.tar.gz: 264e7eb5b224a527f257d81bc8ca5af0154630b0
3
+ metadata.gz: 50034702114fb1e16f423ff36806dabab2390660
4
+ data.tar.gz: c703e97295d1915bb8e46c4b14c3c1e9c28b70c8
5
5
  SHA512:
6
- metadata.gz: f56b8f2affaa8ec4a543c82dc8d70be947c02d5ec9f6a070480e7e4a16ac9e84bfeaf0d50051f23dcc6ce21388321aa2082358c223f572638639043dd261b59d
7
- data.tar.gz: dc07f86977520019b15290d8089f5ffcfdf1d4676f7c95ecdc9f3fd2cedc1214943e2da794f3f9b9c4ae74452e6ba26b474804709e86315bd7d80127096fdea0
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 ERB template directory:
26
+ Goto your's project views directory.
11
27
 
12
- ```sh
13
- $ erb_to_slim
14
- ```
28
+ $ erb_to_slim
15
29
 
16
- It will convert all `*.html.erb` files in current directory and subdirectory to `*.html.slim`,
17
- and rename original file to `*.html.erb.bak`.
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
- ## How it works
33
+ ## Support
20
34
 
21
- [ERbToSlim](https://github.com/zw963/erb_to_slim) convert ERB to Slim directly with REGEXP.
22
- You need Ruby 1.9+ to support the newest regular expression syntax.
35
+ * MRI 1.9+
36
+ * Rubinius 2.2+
23
37
 
24
- ## Feature
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
- indent detection, so, before process, please format ERB file with your's favorate editor.
32
- * This gem is not test fully, consider all cases is not possible.
33
- So, before you try, ensure about you well understood Slim,
34
- and can fix any unexpected error manually.
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
- ## Author
50
+ See [CHANGELOG](https://github.com/zw963/erb_to_slim/blob/master/CHANGELOG) for details.
37
51
 
38
- Billy.zheng (zw963)
52
+ ## Contributing
39
53
 
40
- ## OFFICIAL REPO
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
- ## Contact
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.
@@ -1,5 +1,12 @@
1
- # -*- coding: utf-8 -*-
1
+ #!/usr/bin/env ruby
2
+ # -*- coding: utf-8 -*-
2
3
 
3
- module ErbToSlim
4
- VERSION = '0.0.7'
5
- end
4
+ module ErbToSlim
5
+ VERSION = [0, 0, 8]
6
+
7
+ class << VERSION
8
+ def to_s
9
+ join(?.)
10
+ end
11
+ end
12
+ end
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.7
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-09-01 00:00:00.000000000 Z
11
+ date: 2014-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: minitest
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 converter
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: []