vergissberlin 0.0.7 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b68b208da76beb30cbb7bfae5fae36cdec87e8b
4
- data.tar.gz: 7d297ce704653b74f261c8203e008514c1bcc730
3
+ metadata.gz: 17d03bc9a62997ec9835008deb3254677d72d437
4
+ data.tar.gz: 2e26d390764216d4c7a69a67a8ec61c23f26e011
5
5
  SHA512:
6
- metadata.gz: a12fd751f9da6af8d8cd1b1726dd5cecd0f6ecddc37a558e95548f8c68298f8a5453c4e7377bfc566495cab383f5889d708dcb31c18b0a234b15ed67c3491f20
7
- data.tar.gz: ef23189b12376e49f5e4e4d0777df90ba03a2064c3a71ceca97c138c91226ca07efdc3c46878bc1d0625ad8c1110214dd2016ff6f886774cdadbd3dc73972176
6
+ metadata.gz: 5bac9922c930626a3732177ed7e20e0a956b255b86ed8c53cb57bdbc0519dcb3f43dcb183428fab05d81a60b07a81fbbcea790360b86634b6da3e9ea49665f39
7
+ data.tar.gz: 619d2b9cc48590d7e4649ba8312f4d5f147fc5b4986f3d85d37550cb94c22406da4a11a86bbffb236a02d058e6fb6ccd45a0e529cef10efc60ac8715de2fae1a
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ rvm:
3
+ # - 1.8.7
4
+ # - 1.9.2
5
+ # - 1.9.3
6
+ - 2.0.0
7
+ - ree
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Vergissberlin
2
2
 
3
- TODO: Write a gem description
3
+ Some hot useles stuff!
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,7 +18,7 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ what ever u want!
22
22
 
23
23
  ## Contributing
24
24
 
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!"
@@ -1,3 +1,3 @@
1
1
  module Vergissberlin
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.9"
3
3
  end
data/test/test_test.rb CHANGED
@@ -1,5 +1,3 @@
1
- require "utils"
2
-
3
1
  class Test_Test < Test::Unit::TestCase
4
2
  def test_a_test_case
5
3
  assert true
@@ -0,0 +1,12 @@
1
+
2
+ $:.unshift File.join(File.dirname(__FILE__),'..','lib')
3
+
4
+ require 'test/unit'
5
+ require 'version'
6
+
7
+ class Version_test < Test::Unit::TestCase
8
+ def test_foo
9
+ flunk "TODO: Write test"
10
+ assert_equal("foo", bar)
11
+ end
12
+ end
@@ -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
- # 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")
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.7
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/utils.rb
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/utils.rb
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