ninja-deploy 1.4.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,6 @@
1
+ .bundle
2
+ .rvmrc
3
+ .yardoc
4
+ Gemfile.lock
5
+ doc
6
+ pkg
@@ -0,0 +1,11 @@
1
+ bundler_args: --without debug doc tooling
2
+ rvm:
3
+ - 1.8.7
4
+ - 1.9.2
5
+ - 1.9.3
6
+ - ree
7
+ - jruby-18mode
8
+ - jruby-19mode
9
+ - rbx-18mode
10
+ - rbx-19mode
11
+ script: "bundle exec rake"
@@ -0,0 +1 @@
1
+ --file MIT-LICENSE.markdown --no-private --protected --title "ninja-deploy"
data/Gemfile CHANGED
@@ -1,7 +1,20 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- group :development do
4
- gem 'gem-dandy'
5
- gem 'jeweler'
6
- gem 'rspec', '1.3.2'
7
- end
3
+ gemspec
4
+
5
+ group :debug do
6
+ gem 'ruby-debug', '~> 0', :platforms => :mri_18
7
+ gem 'ruby-debug19', '~> 0', :platforms => :mri_19, :require => 'ruby-debug'
8
+ end
9
+
10
+ group :doc do
11
+ gem 'yard', '~> 0', :platforms => [:ruby, :mswin, :mingw]
12
+ gem 'rdiscount', '~> 1', :platforms => [:ruby, :mswin, :mingw]
13
+ end
14
+
15
+ group :tooling do
16
+ gem 'guard-rspec', '~> 0'
17
+ if RUBY_PLATFORM =~ /darwin/i
18
+ gem 'rb-fsevent', '~> 0', :require => false
19
+ end
20
+ end
@@ -0,0 +1,17 @@
1
+ guard 'rspec', :cli => '--color', :version => 2 do
2
+ # Run the corresponding spec (or all specs) when code changes.
3
+ watch( %r{^lib/(.+)\.rb$} ) do |match|
4
+ corresponding_spec = "spec/#{match[1]}_spec.rb"
5
+ if File.file?( File.expand_path( "../#{corresponding_spec}", __FILE__ ))
6
+ corresponding_spec
7
+ else
8
+ 'spec'
9
+ end
10
+ end
11
+
12
+ # Run a spec when it changes.
13
+ watch %r{^spec/.+_spec\.rb$}
14
+
15
+ # Run all specs when the bundle changes.
16
+ watch( 'Gemfile.lock' ) { 'spec' }
17
+ end
@@ -0,0 +1,9 @@
1
+ # The MIT License
2
+
3
+ Source code for _ninja-deploy_ is Copyright © 2010–2012 [Jason Harrelson](mailto:jason@lookforwardenterprises.com), [Nils Jonsson](mailto:ninja-deploy@nilsjonsson.com) and [contributors](http://github.com/ninja-loss/ninja-deploy/contributors "ninja-deploy contributors at GitHub").
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED “AS IS,” WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -115,9 +115,11 @@ From Command-Line:
115
115
 
116
116
  == Sass Recipes
117
117
 
118
- Require the sass recipes in your deploy.rb file:
118
+ Include the Sass Rake tasks in your deploy.rb:
119
119
 
120
- require 'ninja_deploy/recipes/sass'
120
+ NinjaDeploy do
121
+ mirror_rake_tasks :sass
122
+ end
121
123
 
122
124
  === update
123
125
 
@@ -134,10 +136,14 @@ From Command-Line:
134
136
 
135
137
  == Thinking Sphinx Recipes
136
138
 
137
- Require the thinking sphinx recipes in your deploy.rb file:
139
+ Require the thinking sphinx recipes in your deploy.rb file and include the Thinking Sphinx Rake tasks:
138
140
 
139
141
  require 'ninja_deploy/recipes/thinking_sphinx'
140
142
 
143
+ NinjaDeploy do
144
+ mirror_rake_tasks :thinking_sphinx
145
+ end
146
+
141
147
  === configure
142
148
 
143
149
  Generates the Thinking Sphinx configuration file from the sphinx.yml file.
@@ -298,6 +304,6 @@ From Command-Line:
298
304
  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
299
305
  * Send me a pull request. Bonus points for topic branches.
300
306
 
301
- == Copyright
307
+ == License
302
308
 
303
- Copyright (c) 2010 Ninja Loss. See LICENSE for details.
309
+ Released under the MIT License.
data/Rakefile CHANGED
@@ -1,45 +1,40 @@
1
- require 'rubygems'
2
- require 'rake'
3
-
4
1
  begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "ninja-deploy"
8
- gem.summary = %Q{Common shared deployment recipes.}
9
- gem.description = %Q{Common shared deployment recipes for your pleasure.}
10
- gem.email = "ninja.loss@gmail.com"
11
- gem.homepage = "http://github.com/ninja-loss/ninja-deploy"
12
- gem.authors = ["Ninja Loss"]
13
- gem.add_development_dependency "rspec", ">= 1.2.9"
14
- gem.add_development_dependency "yard", ">= 0"
15
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
16
- end
17
- Jeweler::GemcutterTasks.new
2
+ require 'bundler/gem_tasks'
18
3
  rescue LoadError
19
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
20
4
  end
5
+ require 'rspec/core/rake_task'
21
6
 
22
- require 'spec/rake/spectask'
23
- Spec::Rake::SpecTask.new(:spec) do |spec|
24
- spec.libs << 'lib' << 'spec'
25
- spec.spec_files = FileList['spec/**/*_spec.rb']
7
+ begin
8
+ require 'yard'
9
+ rescue LoadError
10
+ else
11
+ namespace :build do
12
+ YARD::Rake::YardocTask.new :doc
13
+ end
26
14
  end
27
15
 
28
- Spec::Rake::SpecTask.new(:rcov) do |spec|
29
- spec.libs << 'lib' << 'spec'
30
- spec.pattern = 'spec/**/*_spec.rb'
31
- spec.rcov = true
16
+ def define_spec_task(name, options={})
17
+ RSpec::Core::RakeTask.new name do |t|
18
+ t.rspec_opts = ['--color']
19
+ unless options[:debug] == false
20
+ begin
21
+ require 'ruby-debug'
22
+ rescue LoadError
23
+ else
24
+ t.rspec_opts << '--debug'
25
+ end
26
+ end
27
+ t.pattern = %w(spec/*_spec.rb spec/**/*_spec.rb)
28
+ end
32
29
  end
33
30
 
34
- task :spec => :check_dependencies
31
+ desc 'Run all specs'
32
+ define_spec_task :spec
35
33
 
34
+ desc 'Run all specs'
35
+ task '' => :spec
36
36
  task :default => :spec
37
37
 
38
- begin
39
- require 'yard'
40
- YARD::Rake::YardocTask.new
41
- rescue LoadError
42
- task :yardoc do
43
- abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
44
- end
45
- end
38
+ # Support the 'gem test' command.
39
+ desc ''
40
+ define_spec_task :test, :debug => false
@@ -1,3 +1,7 @@
1
- module NinjaDeploy
2
- VERSION = File.read( "#{File.dirname __FILE__}/../VERSION" ).chomp
3
- end
1
+ require 'cape'
2
+
3
+ module NinjaDeploy; end
4
+
5
+ def NinjaDeploy( &block )
6
+ Cape( &block )
7
+ end
@@ -1,30 +1,5 @@
1
1
  Capistrano::Configuration.instance( :must_exist ).load do
2
2
  namespace :thinking_sphinx do
3
- desc "Generate the Sphinx configuration file"
4
- task :configure do
5
- rake "thinking_sphinx:configure"
6
- end
7
-
8
- desc "Index data"
9
- task :index do
10
- rake "thinking_sphinx:index"
11
- end
12
-
13
- desc "Run the Sphinx daemon"
14
- task :ts_run do
15
- rake "ts:run"
16
- end
17
-
18
- desc "Start the Sphinx daemon"
19
- task :start do
20
- rake "thinking_sphinx:start"
21
- end
22
-
23
- desc "Stop the Sphinx daemon"
24
- task :stop do
25
- rake "thinking_sphinx:stop"
26
- end
27
-
28
3
  desc "Stops thinking sphinx using the config file in the previous release (as there is not one configured in this release yet)."
29
4
  task :stop_using_previous_config do
30
5
  run "cd #{previous_release} && bundle exec rake RAILS_ENV=#{rails_env} thinking_sphinx:stop"
@@ -36,11 +11,6 @@ Capistrano::Configuration.instance( :must_exist ).load do
36
11
  start
37
12
  end
38
13
 
39
- desc "Stop, re-index and then start the Sphinx daemon"
40
- task :rebuild do
41
- rake "thinking_sphinx:rebuild"
42
- end
43
-
44
14
  desc "Add the shared folder for sphinx files for the production environment"
45
15
  task :shared_sphinx_folder, :roles => :web do
46
16
  run "mkdir -p #{shared_path}/db/sphinx/#{rails_env}"
@@ -0,0 +1,5 @@
1
+ module NinjaDeploy
2
+
3
+ VERSION = '2.0.0'
4
+
5
+ end
@@ -1,72 +1,31 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
1
  # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path('../lib', __FILE__)
3
+ require 'ninja_deploy/version'
5
4
 
6
5
  Gem::Specification.new do |s|
7
- s.name = %q{ninja-deploy}
8
- s.version = "1.4.0"
6
+ s.name = 'ninja-deploy'
7
+ s.version = NinjaDeploy::VERSION
8
+ s.summary = 'Common shared deployment recipes for your pleasure.'
9
+ s.description = s.summary
10
+ s.platform = Gem::Platform::RUBY
11
+ s.authors = ['Jason Harrelson', 'Nils Jonsson']
12
+ s.email = %w(jason@lookforwardenterprises.com ninja-deploy@nilsjonsson.com)
13
+ s.homepage = 'http://github.com/ninja-loss/ninja-deploy'
14
+ s.license = 'MIT'
9
15
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Ninja Loss"]
12
- s.date = %q{2011-09-15}
13
- s.description = %q{Common shared deployment recipes for your pleasure.}
14
- s.email = %q{ninja.loss@gmail.com}
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.rdoc"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".rvmrc",
22
- "Gemfile",
23
- "Gemfile.lock",
24
- "LICENSE",
25
- "README.rdoc",
26
- "Rakefile",
27
- "VERSION",
28
- "lib/ninja_deploy.rb",
29
- "lib/ninja_deploy/recipes/database.rb",
30
- "lib/ninja_deploy/recipes/deploy.rb",
31
- "lib/ninja_deploy/recipes/log.rb",
32
- "lib/ninja_deploy/recipes/passenger.rb",
33
- "lib/ninja_deploy/recipes/rvm.rb",
34
- "lib/ninja_deploy/recipes/sass.rb",
35
- "lib/ninja_deploy/recipes/thinking_sphinx.rb",
36
- "lib/ninja_deploy/recipes/version.rb",
37
- "lib/ninja_deploy/recipes/whenever.rb",
38
- "ninja-deploy.gemspec",
39
- "spec/ninja-deploy_spec.rb",
40
- "spec/spec.opts",
41
- "spec/spec_helper.rb"
42
- ]
43
- s.homepage = %q{http://github.com/ninja-loss/ninja-deploy}
44
- s.require_paths = ["lib"]
45
- s.rubygems_version = %q{1.6.0}
46
- s.summary = %q{Common shared deployment recipes.}
16
+ # TODO: Claim the RubyForge project
17
+ # s.rubyforge_project = 'ninja-deploy'
47
18
 
48
- if s.respond_to? :specification_version then
49
- s.specification_version = 3
19
+ s.files = `git ls-files`.split("\n")
20
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
21
+ s.executables = `git ls-files -- bin/*`.split("\n").map do |f|
22
+ File.basename f
23
+ end
24
+ s.require_paths = %w(lib)
25
+ s.has_rdoc = true
50
26
 
51
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
52
- s.add_development_dependency(%q<gem-dandy>, [">= 0"])
53
- s.add_development_dependency(%q<jeweler>, [">= 0"])
54
- s.add_development_dependency(%q<rspec>, ["= 1.3.2"])
55
- s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
56
- s.add_development_dependency(%q<yard>, [">= 0"])
57
- else
58
- s.add_dependency(%q<gem-dandy>, [">= 0"])
59
- s.add_dependency(%q<jeweler>, [">= 0"])
60
- s.add_dependency(%q<rspec>, ["= 1.3.2"])
61
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
62
- s.add_dependency(%q<yard>, [">= 0"])
63
- end
64
- else
65
- s.add_dependency(%q<gem-dandy>, [">= 0"])
66
- s.add_dependency(%q<jeweler>, [">= 0"])
67
- s.add_dependency(%q<rspec>, ["= 1.3.2"])
68
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
69
- s.add_dependency(%q<yard>, [">= 0"])
70
- end
71
- end
27
+ s.add_runtime_dependency 'cape', '~> 1'
72
28
 
29
+ s.add_development_dependency 'rake', '~> 0'
30
+ s.add_development_dependency 'rspec', '~> 2'
31
+ end
@@ -0,0 +1,5 @@
1
+ require 'ninja_deploy/version'
2
+
3
+ describe NinjaDeploy::VERSION do
4
+ it { should =~ /^\d+\.\d+\.\d+/ }
5
+ end
@@ -0,0 +1,16 @@
1
+ require 'ninja_deploy'
2
+
3
+ describe '#NinjaDeploy' do
4
+ it 'should yield the Cape module if given a unary block' do
5
+ yielded = nil
6
+ NinjaDeploy do |object|
7
+ yielded = object
8
+ end
9
+ yielded.name.should == 'Cape'
10
+ end
11
+
12
+ it 'should accept a nullary block' do
13
+ NinjaDeploy do
14
+ end
15
+ end
16
+ end
metadata CHANGED
@@ -1,133 +1,102 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ninja-deploy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
- - 1
8
- - 4
7
+ - 2
9
8
  - 0
10
- version: 1.4.0
9
+ - 0
10
+ version: 2.0.0
11
11
  platform: ruby
12
12
  authors:
13
- - Ninja Loss
13
+ - Jason Harrelson
14
+ - Nils Jonsson
14
15
  autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2011-09-15 00:00:00 -05:00
19
- default_executable:
19
+ date: 2012-02-01 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- type: :development
22
+ name: cape
23
+ prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
24
25
  none: false
25
26
  requirements:
26
- - - ">="
27
+ - - ~>
27
28
  - !ruby/object:Gem::Version
28
- hash: 3
29
+ hash: 1
29
30
  segments:
30
- - 0
31
- version: "0"
31
+ - 1
32
+ version: "1"
33
+ type: :runtime
32
34
  version_requirements: *id001
33
- name: gem-dandy
34
- prerelease: false
35
35
  - !ruby/object:Gem::Dependency
36
- type: :development
36
+ name: rake
37
+ prerelease: false
37
38
  requirement: &id002 !ruby/object:Gem::Requirement
38
39
  none: false
39
40
  requirements:
40
- - - ">="
41
+ - - ~>
41
42
  - !ruby/object:Gem::Version
42
43
  hash: 3
43
44
  segments:
44
45
  - 0
45
46
  version: "0"
47
+ type: :development
46
48
  version_requirements: *id002
47
- name: jeweler
48
- prerelease: false
49
49
  - !ruby/object:Gem::Dependency
50
- type: :development
51
- requirement: &id003 !ruby/object:Gem::Requirement
52
- none: false
53
- requirements:
54
- - - "="
55
- - !ruby/object:Gem::Version
56
- hash: 31
57
- segments:
58
- - 1
59
- - 3
60
- - 2
61
- version: 1.3.2
62
- version_requirements: *id003
63
50
  name: rspec
64
51
  prerelease: false
65
- - !ruby/object:Gem::Dependency
66
- type: :development
67
- requirement: &id004 !ruby/object:Gem::Requirement
52
+ requirement: &id003 !ruby/object:Gem::Requirement
68
53
  none: false
69
54
  requirements:
70
- - - ">="
55
+ - - ~>
71
56
  - !ruby/object:Gem::Version
72
- hash: 13
57
+ hash: 7
73
58
  segments:
74
- - 1
75
59
  - 2
76
- - 9
77
- version: 1.2.9
78
- version_requirements: *id004
79
- name: rspec
80
- prerelease: false
81
- - !ruby/object:Gem::Dependency
60
+ version: "2"
82
61
  type: :development
83
- requirement: &id005 !ruby/object:Gem::Requirement
84
- none: false
85
- requirements:
86
- - - ">="
87
- - !ruby/object:Gem::Version
88
- hash: 3
89
- segments:
90
- - 0
91
- version: "0"
92
- version_requirements: *id005
93
- name: yard
94
- prerelease: false
62
+ version_requirements: *id003
95
63
  description: Common shared deployment recipes for your pleasure.
96
- email: ninja.loss@gmail.com
64
+ email:
65
+ - jason@lookforwardenterprises.com
66
+ - ninja-deploy@nilsjonsson.com
97
67
  executables: []
98
68
 
99
69
  extensions: []
100
70
 
101
- extra_rdoc_files:
102
- - LICENSE
103
- - README.rdoc
71
+ extra_rdoc_files: []
72
+
104
73
  files:
105
74
  - .document
106
- - .rvmrc
75
+ - .gitignore
76
+ - .travis.yml
77
+ - .yardopts
107
78
  - Gemfile
108
- - Gemfile.lock
79
+ - Guardfile
109
80
  - LICENSE
81
+ - MIT-LICENSE.markdown
110
82
  - README.rdoc
111
83
  - Rakefile
112
- - VERSION
113
84
  - lib/ninja_deploy.rb
114
85
  - lib/ninja_deploy/recipes/database.rb
115
86
  - lib/ninja_deploy/recipes/deploy.rb
116
87
  - lib/ninja_deploy/recipes/log.rb
117
88
  - lib/ninja_deploy/recipes/passenger.rb
118
89
  - lib/ninja_deploy/recipes/rvm.rb
119
- - lib/ninja_deploy/recipes/sass.rb
120
90
  - lib/ninja_deploy/recipes/thinking_sphinx.rb
121
91
  - lib/ninja_deploy/recipes/version.rb
122
92
  - lib/ninja_deploy/recipes/whenever.rb
93
+ - lib/ninja_deploy/version.rb
123
94
  - ninja-deploy.gemspec
124
- - spec/ninja-deploy_spec.rb
125
- - spec/spec.opts
126
- - spec/spec_helper.rb
127
- has_rdoc: true
95
+ - spec/ninja_deploy/version_spec.rb
96
+ - spec/ninja_deploy_spec.rb
128
97
  homepage: http://github.com/ninja-loss/ninja-deploy
129
- licenses: []
130
-
98
+ licenses:
99
+ - MIT
131
100
  post_install_message:
132
101
  rdoc_options: []
133
102
 
@@ -154,9 +123,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
123
  requirements: []
155
124
 
156
125
  rubyforge_project:
157
- rubygems_version: 1.6.0
126
+ rubygems_version: 1.8.11
158
127
  signing_key:
159
128
  specification_version: 3
160
- summary: Common shared deployment recipes.
161
- test_files: []
162
-
129
+ summary: Common shared deployment recipes for your pleasure.
130
+ test_files:
131
+ - spec/ninja_deploy/version_spec.rb
132
+ - spec/ninja_deploy_spec.rb
133
+ has_rdoc: true
data/.rvmrc DELETED
@@ -1,2 +0,0 @@
1
- rvm use ruby-1.8.7-p302@ninja-deploy
2
- rvm info
@@ -1,21 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- gem-dandy (0.2.1)
5
- trollop (= 1.16.2)
6
- git (1.2.5)
7
- jeweler (1.6.4)
8
- bundler (~> 1.0)
9
- git (>= 1.2.5)
10
- rake
11
- rake (0.9.2)
12
- rspec (1.3.2)
13
- trollop (1.16.2)
14
-
15
- PLATFORMS
16
- ruby
17
-
18
- DEPENDENCIES
19
- gem-dandy
20
- jeweler
21
- rspec (= 1.3.2)
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 1.4.0
@@ -1,8 +0,0 @@
1
- Capistrano::Configuration.instance( :must_exist ).load do
2
- namespace :sass do
3
- desc 'Updates the stylesheets generated by Sass'
4
- task :update, :roles => :app do
5
- invoke_command "cd #{latest_release}; rake app:sass:update RAILS_ENV=#{rails_env}"
6
- end
7
- end
8
- end
@@ -1,7 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
-
3
- describe "NinjaDeploy" do
4
- it "fails" do
5
- fail "hey buddy, you should probably rename this file and start specing for real"
6
- end
7
- end
@@ -1 +0,0 @@
1
- --color
@@ -1,9 +0,0 @@
1
- $LOAD_PATH.unshift(File.dirname(__FILE__))
2
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
- require 'ninja-deploy'
4
- require 'spec'
5
- require 'spec/autorun'
6
-
7
- Spec::Runner.configure do |config|
8
-
9
- end