glynn 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -0
- data/Rakefile +7 -1
- data/VERSION +1 -1
- data/bin/glynn +16 -7
- data/glynn.gemspec +9 -8
- data/spec/lib/ftp.rb +2 -2
- metadata +7 -12
- data/bin/autospec +0 -3
- data/bin/jekyll +0 -3
- data/bin/maruku +0 -3
- data/bin/marutex +0 -3
- data/bin/rake +0 -3
- data/bin/redcloth +0 -3
- data/bin/spec +0 -3
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.3
|
data/bin/glynn
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require '
|
4
|
-
|
2
|
+
begin
|
3
|
+
require File.expand_path('../vendor/environment', __FILE__)
|
4
|
+
rescue LoadError
|
5
|
+
require "rubygems"
|
6
|
+
require "bundler"
|
7
|
+
Bundler.setup
|
8
|
+
end
|
5
9
|
$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
|
6
10
|
|
7
11
|
|
@@ -13,6 +17,11 @@ case ARGV.size
|
|
13
17
|
when 2
|
14
18
|
options['source'] = ARGV[0]
|
15
19
|
options['destination'] = ARGV[1]
|
20
|
+
when 4
|
21
|
+
options['source'] = ARGV[0]
|
22
|
+
options['destination'] = ARGV[1]
|
23
|
+
options['ftp_username'] = ARGV[2]
|
24
|
+
options['ftp_password'] = ARGV[3]
|
16
25
|
end
|
17
26
|
options = Jekyll.configuration(options)
|
18
27
|
|
@@ -28,17 +37,17 @@ begin
|
|
28
37
|
print "FTP Username: "
|
29
38
|
username = $stdin.gets.chomp
|
30
39
|
else
|
31
|
-
username = options['
|
40
|
+
username = options['ftp_username']
|
32
41
|
end
|
33
42
|
|
34
|
-
if options['
|
43
|
+
if options['ftp_password'].nil?
|
35
44
|
print "FTP Password: "
|
36
45
|
# We hide the entered characters before to ask for the password
|
37
46
|
system "stty -echo"
|
38
47
|
password = $stdin.gets.chomp
|
39
48
|
system "stty echo"
|
40
49
|
else
|
41
|
-
password = options['
|
50
|
+
password = options['ftp_password']
|
42
51
|
end
|
43
52
|
rescue NoMethodError, Interrupt
|
44
53
|
# When the process is exited, we display the characters again
|
@@ -50,4 +59,4 @@ end
|
|
50
59
|
ftp = Glynn::Ftp.new(options['ftp_host'], 21, {:username => username, :password => password})
|
51
60
|
puts "\r\nConnected to server. Sending site"
|
52
61
|
ftp.sync(options['destination'], options['ftp_dir'])
|
53
|
-
puts "Successfully sent site"
|
62
|
+
puts "Successfully sent site"
|
data/glynn.gemspec
CHANGED
@@ -1,18 +1,19 @@
|
|
1
1
|
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{glynn}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Damien MATHIEU"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-02-08}
|
13
|
+
s.default_executable = %q{glynn}
|
13
14
|
s.description = %q{Deploy a jekyll weblog through ftp}
|
14
15
|
s.email = %q{42@dmathieu.com}
|
15
|
-
s.executables = ["
|
16
|
+
s.executables = ["glynn"]
|
16
17
|
s.extra_rdoc_files = [
|
17
18
|
"LICENSE",
|
18
19
|
"README.md"
|
@@ -36,11 +37,10 @@ Gem::Specification.new do |s|
|
|
36
37
|
"spec/spec.opts",
|
37
38
|
"spec/spec_helper.rb"
|
38
39
|
]
|
39
|
-
s.has_rdoc = true
|
40
40
|
s.homepage = %q{http://github.com/dmathieu/glynn}
|
41
41
|
s.rdoc_options = ["--charset=UTF-8"]
|
42
42
|
s.require_paths = ["lib"]
|
43
|
-
s.rubygems_version = %q{1.3.
|
43
|
+
s.rubygems_version = %q{1.3.5}
|
44
44
|
s.summary = %q{Deploy a jekyll weblog through ftp}
|
45
45
|
s.test_files = [
|
46
46
|
"spec/lib/file.rb",
|
@@ -51,7 +51,7 @@ Gem::Specification.new do |s|
|
|
51
51
|
|
52
52
|
if s.respond_to? :specification_version then
|
53
53
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
54
|
-
s.specification_version =
|
54
|
+
s.specification_version = 3
|
55
55
|
|
56
56
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
57
57
|
s.add_runtime_dependency(%q<jekyll>, [">= 0.5.4"])
|
@@ -62,3 +62,4 @@ Gem::Specification.new do |s|
|
|
62
62
|
s.add_dependency(%q<jekyll>, [">= 0.5.4"])
|
63
63
|
end
|
64
64
|
end
|
65
|
+
|
data/spec/lib/ftp.rb
CHANGED
@@ -27,8 +27,8 @@ describe "FTP Interface" do
|
|
27
27
|
|
28
28
|
it 'should recursively send a directory' do
|
29
29
|
# We expect NET/FTP to create every file
|
30
|
-
@mock.should_receive(:
|
31
|
-
@mock.should_receive(:
|
30
|
+
@mock.should_receive(:putbinaryfile).with('/test/README', '/blah/README').and_return(true)
|
31
|
+
@mock.should_receive(:putbinaryfile).with('/test/subdir/README', '/blah/subdir/README').and_return(true)
|
32
32
|
FakeFS do
|
33
33
|
# We create the fake files and directories
|
34
34
|
Dir.mkdir('/test')
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damien MATHIEU
|
@@ -9,8 +9,8 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
13
|
-
default_executable:
|
12
|
+
date: 2010-02-08 00:00:00 +01:00
|
13
|
+
default_executable: glynn
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: jekyll
|
@@ -25,14 +25,7 @@ dependencies:
|
|
25
25
|
description: Deploy a jekyll weblog through ftp
|
26
26
|
email: 42@dmathieu.com
|
27
27
|
executables:
|
28
|
-
- autospec
|
29
28
|
- glynn
|
30
|
-
- jekyll
|
31
|
-
- maruku
|
32
|
-
- marutex
|
33
|
-
- rake
|
34
|
-
- redcloth
|
35
|
-
- spec
|
36
29
|
extensions: []
|
37
30
|
|
38
31
|
extra_rdoc_files:
|
@@ -58,6 +51,8 @@ files:
|
|
58
51
|
- spec/spec_helper.rb
|
59
52
|
has_rdoc: true
|
60
53
|
homepage: http://github.com/dmathieu/glynn
|
54
|
+
licenses: []
|
55
|
+
|
61
56
|
post_install_message:
|
62
57
|
rdoc_options:
|
63
58
|
- --charset=UTF-8
|
@@ -78,9 +73,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
73
|
requirements: []
|
79
74
|
|
80
75
|
rubyforge_project:
|
81
|
-
rubygems_version: 1.3.
|
76
|
+
rubygems_version: 1.3.5
|
82
77
|
signing_key:
|
83
|
-
specification_version:
|
78
|
+
specification_version: 3
|
84
79
|
summary: Deploy a jekyll weblog through ftp
|
85
80
|
test_files:
|
86
81
|
- spec/lib/file.rb
|
data/bin/autospec
DELETED
data/bin/jekyll
DELETED
data/bin/maruku
DELETED
data/bin/marutex
DELETED
data/bin/rake
DELETED
data/bin/redcloth
DELETED
data/bin/spec
DELETED