fangorn 0.0.14 → 0.0.15

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: 784a3a269ab82cdbf8fddde248c5adcaceed51cf
4
- data.tar.gz: 6ba05c01fce9d99389823e2a8e7b8bddfdec3b63
3
+ metadata.gz: 49833a5c28bee85bfa2525a7619f2d68a9fa7193
4
+ data.tar.gz: 480bd535207c132d9a47935fbd8511d86159d9c1
5
5
  SHA512:
6
- metadata.gz: 8a9e94d16e82d208a7dc0e03d5f80253e1f57db75fa994cc439dce5b1026f7afbc536d299c2b14fff789b0074fbc1a66c3b04165838a342161fffd003df4d2e2
7
- data.tar.gz: 998d07a47f5c80fbead3bb809d02235cd1a588f88cf70af070f19bb9652b2cb7eb13b2d53a2aa1525cef5af2c89962c4e1063b94ed36011d7caab57aa8252255
6
+ metadata.gz: 62d58cffcdc4a8b270c93cf8c5b5b750b6bed7139e4867c920c1fd28ff86fc0b1342d11d46ee6b0707a68663267d91676080ee15590652db10b165f217fd2722
7
+ data.tar.gz: 2a4065bce24a2dcc4da698896981a5c9972517fea188beb145d24dee11effae4b793b8913fdc50e9270f5678dc50a5c2971397a2cab87e31ecc91af7713063d8
data/lib/fangorn/haml.rb CHANGED
@@ -16,7 +16,7 @@ module Fangorn
16
16
  protected
17
17
  def create_command
18
18
  File.open(@output, 'w') do |f|
19
- f.write ::Haml::Engine.new(File.read(@input)).render self
19
+ f.write ::Haml::Engine.new(File.read(@input)).render self, get_config
20
20
  end
21
21
  end
22
22
 
data/lib/fangorn/js.rb CHANGED
@@ -9,8 +9,6 @@ module Fangorn
9
9
  def initialize(input)
10
10
  output = Output::dist? ? application_js : File.join(Output::dest, input.sub(File.join(Output::source, ''), ''))
11
11
  super input, output
12
-
13
- @config = YAML.load_file 'fangorn.yml'
14
12
  end
15
13
 
16
14
  protected
@@ -45,11 +43,5 @@ module Fangorn
45
43
  def application_js
46
44
  File.join Output::dest, 'js', 'application.js'
47
45
  end
48
-
49
- def get_config
50
- if @config
51
- @config[Output::env]
52
- end
53
- end
54
46
  end
55
47
  end
@@ -4,6 +4,7 @@ module Fangorn
4
4
  class Output
5
5
  def initialize(input, output)
6
6
  @input, @output = input, output
7
+ @config = YAML.load_file 'fangorn.yml'
7
8
  end
8
9
  def create!
9
10
  FileUtils.mkdir_p File.dirname(@output)
@@ -15,6 +16,11 @@ module Fangorn
15
16
  def to_s
16
17
  @output
17
18
  end
19
+ def get_config
20
+ if @config
21
+ @config[Output::env]
22
+ end
23
+ end
18
24
  def self.make(input)
19
25
  type = File.extname(input)[1..-1]
20
26
  begin
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fangorn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Calhoun