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.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/kalipso.gemspec +1 -1
  3. data/lib/kalipso/cli.rb +19 -9
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/kalipso.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{kalipso}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Paul Campbell"]
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(__FILE__))
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
- puts "uploading #{name}"
72
- site = Site::Local.find_by_name(name)
73
- if site.path.present?
74
- puts "uploading #{site.path} to #{site.name}.diddlydum.com"
75
- `rsync -arvH #{site.path.gsub(/\/+$/, '')}/ sites@diddlydum.com:/home/sites/#{site.name}`
76
- puts "#{site.path} uploaded to http://#{site.name}.diddlydum.com"
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 "You need to link this site first"
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: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Paul Campbell