embork 0.0.6 → 0.0.7

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: 2e35ff3431256170d9eba1a38cf6346015b10005
4
- data.tar.gz: 892646e23cec86916839b6dba597b34d4d34d5fe
3
+ metadata.gz: e44a58a0dae56d77aeaff94d30068f369d63ae08
4
+ data.tar.gz: 49c046ca98b51260bf8ff3e72569b812d1f6317e
5
5
  SHA512:
6
- metadata.gz: 85132d7b85dae89b42defa702a7c505d727ef5a49681afafcc4c5e8d61ed0614bbb0038bb9815eaf59c2d58c78d66bdcff93e3e40fbcb93fbf947c0051dcb8cb
7
- data.tar.gz: 97d2ebdd73278d45183167c8feb5f163c30246ec57c6782d202b93c75730f913ab35821a5106418bd63895341178194f428cc9d5e7510750cef4987bc3514e32
6
+ metadata.gz: ac5caa15250e134f94764117895bd9310e572c87d982695bfca27a690ee692f286c5390efbcc06db9f9906ccf4e1072e017cb7fa78d0585e51d8119d86e458ba
7
+ data.tar.gz: eedf1b170c8a9576adb6add52213e4bb3420cae001b9241ae4194a6a92d8e3be07974ec9c205a15313c59900634e847c29897f569444521d99f09aa3abc356b9
data/blueprint/Borkfile CHANGED
@@ -38,7 +38,7 @@ configure :production do
38
38
  # corresponding gem in the Gemfile.
39
39
  #
40
40
  # compress_with :closure_compiler
41
- # compress_with :uglifier
41
+ # compress_with :uglify
42
42
  end
43
43
 
44
44
  # Use :static index to fall back to sprockets-built html files OR pass in
data/blueprint/bower.json CHANGED
@@ -5,12 +5,12 @@
5
5
  "jquery": "^1.11.1",
6
6
  "qunit": "~1.12.0",
7
7
  "ember-qunit": "~0.1.5",
8
- "ember": "1.5.1",
8
+ "ember": "1.6.1",
9
9
  "ember-data": "1.0.0-beta.7",
10
10
  "ic-ajax": "~1.x",
11
11
  "loader": "stefanpenner/loader.js#1.0.0",
12
12
  "ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.1",
13
13
  "ember-load-initializers": "stefanpenner/ember-load-initializers#0.0.1",
14
- "ember-resolver": "stefanpenner/ember-jj-abrams-resolver#0.1.1"
14
+ "ember-resolver": "stefanpenner/ember-jj-abrams-resolver#0.1.6"
15
15
  }
16
16
  }
@@ -37,7 +37,7 @@ class Embork::Borkfile
37
37
  include Attributes
38
38
 
39
39
  SUPPORTED_FRAMEWORKS = %w(bootstrap compass)
40
- SUPPORTED_COMPRESSORS = %w(closure_compiler uglifier)
40
+ SUPPORTED_COMPRESSORS = %w(closure_compiler uglify)
41
41
 
42
42
  def initialize(environment, logger)
43
43
  Embork.env = @environment = environment.to_sym
@@ -123,7 +123,9 @@ class Embork::Borkfile
123
123
  end
124
124
 
125
125
  def compress_with(compressor)
126
- if SUPPORTED_COMPRESSORS.include? compressor.to_s
126
+ if compressor.class == Symbol && SUPPORTED_COMPRESSORS.include?(compressor.to_s)
127
+ @compressor = compressor
128
+ elsif compressor.class != String
127
129
  @compressor = compressor
128
130
  else
129
131
  @logger.critical 'Compressor "%s" is not currently supported by embork.' % compressor.to_s
@@ -83,6 +83,11 @@ class Embork::Builder
83
83
  FileUtils.cp src, dest
84
84
  end
85
85
 
86
+ # Write the current version
87
+ Dir.chdir build_path do
88
+ File.open('current-version', 'w') { |f| f.puts @version }
89
+ end
90
+
86
91
  # Clean up
87
92
  FileUtils.rm manifest_path
88
93
  end
data/lib/embork/cli.rb CHANGED
@@ -82,13 +82,26 @@ class Embork::CLI < Thor
82
82
  end
83
83
 
84
84
  desc "hint", %{run jshint on the app and tests}
85
- option :only_app, :type => :boolean, :default => false
86
- option :only_tests, :type => :boolean, :default => false
87
85
  def hint
88
86
  borkfile = Embork::Borkfile.new options[:borkfile]
89
87
  Dir.chdir borkfile.project_root do
90
- system('npm run hint-app') unless options[:only_tests]
91
- system('npm run hint-testss') unless options[:only_app]
88
+ system('node node_modules/jshint/bin/jshint app tests')
89
+ end
90
+ end
91
+
92
+ desc "deps", "Install bower and node dependencies"
93
+ def deps
94
+ if !system('which node 2>&1 > /dev/null')
95
+ puts "Please install node and npm before continuing."
96
+ exit 1
97
+ elsif !system('which npm 2>&1 > /dev/null')
98
+ puts "Please install npm before continuing."
99
+ exit 1
100
+ end
101
+ borkfile = Embork::Borkfile.new options[:borkfile]
102
+ Dir.chdir borkfile.project_root do
103
+ system('npm install')
104
+ system('node node_modules/bower/bin/bower install')
92
105
  end
93
106
  end
94
107
 
@@ -100,8 +100,11 @@ class Embork::Environment
100
100
  if @borkfile.compressor == :closure_compiler
101
101
  @sprockets_environment.register_bundle_processor 'application/javascript',
102
102
  Embork::Sprockets::ClosureCompiler
103
- elsif @borkfile.compressor == :uglifier
103
+ elsif @borkfile.compressor == :uglify
104
104
  @sprockets_environment.js_compressor = :uglify
105
+ elsif @borkfile.compressor
106
+ @sprockets_environment.register_bundle_processor 'application/javascript',
107
+ @borkfile.compressor
105
108
  end
106
109
  end
107
110
  end
@@ -28,6 +28,14 @@ module Embork::Sprockets::Helpers
28
28
  def stylesheet_embed_tag
29
29
  end
30
30
 
31
+ def build_version
32
+ if self.class.use_bundled_assets
33
+ self.class.bundled_version
34
+ else
35
+ nil
36
+ end
37
+ end
38
+
31
39
  def namespace
32
40
  Embork::Sprockets::ES6ModuleTranspiler.namespace
33
41
  end
@@ -1,3 +1,3 @@
1
1
  class Embork
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -18,7 +18,8 @@ describe 'Embork::Builder' do
18
18
  'deeply/nested/asset-%s.js',
19
19
  'images/image.png',
20
20
  'index-%s.html',
21
- 'index.html'
21
+ 'index.html',
22
+ 'current-version'
22
23
  ]
23
24
  end
24
25
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embork
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mina Smart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-28 00:00:00.000000000 Z
11
+ date: 2014-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sprockets