-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sven Fuchs
committed
Apr 7, 2012
1 parent
ce8fb95
commit c57020a
Showing
65 changed files
with
1,330 additions
and
854 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,5 @@ | |||
guard 'rspec' do | |||
watch(%r{^spec/.+_spec\.rb$}) | |||
watch(%r{^lib/space/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } | |||
watch('spec/spec_helper.rb') { "spec" } | |||
end |
9 changes: 2 additions & 7 deletions
9
lib/core_ext/enumerable.rb → lib/core_ext/enumerable/map_slice.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,13 +1,8 @@ | |||
module Enumerable | module Enumerable | ||
def map_with_index(&block) | |||
result = [] | |||
each_with_index { |element, ix| result << yield(element, ix) } | |||
result | |||
end | |||
|
|||
def map_slice(num, &block) | def map_slice(num, &block) | ||
result = [] | result = [] | ||
each_slice(num) { |element| result << yield(element) } | each_slice(num) { |element| result << yield(element) } | ||
result | result | ||
end | end unless method_defined?(:map_slice) | ||
end | end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,7 +1,6 @@ | |||
class String | class String | ||
def wrap(width) | def wrap(width) | ||
gsub(/(.{1,#{width}})( +|$\n?)|(.{1,#{width}})/, "\\1\\3\n") | gsub(/(.{1,#{width}})( +|$\n?)|(.{1,#{width}})/, "\\1\\3\n") | ||
end | end unless method_defined?(:wrap) | ||
end | end | ||
|
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,26 +1,15 @@ | |||
require 'yaml' | require 'yaml' | ||
require 'hashr' | require 'hashr' | ||
require 'core_ext/enumerable' | |||
|
|
||
module Space | module Space | ||
autoload :Action, 'space/action' | # autoload :Action, 'space/action' | ||
autoload :App, 'space/app' | autoload :App, 'space/app' | ||
autoload :Config, 'space/config' | autoload :Config, 'space/config' | ||
autoload :Events, 'space/events' | |||
autoload :Helpers, 'space/helpers' | autoload :Helpers, 'space/helpers' | ||
autoload :Models, 'space/models' | |||
autoload :Screen, 'space/screen' | autoload :Screen, 'space/screen' | ||
autoload :System, 'space/system' | autoload :Shell, 'space/shell' | ||
autoload :View, 'space/view' | |||
autoload :Tmux, 'space/tmux' | autoload :Tmux, 'space/tmux' | ||
autoload :Watch, 'space/watch' | |||
|
|||
autoload :Bundler, 'space/models/bundler' | |||
autoload :Bundle, 'space/models/bundle' | |||
autoload :Commands, 'space/models/commands' | |||
autoload :Command, 'space/models/command' | |||
autoload :Dependency, 'space/models/dependency' | |||
autoload :Git, 'space/models/git' | |||
autoload :Project, 'space/models/project' | |||
autoload :Repos, 'space/models/repos' | |||
autoload :Repo, 'space/models/repo' | |||
autoload :Watcher, 'space/models/watcher' | |||
end | end | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,48 @@ | |||
module Space | |||
class App | |||
class Command | |||
autoload :Execute, 'space/app/command/builtin' | |||
autoload :Refresh, 'space/app/command/builtin' | |||
autoload :Scope, 'space/app/command/builtin' | |||
autoload :Unscope, 'space/app/command/builtin' | |||
|
|||
autoload :Local, 'space/app/command/development' | |||
autoload :Remote, 'space/app/command/development' | |||
|
|||
attr_reader :project, :scope, :args | |||
|
|||
def initialize(project, scope, *args) | |||
@project = project | |||
@scope = scope | |||
@args = args | |||
end | |||
|
|||
# ::Bundler.with_clean_env do | |||
# end | |||
|
|||
def run | |||
raise 'not implemented' | |||
end | |||
|
|||
private | |||
|
|||
def repos | |||
@repos ||= project.repos.select_by_names(scope) | |||
end | |||
|
|||
def in_scope | |||
repos.each { |repo| yield repo } | |||
end | |||
|
|||
def system(cmd) | |||
puts cmd | |||
super | |||
end | |||
|
|||
def confirm | |||
puts "\n--- hit any key to continue ---\n" | |||
STDIN.getc | |||
end | |||
end | |||
end | |||
end |
Oops, something went wrong.