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 +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +14 -1
- data/lib/cybertron/version.rb +1 -1
- data/lib/templates/transform_spec.tt +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d20e0742165304f6c966bf10b2eb587207af8b68efeee796db7ec5126887210
|
4
|
+
data.tar.gz: ca763e88673bd9a77169199a8c9b198312befb7b49c7303cd758c7ad6a6103cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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
|
-
|
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.
|
data/lib/cybertron/version.rb
CHANGED
@@ -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 =
|
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.
|
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-
|
11
|
+
date: 2019-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|