guard-sprockets 0.5.0 → 1.0.0

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: 4e895f229d870ee389fbe71295c0af73d352e2dc
4
- data.tar.gz: 2342a8b0a3c58fa343aec83a8e6026ad112d7807
3
+ metadata.gz: 29e994249a106a797aa8d40fbfff3c1cf4288c23
4
+ data.tar.gz: b328c9901b2ac758aef46c226f3a5314ffe9ba8c
5
5
  SHA512:
6
- metadata.gz: 6cdd3b32a121eb97822e9379907dacf8c9d7a13c06d052c3a0242935758046725a87c59662babc705f1925808f80853a26e7d20ef8cad4d7f12a37aef94ddd0a
7
- data.tar.gz: cc03116aab742fe15e4ac8305e3f28fb4b906e4f72b330d144ebea49d793d5d43969a5cc0ec10d0e25bb07ae6aa1545754b3949e574b830f942990c9beef90bc
6
+ metadata.gz: 7569a35af03ff5c73e3299a33ce9a73be7a19275f762d3a6bc0555b3d22fe503bbfd632fb9ed79b3551f10ee1d8a2959dd89b3c38006226d921e131496976daf
7
+ data.tar.gz: dafc1cb3b4ccbbfb1ac5d84d8fc3629078c9499318f7a3c94f64f2d1f5c0030bd8ba36b766d53f824958eb915eb5d574d1eccdd4f0841b467c77e415fe85918d
data/CHANGELOG.md ADDED
@@ -0,0 +1 @@
1
+ # Moved to [GitHub releases](https://github.com/guard/guard-sprockets/releases) page.
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010-2013 Aaron Cruz
1
+ Copyright (c) 2013 Aaron Cruz, Rémy Coutable
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  Sprockets guard automatically packages your JavaScript files together when your source files are saved.
6
6
 
7
7
  * Compatible with Sprockets 2.x (for Sprockets 1.x compatibility, please use Guard::Sprockets 0.1.4 or the `sprockets_1` branch).
8
- * Tested against Ruby 1.8.7, 1.9.2, 1.9.3, REE and the latest versions of JRuby & Rubinius.
8
+ * Tested against Ruby 1.9.3, 2.0.0, Rubinius & JRuby (1.9 mode only).
9
9
 
10
10
  ## Install
11
11
 
@@ -42,7 +42,7 @@ Guard::Sprockets can be adapted to all kind of projects.
42
42
  ### Typical Rails 3 app (default generated Guardfile)
43
43
 
44
44
  ```ruby
45
- guard 'sprockets', :destination => 'public/javascripts', :asset_paths => ['/app/assets/javascripts'] do
45
+ guard :sprockets, destination: 'public/javascripts', asset_paths: ['/app/assets/javascripts'] do
46
46
  watch 'app/assets/javascripts/application.js'
47
47
  end
48
48
  ```
@@ -52,17 +52,17 @@ Please read [Guard doc](https://github.com/guard/guard#readme) for more informat
52
52
  ## Options
53
53
 
54
54
  ```ruby
55
- :destination => 'public/js' # change the destination folder in which the compiled assets are saved, default: 'public/javascripts'
56
- :asset_paths => 'app/js' # add a directory (or on array of directories) to Sprockets' environment's load path, default: ['app/assets/javascripts']
57
- :asset_paths => ['app/js', 'lib/js'] # asset_paths can be a String or an Array
58
- :minify => true # minify the JavaScript files content using Uglifier, default: false
55
+ destination: 'public/js' # change the destination folder in which the compiled assets are saved, default: 'public/javascripts'
56
+ asset_paths: 'app/js' # add a directory (or on array of directories) to Sprockets' environment's load path, default: ['app/assets/javascripts']
57
+ asset_paths: ['app/js', 'lib/js'] # asset_paths can be a String or an Array
58
+ minify: true # minify the JavaScript files content using Uglifier, default: false
59
59
  # be sure to add: "gem 'uglifier'" in your Gemfile
60
- :keep_paths => true # retain the directory structure of an asset's path relative to the asset_path, default: false
60
+ keep_paths: true # retain the directory structure of an asset's path relative to the asset_path, default: false
61
61
  # this prevents assets with the same basename, but placed different folders, from overwriting each other in the destination folder
62
62
  # e.x. with this option set to true: app/js/vendor/rails/turbolinks.js.coffee -> public/js/vendor/rails/turbolinks.js
63
63
  # and with this option set to false: app/js/vendor/rails/turbolinks.js.coffee -> public/js/turbolinks.js
64
- :root_file => 'app/js/app.js' # if set, only this file will be compiled, default: nil
65
- :root_file => ['one.js', 'two.js'] # root_file can be a String or an Array
64
+ root_file: 'app/js/app.js' # if set, only this file will be compiled, default: nil
65
+ root_file: ['one.js', 'two.js'] # root_file can be a String or an Array
66
66
  ```
67
67
 
68
68
  ## Development
@@ -91,4 +91,4 @@ For questions please join us in our [Google group](http://groups.google.com/grou
91
91
 
92
92
  ## Contributors
93
93
 
94
- https://github.com/guard/guard-sprockets/contributors
94
+ [https://github.com/guard/guard-sprockets/graphs/contributors](https://github.com/guard/guard-sprockets/graphs/contributors)
@@ -1,22 +1,22 @@
1
1
  require 'guard'
2
- require 'guard/guard'
2
+ require 'guard/plugin'
3
3
 
4
4
  require 'sprockets'
5
5
  require 'execjs'
6
6
 
7
7
  module Guard
8
- class Sprockets < Guard
8
+ class Sprockets < Plugin
9
9
 
10
10
  attr_reader :asset_paths, :destination, :root_file, :sprockets
11
11
 
12
- def initialize(watchers = [], options = {})
13
- super(watchers, options)
12
+ def initialize(options = {})
13
+ super
14
14
 
15
15
  @options = options
16
16
  @asset_paths = Array(@options[:asset_paths] || 'app/assets/javascripts')
17
17
  @destination = @options[:destination] || 'public/javascripts'
18
18
  @root_file = Array(@options[:root_file])
19
- @keep_paths = @options[:keep_paths] || false
19
+ @keep_paths = @options[:keep_paths] || false
20
20
 
21
21
  @sprockets = ::Sprockets::Environment.new
22
22
  @asset_paths.each { |p| @sprockets.append_path(p) }
@@ -43,7 +43,7 @@ module Guard
43
43
  end
44
44
 
45
45
  def run_all
46
- run_on_changes []
46
+ run_on_changes([])
47
47
  end
48
48
 
49
49
  def run_on_changes(paths)
@@ -86,7 +86,7 @@ module Guard
86
86
  rescue ExecJS::ProgramError => ex
87
87
  UI.error "Sprockets failed compiling #{output_filename}"
88
88
  UI.error ex.message
89
- Notifier.notify "Sprockets failed compiling #{output_filename}!", :priority => 2, :image => :failed
89
+ Notifier.notify "Sprockets failed compiling #{output_filename}!", priority: 2, image: :failed
90
90
 
91
91
  false
92
92
  end
@@ -1,3 +1,3 @@
1
- guard 'sprockets', :destination => 'public/javascripts', :asset_paths => ['app/assets/javascripts'] do
1
+ guard :sprockets, destination: 'public/javascripts', asset_paths: ['app/assets/javascripts'] do
2
2
  watch 'app/assets/javascripts/application.js'
3
3
  end
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module SprocketsVersion
3
- VERSION = '0.5.0'
3
+ VERSION = '1.0.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-sprockets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Cruz
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-25 00:00:00.000000000 Z
12
+ date: 2013-10-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: guard
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ~>
19
19
  - !ruby/object:Gem::Version
20
- version: '1.8'
20
+ version: '2.0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ~>
26
26
  - !ruby/object:Gem::Version
27
- version: '1.8'
27
+ version: '2.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: execjs
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -83,8 +83,7 @@ dependencies:
83
83
  version: '0'
84
84
  description: Guard::Sprockets automatically packages your JavaScript files together.
85
85
  email:
86
- - aaron@aaroncruz.com
87
- - kematzy at gmail
86
+ - remy@rymai.me
88
87
  executables: []
89
88
  extensions: []
90
89
  extra_rdoc_files: []
@@ -92,10 +91,12 @@ files:
92
91
  - lib/guard/sprockets/templates/Guardfile
93
92
  - lib/guard/sprockets/version.rb
94
93
  - lib/guard/sprockets.rb
94
+ - CHANGELOG.md
95
95
  - LICENSE
96
96
  - README.md
97
97
  homepage: https://rubygems.org/gems/guard-sprockets
98
- licenses: []
98
+ licenses:
99
+ - MIT
99
100
  metadata: {}
100
101
  post_install_message:
101
102
  rdoc_options: []
@@ -105,7 +106,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
105
106
  requirements:
106
107
  - - '>='
107
108
  - !ruby/object:Gem::Version
108
- version: 1.8.7
109
+ version: 1.9.2
109
110
  required_rubygems_version: !ruby/object:Gem::Requirement
110
111
  requirements:
111
112
  - - '>='