runecms 0.0.15 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/runecms/commands.rb +6 -2
- data/lib/runecms/support.rb +3 -1
- data/lib/runecms/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef24d51477b964773f8fc6c40f938132d08c95bbaa15d78eabdd6a598e3e89e8
|
4
|
+
data.tar.gz: 87e5b57bce9f6eaefd5e3499188633f05a3d85f6963d5b5b44c00eef894eff1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c87ff4db3ccb7f14560b1da004bbc4452b1d663d5e716d05afbadb24437f762d909e34538e098322e8a065b68c41d19155d39a5b7e8f74acc86399af71ef859e
|
7
|
+
data.tar.gz: 9d02b920e272d6a1082d4b79f916bd10471df2960cf0d304023b584a1a46b4def2a9fe1462d632c41d53873ed63bc90263069fa57189787394583277f9730b5a
|
data/lib/runecms/commands.rb
CHANGED
@@ -34,6 +34,7 @@ def run_generate
|
|
34
34
|
stale = stale_files("source")
|
35
35
|
if stale.empty?
|
36
36
|
puts "Nothing to do"
|
37
|
+
return false
|
37
38
|
else
|
38
39
|
puts "Stale files:"
|
39
40
|
stale.each do |file|
|
@@ -41,12 +42,13 @@ def run_generate
|
|
41
42
|
update_target(file)
|
42
43
|
end
|
43
44
|
puts
|
45
|
+
return true
|
44
46
|
end
|
45
47
|
end
|
46
48
|
|
47
49
|
def run_update
|
48
|
-
run_generate
|
49
|
-
run_publish
|
50
|
+
needed = run_generate
|
51
|
+
run_publish if needed
|
50
52
|
end
|
51
53
|
|
52
54
|
def run_view
|
@@ -56,6 +58,7 @@ end
|
|
56
58
|
|
57
59
|
def run_publish
|
58
60
|
cmd = "rsync -r -z target/ #@user@#@server:#@path/"
|
61
|
+
# puts "Running: #{cmd}"
|
59
62
|
system(cmd)
|
60
63
|
end
|
61
64
|
|
@@ -68,6 +71,7 @@ def command?(cmd)
|
|
68
71
|
end
|
69
72
|
|
70
73
|
def execute(cmd)
|
74
|
+
read_config
|
71
75
|
send("run_#{cmd}")
|
72
76
|
end
|
73
77
|
|
data/lib/runecms/support.rb
CHANGED
@@ -97,7 +97,9 @@ def read_config
|
|
97
97
|
# Example: "user: hal9000"
|
98
98
|
lines.each do |line|
|
99
99
|
var, val = line.split(": ")
|
100
|
-
|
100
|
+
var, val = "@" + var, val.chomp.strip
|
101
|
+
# puts "Config: setting #{var} to #{val.inspect}"
|
102
|
+
instance_variable_set(var, val)
|
101
103
|
end
|
102
104
|
return true
|
103
105
|
rescue => e
|
data/lib/runecms/version.rb
CHANGED