vergissberlin 0.0.7 → 0.0.9
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.
- checksums.yaml +4 -4
- data/.travis.yml +7 -0
- data/README.md +2 -2
- data/bin/programmerq +92 -0
- data/lib/vergissberlin/version.rb +1 -1
- data/test/test_test.rb +0 -2
- data/test/version_test.rb +12 -0
- data/vergissberlin.gemspec +4 -4
- metadata +6 -3
- data/test/utils.rb +0 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17d03bc9a62997ec9835008deb3254677d72d437
|
4
|
+
data.tar.gz: 2e26d390764216d4c7a69a67a8ec61c23f26e011
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bac9922c930626a3732177ed7e20e0a956b255b86ed8c53cb57bdbc0519dcb3f43dcb183428fab05d81a60b07a81fbbcea790360b86634b6da3e9ea49665f39
|
7
|
+
data.tar.gz: 619d2b9cc48590d7e4649ba8312f4d5f147fc5b4986f3d85d37550cb94c22406da4a11a86bbffb236a02d058e6fb6ccd45a0e529cef10efc60ac8715de2fae1a
|
data/.travis.yml
ADDED
data/README.md
CHANGED
data/bin/programmerq
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'optparse'
|
4
|
+
require 'fileutils'
|
5
|
+
|
6
|
+
OptionParser.new do |opts|
|
7
|
+
opts.banner = "Usage: #{File.basename($0)} [path]"
|
8
|
+
|
9
|
+
opts.on("-h", "--help", "Displays this help info") do
|
10
|
+
puts opts
|
11
|
+
exit 0
|
12
|
+
end
|
13
|
+
|
14
|
+
begin
|
15
|
+
opts.parse!(ARGV)
|
16
|
+
rescue OptionParser::ParseError => e
|
17
|
+
warn e.message
|
18
|
+
puts opts
|
19
|
+
exit 1
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
if ARGV.empty?
|
24
|
+
abort "Please specify the directory to programmerq, e.g. `#{File.basename($0)} .'"
|
25
|
+
elsif !File.exists?(ARGV.first)
|
26
|
+
abort "`#{ARGV.first}' does not exist."
|
27
|
+
elsif !File.directory?(ARGV.first)
|
28
|
+
abort "`#{ARGV.first}' is not a directory."
|
29
|
+
elsif ARGV.length > 1
|
30
|
+
abort "Too many arguments; please specify only the directory to programmerq."
|
31
|
+
end
|
32
|
+
|
33
|
+
def unindent(string)
|
34
|
+
indentation = string[/\A\s*/]
|
35
|
+
string.strip.gsub(/^#{indentation}/, "")
|
36
|
+
end
|
37
|
+
|
38
|
+
files = {
|
39
|
+
"Capfile" => unindent(<<-FILE),
|
40
|
+
|
41
|
+
load 'deploy'
|
42
|
+
|
43
|
+
# Uncomment if you are using Rails' asset pipeline
|
44
|
+
# load 'deploy/assets'
|
45
|
+
|
46
|
+
load 'config/deploy' # remove this line to skip loading any of the default tasks
|
47
|
+
FILE
|
48
|
+
|
49
|
+
"config/deploy.rb" => 'set :application, "set your application name here"
|
50
|
+
set :repository, "set your repository location here"
|
51
|
+
|
52
|
+
# set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names
|
53
|
+
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
|
54
|
+
|
55
|
+
role :web, "your web-server here" # Your HTTP server, Apache/etc
|
56
|
+
role :app, "your app-server here" # This may be the same as your `Web` server
|
57
|
+
role :db, "your primary db-server here", :primary => true # This is where Rails migrations will run
|
58
|
+
role :db, "your slave db-server here"
|
59
|
+
|
60
|
+
# if you want to clean up old releases on each deploy uncomment this:
|
61
|
+
# after "deploy:restart", "deploy:cleanup"
|
62
|
+
|
63
|
+
# if you\'re still using the script/reaper helper you will need
|
64
|
+
# these http://github.com/rails/irs_process_scripts
|
65
|
+
|
66
|
+
# If you are using Passenger mod_rails uncomment this:
|
67
|
+
# namespace :deploy do
|
68
|
+
# task :start do ; end
|
69
|
+
# task :stop do ; end
|
70
|
+
# task :restart, :roles => :app, :except => { :no_release => true } do
|
71
|
+
# run "#{try_sudo} touch #{File.join(current_path,\'tmp\',\'restart.txt\')}"
|
72
|
+
# end
|
73
|
+
# end'}
|
74
|
+
|
75
|
+
base = ARGV.shift
|
76
|
+
files.each do |file, content|
|
77
|
+
file = File.join(base, file)
|
78
|
+
if File.exists?(file)
|
79
|
+
warn "[skip] '#{file}' already exists"
|
80
|
+
elsif File.exists?(file.downcase)
|
81
|
+
warn "[skip] '#{file.downcase}' exists, which could conflict with `#{file}'"
|
82
|
+
else
|
83
|
+
unless File.exists?(File.dirname(file))
|
84
|
+
puts "[add] making directory '#{File.dirname(file)}'"
|
85
|
+
FileUtils.mkdir(File.dirname(file))
|
86
|
+
end
|
87
|
+
puts "[add] writing '#{file}'"
|
88
|
+
File.open(file, "w") { |f| f.write(content) }
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
puts "[done] capified!"
|
data/test/test_test.rb
CHANGED
data/vergissberlin.gemspec
CHANGED
@@ -14,10 +14,10 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
17
|
-
|
18
|
-
spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
-
|
20
|
-
spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
# spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
# spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vergissberlin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- André Lademann
|
@@ -56,20 +56,23 @@ description: Write a gem description
|
|
56
56
|
email:
|
57
57
|
- andre@programmerq.eu
|
58
58
|
executables:
|
59
|
+
- programmerq
|
59
60
|
- vergissberlin
|
60
61
|
extensions: []
|
61
62
|
extra_rdoc_files: []
|
62
63
|
files:
|
63
64
|
- .gitignore
|
65
|
+
- .travis.yml
|
64
66
|
- Gemfile
|
65
67
|
- LICENSE.txt
|
66
68
|
- README.md
|
67
69
|
- Rakefile
|
70
|
+
- bin/programmerq
|
68
71
|
- bin/vergissberlin
|
69
72
|
- lib/vergissberlin.rb
|
70
73
|
- lib/vergissberlin/version.rb
|
71
74
|
- test/test_test.rb
|
72
|
-
- test/
|
75
|
+
- test/version_test.rb
|
73
76
|
- vendor/bundle/bin/rake
|
74
77
|
- vendor/bundle/bin/vergissberlin
|
75
78
|
- vendor/bundle/build_info/capistrano_colors-0.5.5.info
|
@@ -216,4 +219,4 @@ specification_version: 4
|
|
216
219
|
summary: Write a gem summary
|
217
220
|
test_files:
|
218
221
|
- test/test_test.rb
|
219
|
-
- test/
|
222
|
+
- test/version_test.rb
|
data/test/utils.rb
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'bundler/setup'
|
3
|
-
|
4
|
-
require 'test/unit'
|
5
|
-
require 'mocha'
|
6
|
-
|
7
|
-
require 'capistrano/server_definition'
|
8
|
-
require 'pry'
|
9
|
-
|
10
|
-
module TestExtensions
|
11
|
-
def server(host, options={})
|
12
|
-
Capistrano::ServerDefinition.new(host, options)
|
13
|
-
end
|
14
|
-
|
15
|
-
def namespace(fqn=nil)
|
16
|
-
space = stub(:roles => {}, :fully_qualified_name => fqn, :default_task => nil)
|
17
|
-
yield(space) if block_given?
|
18
|
-
space
|
19
|
-
end
|
20
|
-
|
21
|
-
def role(space, name, *args)
|
22
|
-
opts = args.last.is_a?(Hash) ? args.pop : {}
|
23
|
-
space.roles[name] ||= []
|
24
|
-
space.roles[name].concat(args.map { |h| Capistrano::ServerDefinition.new(h, opts) })
|
25
|
-
end
|
26
|
-
|
27
|
-
def new_task(name, namespace=@namespace, options={}, &block)
|
28
|
-
block ||= Proc.new {}
|
29
|
-
task = Capistrano::TaskDefinition.new(name, namespace, options, &block)
|
30
|
-
assert_equal block, task.body
|
31
|
-
return task
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
class Test::Unit::TestCase
|
36
|
-
include TestExtensions
|
37
|
-
end
|