cybertron 0.1.2 → 0.1.3

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: 6d20e0742165304f6c966bf10b2eb587207af8b68efeee796db7ec5126887210
4
- data.tar.gz: ca763e88673bd9a77169199a8c9b198312befb7b49c7303cd758c7ad6a6103cf
3
+ metadata.gz: 69b0cc1752860c6239eb7f3d3ee9b5c8b141e776c8ec03b60eb9d022d599e025
4
+ data.tar.gz: a97241c7c0f359c18a472605945703290fe8aaa841ddd94575804793a3bbc8c1
5
5
  SHA512:
6
- metadata.gz: 596dc51e88ab330b08b652acb3dacf4e1e7014de2f000293933f57d15946c22a7f559277de9794da2937d06406c3fee9bb095d8e7bd0a2c3a2b0421651bf76eb
7
- data.tar.gz: 4b893d5b0d47f21ec6b4b1776ddd8a5d1231b8b07e20e4819dfab79ea5fe734d05b0eebc657fb7b72b285d51aadc220183f10367106d896ae84b0c4b9744ecd6
6
+ metadata.gz: '014840c237be7d76e4ec85c82227368e7d6b41bb7cf81996f1ba0c6d68b765fc1dad18f21609af22994452a22ada9d3320e602229a103d51f8c4978f21a0a472'
7
+ data.tar.gz: 24121b76720762bc508647cc56158d93b00c112001316de0bfbc2224cb6f494fc4e64fd72ae71132656a6d769ea54052db66ecd63cd14fc49ce38b52f6d42d02
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+ Gemfile.lock
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cybertron (0.1.2)
4
+ cybertron (0.1.3)
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.1)
14
+ parser (2.6.4.0)
15
15
  ast (~> 2.4.0)
16
16
  rake (10.5.0)
17
17
  rspec (3.8.0)
data/README.md CHANGED
@@ -37,6 +37,15 @@ Example:
37
37
  ```
38
38
  $ cybertron new my_ruby_codemod
39
39
  ```
40
+ This will create a project structure like this:
41
+ ```
42
+ my_ruby_codemod
43
+ | transforms
44
+ | spec
45
+ | | spec_helper.rb
46
+ .rspec
47
+ Rakefile
48
+ ```
40
49
 
41
50
  ### Generate a new transform
42
51
  ```
@@ -50,6 +59,21 @@ $ cd my_ruby_codemod
50
59
  $ cybertron generate my_transform
51
60
  ```
52
61
 
62
+ Now the project structure will be like this:
63
+ ```
64
+ my_ruby_codemod
65
+ | transforms
66
+ | | my_transform
67
+ | | | fixtures
68
+ | | | | basic_input.rb
69
+ | | | | basic_output.rb
70
+ | | | transform.rb
71
+ | spec
72
+ | | my_transform_spec.rb
73
+ | | spec_helper.rb
74
+ .rspec
75
+ Rakefile
76
+ ```
53
77
  ### Generate a new fixture for transform
54
78
  ```
55
79
  $ cybertron generate <transform-name> <fixture-name>
@@ -60,6 +84,23 @@ Example:
60
84
  $ cybertron generate my_transform advanced_usage
61
85
  ```
62
86
 
87
+ Now the project structure will be like this:
88
+ ```
89
+ my_ruby_codemod
90
+ | transforms
91
+ | | my_transform
92
+ | | | fixtures
93
+ | | | | basic_input.rb
94
+ | | | | basic_output.rb
95
+ | | | | advanced_usage_input.rb
96
+ | | | | advanced_usage_output.rb
97
+ | | | transform.rb
98
+ | spec
99
+ | | my_transform_spec.rb
100
+ | | spec_helper.rb
101
+ .rspec
102
+ Rakefile
103
+ ```
63
104
  ### Run tests for your codemod transforms
64
105
  ```
65
106
  $ bundle exec rake
data/lib/cybertron/cli.rb CHANGED
@@ -24,7 +24,7 @@ module Cybertron
24
24
  template 'rspec.tt', "#{name}/.rspec"
25
25
  template 'spec_helper.tt', "#{name}/spec/spec_helper.rb"
26
26
  template 'Rakefile.tt', "#{name}/Rakefile"
27
- template 'readme.tt', "#{name}/README.md"
27
+ template 'README.tt', "#{name}/README.md"
28
28
  end
29
29
 
30
30
  desc 'generate', 'Generate fixtures and transforms'
@@ -26,11 +26,11 @@ module Cybertron
26
26
  puts "Creating new transform: #{name}"
27
27
  FileUtils.mkdir_p "transforms/#{name}"
28
28
  FileUtils.mkdir_p "transforms/#{name}/fixtures"
29
- template 'transform.tt', "transforms/#{name}/transform.rb"
30
- template 'transform_spec.tt', "spec/#{name}_spec.rb"
31
- template 'fixture_input.tt', "transforms/#{name}/fixtures/basic_input.rb"
32
- template 'fixture_output.tt', "transforms/#{name}/fixtures/basic_output.rb"
33
- template 'readme_transform.tt', "transforms/#{name}/README.md"
29
+ template 'transforms/transform.tt', "transforms/#{name}/transform.rb"
30
+ template 'transforms/spec.tt', "spec/#{name}_spec.rb"
31
+ template 'transforms/fixture_input.tt', "transforms/#{name}/fixtures/basic_input.rb"
32
+ template 'transforms/fixture_output.tt', "transforms/#{name}/fixtures/basic_output.rb"
33
+ template 'transforms/README.tt', "transforms/#{name}/README.md"
34
34
  end
35
35
 
36
36
  desc 'fixture <transform-name> <fixture-name>', 'Generate a new fixture for a transform'
@@ -38,8 +38,8 @@ module Cybertron
38
38
  @codemod = codemod
39
39
  @name = name
40
40
  puts "Creating new fixture: #{name} for #{codemod}"
41
- template 'fixture_input.tt', "transforms/#{codemod}/fixtures/#{name}_input.rb"
42
- template 'fixture_output.tt', "transforms/#{codemod}/fixtures/#{name}_output.rb"
41
+ template 'transforms/fixture_input.tt', "transforms/#{codemod}/fixtures/#{name}_input.rb"
42
+ template 'transforms/fixture_output.tt', "transforms/#{codemod}/fixtures/#{name}_output.rb"
43
43
  end
44
44
 
45
45
 
@@ -1,3 +1,3 @@
1
1
  module Cybertron
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cybertron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajasegar
@@ -107,14 +107,14 @@ files:
107
107
  - lib/cybertron/options.rb
108
108
  - lib/cybertron/version.rb
109
109
  - lib/templates/Rakefile.tt
110
- - lib/templates/fixture_input.tt
111
- - lib/templates/fixture_output.tt
112
110
  - lib/templates/readme.tt
113
- - lib/templates/readme_transform.tt
114
111
  - lib/templates/rspec.tt
115
112
  - lib/templates/spec_helper.tt
116
- - lib/templates/transform.tt
117
- - lib/templates/transform_spec.tt
113
+ - lib/templates/transforms/README.tt
114
+ - lib/templates/transforms/fixture_input.tt
115
+ - lib/templates/transforms/fixture_output.tt
116
+ - lib/templates/transforms/spec.tt
117
+ - lib/templates/transforms/transform.tt
118
118
  homepage: https://github.com/rajasegar/cybertron
119
119
  licenses:
120
120
  - MIT