glynn 1.2.2 → 1.2.3
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.
- checksums.yaml +4 -4
- data/bin/glynn +23 -31
- data/lib/glynn/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 40d3add92259243508f8487f677cf5eb367d1c2c
|
|
4
|
+
data.tar.gz: c0102f947af45c1d93fc30f182dea522b48b4233
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ce0a531620c4ececdd165a87214707d057fa3c6914cb9719c59489b233a9c8556dc5214240825a6f52384958fe6962f3ebc3a64f62859ac39bd4db14038c06d8
|
|
7
|
+
data.tar.gz: 8fd4934e0d04b71ad1c62710db80354370fe712e3eef74f751d05273654f49303a6a1b1bc62ab113ca61bce25baa4daa319eb576d7d0bf681a3af916a0d33de2
|
data/bin/glynn
CHANGED
|
@@ -25,15 +25,15 @@ case ARGV.size
|
|
|
25
25
|
options['ftp_password'] = ARGV[3]
|
|
26
26
|
end
|
|
27
27
|
options = Jekyll.configuration(options)
|
|
28
|
-
ftp_port = (options['ftp_port'] || 21).to_i
|
|
29
|
-
passive = options['ftp_passive'] || true
|
|
30
|
-
ftp_secure = options['ftp_secure'] || false
|
|
31
|
-
|
|
32
28
|
# If _glynn.yml exists, load and merge these options
|
|
33
29
|
if File.file?('_glynn.yml')
|
|
34
30
|
options = options.merge(YAML.load_file('_glynn.yml'))
|
|
35
31
|
end
|
|
36
32
|
|
|
33
|
+
ftp_port = (options['ftp_port'] || 21).to_i
|
|
34
|
+
passive = options['ftp_passive'] || true
|
|
35
|
+
ftp_secure = options['ftp_secure'] || false
|
|
36
|
+
|
|
37
37
|
# Include Username/Password from .netrc file if available
|
|
38
38
|
if n = netrc[options['ftp_host']]
|
|
39
39
|
if options['ftp_username'] || options['ftp_password']
|
|
@@ -46,36 +46,28 @@ if n = netrc[options['ftp_host']]
|
|
|
46
46
|
options = (Hash[['ftp_username', 'ftp_password'].zip n]).merge options
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
cli.say "Building site: #{options['source']} -> #{options['destination']}"
|
|
50
50
|
jekyll = Glynn::Jekyll.new
|
|
51
51
|
jekyll.build
|
|
52
|
-
|
|
52
|
+
cli.say cli.color("Successfully generated site", :green)
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
end
|
|
54
|
+
cli.say "Sending site over FTP (host: #{options['ftp_host']}, port: #{ftp_port}, ftps: #{ftp_secure})"
|
|
55
|
+
|
|
56
|
+
if options['ftp_username'].nil?
|
|
57
|
+
username = cli.ask "FTP Username: "
|
|
58
|
+
else
|
|
59
|
+
username = options['ftp_username']
|
|
60
|
+
end
|
|
62
61
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
netrc.save
|
|
70
|
-
end
|
|
71
|
-
else
|
|
72
|
-
password = options['ftp_password']
|
|
62
|
+
if options['ftp_password'].nil?
|
|
63
|
+
# Get the password without echoing characters
|
|
64
|
+
password = cli.ask("FTP Password: ") { |q| q.echo = false }
|
|
65
|
+
if cli.agree("Would you like to save this password to #{Netrc.default_path}?")
|
|
66
|
+
netrc[options['ftp_host']] = username, password
|
|
67
|
+
netrc.save
|
|
73
68
|
end
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
# And we exit
|
|
77
|
-
system "stty echo"
|
|
78
|
-
exit
|
|
69
|
+
else
|
|
70
|
+
password = options['ftp_password']
|
|
79
71
|
end
|
|
80
72
|
|
|
81
73
|
ftp = Glynn::Ftp.new(options['ftp_host'], ftp_port, {
|
|
@@ -84,6 +76,6 @@ ftp = Glynn::Ftp.new(options['ftp_host'], ftp_port, {
|
|
|
84
76
|
:passive => passive,
|
|
85
77
|
:secure => ftp_secure
|
|
86
78
|
})
|
|
87
|
-
|
|
79
|
+
cli.say "Connected to server. Sending site"
|
|
88
80
|
ftp.sync(options['destination'], options['ftp_dir'])
|
|
89
|
-
|
|
81
|
+
cli.say cli.color("Successfully sent site", :green)
|
data/lib/glynn/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: glynn
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Damien MATHIEU
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-03-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -131,3 +131,4 @@ signing_key:
|
|
|
131
131
|
specification_version: 4
|
|
132
132
|
summary: Deploy a jekyll weblog through ftp
|
|
133
133
|
test_files: []
|
|
134
|
+
has_rdoc:
|