Skip to content

Commit 7904d5e

Browse files
committed
reorganize folders again for better pod structure
1 parent f1df66a commit 7904d5e

File tree

11 files changed

+20
-20
lines changed

11 files changed

+20
-20
lines changed

ExampleScript/generateCode.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#/bin/sh
2-
../codegen/swinject_codegen -i example.csv -o containerExtension.swift
3-
../codegen/swinject_codegen -i example.yml -o containerExtension2.swift
4-
../codegen/swinject_codegen -i example.csv -c -o example.csv.yml
5-
../codegen/swinject_codegen -i example.yml -c -o example.yml.csv
6-
../codegen/swinject_codegen -i example.csv -m
7-
../codegen/swinject_codegen -i example.yml -m
8-
../codegen/swinject_codegen -i example.csv.yml -o containerExtension3.swift
9-
../codegen/swinject_codegen -i example.yml.csv -o containerExtension4.swift
2+
../bin/swinject_codegen -i example.csv -o containerExtension.swift
3+
../bin/swinject_codegen -i example.yml -o containerExtension2.swift
4+
../bin/swinject_codegen -i example.csv -c -o example.csv.yml
5+
../bin/swinject_codegen -i example.yml -c -o example.yml.csv
6+
../bin/swinject_codegen -i example.csv -m
7+
../bin/swinject_codegen -i example.yml -m
8+
../bin/swinject_codegen -i example.csv.yml -o containerExtension3.swift
9+
../bin/swinject_codegen -i example.yml.csv -o containerExtension4.swift

Support/README.erb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Example for a .yml definition:
120120

121121
#### Output
122122
```Swift
123-
<%= %x(./../codegen/swinject_codegen -i ../Tests/Examples/ExampleA.csv).chomp %>
123+
<%= %x(./../bin/swinject_codegen -i ../Tests/Examples/ExampleA.csv).chomp %>
124124
```
125125

126126
### Example B: Different source and target
@@ -132,7 +132,7 @@ Example for a .yml definition:
132132

133133
#### Output
134134
```Swift
135-
<%= %x(./../codegen/swinject_codegen -i ../Tests/Examples/ExampleB.csv).chomp %>
135+
<%= %x(./../bin/swinject_codegen -i ../Tests/Examples/ExampleB.csv).chomp %>
136136
```
137137

138138
### Example C: Different source and target class with name
@@ -144,7 +144,7 @@ Example for a .yml definition:
144144

145145
#### Output
146146
```Swift
147-
<%= %x(./../codegen/swinject_codegen -i ../Tests/Examples/ExampleC.csv).chomp %>
147+
<%= %x(./../bin/swinject_codegen -i ../Tests/Examples/ExampleC.csv).chomp %>
148148
```
149149

150150
### Example D: Different source and target with a single, explicitly named argument
@@ -155,7 +155,7 @@ Example for a .yml definition:
155155

156156
#### Output
157157
```Swift
158-
<%= %x(./../codegen/swinject_codegen -i ../Tests/Examples/ExampleD.csv).chomp %>
158+
<%= %x(./../bin/swinject_codegen -i ../Tests/Examples/ExampleD.csv).chomp %>
159159
```
160160

161161
### Example E: Different source and target with multiple arguments, both explicitly named and not
@@ -168,7 +168,7 @@ If no explicit name is given, the lowercase type is used as argumentname.
168168

169169
#### Output
170170
```Swift
171-
<%= %x(./../codegen/swinject_codegen -i ../Tests/Examples/ExampleE.csv).chomp %>
171+
<%= %x(./../bin/swinject_codegen -i ../Tests/Examples/ExampleE.csv).chomp %>
172172
```
173173

174174
### Example F: Different source and target with name with multiple arguments, both explicitly named and not
@@ -179,7 +179,7 @@ If no explicit name is given, the lowercase type is used as argumentname.
179179

180180
#### Output
181181
```Swift
182-
<%= %x(./../codegen/swinject_codegen -i ../Tests/Examples/ExampleF.csv).chomp %>
182+
<%= %x(./../bin/swinject_codegen -i ../Tests/Examples/ExampleF.csv).chomp %>
183183
```
184184

185185
## Usage Examples

Swinject-CodeGen.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
1717

1818
s.ios.deployment_target = '8.0'
1919
s.tvos.deployment_target = '9.0'
20-
s.source_files = 'codegen/*.erb', 'codegen/*.rb', 'codegen/swinject_codegen'
20+
s.preserve_paths = ['erb', 'source', 'bin']
2121

2222
s.dependency "Swinject"
2323

Tests/test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class TestCodegeneration < MiniTest::Unit::TestCase
44
def buildCSV(fileName)
5-
%x(./../codegen/swinject_codegen -i #{fileName}).chomp
5+
%x(./../bin/swinject_codegen -i #{fileName}).chomp
66
end
77

88
def readFile(fileName)
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
require "erb"
33
require "Shellwords"
44
require "optparse"
5-
require_relative "./CSVParser"
6-
require_relative "./YMLParser"
7-
require_relative "./YMLSerializer"
5+
require_relative "../source/CSVParser"
6+
require_relative "../source/YMLParser"
7+
require_relative "../source/YMLSerializer"
88

99
@options = {
1010
:MIGRATION => false,
@@ -85,7 +85,7 @@ def parse_input_file(input_filename)
8585
end
8686

8787
def templates_folder
88-
File.expand_path(File.dirname(__FILE__))
88+
"#{File.expand_path(File.dirname(__FILE__))}/../erb"
8989
end
9090

9191
def write_container_file(input_hash, output_filename)
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)