cybertron 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: 93377457317174c2befff55d0644ae666071d737f64aa4871dd4ae48154f26f1
4
- data.tar.gz: 746579bfd1f69bc0cbec4e4a71607e397de8d4af383f41f04ad62cbdf23c3217
3
+ metadata.gz: 6d20e0742165304f6c966bf10b2eb587207af8b68efeee796db7ec5126887210
4
+ data.tar.gz: ca763e88673bd9a77169199a8c9b198312befb7b49c7303cd758c7ad6a6103cf
5
5
  SHA512:
6
- metadata.gz: 1ca602d7b69aad6ce12802fd2f130a3e41efd60af0d8cd802a446dc7f8904125d220fce5bc468fb5f856310e5e8ad6d92ae4228421b76ed6fc4529c9e7afd164
7
- data.tar.gz: b17f9d7a0078b7f1121e468fc85d28327ddc09536c97a0844275e738b684df594e570ef4730496e0dec0a9028472972eec866756750fe4e6c290588946ed93a7
6
+ metadata.gz: 596dc51e88ab330b08b652acb3dacf4e1e7014de2f000293933f57d15946c22a7f559277de9794da2937d06406c3fee9bb095d8e7bd0a2c3a2b0421651bf76eb
7
+ data.tar.gz: 4b893d5b0d47f21ec6b4b1776ddd8a5d1231b8b07e20e4819dfab79ea5fe734d05b0eebc657fb7b72b285d51aadc220183f10367106d896ae84b0c4b9744ecd6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cybertron (0.1.1)
4
+ cybertron (0.1.2)
5
5
  parser (~> 2.6)
6
6
  rspec (~> 3.0)
7
7
  thor
@@ -11,7 +11,7 @@ GEM
11
11
  specs:
12
12
  ast (2.4.0)
13
13
  diff-lcs (1.3)
14
- parser (2.6.4.0)
14
+ parser (2.6.4.1)
15
15
  ast (~> 2.4.0)
16
16
  rake (10.5.0)
17
17
  rspec (3.8.0)
data/README.md CHANGED
@@ -1,6 +1,14 @@
1
1
  # cybertron
2
2
 
3
- cybertron is a command line tool for generating, testing and publishing converters aka Codemods for Ruby.
3
+ [![Gem Version](https://badge.fury.io/rb/cybertron.svg)](https://badge.fury.io/rb/cybertron)
4
+
5
+ cybertron is a command line tool for generating, testing and publishing
6
+ [converters](https://github.com/rajasegar/awesome-ruby-ast#converters) aka
7
+ [Codemods](https://github.com/facebook/codemod) for Ruby.
8
+
9
+ **INFO**:
10
+ You can use a tool like [codeshift](https://github.com/rajasegar/codeshift) to run your codemods/transforms against your Ruby codebase.
11
+ For writing transforms you can also make use of the [Ruby AST Explorer](https://ruby-ast-explorer.herokuapp.com/)
4
12
 
5
13
  ## Installation
6
14
 
@@ -52,6 +60,11 @@ Example:
52
60
  $ cybertron generate my_transform advanced_usage
53
61
  ```
54
62
 
63
+ ### Run tests for your codemod transforms
64
+ ```
65
+ $ bundle exec rake
66
+ ```
67
+
55
68
  ## Development
56
69
 
57
70
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -1,3 +1,3 @@
1
1
  module Cybertron
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -9,7 +9,7 @@ RSpec.describe <%= @name.capitalize %>Transform do
9
9
  source = File.read(input)
10
10
 
11
11
  temp = Parser::CurrentRuby.parse(source)
12
- rewriter = ConditionsTransform.new
12
+ rewriter = <%= @name.capitalize %>Transform.new
13
13
 
14
14
  buffer = Parser::Source::Buffer.new('(example)')
15
15
  buffer.source = source
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cybertron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajasegar
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-19 00:00:00.000000000 Z
11
+ date: 2019-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor