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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc04745ed11b9b44de73a58febc4525ea2aac352f4396a46fe86ea9db3019756
4
- data.tar.gz: '08ce062e18a1775343d4f01ad0963b835985509da733d0ae989eb5b716bbd94d'
3
+ metadata.gz: ef24d51477b964773f8fc6c40f938132d08c95bbaa15d78eabdd6a598e3e89e8
4
+ data.tar.gz: 87e5b57bce9f6eaefd5e3499188633f05a3d85f6963d5b5b44c00eef894eff1b
5
5
  SHA512:
6
- metadata.gz: 9619e3058fd89d910fd6ed7a07de894f0bc68e0884fd7436b9bba8a8248000d38650e9c86fe8a2e498ecaf6b4ae170f82a71dd916c5be4e9e8a5a9846fdd43e7
7
- data.tar.gz: ca0cdf6c1235c3b314669a395ad9407dc18df48f1a2950534830d69b0970ff18b96dcf318e33fb3c5957d3709e78b8e37b7092f8245f1ca6392513b18af164c8
6
+ metadata.gz: c87ff4db3ccb7f14560b1da004bbc4452b1d663d5e716d05afbadb24437f762d909e34538e098322e8a065b68c41d19155d39a5b7e8f74acc86399af71ef859e
7
+ data.tar.gz: 9d02b920e272d6a1082d4b79f916bd10471df2960cf0d304023b584a1a46b4def2a9fe1462d632c41d53873ed63bc90263069fa57189787394583277f9730b5a
@@ -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
 
@@ -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
- instance_variable_set("@" + var, val.chomp.strip)
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
@@ -1,3 +1,3 @@
1
1
  class RuneCMS
2
- VERSION = "0.0.15"
2
+ VERSION = "0.0.17"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runecms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton