fangorn 0.0.2 → 0.0.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
  SHA1:
3
- metadata.gz: 5eaf4b2b66a17b1e8b850091adc10d8784daedde
4
- data.tar.gz: c71d54e59e9f45eea24a99d7b0724ba1d234c434
3
+ metadata.gz: 281e786f973b30a570c6deac6755f2188a9073bb
4
+ data.tar.gz: 9582f350560cf0d5cea16784d8a63879a70c33f2
5
5
  SHA512:
6
- metadata.gz: 825ad24d8bd08ddc760114eb33c2acd20a29ee8faed3729ea2110b7496b53c014537b3489c43870978944e81b62b98fb918ca12291b6d5e4c136aee630eb2ccd
7
- data.tar.gz: 775dadd16e6c54ac4b1b5426bc879c4c17591e0eeefd3e56df6ccab2517b612f916b47c52200d28596d0eff14c8469b02abd9b20e384fd77b124918fe3d7a5a9
6
+ metadata.gz: 6c6550cc16b7cd21abb4666094c92634676e74f78c1ec7bc3d5763c206e97d14734f0daac2ac62f084fda00ca598b89655ce9ea600072f2aa4cdb7e4e8dbefc9
7
+ data.tar.gz: a4ef7dc1def96252f75fa333c1889925c3c042a3bfdd61d37323edbb7495b993bf65cecb576db0e1f43b1d163e5914102983163527389daf82718bcc31b33cd0
data/lib/fangorn/app.rb CHANGED
@@ -16,6 +16,9 @@ module Fangorn
16
16
  Haml::SCRIPT_SOURCES[m[1]] = m[2]
17
17
  end
18
18
  end
19
+ opts.on('-d', '--dist', 'Compile a distribution package') do
20
+ Output::dist!
21
+ end
19
22
  end
20
23
 
21
24
  begin
data/lib/fangorn/js.rb CHANGED
@@ -1,10 +1,9 @@
1
1
  module Fangorn
2
2
  class Js < Output
3
- APPLICATION_JS = File.join Output::dest, 'js', 'application.js'
4
3
  @@cleaned = false
5
4
 
6
5
  def initialize(input)
7
- output = Output::dist? ? APPLICATION_JS : File.join(Output::dest?, input.sub(File.join(Output::source, ''), ''))
6
+ output = Output::dist? ? application_js : File.join(Output::dest?, input.sub(File.join(Output::source, ''), ''))
8
7
  super input, output
9
8
  end
10
9
 
@@ -19,5 +18,8 @@ module Fangorn
19
18
  f.puts if Output::dist?
20
19
  end
21
20
  end
21
+ def application_js
22
+ File.join Output::dest, 'js', 'application.js'
23
+ end
22
24
  end
23
25
  end
@@ -33,7 +33,7 @@ module Fangorn
33
33
  end
34
34
 
35
35
  def self.dest
36
- @@dest
36
+ @@dest || (@@dist ? 'dist' : 'public')
37
37
  end
38
38
 
39
39
  def self.dist!
@@ -50,7 +50,7 @@ module Fangorn
50
50
 
51
51
  @@dist = false
52
52
  @@source = 'app'
53
- @@dest = 'public'
53
+ @@dest = nil
54
54
  end
55
55
  end
56
56
 
data/lib/fangorn/sass.rb CHANGED
@@ -2,11 +2,10 @@ require 'sass'
2
2
 
3
3
  module Fangorn
4
4
  class Sass < Output
5
- APPLICATION_CSS = File.join Output::dest, 'stylesheets', 'application.css'
6
5
  @@cleaned = false
7
6
 
8
7
  def initialize(input)
9
- output = Output::dist? ? APPLICATION_CSS : File.join(Output::dest, input.sub(File.join(Output::source, ''), '')).sub(/sass$/, 'css')
8
+ output = Output::dist? ? application_css : File.join(Output::dest, input.sub(File.join(Output::source, ''), '')).sub(/sass$/, 'css')
10
9
  super input, output
11
10
  end
12
11
 
@@ -21,5 +20,8 @@ module Fangorn
21
20
  f.puts
22
21
  end
23
22
  end
23
+ def application_css
24
+ File.join Output::dest, 'stylesheets', 'application.css'
25
+ end
24
26
  end
25
27
  end
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.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Calhoun
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.5.1
110
+ rubygems_version: 2.6.4
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: Haml + Sass + Javascript