static_cms 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/static_cms/application.rb +4 -4
- data/lib/static_cms/commands.rb +7 -6
- data/lib/static_cms/version.rb +1 -1
- data/test/helper_for_test.rb +2 -0
- data/test/test_generate.rb +0 -2
- data/test/test_init.rb +1 -1
- data/test/test_update.rb +9 -0
- metadata +11 -9
@@ -4,13 +4,13 @@ class ::StaticCms::Application < Thor
|
|
4
4
|
require 'ruby_patch'
|
5
5
|
extend ::RubyPatch::AutoLoad
|
6
6
|
|
7
|
-
desc "init [DIR]", "Initialize DIR directory for StaticCms
|
7
|
+
desc "init [DIR='.']", "Initialize DIR directory for StaticCms"
|
8
8
|
def init(dir = '.')
|
9
9
|
::StaticCms::Commands.init(dir)
|
10
10
|
end
|
11
11
|
|
12
|
-
desc "update", "Update templates, sources, statics (and more)."
|
13
|
-
def update
|
14
|
-
::StaticCms::Commands.update
|
12
|
+
desc "update [DIR='.']", "Update templates, sources, statics (and more)."
|
13
|
+
def update(dir = '.')
|
14
|
+
::StaticCms::Commands.update(dir)
|
15
15
|
end
|
16
16
|
end
|
data/lib/static_cms/commands.rb
CHANGED
@@ -21,11 +21,12 @@ git commit -m 'Copied from site template.' > #{File::NULL}
|
|
21
21
|
success
|
22
22
|
end
|
23
23
|
|
24
|
-
def self.update
|
25
|
-
|
26
|
-
FileUtils.cp_r(File.join(
|
27
|
-
FileUtils.cp_r(File.join(
|
28
|
-
FileUtils.
|
29
|
-
|
24
|
+
def self.update(dir = '.')
|
25
|
+
FileUtils.cp_r(File.join(SITE_TEMPLATE_DIR, 'templates'), dir)
|
26
|
+
FileUtils.cp_r(File.join(SITE_TEMPLATE_DIR, 'sources'), dir)
|
27
|
+
FileUtils.cp_r(File.join(SITE_TEMPLATE_DIR, 'statics'), dir)
|
28
|
+
FileUtils.cp(File.join(SITE_TEMPLATE_DIR, 'rakefile'), dir)
|
29
|
+
|
30
|
+
true
|
30
31
|
end
|
31
32
|
end
|
data/lib/static_cms/version.rb
CHANGED
data/test/helper_for_test.rb
CHANGED
data/test/test_generate.rb
CHANGED
data/test/test_init.rb
CHANGED
data/test/test_update.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: static_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-10-06 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: haml
|
16
|
-
requirement: &
|
16
|
+
requirement: &79450410 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '3.1'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *79450410
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: sass
|
27
|
-
requirement: &
|
27
|
+
requirement: &79238900 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '3.2'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *79238900
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: ruby_patch
|
38
|
-
requirement: &
|
38
|
+
requirement: &79237630 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '1.1'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *79237630
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: thor
|
49
|
-
requirement: &
|
49
|
+
requirement: &79236320 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0.16'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *79236320
|
58
58
|
description: Simple static contents management system based on Haml and Sass.
|
59
59
|
email:
|
60
60
|
executables:
|
@@ -92,6 +92,7 @@ files:
|
|
92
92
|
- test/helper_for_test.rb
|
93
93
|
- test/test_generate.rb
|
94
94
|
- test/test_init.rb
|
95
|
+
- test/test_update.rb
|
95
96
|
homepage:
|
96
97
|
licenses: []
|
97
98
|
post_install_message:
|
@@ -119,4 +120,5 @@ summary: Simple static contents management system.
|
|
119
120
|
test_files:
|
120
121
|
- test/test_generate.rb
|
121
122
|
- test/test_init.rb
|
123
|
+
- test/test_update.rb
|
122
124
|
has_rdoc:
|