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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 92bc41dccca7c5572fe88ca338237ac640f86108
4
- data.tar.gz: f6c94d7d7235018d7b7ea7b18bcb67288b0393ee
3
+ metadata.gz: 68ed96f20b1b4bb68481bec90ec87620da5a2b77
4
+ data.tar.gz: 6e56c8108d5c55ea86427244a9b251713a36b696
5
5
  SHA512:
6
- metadata.gz: 95f6a621e7ac4104a9b43c11fba4e215826ba91b7879515c4a8c4aa669348e21b87487019e9ab178a23246ecb753110fe71e8f56f37fc903afc578c4f043da02
7
- data.tar.gz: 09785e142127f477854396a24192309fc7d593e88f8bbbd6702739d4b2be5255b5c1f8aa0c7f52a79afbc75ea1d361c50838d1c26b1d9a5b6ff1a02ec286b3c2
6
+ metadata.gz: e312c184043311cb3424280f735e427eac2962b36d4c9583d8a2cb4ab9d713bbcd025d294f46666b918aecdd66af4f7a0ae0b1e08b5443b970d4246bcd7a5915
7
+ data.tar.gz: 57b755d0570b7ff6fb3be9666a9a91bc67acc56f456de6d62ea60440a1211077d0310b3b19eba0bab8c16050b96eb184f1c880f688aa964890bf2f411f7729e4
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.2.0
4
+
5
+ * Output rewriter warnings
6
+
3
7
  ## 0.1.1
4
8
 
5
9
  * Ask to run `synvert --sync` if no snippet available
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/][2]
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-snippets/
62
- [2]: http://xinminlabs.github.io/synvert/
63
+ [1]: https://github.com/xinminlabs/synvert-core/
64
+ [2]: https://github.com/xinminlabs/synvert-snippets/
65
+ [3]: http://xinminlabs.github.io/synvert/
@@ -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
@@ -1,5 +1,5 @@
1
1
  # coding: utf-8
2
2
 
3
3
  module Synvert
4
- VERSION = "0.1.1"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -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
@@ -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.1.1
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-04 00:00:00.000000000 Z
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: '0'
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: '0'
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