paratrooper-asset_precompile 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OTA4NjBiYThiMzM5NjQ5N2ZjYmI0ZTBjNWJiZGY2ZWNkNzlkYmE2MQ==
5
+ data.tar.gz: !binary |-
6
+ YjA5ODJlMzM3YjZmMzg3MDQ5YjJlMGExZWMxM2Y4MjE4NjYwYjVjMg==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ YTNkNmNjODQ4NjRkM2Q3OTYwNDg1ZmEwMTM3Mzg1NDNjMzZlMjIxZTExYTdk
10
+ ZWVkNWE5YjljZDRjZDc3NzE3NmIzNTMzNzMzMDRhOGVkYmYxNTlmZmVhNzI0
11
+ NDg0MGI3YTkwODZjOTFkYWVjM2YwY2RmOGY1YmQ0MGQxYzQyNWM=
12
+ data.tar.gz: !binary |-
13
+ NWZlNGQ0NjJmODYwZjYxZGNiYzRkYzFiYjZhMjZhNGI2N2MxNjU4N2VjMGZm
14
+ MDk5YTU5MDAyNGI2ZWEyZDNjNjc3MzRjMjgzMDY2MTYxMDk0NWQ5M2YxNGUw
15
+ NmYzOGExMzJlOGM1ZThjZDEwMjg0ZWJhMDQ4YjJiNmM3MmVlMjQ=
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in paratrooper-airbrake.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Matt Polito
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,49 @@
1
+ # Paratrooper - Asset Precompile
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/paratrooper-asset_precompile.png)](http://badge.fury.io/rb/paratrooper-asset_precompile)
4
+ [![Code Climate](https://codeclimate.com/github/mattpolito/paratrooper-asset_precompile.png)](https://codeclimate.com/github/mattpolito/paratrooper-asset_precompile)
5
+
6
+ Sometimes you need to run Asset Precompilation manually. This will add the process into the mix when using [Paratrooper][].
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ gem 'paratrooper-asset_precompile'
13
+
14
+ And then execute:
15
+
16
+ $ bundle
17
+
18
+ Or install it yourself as:
19
+
20
+ $ gem install paratrooper-asset_precompile
21
+
22
+ ## Usage
23
+
24
+ When initializing `Paratrooper::Deploy` a `notifiers` option can be passed
25
+
26
+ ```ruby
27
+ Paratrooper::Deploy.new('app_name',
28
+ notifiers: [
29
+ Paratrooper::AssetPrecompile::Notifier.new
30
+ ]
31
+ )
32
+ ```
33
+
34
+ For more information on `notifiers`, see [Paratrooper][] documentation.
35
+
36
+ ## Contributing
37
+
38
+ 1. Fork it
39
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
40
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
41
+ 4. Push to the branch (`git push origin my-new-feature`)
42
+ 5. Create new Pull Request
43
+
44
+ ## Thanks
45
+
46
+ * [Brandon Farmer][]
47
+
48
+ [Paratrooper]: https://github.com/mattpolito/paratrooper
49
+ [Brandon Farmer]: https://github.com/bthesorceror
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,20 @@
1
+ require "paratrooper-asset_precompile/version"
2
+ require 'paratrooper/notifier'
3
+ require 'paratrooper/system_caller'
4
+
5
+ module Paratrooper
6
+ module AssetPrecompile
7
+ class Notifier < Paratrooper::Notifier
8
+ attr_reader :system_caller
9
+
10
+ def initialize(options = {})
11
+ @system_caller = options[:system_caller] || Paratrooper::SystemCaller.new
12
+ end
13
+
14
+ def app_restart(options = {})
15
+ command = "heroku run rake assets:precompile --app #{options[:app_name]}"
16
+ system_caller.execute(command)
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,5 @@
1
+ module Paratrooper
2
+ module AssetPrecompile
3
+ VERSION = "1.0.0"
4
+ end
5
+ end
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'paratrooper-asset_precompile/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "paratrooper-asset_precompile"
8
+ gem.version = Paratrooper::AssetPrecompile::VERSION
9
+ gem.authors = ["Brandon Farmer", "Matt Polito"]
10
+ gem.email = ["bthesorceror@gmail.com", "matt.polito@gmail.com"]
11
+ gem.description = %q{Adds manual asset precompilation to Paratrooper deploy process}
12
+ gem.summary = %q{Adds manual asset precompilation to Paratrooper deploy process}
13
+ gem.homepage = "http://github.com/mattpolito/paratrooper-newrelic"
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+
20
+ gem.add_development_dependency 'rake'
21
+ gem.add_development_dependency 'rspec', '~> 2.12'
22
+ gem.add_development_dependency 'pry'
23
+ gem.add_dependency 'paratrooper', '~> 1.2'
24
+ end
metadata ADDED
@@ -0,0 +1,110 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: paratrooper-asset_precompile
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Brandon Farmer
8
+ - Matt Polito
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-03-22 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ! '>='
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ! '>='
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rspec
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ~>
33
+ - !ruby/object:Gem::Version
34
+ version: '2.12'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ~>
40
+ - !ruby/object:Gem::Version
41
+ version: '2.12'
42
+ - !ruby/object:Gem::Dependency
43
+ name: pry
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: paratrooper
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ~>
61
+ - !ruby/object:Gem::Version
62
+ version: '1.2'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: '1.2'
70
+ description: Adds manual asset precompilation to Paratrooper deploy process
71
+ email:
72
+ - bthesorceror@gmail.com
73
+ - matt.polito@gmail.com
74
+ executables: []
75
+ extensions: []
76
+ extra_rdoc_files: []
77
+ files:
78
+ - .gitignore
79
+ - Gemfile
80
+ - LICENSE.txt
81
+ - README.md
82
+ - Rakefile
83
+ - lib/paratrooper-asset_precompile.rb
84
+ - lib/paratrooper-asset_precompile/version.rb
85
+ - paratrooper-asset_precompile.gemspec
86
+ homepage: http://github.com/mattpolito/paratrooper-newrelic
87
+ licenses: []
88
+ metadata: {}
89
+ post_install_message:
90
+ rdoc_options: []
91
+ require_paths:
92
+ - lib
93
+ required_ruby_version: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ! '>='
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ required_rubygems_version: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ! '>='
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ requirements: []
104
+ rubyforge_project:
105
+ rubygems_version: 2.0.3
106
+ signing_key:
107
+ specification_version: 4
108
+ summary: Adds manual asset precompilation to Paratrooper deploy process
109
+ test_files: []
110
+ has_rdoc: