take 0.0.5 → 0.0.6

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: a417cb47dbe78a63ef7ab734a3b74d5ed4500050
4
- data.tar.gz: 98cb256c95a3e601d4ac638a97efb0ad5a11fc35
3
+ metadata.gz: 876e2557abd3d9bd46630eef0fd1c670bb34b6d6
4
+ data.tar.gz: 0f5260a27735c76d369630d15b44cd884e2ec06c
5
5
  SHA512:
6
- metadata.gz: a956d30c033b76687fe2155b58eb931c87014c637e938ef8bd781896cc4dd09af4b9e90638fc32c05928049e0c74a6cc212980be3d5f314500d05c61c61fde8e
7
- data.tar.gz: b8b9d7e6ec61121633ed6485327d582ec205add53f9220e7c604be9695464ef53970d40f63890340aca858dd2c968df309a6f088df661596a317c60305845534
6
+ metadata.gz: bd8974bf0b645758983abdedf9fdcfdd9483a3e3de176db9a36fcd08df39289af6d15d86f6a35bcf69ba4d256ee1b63a392ca5bb599f2b6afd435d82ca2fcd62
7
+ data.tar.gz: e2c51fc55daaa4a2f3f70424dc9d26d7974f1e2c80135d14823a1af2546193ba2bd4fb630f923b588acc4fe277536be7b90d5ba366104a0201d82212ff8414f1
@@ -17,7 +17,7 @@ module Take
17
17
  end
18
18
 
19
19
  def write_file
20
- File.open("#{@parent.name}.c", "w") do |f|
20
+ File.open("#{@options[:directory]}#{@parent.name}.c", "w") do |f|
21
21
  f.write generate
22
22
  end
23
23
  end
data/lib/take/unit.rb CHANGED
@@ -13,7 +13,9 @@ module Take
13
13
  file = File.open(file, "r")
14
14
  scanner = Scanner.new(file.read)
15
15
  compiler = Compiler.new(file.path, scanner.scan)
16
- generator = Generator.new(compiler.compile, {}).generate
16
+ generator = Generator.new(compiler.compile,
17
+ directory: File.dirname(file.path)).tap(&:generate)
18
+ generator.write_file
17
19
  end
18
20
 
19
21
  end
data/lib/take/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Take
2
- VERSION = "0.0.5".freeze
2
+ VERSION = "0.0.6".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: take
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Rodi