synvert 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +10 -7
- data/lib/synvert/cli.rb +3 -0
- data/lib/synvert/version.rb +1 -1
- data/spec/spec_helper.rb +0 -3
- data/synvert.gemspec +1 -2
- metadata +6 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68ed96f20b1b4bb68481bec90ec87620da5a2b77
|
4
|
+
data.tar.gz: 6e56c8108d5c55ea86427244a9b251713a36b696
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e312c184043311cb3424280f735e427eac2962b36d4c9583d8a2cb4ab9d713bbcd025d294f46666b918aecdd66af4f7a0ae0b1e08b5443b970d4246bcd7a5915
|
7
|
+
data.tar.gz: 57b755d0570b7ff6fb3be9666a9a91bc67acc56f456de6d62ea60440a1211077d0310b3b19eba0bab8c16050b96eb184f1c880f688aa964890bf2f411f7729e4
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -9,6 +9,12 @@ automatically.
|
|
9
9
|
|
10
10
|
Synvert is tested against MRI 1.9.3, 2.0.0 and 2.1.1.
|
11
11
|
|
12
|
+
Synvert is composed by synvert-core and synvert-snippets.
|
13
|
+
|
14
|
+
[synvert-core][1] provides a dsl to convert ruby code.
|
15
|
+
[synvert-snippets][2] lists all snippets to convert ruby code based on
|
16
|
+
synvert-core.
|
17
|
+
|
12
18
|
## Installation
|
13
19
|
|
14
20
|
Install it using rubygems
|
@@ -42,13 +48,9 @@ $ synvert --sync
|
|
42
48
|
$ synvert -r factory_girl_short_syntax,upgrade_rails_3_2_to_4_0 ~/Sites/railsbp/rails-bestpractices.com
|
43
49
|
```
|
44
50
|
|
45
|
-
## Snippets
|
46
|
-
|
47
|
-
[https://github.com/xinminlabs/synvert-snippets/][1]
|
48
|
-
|
49
51
|
## Documentation
|
50
52
|
|
51
|
-
[http://xinminlabs.github.io/synvert/][
|
53
|
+
[http://xinminlabs.github.io/synvert/][3]
|
52
54
|
|
53
55
|
## Contributing
|
54
56
|
|
@@ -58,5 +60,6 @@ $ synvert -r factory_girl_short_syntax,upgrade_rails_3_2_to_4_0 ~/Sites/railsbp/
|
|
58
60
|
4. Push to the branch (`git push origin my-new-feature`)
|
59
61
|
5. Create new Pull Request
|
60
62
|
|
61
|
-
[1]: https://github.com/xinminlabs/synvert-
|
62
|
-
[2]:
|
63
|
+
[1]: https://github.com/xinminlabs/synvert-core/
|
64
|
+
[2]: https://github.com/xinminlabs/synvert-snippets/
|
65
|
+
[3]: http://xinminlabs.github.io/synvert/
|
data/lib/synvert/cli.rb
CHANGED
@@ -36,6 +36,9 @@ module Synvert
|
|
36
36
|
@options[:snippet_names].each do |snippet_name|
|
37
37
|
puts "===== #{snippet_name} started ====="
|
38
38
|
rewriter = Core::Rewriter.call snippet_name
|
39
|
+
rewriter.warnings.each do |warning|
|
40
|
+
puts "[Warn] " + warning.message
|
41
|
+
end
|
39
42
|
puts rewriter.todo if rewriter.todo
|
40
43
|
puts "===== #{snippet_name} done ====="
|
41
44
|
end
|
data/lib/synvert/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,14 +1,11 @@
|
|
1
1
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
|
2
2
|
|
3
3
|
require 'synvert'
|
4
|
-
require 'fakefs/spec_helpers'
|
5
4
|
|
6
5
|
require 'coveralls'
|
7
6
|
Coveralls.wear!
|
8
7
|
|
9
8
|
RSpec.configure do |config|
|
10
|
-
config.include FakeFS::SpecHelpers, fakefs: true
|
11
|
-
|
12
9
|
config.treat_symbols_as_metadata_keys_with_true_values = true
|
13
10
|
config.run_all_when_everything_filtered = true
|
14
11
|
config.filter_run :focus
|
data/synvert.gemspec
CHANGED
@@ -18,10 +18,9 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_runtime_dependency "synvert-core"
|
21
|
+
spec.add_runtime_dependency "synvert-core", "~> 0.2.0"
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
24
24
|
spec.add_development_dependency "rake"
|
25
25
|
spec.add_development_dependency "rspec"
|
26
|
-
spec.add_development_dependency "fakefs"
|
27
26
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: synvert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Huang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: synvert-core
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: fakefs
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
69
|
description: synvert is used to convert ruby code to better syntax.
|
84
70
|
email:
|
85
71
|
- flyerhzm@gmail.com
|