soupcms-cli 0.5.3 → 0.5.4
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 +4 -4
- data/.travis.yml +0 -1
- data/Gemfile +1 -1
- data/Gemfile.lock +19 -19
- data/README.md +10 -1
- data/lib/soupcms/cli/model/base.rb +1 -1
- data/lib/soupcms/cli/version.rb +1 -1
- data/lib/soupcms/soupcms_cli.rb +15 -4
- data/lib/templates/Gemfile +1 -1
- data/lib/templates/blog/my-first-post.md +3 -2
- data/lib/templates/modules/author.yml +11 -0
- data/lib/templates/modules/navigation.yml +13 -0
- data/lib/templates/modules/projects.yml +14 -0
- data/lib/templates/modules/share-this.yml +13 -0
- data/lib/templates/modules/tag-cloud.yml +11 -0
- data/lib/templates/pages/default.yml +5 -15
- data/lib/templates/pages/{blog-post.yml → post.yml} +6 -20
- data/lib/templates/public/favicon.ico +0 -0
- data/lib/templates/schemaless/author.yml +14 -0
- data/lib/templates/schemaless/footer.yml +1 -1
- data/lib/templates/schemaless/navigation.yml +2 -2
- data/lib/templates/single-app-config.ru +5 -2
- metadata +10 -4
- data/lib/templates/schemaless/social-toolbar.yml +0 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 88ef906109933b28d1cfbf6180ccd1ed45868dc5
|
|
4
|
+
data.tar.gz: b3a6e1c4612aee3588b5f83fc3891261d9f6e62d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9f5435351543fe6ba8d0eac5702d62985547ff8ba11c3cf7b2dde0cf890d152687e6a4de7a2d3febaa2252b9fe1936d3d70b99c5ffb45778344b7c9e433ac20a
|
|
7
|
+
data.tar.gz: e140980604369a5de75760584bcf8869f265a35966a85f59b5d3e1c4cbbae00ab61dc7bd61e19b72524eccb57d3f40b6fef6fff3259dce3b476f79b55155edbb
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
soupcms-cli (0.5.
|
|
4
|
+
soupcms-cli (0.5.4)
|
|
5
5
|
bson_ext (~> 1.10)
|
|
6
6
|
mongo (~> 1.10)
|
|
7
7
|
thor (~> 0.19)
|
|
@@ -9,28 +9,28 @@ PATH
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
-
bson (1.10.
|
|
13
|
-
bson_ext (1.10.
|
|
14
|
-
bson (~> 1.10.
|
|
12
|
+
bson (1.10.1)
|
|
13
|
+
bson_ext (1.10.1)
|
|
14
|
+
bson (~> 1.10.1)
|
|
15
15
|
diff-lcs (1.2.5)
|
|
16
|
-
mongo (1.10.
|
|
17
|
-
bson (~> 1.10.
|
|
16
|
+
mongo (1.10.1)
|
|
17
|
+
bson (~> 1.10.1)
|
|
18
18
|
rack (1.5.2)
|
|
19
19
|
rack-test (0.6.2)
|
|
20
20
|
rack (>= 1.0)
|
|
21
|
-
rake (10.
|
|
22
|
-
rspec (3.0.0.
|
|
23
|
-
rspec-core (= 3.0.0.
|
|
24
|
-
rspec-expectations (= 3.0.0.
|
|
25
|
-
rspec-mocks (= 3.0.0.
|
|
26
|
-
rspec-core (3.0.0.
|
|
27
|
-
rspec-support (= 3.0.0.
|
|
28
|
-
rspec-expectations (3.0.0.
|
|
21
|
+
rake (10.3.2)
|
|
22
|
+
rspec (3.0.0.rc1)
|
|
23
|
+
rspec-core (= 3.0.0.rc1)
|
|
24
|
+
rspec-expectations (= 3.0.0.rc1)
|
|
25
|
+
rspec-mocks (= 3.0.0.rc1)
|
|
26
|
+
rspec-core (3.0.0.rc1)
|
|
27
|
+
rspec-support (= 3.0.0.rc1)
|
|
28
|
+
rspec-expectations (3.0.0.rc1)
|
|
29
29
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
30
|
-
rspec-support (= 3.0.0.
|
|
31
|
-
rspec-mocks (3.0.0.
|
|
32
|
-
rspec-support (= 3.0.0.
|
|
33
|
-
rspec-support (3.0.0.
|
|
30
|
+
rspec-support (= 3.0.0.rc1)
|
|
31
|
+
rspec-mocks (3.0.0.rc1)
|
|
32
|
+
rspec-support (= 3.0.0.rc1)
|
|
33
|
+
rspec-support (3.0.0.rc1)
|
|
34
34
|
thor (0.19.1)
|
|
35
35
|
|
|
36
36
|
PLATFORMS
|
|
@@ -39,5 +39,5 @@ PLATFORMS
|
|
|
39
39
|
DEPENDENCIES
|
|
40
40
|
rack-test
|
|
41
41
|
rake
|
|
42
|
-
rspec (~> 3.0.0.
|
|
42
|
+
rspec (~> 3.0.0.rc1)
|
|
43
43
|
soupcms-cli!
|
data/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# soupCMS command line tool
|
|
2
2
|
|
|
3
3
|
soupCMS is still in alpha and experiment stage. So please use it with caution. If you face any problem raise issue with error details and I will be happy to help.
|
|
4
4
|
|
|
@@ -7,5 +7,14 @@ soupCMS is still in alpha and experiment stage. So please use it with caution. I
|
|
|
7
7
|
[Hosting soupCMS](http://blog.soupcms.com/posts/deploying-on-heroku) for more details on how to host your website built using soupCMS.
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
## Release
|
|
11
|
+
|
|
12
|
+
### v0.5.3 (24 April, 2014)
|
|
13
|
+
|
|
14
|
+
1. fixed issue with generating config.ru without hosting support
|
|
15
|
+
2. by default now new application creates new directory, use '-t' option to skip top level directory
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
10
19
|
|
|
11
20
|
|
|
@@ -45,7 +45,7 @@ module SoupCMS
|
|
|
45
45
|
|
|
46
46
|
def conn
|
|
47
47
|
return @conn if @conn
|
|
48
|
-
mongo_uri = ENV["MONGODB_URI_#{app_name}"] || "mongodb://localhost:27017/#{app_name}"
|
|
48
|
+
mongo_uri = ENV["MONGODB_URI_#{app_name}"] || ENV["MONGOLAB_URI"] || "mongodb://localhost:27017/#{app_name}"
|
|
49
49
|
@conn = Mongo::MongoClient.from_uri(mongo_uri)
|
|
50
50
|
end
|
|
51
51
|
|
data/lib/soupcms/cli/version.rb
CHANGED
data/lib/soupcms/soupcms_cli.rb
CHANGED
|
@@ -38,15 +38,22 @@ class SoupCMSCLI < Thor
|
|
|
38
38
|
top_dir = options.skip_dir? ? '.' : name
|
|
39
39
|
data_folder = "#{top_dir}/data/#{name}"
|
|
40
40
|
if configs[:blog]
|
|
41
|
-
template 'lib/templates/pages/
|
|
41
|
+
template 'lib/templates/pages/post.yml',"#{data_folder}/pages/post.yml"
|
|
42
42
|
template 'lib/templates/pages/posts.yml',"#{data_folder}/pages/posts.yml"
|
|
43
43
|
end
|
|
44
44
|
copy_file 'lib/templates/public/favicon.png', "#{top_dir}/public/favicon.png"
|
|
45
|
+
copy_file 'lib/templates/public/favicon.ico', "#{top_dir}/public/favicon.ico"
|
|
45
46
|
copy_file 'lib/templates/public/common/stylesheets/_custom-variables.scss', "#{top_dir}/public/common/stylesheets/_custom-variables.scss"
|
|
46
47
|
|
|
47
48
|
template 'lib/templates/schemaless/footer.yml',"#{data_folder}/schemaless/footer.yml"
|
|
48
49
|
template 'lib/templates/schemaless/navigation.yml',"#{data_folder}/schemaless/navigation.yml"
|
|
49
|
-
template 'lib/templates/schemaless/
|
|
50
|
+
template 'lib/templates/schemaless/author.yml',"#{data_folder}/schemaless/author.yml"
|
|
51
|
+
|
|
52
|
+
template 'lib/templates/modules/author.yml',"#{data_folder}/modules/author.yml"
|
|
53
|
+
template 'lib/templates/modules/navigation.yml',"#{data_folder}/modules/navigation.yml"
|
|
54
|
+
template 'lib/templates/modules/projects.yml',"#{data_folder}/modules/projects.yml"
|
|
55
|
+
template 'lib/templates/modules/tag-cloud.yml',"#{data_folder}/modules/tag-cloud.yml"
|
|
56
|
+
template 'lib/templates/modules/share-this.yml',"#{data_folder}/modules/share-this.yml"
|
|
50
57
|
|
|
51
58
|
template 'lib/templates/pages/default.yml',"#{data_folder}/pages/default.yml"
|
|
52
59
|
template 'lib/templates/pages/home.yml',"#{data_folder}/pages/home.yml"
|
|
@@ -64,7 +71,6 @@ class SoupCMSCLI < Thor
|
|
|
64
71
|
end
|
|
65
72
|
end
|
|
66
73
|
|
|
67
|
-
|
|
68
74
|
create_file "#{top_dir}/data/#{name}/_config.yml", YAML.dump(JSON.parse(configs.to_json))
|
|
69
75
|
end
|
|
70
76
|
|
|
@@ -72,7 +78,7 @@ class SoupCMSCLI < Thor
|
|
|
72
78
|
def post(name, top_dir = '.')
|
|
73
79
|
configs[:name] = name
|
|
74
80
|
configs[:title] = ask('Title for the new post? (20 to 30 char) :', :green)
|
|
75
|
-
sanitize_title = configs[:title]
|
|
81
|
+
sanitize_title = sanatize(configs[:title])
|
|
76
82
|
configs[:sanitize_title] = sanitize_title
|
|
77
83
|
tags = ask('Tags as comma separated list:', :green)
|
|
78
84
|
configs[:tags] = tags.split(',')
|
|
@@ -129,6 +135,11 @@ class SoupCMSCLI < Thor
|
|
|
129
135
|
File.join(File.dirname(__FILE__), '../..')
|
|
130
136
|
end
|
|
131
137
|
|
|
138
|
+
private
|
|
139
|
+
def sanatize(value)
|
|
140
|
+
value.gsub(/\W/, '-').gsub('--','-').downcase
|
|
141
|
+
end
|
|
142
|
+
|
|
132
143
|
|
|
133
144
|
end
|
|
134
145
|
|
data/lib/templates/Gemfile
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
source 'https://rubygems.org'
|
|
2
2
|
ruby '2.1.1'
|
|
3
3
|
|
|
4
|
-
gem 'soupcms-cli'
|
|
4
|
+
gem 'soupcms-cli', github: 'soupcms/soupcms-cli'
|
|
5
5
|
gem 'soupcms-common', github: 'soupcms/soupcms-common'
|
|
6
6
|
gem 'soupcms-core', github: 'soupcms/soupcms-core'
|
|
7
7
|
gem 'soupcms-api', github: 'soupcms/soupcms-api'
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
# blog post attributes in front matter format
|
|
3
3
|
tags: [<%= configs[:tags].join(",") %>]
|
|
4
4
|
title: <%= configs[:title] %>
|
|
5
|
-
publish_datetime: 2014-01-01T00:00:07.0Z
|
|
5
|
+
publish_datetime: 2014-01-01T00:00:07.0Z # change date in future for draft article
|
|
6
6
|
description: Write post description here...
|
|
7
|
+
#slug: change-it-to-define-slug-for-the-post # default slug is sanitized file name
|
|
7
8
|
---
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
## Markdown documentation
|
|
10
11
|
|
|
11
12
|
This is [markdown template](http://kramdown.gettalong.org/index.html) and quick reference of the markdown language is available [here](http://kramdown.gettalong.org/quickref.html).
|
|
12
13
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
doc_id: projects
|
|
3
|
+
|
|
4
|
+
recipes:
|
|
5
|
+
-
|
|
6
|
+
type: http
|
|
7
|
+
url: "#{context.application.soupcms_api_url}/schemaless/doc_id/author"
|
|
8
|
+
get: "result['projects']"
|
|
9
|
+
return: articles
|
|
10
|
+
template:
|
|
11
|
+
type: slim
|
|
12
|
+
name: bootstrap/list-view
|
|
13
|
+
config:
|
|
14
|
+
title: My Projects
|
|
@@ -15,17 +15,7 @@
|
|
|
15
15
|
-
|
|
16
16
|
name: header
|
|
17
17
|
modules:
|
|
18
|
-
-
|
|
19
|
-
recipes:
|
|
20
|
-
-
|
|
21
|
-
type: soupcms-api
|
|
22
|
-
model: schemaless
|
|
23
|
-
match:
|
|
24
|
-
name: navigation
|
|
25
|
-
return: navigation
|
|
26
|
-
template:
|
|
27
|
-
type: slim
|
|
28
|
-
name: bootstrap/navigation
|
|
18
|
+
- navigation
|
|
29
19
|
-
|
|
30
20
|
recipes:
|
|
31
21
|
-
|
|
@@ -44,11 +34,11 @@
|
|
|
44
34
|
recipes:
|
|
45
35
|
-
|
|
46
36
|
type: http
|
|
47
|
-
url: "#{context.application.soupcms_api_url}/schemaless/
|
|
48
|
-
return:
|
|
37
|
+
url: "#{context.application.soupcms_api_url}/schemaless/doc_id/author"
|
|
38
|
+
return: author
|
|
49
39
|
template:
|
|
50
40
|
type: slim
|
|
51
|
-
name: bootstrap/
|
|
41
|
+
name: bootstrap/author
|
|
52
42
|
-
|
|
53
43
|
recipes:
|
|
54
44
|
-
|
|
@@ -67,7 +57,7 @@
|
|
|
67
57
|
type: soupcms-api
|
|
68
58
|
model: schemaless
|
|
69
59
|
match:
|
|
70
|
-
|
|
60
|
+
doc_id: footer
|
|
71
61
|
return: footer
|
|
72
62
|
template:
|
|
73
63
|
type: slim
|
|
@@ -5,16 +5,10 @@
|
|
|
5
5
|
-
|
|
6
6
|
name: sidebar
|
|
7
7
|
modules:
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
url: "#{context.application.soupcms_api_url}/schemaless/name/social-toolbar"
|
|
13
|
-
return: social-toolbar
|
|
14
|
-
template:
|
|
15
|
-
type: slim
|
|
16
|
-
name: bootstrap/social-toolbar
|
|
17
|
-
-
|
|
8
|
+
- author
|
|
9
|
+
- projects
|
|
10
|
+
- share-this
|
|
11
|
+
-
|
|
18
12
|
recipes:
|
|
19
13
|
-
|
|
20
14
|
type: soupcms-api
|
|
@@ -37,15 +31,7 @@
|
|
|
37
31
|
name: bootstrap/table-of-content
|
|
38
32
|
config:
|
|
39
33
|
title: Contents
|
|
40
|
-
-
|
|
41
|
-
recipes:
|
|
42
|
-
-
|
|
43
|
-
type: soupcms-api
|
|
44
|
-
url: posts/tag-cloud
|
|
45
|
-
return: tag-cloud
|
|
46
|
-
template:
|
|
47
|
-
type: slim
|
|
48
|
-
name: bootstrap/tag-cloud
|
|
34
|
+
- tag-cloud
|
|
49
35
|
-
|
|
50
36
|
recipes:
|
|
51
37
|
-
|
|
@@ -54,7 +40,7 @@
|
|
|
54
40
|
fields:
|
|
55
41
|
- title
|
|
56
42
|
- slug
|
|
57
|
-
limit:
|
|
43
|
+
limit: 0
|
|
58
44
|
return: articles
|
|
59
45
|
template:
|
|
60
46
|
type: slim
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
doc_id: author
|
|
3
|
+
|
|
4
|
+
name: <%= configs[:name] %>
|
|
5
|
+
bio:
|
|
6
|
+
- Author short bio like twitter line 1
|
|
7
|
+
- bio line 2
|
|
8
|
+
- as many lines as you want
|
|
9
|
+
- fully optional
|
|
10
|
+
thumbnail: http://www.gravatar.com/avatar/f40c60ffb60255ae89e75ccbb8eb303c.png
|
|
11
|
+
email: <%= configs[:name] %>@email.com
|
|
12
|
+
twitter_handle: <%= configs[:name] %>
|
|
13
|
+
github_username: <%= configs[:name] %>
|
|
14
|
+
|
|
@@ -6,7 +6,7 @@ require 'soupcms/api'
|
|
|
6
6
|
|
|
7
7
|
SoupCMS::Common::Strategy::Application::SingleApp.configure do |app|
|
|
8
8
|
app.app_name = "<%= configs[:name] %>"
|
|
9
|
-
app.display_name = "<%= configs[:
|
|
9
|
+
app.display_name = "<%= configs[:display_name] %>"
|
|
10
10
|
<%- if configs[:site_name] %>
|
|
11
11
|
if ENV['RACK_ENV'] == 'production'
|
|
12
12
|
app.soupcms_api_url = '<%= configs[:site_name] %>/api'
|
|
@@ -32,8 +32,8 @@ end
|
|
|
32
32
|
PUBLIC_DIR = File.join(File.dirname(__FILE__), 'public')
|
|
33
33
|
map '/assets' do
|
|
34
34
|
sprockets = SoupCMSCore.config.sprockets
|
|
35
|
-
sprockets.append_path SoupCMS::Core::Template::Manager::DEFAULT_TEMPLATE_DIR
|
|
36
35
|
sprockets.append_path PUBLIC_DIR
|
|
36
|
+
sprockets.append_path SoupCMS::Core::Template::Manager::DEFAULT_TEMPLATE_DIR
|
|
37
37
|
Sprockets::Helpers.configure do |config|
|
|
38
38
|
config.environment = sprockets
|
|
39
39
|
config.prefix = '/assets'
|
|
@@ -48,8 +48,11 @@ map '/' do
|
|
|
48
48
|
config.application_strategy = SoupCMS::Common::Strategy::Application::SingleApp
|
|
49
49
|
end
|
|
50
50
|
soup_cms_rack_app = SoupCMSRackApp.new
|
|
51
|
+
soup_cms_rack_app.set_redirect('http://localhost:9292','http://localhost:9292/home')
|
|
52
|
+
soup_cms_rack_app.set_redirect('http://localhost:9292/','http://localhost:9292/home')
|
|
51
53
|
<%- if configs[:site_name] %>
|
|
52
54
|
soup_cms_rack_app.set_redirect('<%= configs[:site_name] %>','<%= configs[:site_name] %>/home')
|
|
55
|
+
soup_cms_rack_app.set_redirect('<%= configs[:site_name] %>/','<%= configs[:site_name] %>/home')
|
|
53
56
|
<%- end %>
|
|
54
57
|
run soup_cms_rack_app
|
|
55
58
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: soupcms-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sunit Parekh
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-05-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|
|
@@ -88,18 +88,24 @@ files:
|
|
|
88
88
|
- lib/templates/Gemfile
|
|
89
89
|
- lib/templates/Procfile
|
|
90
90
|
- lib/templates/blog/my-first-post.md
|
|
91
|
+
- lib/templates/modules/author.yml
|
|
92
|
+
- lib/templates/modules/navigation.yml
|
|
93
|
+
- lib/templates/modules/projects.yml
|
|
94
|
+
- lib/templates/modules/share-this.yml
|
|
95
|
+
- lib/templates/modules/tag-cloud.yml
|
|
91
96
|
- lib/templates/pages/about.md
|
|
92
|
-
- lib/templates/pages/blog-post.yml
|
|
93
97
|
- lib/templates/pages/default.yml
|
|
94
98
|
- lib/templates/pages/home.yml
|
|
99
|
+
- lib/templates/pages/post.yml
|
|
95
100
|
- lib/templates/pages/posts.yml
|
|
96
101
|
- lib/templates/public/blog/posts/images/my-first-post.png
|
|
97
102
|
- lib/templates/public/blog/posts/images/my-first-post/1-post-image.png
|
|
98
103
|
- lib/templates/public/common/stylesheets/_custom-variables.scss
|
|
104
|
+
- lib/templates/public/favicon.ico
|
|
99
105
|
- lib/templates/public/favicon.png
|
|
106
|
+
- lib/templates/schemaless/author.yml
|
|
100
107
|
- lib/templates/schemaless/footer.yml
|
|
101
108
|
- lib/templates/schemaless/navigation.yml
|
|
102
|
-
- lib/templates/schemaless/social-toolbar.yml
|
|
103
109
|
- lib/templates/single-app-config.ru
|
|
104
110
|
- soupcms-cli.gemspec
|
|
105
111
|
- spec/sopucms-site/dummy_spec.rb
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: social-toolbar
|
|
3
|
-
|
|
4
|
-
twitter: http://www.twitter.com/<%= configs[:name] %> # update or remove if not needed
|
|
5
|
-
facebook: http://www.facebook.com/<%= configs[:name] %> # update or remove if not needed
|
|
6
|
-
github: https://www.github.com/<%= configs[:name] %> # update or remove if not needed
|
|
7
|
-
plus: https://plus.google.com/+<%= configs[:name] %> # update or remove if not needed
|