guard-jammit 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in guard-jammit.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,28 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ guard-jammit (0.2.0)
5
+ guard
6
+ jammit
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ POpen4 (0.1.4)
12
+ Platform (>= 0.4.0)
13
+ open4
14
+ Platform (0.4.0)
15
+ guard (0.6.2)
16
+ thor (~> 0.14.6)
17
+ jammit (0.6.3)
18
+ yui-compressor (>= 0.9.3)
19
+ open4 (1.1.0)
20
+ thor (0.14.6)
21
+ yui-compressor (0.9.6)
22
+ POpen4 (>= 0.1.4)
23
+
24
+ PLATFORMS
25
+ ruby
26
+
27
+ DEPENDENCIES
28
+ guard-jammit!
data/Rakefile CHANGED
@@ -1,32 +1 @@
1
- require 'rubygems'
2
- require 'rake'
3
-
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "guard-jammit"
8
- gem.summary = %Q{Guard plugin for running jammit}
9
- gem.description = %Q{This is a guard plugin to watch javascript and stylesheets to afterwards run jammit.}
10
- gem.email = "pelleb@gmail.com"
11
- gem.homepage = "http://github.com/pelle/guard-jammit"
12
- gem.authors = ["Pelle Braendgaard"]
13
- gem.add_dependency "guard"
14
- gem.add_dependency "jammit"
15
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
16
- end
17
- Jeweler::GemcutterTasks.new
18
- rescue LoadError
19
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
20
- end
21
-
22
- task :default => :jeweler
23
-
24
- require 'rake/rdoctask'
25
- Rake::RDocTask.new do |rdoc|
26
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
27
-
28
- rdoc.rdoc_dir = 'rdoc'
29
- rdoc.title = "guard-jammit #{version}"
30
- rdoc.rdoc_files.include('README*')
31
- rdoc.rdoc_files.include('lib/**/*.rb')
32
- end
1
+ require 'bundler/gem_tasks'
data/guard-jammit.gemspec CHANGED
@@ -1,37 +1,22 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
1
  # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "guard/jammit/version"
5
4
 
6
5
  Gem::Specification.new do |s|
7
- s.name = %q{guard-jammit}
8
- s.version = "0.1.0"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Pelle Braendgaard"]
12
- s.date = %q{2010-11-08}
6
+ s.name = "guard-jammit"
7
+ s.version = Guard::Jammit::VERSION
8
+ s.authors = ["Pelle Braendgaard"]
9
+ s.email = ["pelle@stakeventures.com"]
10
+ s.homepage = %q{http://github.com/guard/guard-jammit}
11
+ s.summary = %q{Guard plugin for Jammit}
13
12
  s.description = %q{This is a guard plugin to watch javascript and stylesheets to afterwards run jammit.}
14
- s.email = %q{pelleb@gmail.com}
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.textile"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".gitignore",
22
- "LICENSE",
23
- "README.textile",
24
- "Rakefile",
25
- "VERSION",
26
- "guard-jammit.gemspec",
27
- "lib/guard/jammit.rb",
28
- "lib/guard/jammit/templates/Guardfile"
29
- ]
30
- s.homepage = %q{http://github.com/pelle/guard-jammit}
31
- s.rdoc_options = ["--charset=UTF-8"]
13
+
14
+ s.rubyforge_project = "guard-jammit"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
32
19
  s.require_paths = ["lib"]
33
- s.rubygems_version = %q{1.3.7}
34
- s.summary = %q{Guard plugin for running jammit}
35
20
 
36
21
  if s.respond_to? :specification_version then
37
22
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
@@ -48,5 +33,5 @@ Gem::Specification.new do |s|
48
33
  s.add_dependency(%q<guard>, [">= 0"])
49
34
  s.add_dependency(%q<jammit>, [">= 0"])
50
35
  end
51
- end
52
36
 
37
+ end
data/lib/guard/jammit.rb CHANGED
@@ -6,8 +6,7 @@ module Guard
6
6
 
7
7
  def initialize(watchers = [], options = {})
8
8
  super
9
-
10
- # init stuff here, thx!
9
+ @options.merge(options)
11
10
  end
12
11
 
13
12
  # ================
@@ -44,13 +43,20 @@ module Guard
44
43
  def run_on_change(paths)
45
44
  jammit
46
45
  end
47
-
46
+
48
47
  def jammit
49
- ::Jammit.load_configuration ::Jammit::DEFAULT_CONFIG_PATH
50
- puts "Jamming"
51
- ::Jammit.packager.force = true
52
- ::Jammit.packager.precache_all
53
- true
48
+ begin
49
+ ::Jammit.load_configuration @options[:config] || ::Jammit::DEFAULT_CONFIG_PATH
50
+ ::Guard::UI.info("Jamming #{@options[:config]}")
51
+ ::Guard::Notifier.notify("Jamming #{@options[:config]}", :title => 'Jammit')
52
+ ::Jammit.packager.force = false
53
+ ::Jammit.packager.precache_all
54
+ true
55
+ rescue Exception => e
56
+ ::Guard::UI.error("Jammit failed (#{e})")
57
+ ::Guard::Notifier.notify('Jammit failed', :title => 'Jammit', :image => :failed)
58
+ false
59
+ end
54
60
  end
55
61
 
56
62
  end
@@ -1,4 +1,4 @@
1
1
  guard 'jammit' do
2
- watch('^public/javascripts/(.*)\.js')
3
- watch('^public/stylesheets/(.*)\.css')
4
- end
2
+ watch(/^public\/javascripts\/(.*)\.js/)
3
+ watch(/^public\/stylesheets\/(.*)\.css/)
4
+ end
@@ -0,0 +1,5 @@
1
+ module Guard
2
+ module Jammit
3
+ VERSION = "0.2.0"
4
+ end
5
+ end
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-jammit
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 1
9
- - 0
10
- version: 0.1.0
4
+ prerelease:
5
+ version: 0.2.0
11
6
  platform: ruby
12
7
  authors:
13
8
  - Pelle Braendgaard
@@ -15,8 +10,7 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2010-11-08 00:00:00 -05:00
19
- default_executable:
13
+ date: 2011-08-24 00:00:00 Z
20
14
  dependencies:
21
15
  - !ruby/object:Gem::Dependency
22
16
  name: guard
@@ -26,9 +20,6 @@ dependencies:
26
20
  requirements:
27
21
  - - ">="
28
22
  - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
23
  version: "0"
33
24
  type: :runtime
34
25
  version_requirements: *id001
@@ -40,38 +31,36 @@ dependencies:
40
31
  requirements:
41
32
  - - ">="
42
33
  - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
34
  version: "0"
47
35
  type: :runtime
48
36
  version_requirements: *id002
49
37
  description: This is a guard plugin to watch javascript and stylesheets to afterwards run jammit.
50
- email: pelleb@gmail.com
38
+ email:
39
+ - pelle@stakeventures.com
51
40
  executables: []
52
41
 
53
42
  extensions: []
54
43
 
55
- extra_rdoc_files:
56
- - LICENSE
57
- - README.textile
44
+ extra_rdoc_files: []
45
+
58
46
  files:
59
47
  - .document
60
48
  - .gitignore
49
+ - Gemfile
50
+ - Gemfile.lock
61
51
  - LICENSE
62
52
  - README.textile
63
53
  - Rakefile
64
- - VERSION
65
54
  - guard-jammit.gemspec
66
55
  - lib/guard/jammit.rb
67
56
  - lib/guard/jammit/templates/Guardfile
68
- has_rdoc: true
69
- homepage: http://github.com/pelle/guard-jammit
57
+ - lib/guard/jammit/version.rb
58
+ homepage: http://github.com/guard/guard-jammit
70
59
  licenses: []
71
60
 
72
61
  post_install_message:
73
- rdoc_options:
74
- - --charset=UTF-8
62
+ rdoc_options: []
63
+
75
64
  require_paths:
76
65
  - lib
77
66
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -79,25 +68,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
79
68
  requirements:
80
69
  - - ">="
81
70
  - !ruby/object:Gem::Version
82
- hash: 3
83
- segments:
84
- - 0
85
71
  version: "0"
86
72
  required_rubygems_version: !ruby/object:Gem::Requirement
87
73
  none: false
88
74
  requirements:
89
75
  - - ">="
90
76
  - !ruby/object:Gem::Version
91
- hash: 3
92
- segments:
93
- - 0
94
77
  version: "0"
95
78
  requirements: []
96
79
 
97
- rubyforge_project:
98
- rubygems_version: 1.3.7
80
+ rubyforge_project: guard-jammit
81
+ rubygems_version: 1.8.5
99
82
  signing_key:
100
83
  specification_version: 3
101
- summary: Guard plugin for running jammit
84
+ summary: Guard plugin for Jammit
102
85
  test_files: []
103
86
 
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.1.0