glynn 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -1
- data/Rakefile +2 -2
- data/bin/glynn +15 -7
- data/glynn.gemspec +1 -1
- data/lib/glynn/ftp.rb +6 -2
- data/lib/glynn.rb +1 -0
- metadata +3 -5
data/.gitignore
CHANGED
data/Rakefile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'vendor/gems/environment'
|
2
2
|
require 'spec/rake/spectask'
|
3
3
|
|
4
4
|
begin
|
@@ -10,7 +10,7 @@ begin
|
|
10
10
|
gemspec.email = "42@dmathieu.com"
|
11
11
|
gemspec.homepage = "http://github.com/dmathieu/glynn"
|
12
12
|
gemspec.authors = ["Damien MATHIEU"]
|
13
|
-
gemspec.version = '1.0.
|
13
|
+
gemspec.version = '1.0.1'
|
14
14
|
|
15
15
|
gemspec.add_dependency('jekyll', '>= 0.5.4')
|
16
16
|
end
|
data/bin/glynn
CHANGED
@@ -24,14 +24,22 @@ puts "Successfully generated site"
|
|
24
24
|
|
25
25
|
puts "Sending site over FTP (host: #{options['ftp_host']})"
|
26
26
|
begin
|
27
|
-
|
28
|
-
|
27
|
+
if options['ftp_username'].nil?
|
28
|
+
print "FTP Username: "
|
29
|
+
username = $stdin.gets.chomp
|
30
|
+
else
|
31
|
+
username = options['username']
|
32
|
+
end
|
29
33
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
34
|
+
if options['password'].nil?
|
35
|
+
print "FTP Password: "
|
36
|
+
# We hide the entered characters before to ask for the password
|
37
|
+
system "stty -echo"
|
38
|
+
password = $stdin.gets.chomp
|
39
|
+
system "stty echo"
|
40
|
+
else
|
41
|
+
password = options['password']
|
42
|
+
end
|
35
43
|
rescue NoMethodError, Interrupt
|
36
44
|
# When the process is exited, we display the characters again
|
37
45
|
# And we exit
|
data/glynn.gemspec
CHANGED
data/lib/glynn/ftp.rb
CHANGED
@@ -34,7 +34,7 @@ module Glynn
|
|
34
34
|
# If the file/directory is hidden (first character is a dot), we ignore it
|
35
35
|
next if file_name =~ /^\./
|
36
36
|
|
37
|
-
if File.stat(local + "/" + file_name).directory?
|
37
|
+
if ::File.stat(local + "/" + file_name).directory?
|
38
38
|
# It is a directory, we recursively send it
|
39
39
|
begin
|
40
40
|
ftp.mkdir(distant + "/" + file_name)
|
@@ -45,7 +45,11 @@ module Glynn
|
|
45
45
|
send_dir(ftp, local + "/" + file_name, distant + "/" + file_name)
|
46
46
|
else
|
47
47
|
# It's a file, we just send it
|
48
|
-
|
48
|
+
if Glynn::File.is_bin?(local + "/" + file_name)
|
49
|
+
ftp.putbinaryfile(local + "/" + file_name, distant + "/" + file_name)
|
50
|
+
else
|
51
|
+
ftp.puttextfile(local + "/" + file_name, distant + "/" + file_name)
|
52
|
+
end
|
49
53
|
end
|
50
54
|
end
|
51
55
|
|
data/lib/glynn.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glynn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damien MATHIEU
|
@@ -45,10 +45,8 @@ files:
|
|
45
45
|
- spec/lib/jekyll.rb
|
46
46
|
- spec/spec.opts
|
47
47
|
- spec/spec_helper.rb
|
48
|
-
has_rdoc:
|
48
|
+
has_rdoc: false
|
49
49
|
homepage: http://github.com/dmathieu/glynn
|
50
|
-
licenses: []
|
51
|
-
|
52
50
|
post_install_message:
|
53
51
|
rdoc_options:
|
54
52
|
- --charset=UTF-8
|
@@ -69,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
67
|
requirements: []
|
70
68
|
|
71
69
|
rubyforge_project:
|
72
|
-
rubygems_version: 1.3.
|
70
|
+
rubygems_version: 1.3.1
|
73
71
|
signing_key:
|
74
72
|
specification_version: 3
|
75
73
|
summary: Deploy a jekyll weblog through ftp
|