cyborg 0.0.8 → 0.0.9

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: abc605cb6e19c51aea7d3e178642922bc86f1e33
4
- data.tar.gz: cca559ee3a6a8543680b42405e7b89cb53a6aa60
3
+ metadata.gz: 302f49cf71fff393e1136f674d695ea619973c22
4
+ data.tar.gz: 2c17bc91cc6437c4aab49c5b9c1899d157dd9427
5
5
  SHA512:
6
- metadata.gz: 9f501299e3f681bbb1e0c919e5255faaf46906cefaee7f5469bf84ae867c756d0247cacd2812dde5e3f9b00f7bcd3cabc853e44fa6724f6e77e43dd85475210b
7
- data.tar.gz: 03e1229e046af7a466d066236a6ead0a8efa264b39248c750133f01b6337fedfffa7d0a7e64f181fe2b8e1ca9dc10174c58454fef5db72a2e9463968652edf4e
6
+ metadata.gz: f32042ee1e43a00c116a1e8a7448c8004cf075b775f02ad11bd34fa872ae0e2ed33122cbcfabeb9d5fd870b0a9f60c31c6255930925c5cfb5205006fcb7f0316
7
+ data.tar.gz: f6b32fcc8a5840a700f012757d6a86e5437d173d01da295bf9b939ac5b263769ca366b572f4121f49b74cbf57d966e90c8e1af2c1578a6ee6cca3d6736e57a52
@@ -10,6 +10,7 @@ module Cyborg
10
10
  autoprefixer: ^5.2.0
11
11
  babelify: ^6.4.0
12
12
  browserify: ^11.2.0
13
+ browserify-incremental: ^3.0.1
13
14
  minifyify: ^7.3.2
14
15
  postcss-cli: ^1.5.0
15
16
  svgo: ^0.5.6
@@ -10,7 +10,7 @@ module Cyborg
10
10
  @module_name = name.split('_').collect(&:capitalize).join
11
11
 
12
12
  puts "Creating new plugin #{name}".bold
13
- engine_site_scaffod
13
+ engine_site_scaffold
14
14
 
15
15
  @gemspec_path = create_gem
16
16
  @path = File.expand_path(File.dirname(@gemspec_path))
@@ -149,7 +149,7 @@ _svg.js
149
149
  action_log "update", "#{name}/.gitignore"
150
150
  end
151
151
 
152
- def engine_site_scaffod
152
+ def engine_site_scaffold
153
153
  FileUtils.mkdir_p(".#{name}-tmp")
154
154
  Dir.chdir ".#{name}-tmp" do
155
155
  response = Open3.capture3("rails plugin new #{name} --mountable --dummy-path=site --skip-test-unit")
@@ -207,11 +207,15 @@ require "rails"
207
207
  # Pick the frameworks you want:
208
208
  require "action_controller/railtie"
209
209
  require "action_view/railtie"
210
+ require 'bundler'
210
211
 
211
212
  # Require the gems listed in Gemfile, including any gems
212
213
  # you've limited to :test, :development, or :production.
213
214
  Bundler.require(*Rails.groups)
214
215
 
216
+ require '#{name}'
217
+ require 'sprockets/railtie'
218
+
215
219
  module Site
216
220
  class Application < Cyborg::Application
217
221
  end
@@ -48,6 +48,7 @@ module Cyborg
48
48
  # Returns path to binary if installed
49
49
  def find_node_module(cmd)
50
50
 
51
+ system "$(npm bin)/#{cmd}"
51
52
  response = Open3.capture3("npm ls #{cmd}")
52
53
 
53
54
  # Look in local `./node_modules` path.
@@ -10,14 +10,14 @@ module Cyborg
10
10
  end
11
11
 
12
12
  def build
13
- if find_node_module "browserify"
13
+ if Open3.capture3("npm ls browserify-incremental")[1].empty?
14
14
  find_files.each do |file|
15
15
  dest = destination(file).sub(/\.js$/,'')
16
- npm_command "browserify #{file} -t babelify --standalone #{plugin.module_name} -o #{dest}.js -d -p [ minifyify --map #{url(file)}.map.json --output #{dest}.map.json ]"
16
+ system "browserifyinc --cachefile #{Cyborg.rails_path("tmp/cache/assets/.browserify-cache.json")} #{file} -t babelify --standalone #{plugin.module_name} -o #{dest}.js -d -p [ minifyify --map #{url(file).sub(/\.js$/,'')}.map.json --output #{dest}.map.json ]"
17
17
  puts build_msg(file)
18
18
  end
19
19
  else
20
- abort "JS BUILD FAILED: browserify NPM module not found.\n" << "Please add browserify to your package.json and run `npm install`"
20
+ abort "JS BUILD FAILED: browserifyinc NPM module not found.\n" << "Please add browserifyinc to your package.json and run `npm install`"
21
21
  end
22
22
  end
23
23
  end
@@ -1,3 +1,3 @@
1
1
  module Cyborg
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cyborg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis