capistrano-scm-dummy 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 544287ba6bd3744f62a06fa73856430976434579
4
+ data.tar.gz: d2c322a3b07f6802b3dc17f4ab55088db84a498f
5
+ SHA512:
6
+ metadata.gz: d1d3a0a0ceb927cf75505f57456c5d89eb195340f1eb1281adb6c61b6810c4106fc8f3c2299570374bfc90d038ee9be1b7569516a28d7d331024c53e9c91cf0c
7
+ data.tar.gz: 1ec82d549bb6b8f84f0cee4f2443462a384c454498675a291ca8e720236b9b31bfc19b129dd1b547431c4a3146af16a32133775e48d1b3d4192b06e7379b0f9c
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.5
4
+ before_install: gem install bundler -v 1.10.6
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in capistrano-scm-dummy.gemspec
4
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Bryan Taylor
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,44 @@
1
+ # Capistrano::Scm::Dummy
2
+
3
+ I wrote this simple thing to test, and also to use in a greater CI context where we use deployable artifcats. It doesn't really do anything
4
+ useful except sit in the role of :scm for cap3. The lone thing that it actually performs is run /bin/true on your remote servers when you run
5
+ deploy:check
6
+
7
+ ## Installation
8
+
9
+ Add this line to your Gemfile:
10
+
11
+ ```ruby
12
+ gem 'capistrano-scm-dummy'
13
+ ```
14
+
15
+ Add this line to your Capfile:
16
+
17
+ ```ruby
18
+ require 'capistrano/dummy'
19
+ ```
20
+
21
+ Set the SCM strategy in your deploy.rb:
22
+ ```ruby
23
+ set :scm, :dummy
24
+ ```
25
+
26
+ And watch the nothing happen
27
+
28
+ ## Usage
29
+
30
+ You can't really use it, it doesn't do anything
31
+
32
+ ## Development
33
+
34
+ This gem currently only pretends to have tests
35
+
36
+ ## Contributing
37
+
38
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/capistrano-scm-dummy.
39
+
40
+
41
+ ## License
42
+
43
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
44
+
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << "test"
6
+ t.libs << "lib"
7
+ t.test_files = FileList['test/**/*_test.rb']
8
+ end
9
+
10
+ task :default => :test
@@ -0,0 +1,33 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'capistrano-scm-dummy'
7
+ spec.version = '0.0.1'
8
+ spec.authors = ['rubyisbeautiful']
9
+ spec.email = ['bcptaylor@gmail.com']
10
+
11
+ spec.summary = %q{dummy SCM for cap 3}
12
+ spec.description = %q{dummy SCM for cap 3}
13
+ spec.homepage = 'https://github.com/rubyisbeautiful'
14
+ spec.license = 'MIT'
15
+
16
+ # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
17
+ # delete this section to allow pushing this gem to any host.
18
+ if spec.respond_to?(:metadata)
19
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
20
+ else
21
+ raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.'
22
+ end
23
+
24
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
26
+ spec.require_paths = ['lib']
27
+
28
+ spec.add_development_dependency 'bundler', '~> 1.10'
29
+ spec.add_development_dependency 'rake', '~> 10.0'
30
+ spec.add_development_dependency 'minitest'
31
+
32
+ spec.add_dependency 'capistrano', '~> 3.0'
33
+ end
@@ -0,0 +1,37 @@
1
+ load File.expand_path('../tasks/dummy.rake', __FILE__)
2
+
3
+ require 'capistrano/scm'
4
+
5
+ class Capistrano::Dummy < Capistrano::SCM
6
+
7
+ def self.derp
8
+ 'Capistrano::Dummy loaded'
9
+ end
10
+
11
+ # The Capistrano default strategy for dummy. You should want to use this.
12
+ module DefaultStrategy
13
+ def test
14
+ true
15
+ end
16
+
17
+ def check
18
+ context.execute '/bin/true'
19
+ end
20
+
21
+ def clone
22
+ true
23
+ end
24
+
25
+ def update
26
+ true
27
+ end
28
+
29
+ def release
30
+ true
31
+ end
32
+
33
+ def fetch_revision
34
+ fetch(:branch)
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,50 @@
1
+ namespace :dummy do
2
+
3
+ def strategy
4
+ @strategy ||= Capistrano::Dummy.new(self, fetch(:git_strategy, Capistrano::Dummy::DefaultStrategy))
5
+ end
6
+
7
+ desc 'check simple remote command'
8
+ task :check do
9
+ on release_roles :all do
10
+ strategy.check
11
+ end
12
+ end
13
+
14
+ desc 'fake clone the repo to the non-existent cache'
15
+ task :clone do
16
+ on release_roles :all do
17
+ within deploy_path do
18
+ strategy.clone
19
+ end
20
+ end
21
+ end
22
+
23
+ desc 'fake update the repo mirror to not do anything'
24
+ task :update do
25
+ on release_roles :all do
26
+ within repo_path do
27
+ strategy.update
28
+ end
29
+ end
30
+ end
31
+
32
+ desc 'fake copy repo to nowhere'
33
+ task :create_release do
34
+ on release_roles :all do
35
+ within repo_path do
36
+ execute :mkdir, '-p', release_path
37
+ strategy.release
38
+ end
39
+ end
40
+ end
41
+
42
+ desc 'fake determine the revision that will be deployed'
43
+ task :set_current_revision do
44
+ on release_roles :all do
45
+ within repo_path do
46
+ set :current_revision, strategy.fetch_revision
47
+ end
48
+ end
49
+ end
50
+ end
metadata ADDED
@@ -0,0 +1,110 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-scm-dummy
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - rubyisbeautiful
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-12-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.10'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.10'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: capistrano
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ description: dummy SCM for cap 3
70
+ email:
71
+ - bcptaylor@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".gitignore"
77
+ - ".travis.yml"
78
+ - Gemfile
79
+ - LICENSE.txt
80
+ - README.md
81
+ - Rakefile
82
+ - capistrano-scm-dummy.gemspec
83
+ - lib/capistrano/dummy.rb
84
+ - lib/capistrano/tasks/dummy.rake
85
+ homepage: https://github.com/rubyisbeautiful
86
+ licenses:
87
+ - MIT
88
+ metadata:
89
+ allowed_push_host: https://rubygems.org
90
+ post_install_message:
91
+ rdoc_options: []
92
+ require_paths:
93
+ - lib
94
+ required_ruby_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ required_rubygems_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ requirements: []
105
+ rubyforge_project:
106
+ rubygems_version: 2.2.2
107
+ signing_key:
108
+ specification_version: 4
109
+ summary: dummy SCM for cap 3
110
+ test_files: []