kalipso 0.1.0 → 0.1.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.
- data/VERSION +1 -1
- data/kalipso.gemspec +1 -1
- data/lib/kalipso/cli.rb +19 -9
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/kalipso.gemspec
CHANGED
data/lib/kalipso/cli.rb
CHANGED
@@ -3,7 +3,7 @@ module Kalipso
|
|
3
3
|
|
4
4
|
desc "create", "add a site"
|
5
5
|
def create(name = nil)
|
6
|
-
path = File.expand_path(File.dirname(
|
6
|
+
path = File.expand_path(File.dirname($0))
|
7
7
|
if name.present?
|
8
8
|
puts "Creating #{name} linked to #{path}"
|
9
9
|
else
|
@@ -67,15 +67,25 @@ module Kalipso
|
|
67
67
|
end
|
68
68
|
|
69
69
|
desc "upload", "upload a path, eg. kalipso upload SITENAME PATH"
|
70
|
-
def upload(name)
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
70
|
+
def upload(name = nil)
|
71
|
+
if name.present?
|
72
|
+
puts "uploading #{name}"
|
73
|
+
site = Site::Local.find_by_name(name)
|
74
|
+
else
|
75
|
+
path = File.expand_path(File.dirname($0))
|
76
|
+
site = Site::Local.find_by_path(path)
|
77
|
+
end
|
78
|
+
if site.present?
|
79
|
+
puts "uploading #{name} from #{path}"
|
80
|
+
if site.path.present?
|
81
|
+
puts "uploading #{site.path} to #{site.name}.diddlydum.com"
|
82
|
+
`rsync -arvH #{site.path.gsub(/\/+$/, '')}/ sites@diddlydum.com:/home/sites/#{site.name}`
|
83
|
+
puts "#{site.path} uploaded to http://#{site.name}.diddlydum.com"
|
84
|
+
else
|
85
|
+
puts "You need to link this site first"
|
86
|
+
end
|
77
87
|
else
|
78
|
-
puts "
|
88
|
+
puts "site not found with path #{path}"
|
79
89
|
end
|
80
90
|
end
|
81
91
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kalipso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Paul Campbell
|