hyde-ftp 0.1.8 → 0.1.11

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 (5) hide show
  1. data/bin/hyde +3 -2
  2. data/hyde-ftp.gemspec +1 -2
  3. data/lib/hyde.rb +1 -44
  4. metadata +1 -2
  5. data/CHANGELOG +0 -15
data/bin/hyde CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
- $LOAD_PATH << 'lib'
3
2
 
4
- require 'rubygems'
3
+ $: << File.expand_path(File.dirname(__FILE__) + "/../lib")
4
+
5
+ require 'hyde/ftp-transfer.rb'
5
6
  require 'hyde.rb'
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
4
4
  s.rubygems_version = '1.3.5'
5
5
 
6
6
  s.name = 'hyde-ftp'
7
- s.version = '0.1.8'
7
+ s.version = '0.1.11'
8
8
  s.license = 'MIT'
9
9
  s.date = '2013-06-11'
10
10
 
@@ -26,7 +26,6 @@ Gem::Specification.new do |s|
26
26
  bin/hyde
27
27
  lib/hyde/ftp-transfer.rb
28
28
  lib/hyde.rb
29
- CHANGELOG
30
29
  LICENSE
31
30
  README.md
32
31
  hyde-ftp.gemspec
@@ -3,50 +3,7 @@
3
3
  require 'rubygems'
4
4
  require 'net/ftp'
5
5
  require 'yaml'
6
-
7
- def mirror(path, ftp, initial_path = nil)
8
- initial_path ||= path
9
- Dir.entries(path).each do |file|
10
- next if ['.', '..'].include? file
11
-
12
- file_path = path + '/' + file
13
- short_file_path = file_path[initial_path.length, file_path.length]
14
- if File.directory?(file_path)
15
- ftp.mkdir(file) unless ftp.nlst.index(file)
16
- ftp.chdir(file)
17
- mirror(file_path, ftp, initial_path)
18
- ftp.chdir('..')
19
- else
20
- puts "Deploying: " + short_file_path
21
- puts " To: " + ftp.pwd + '/' + file
22
- ftp.putbinaryfile(path + '/' + file, file)
23
- end
24
- end
25
- end
26
-
27
- def ftp_directory?(ftp, file_name)
28
- ftp.chdir(file_name)
29
- ftp.chdir('..')
30
- true
31
- rescue
32
- false
33
- end
34
-
35
- def clean_ftp(ftp)
36
- ftp.nlst.each do |file|
37
- next if ['.', '..', 'bup', 'backup'].include? file
38
- if ftp_directory? ftp, file
39
- ftp.chdir file
40
- clean_ftp(ftp)
41
- ftp.chdir '..'
42
- puts "Deleting directory: " + ftp.pwd + "/" + file
43
- ftp.rmdir(file)
44
- else
45
- puts "Deleting: " + ftp.pwd + "/" + file
46
- ftp.delete file
47
- end
48
- end
49
- end
6
+ require 'hyde/ftp-transfer'
50
7
 
51
8
  class Jekyll
52
9
  $jekyll = Jekyll.new()
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyde-ftp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -38,7 +38,6 @@ files:
38
38
  - bin/hyde
39
39
  - lib/hyde/ftp-transfer.rb
40
40
  - lib/hyde.rb
41
- - CHANGELOG
42
41
  - LICENSE
43
42
  - README.md
44
43
  - hyde-ftp.gemspec
data/CHANGELOG DELETED
@@ -1,15 +0,0 @@
1
- Version 0.0.1: Beta Released.
2
- Version 0.0.2: Fixed a few bugs.
3
- Version 0.0.3: Cleaned up code.
4
- Version 0.0.4: More code cleaning.
5
- Version 0.0.5: Runtime fail fix.
6
- Version 0.0.6: Require fail fix.
7
- Version 0.0.7: Require fail fix.
8
- Version 0.0.8: Cleaning up fix.
9
- Version 0.1.0: No longer builds site before deployment to avoid jekyll config related errors.
10
- Version 0.1.1: Fixed private method error.
11
- Version 0.1.2: Fixing require error.
12
- Version 0.1.3: Accidentally required nothing. Fixed that.
13
- Version 0.1.4: Trying something new.
14
- Version 0.1.5: Still trying new stuff.
15
- Version 0.1.6: Figured out require error.