pfpux 0.1.0
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 +7 -0
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +4 -0
- data/lib/pfpux.rb +69 -0
- metadata +108 -0
- metadata.gz.sig +3 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: b409cd04c50526549e161a9740d1c051561fd221
|
|
4
|
+
data.tar.gz: 6b95d6918077804321fa78b1a1bb6596f5b8e99f
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: ce337feabfbafb7aa4254581422afe7d8ed0af09d52cba75c2e5f6a71b5dddbef0e83aaa0fe3c3d64da28375ae032412437bff0e5d56ae1167e70ff624e3240a
|
|
7
|
+
data.tar.gz: fc400bc25795cf5624c2f6a7df205bd74f4dd26dcf90164d4e9a68a92660eb0712f48fa483020cdee741ffc75ea77a4df6ea7b9bd135a3765e39cdf9bd047e7e
|
checksums.yaml.gz.sig
ADDED
|
Binary file
|
data.tar.gz.sig
ADDED
data/lib/pfpux.rb
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
# file: pfpux.rb
|
|
4
|
+
|
|
5
|
+
require 'rsync'
|
|
6
|
+
require 'dir-to-xml'
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class PFPuX
|
|
10
|
+
|
|
11
|
+
def initialize(dir, target, msg='')
|
|
12
|
+
|
|
13
|
+
directories = rsync dir, target
|
|
14
|
+
|
|
15
|
+
directories.each do |dirpath, files|
|
|
16
|
+
|
|
17
|
+
dtx = DirToXML.new File.join(target, dirpath)
|
|
18
|
+
|
|
19
|
+
files.each do |filename|
|
|
20
|
+
|
|
21
|
+
row = dtx.find_by_filename filename
|
|
22
|
+
next unless row
|
|
23
|
+
|
|
24
|
+
row[:description] = msg
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
dtx.save if files.any?
|
|
28
|
+
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
private
|
|
34
|
+
|
|
35
|
+
def rsync(dir, target)
|
|
36
|
+
|
|
37
|
+
h = {}
|
|
38
|
+
|
|
39
|
+
Rsync.run(dir, target ,'-a') do |result|
|
|
40
|
+
|
|
41
|
+
if result.success?
|
|
42
|
+
|
|
43
|
+
result.changes.each do |change|
|
|
44
|
+
|
|
45
|
+
puts ":: #{change.filename} (#{change.summary})"
|
|
46
|
+
s = change.filename
|
|
47
|
+
|
|
48
|
+
if s[-1] == '/' then
|
|
49
|
+
|
|
50
|
+
curkey = s
|
|
51
|
+
h.merge!(curkey => [])
|
|
52
|
+
|
|
53
|
+
else
|
|
54
|
+
curkey = File.dirname(s)
|
|
55
|
+
h.merge!(curkey => []) unless h.has_key? curkey
|
|
56
|
+
h[curkey] << File.basename(s)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
end
|
|
60
|
+
else
|
|
61
|
+
puts result.error
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
return h
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: pfpux
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- James Robertson
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain:
|
|
11
|
+
- |
|
|
12
|
+
-----BEGIN CERTIFICATE-----
|
|
13
|
+
MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
|
|
14
|
+
YXN0ZXIxHjAcBgoJ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fob4sBzvWlYuvJxfISEtFOVIekGVSFwN
|
|
29
|
+
WWemYlDR7m3AQOOSjviQZzJLiBsbCsamm9lKzUHimUHg2e+PRZWVNNSNDXjJf7Hj
|
|
30
|
+
Ylma+E/8PQ1QmBa3bfgTCNanb1Axa1YCTbMHtiNsWgBgjZjWPz004x+yGcIvd8VD
|
|
31
|
+
7mBhsqHW09ch0MsaJ6uZJ+rRDI1p5HYwGswCewH+IDKnI43bZXKuhvNmqcC+HYvK
|
|
32
|
+
aVhfS8iygrPouQ==
|
|
33
|
+
-----END CERTIFICATE-----
|
|
34
|
+
date: 2015-12-19 00:00:00.000000000 Z
|
|
35
|
+
dependencies:
|
|
36
|
+
- !ruby/object:Gem::Dependency
|
|
37
|
+
name: dir-to-xml
|
|
38
|
+
requirement: !ruby/object:Gem::Requirement
|
|
39
|
+
requirements:
|
|
40
|
+
- - "~>"
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
version: '0.7'
|
|
43
|
+
- - ">="
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: 0.7.2
|
|
46
|
+
type: :runtime
|
|
47
|
+
prerelease: false
|
|
48
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
49
|
+
requirements:
|
|
50
|
+
- - "~>"
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: '0.7'
|
|
53
|
+
- - ">="
|
|
54
|
+
- !ruby/object:Gem::Version
|
|
55
|
+
version: 0.7.2
|
|
56
|
+
- !ruby/object:Gem::Dependency
|
|
57
|
+
name: rsync
|
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
|
59
|
+
requirements:
|
|
60
|
+
- - "~>"
|
|
61
|
+
- !ruby/object:Gem::Version
|
|
62
|
+
version: '1.0'
|
|
63
|
+
- - ">="
|
|
64
|
+
- !ruby/object:Gem::Version
|
|
65
|
+
version: 1.0.9
|
|
66
|
+
type: :runtime
|
|
67
|
+
prerelease: false
|
|
68
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
69
|
+
requirements:
|
|
70
|
+
- - "~>"
|
|
71
|
+
- !ruby/object:Gem::Version
|
|
72
|
+
version: '1.0'
|
|
73
|
+
- - ">="
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: 1.0.9
|
|
76
|
+
description:
|
|
77
|
+
email: james@r0bertson.co.uk
|
|
78
|
+
executables: []
|
|
79
|
+
extensions: []
|
|
80
|
+
extra_rdoc_files: []
|
|
81
|
+
files:
|
|
82
|
+
- lib/pfpux.rb
|
|
83
|
+
homepage: https://github.com/jrobertson/pfpux
|
|
84
|
+
licenses:
|
|
85
|
+
- MIT
|
|
86
|
+
metadata: {}
|
|
87
|
+
post_install_message:
|
|
88
|
+
rdoc_options: []
|
|
89
|
+
require_paths:
|
|
90
|
+
- lib
|
|
91
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
92
|
+
requirements:
|
|
93
|
+
- - ">="
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: '0'
|
|
96
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
|
+
requirements:
|
|
98
|
+
- - ">="
|
|
99
|
+
- !ruby/object:Gem::Version
|
|
100
|
+
version: '0'
|
|
101
|
+
requirements: []
|
|
102
|
+
rubyforge_project:
|
|
103
|
+
rubygems_version: 2.4.8
|
|
104
|
+
signing_key:
|
|
105
|
+
specification_version: 4
|
|
106
|
+
summary: Project File Publisher using XML (PFPuX) helps publish your project file
|
|
107
|
+
directory to a static web location.
|
|
108
|
+
test_files: []
|
metadata.gz.sig
ADDED