delphivm 0.7.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 +7 -0
- data/.gitignore +5 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +20 -0
- data/README.md +15 -0
- data/Thorfile.thor +24 -0
- data/bin/delphivm.rb +28 -0
- data/delphi_PROJECTICON.ico +0 -0
- data/delphivm.gemspec +25 -0
- data/dvmimports.org/.gitignore +10 -0
- data/dvmimports.org/404.html +1 -0
- data/dvmimports.org/Rakefile +294 -0
- data/dvmimports.org/_config.yml +124 -0
- data/dvmimports.org/_includes/JB/analytics +12 -0
- data/dvmimports.org/_includes/JB/analytics-providers/getclicky +12 -0
- data/dvmimports.org/_includes/JB/analytics-providers/google +11 -0
- data/dvmimports.org/_includes/JB/categories_list +37 -0
- data/dvmimports.org/_includes/JB/comments +16 -0
- data/dvmimports.org/_includes/JB/comments-providers/disqus +13 -0
- data/dvmimports.org/_includes/JB/comments-providers/facebook +9 -0
- data/dvmimports.org/_includes/JB/comments-providers/intensedebate +6 -0
- data/dvmimports.org/_includes/JB/comments-providers/livefyre +6 -0
- data/dvmimports.org/_includes/JB/liquid_raw +32 -0
- data/dvmimports.org/_includes/JB/pages_list +37 -0
- data/dvmimports.org/_includes/JB/posts_collate +55 -0
- data/dvmimports.org/_includes/JB/setup +22 -0
- data/dvmimports.org/_includes/JB/sharing +8 -0
- data/dvmimports.org/_includes/JB/tags_list +33 -0
- data/dvmimports.org/_includes/themes/twitter/default.html +59 -0
- data/dvmimports.org/_includes/themes/twitter/page.html +9 -0
- data/dvmimports.org/_includes/themes/twitter/post.html +40 -0
- data/dvmimports.org/_includes/themes/twitter/settings.yml +2 -0
- data/dvmimports.org/_layouts/default.html +6 -0
- data/dvmimports.org/_layouts/page.html +5 -0
- data/dvmimports.org/_layouts/post.html +5 -0
- data/dvmimports.org/_plugins/debug.rb +38 -0
- data/dvmimports.org/_plugins/gallery.rb +41 -0
- data/dvmimports.org/archive.html +10 -0
- data/dvmimports.org/assets/themes/twitter/css/1.4.0/bootstrap.css +356 -0
- data/dvmimports.org/assets/themes/twitter/css/style.css +71 -0
- data/dvmimports.org/atom.xml +28 -0
- data/dvmimports.org/categories.html +22 -0
- data/dvmimports.org/download.md +16 -0
- data/dvmimports.org/index.md +21 -0
- data/dvmimports.org/pages.html +13 -0
- data/dvmimports.org/sitemap.txt +8 -0
- data/dvmimports.org/tags.html +21 -0
- data/lib/delphivm/dsl.rb +93 -0
- data/lib/delphivm/ide_services.rb +152 -0
- data/lib/delphivm/version.rb +7 -0
- data/lib/delphivm.rb +167 -0
- data/lib/extensions.rb +37 -0
- data/lib/tasks/ide.thor +38 -0
- data/lib/tasks/project.thor +73 -0
- data/lib/tasks/vendor.thor +73 -0
- data/vendor/imports.dvm +11 -0
- metadata +128 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b31549013b9505373f9aed7b53695610617c4dff
|
4
|
+
data.tar.gz: 41380a2214f9e579837d4311a85c49af8dfefda5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 876d2da58ccbc3b4c5b7fdcc3d356ece4e468cb95a6d862e1803ac0380665249ff4a571ac98b2a16a7a90ff3c23b6ad17b9b7a338d34a7e889f0dc5c9c5f99e9
|
7
|
+
data.tar.gz: 0679b68789c8be610a1af11eb34786bb8a7842b7e2052137a10304ecd85156fa44d350a07a6867a89dec52d3c682a8767531bab28352c6dc7b39386292b6c2fa
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
nokogiri (1.5.7.rc3-x86-mingw32)
|
5
|
+
ocra (1.3.0)
|
6
|
+
ruby-progressbar (0.0.10)
|
7
|
+
rubyzip (0.9.6.1)
|
8
|
+
thor (0.14.6)
|
9
|
+
version_info (1.7.2)
|
10
|
+
|
11
|
+
PLATFORMS
|
12
|
+
x86-mingw32
|
13
|
+
|
14
|
+
DEPENDENCIES
|
15
|
+
nokogiri (= 1.5.7.rc3)
|
16
|
+
ocra
|
17
|
+
ruby-progressbar
|
18
|
+
rubyzip
|
19
|
+
thor
|
20
|
+
version_info
|
data/README.md
ADDED
data/Thorfile.thor
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'version_info'
|
3
|
+
|
4
|
+
$LOAD_PATH << Pathname(__FILE__).dirname + 'lib'
|
5
|
+
require 'delphivm/version'
|
6
|
+
|
7
|
+
VersionInfo.install_tasks(:target => Delphivm)
|
8
|
+
|
9
|
+
|
10
|
+
module Thor::Util
|
11
|
+
SEARCH_ROOT = File.dirname(__FILE__)
|
12
|
+
# redefine to search tasks only for this app
|
13
|
+
def self.load_thorfile(path, content=nil, debug=false)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
class Build < Thor
|
18
|
+
desc "ocra", "compile script with ocra"
|
19
|
+
def ocra
|
20
|
+
root = Pathname.getwd
|
21
|
+
(root + 'out').mkpath
|
22
|
+
system "ocra --icon delphi_PROJECTICON.ico --output ./out/DelphiVM.exe --no-enc --gem-full --console bin\\delphivm.rb **\\*.thor"
|
23
|
+
end
|
24
|
+
end
|
data/bin/delphivm.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: UTF-8
|
3
|
+
begin
|
4
|
+
$LOAD_PATH.unshift File.join(File.dirname($0), '..', 'lib')
|
5
|
+
|
6
|
+
require 'DelphiVM'
|
7
|
+
|
8
|
+
if ARGV[0] == 'backtrace'
|
9
|
+
::BACKTRACE = true
|
10
|
+
ARGV.shift
|
11
|
+
end
|
12
|
+
|
13
|
+
ARGV << 'vendor:import' << '-c' if defined? Ocra #to see all requires when compiling
|
14
|
+
|
15
|
+
$0 = Pathname($0).basename('.rb').to_s
|
16
|
+
|
17
|
+
$thor_runner = true
|
18
|
+
Delphivm::Runner.start(ARGV)
|
19
|
+
|
20
|
+
rescue Interrupt => e
|
21
|
+
puts "\nQuitting..."
|
22
|
+
puts e.backtrace.join("\n") if defined? ::BACKTRACE
|
23
|
+
exit 1
|
24
|
+
rescue Exception => e
|
25
|
+
puts e.message
|
26
|
+
puts e.backtrace.join("\n") if defined? ::BACKTRACE
|
27
|
+
exit 1
|
28
|
+
end
|
Binary file
|
data/delphivm.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "version_info"
|
4
|
+
require "delphivm/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "delphivm"
|
8
|
+
s.version = Delphivm::VERSION
|
9
|
+
s.platform = Gem::Platform::RUBY
|
10
|
+
s.authors = ["Jorge L. Cangas"]
|
11
|
+
s.email = ["jorge.cangas@gmail.com"]
|
12
|
+
s.homepage = "http://github.com/jcangas/delphivm"
|
13
|
+
s.summary = %q{A Ruby gem to manage your multi-IDE delphi projects: build, genenrate docs, and any custom task you want}
|
14
|
+
s.description = %q{Easy way to invoke tasks for all your IDE versions from the command line}
|
15
|
+
|
16
|
+
s.rubyforge_project = "delphivm"
|
17
|
+
|
18
|
+
s.files = `git ls-files`.split("\n")
|
19
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
20
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
21
|
+
s.require_paths = ["lib"]
|
22
|
+
|
23
|
+
s.add_development_dependency "bundler"
|
24
|
+
s.add_development_dependency "rake"
|
25
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
Sorry this page does not exist =(
|
@@ -0,0 +1,294 @@
|
|
1
|
+
require "rubygems"
|
2
|
+
require 'rake'
|
3
|
+
require 'yaml'
|
4
|
+
|
5
|
+
SOURCE = "."
|
6
|
+
CONFIG = {
|
7
|
+
'version' => "0.2.0",
|
8
|
+
'themes' => File.join(SOURCE, "_includes", "themes"),
|
9
|
+
'layouts' => File.join(SOURCE, "_layouts"),
|
10
|
+
'posts' => File.join(SOURCE, "_posts"),
|
11
|
+
'post_ext' => "md",
|
12
|
+
'theme_package_version' => "0.1.0"
|
13
|
+
}
|
14
|
+
|
15
|
+
# Path configuration helper
|
16
|
+
module JB
|
17
|
+
class Path
|
18
|
+
SOURCE = "."
|
19
|
+
Paths = {
|
20
|
+
:layouts => "_layouts",
|
21
|
+
:themes => "_includes/themes",
|
22
|
+
:theme_assets => "assets/themes",
|
23
|
+
:theme_packages => "_theme_packages",
|
24
|
+
:posts => "_posts"
|
25
|
+
}
|
26
|
+
|
27
|
+
def self.base
|
28
|
+
SOURCE
|
29
|
+
end
|
30
|
+
|
31
|
+
# build a path relative to configured path settings.
|
32
|
+
def self.build(path, opts = {})
|
33
|
+
opts[:root] ||= SOURCE
|
34
|
+
path = "#{opts[:root]}/#{Paths[path.to_sym]}/#{opts[:node]}".split("/")
|
35
|
+
path.compact!
|
36
|
+
File.__send__ :join, path
|
37
|
+
end
|
38
|
+
|
39
|
+
end #Path
|
40
|
+
end #JB
|
41
|
+
|
42
|
+
# Usage: rake post title="A Title"
|
43
|
+
desc "Begin a new post in #{CONFIG['posts']}"
|
44
|
+
task :post do
|
45
|
+
abort("rake aborted: '#{CONFIG['posts']}' directory not found.") unless FileTest.directory?(CONFIG['posts'])
|
46
|
+
title = ENV["title"] || "new-post"
|
47
|
+
slug = title.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '')
|
48
|
+
filename = File.join(CONFIG['posts'], "#{Time.now.strftime('%Y-%m-%d')}-#{slug}.#{CONFIG['post_ext']}")
|
49
|
+
if File.exist?(filename)
|
50
|
+
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
|
51
|
+
end
|
52
|
+
|
53
|
+
puts "Creating new post: #{filename}"
|
54
|
+
open(filename, 'w') do |post|
|
55
|
+
post.puts "---"
|
56
|
+
post.puts "layout: post"
|
57
|
+
post.puts "title: \"#{title.gsub(/-/,' ')}\""
|
58
|
+
post.puts "category: "
|
59
|
+
post.puts "tags: []"
|
60
|
+
post.puts "---"
|
61
|
+
post.puts "{% include JB/setup %}"
|
62
|
+
end
|
63
|
+
end # task :post
|
64
|
+
|
65
|
+
# Usage: rake page name="about.html"
|
66
|
+
# You can also specify a sub-directory path.
|
67
|
+
# If you don't specify a file extention we create an index.html at the path specified
|
68
|
+
desc "Create a new page."
|
69
|
+
task :page do
|
70
|
+
name = ENV["name"] || "new-page.md"
|
71
|
+
filename = File.join(SOURCE, "#{name}")
|
72
|
+
filename = File.join(filename, "index.html") if File.extname(filename) == ""
|
73
|
+
title = File.basename(filename, File.extname(filename)).gsub(/[\W\_]/, " ").gsub(/\b\w/){$&.upcase}
|
74
|
+
if File.exist?(filename)
|
75
|
+
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
|
76
|
+
end
|
77
|
+
|
78
|
+
mkdir_p File.dirname(filename)
|
79
|
+
puts "Creating new page: #{filename}"
|
80
|
+
open(filename, 'w') do |post|
|
81
|
+
post.puts "---"
|
82
|
+
post.puts "layout: page"
|
83
|
+
post.puts "title: \"#{title}\""
|
84
|
+
post.puts "---"
|
85
|
+
post.puts "{% include JB/setup %}"
|
86
|
+
end
|
87
|
+
end # task :page
|
88
|
+
|
89
|
+
desc "Launch preview environment"
|
90
|
+
task :preview do
|
91
|
+
system "jekyll --auto --server"
|
92
|
+
end # task :preview
|
93
|
+
|
94
|
+
# Public: Alias - Maintains backwards compatability for theme switching.
|
95
|
+
task :switch_theme => "theme:switch"
|
96
|
+
|
97
|
+
namespace :theme do
|
98
|
+
|
99
|
+
# Public: Switch from one theme to another for your blog.
|
100
|
+
#
|
101
|
+
# name - String, Required. name of the theme you want to switch to.
|
102
|
+
# The the theme must be installed into your JB framework.
|
103
|
+
#
|
104
|
+
# Examples
|
105
|
+
#
|
106
|
+
# rake theme:switch name="the-program"
|
107
|
+
#
|
108
|
+
# Returns Success/failure messages.
|
109
|
+
desc "Switch between Jekyll-bootstrap themes."
|
110
|
+
task :switch do
|
111
|
+
theme_name = ENV["name"].to_s
|
112
|
+
theme_path = File.join(CONFIG['themes'], theme_name)
|
113
|
+
settings_file = File.join(theme_path, "settings.yml")
|
114
|
+
non_layout_files = ["settings.yml"]
|
115
|
+
|
116
|
+
abort("rake aborted: name cannot be blank") if theme_name.empty?
|
117
|
+
abort("rake aborted: '#{theme_path}' directory not found.") unless FileTest.directory?(theme_path)
|
118
|
+
abort("rake aborted: '#{CONFIG['layouts']}' directory not found.") unless FileTest.directory?(CONFIG['layouts'])
|
119
|
+
|
120
|
+
Dir.glob("#{theme_path}/*") do |filename|
|
121
|
+
next if non_layout_files.include?(File.basename(filename).downcase)
|
122
|
+
puts "Generating '#{theme_name}' layout: #{File.basename(filename)}"
|
123
|
+
|
124
|
+
open(File.join(CONFIG['layouts'], File.basename(filename)), 'w') do |page|
|
125
|
+
if File.basename(filename, ".html").downcase == "default"
|
126
|
+
page.puts "---"
|
127
|
+
page.puts File.read(settings_file) if File.exist?(settings_file)
|
128
|
+
page.puts "---"
|
129
|
+
else
|
130
|
+
page.puts "---"
|
131
|
+
page.puts "layout: default"
|
132
|
+
page.puts "---"
|
133
|
+
end
|
134
|
+
page.puts "{% include JB/setup %}"
|
135
|
+
page.puts "{% include themes/#{theme_name}/#{File.basename(filename)} %}"
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
puts "=> Theme successfully switched!"
|
140
|
+
puts "=> Reload your web-page to check it out =)"
|
141
|
+
end # task :switch
|
142
|
+
|
143
|
+
# Public: Install a theme using the theme packager.
|
144
|
+
# Version 0.1.0 simple 1:1 file matching.
|
145
|
+
#
|
146
|
+
# git - String, Optional path to the git repository of the theme to be installed.
|
147
|
+
# name - String, Optional name of the theme you want to install.
|
148
|
+
# Passing name requires that the theme package already exist.
|
149
|
+
#
|
150
|
+
# Examples
|
151
|
+
#
|
152
|
+
# rake theme:install git="https://github.com/jekyllbootstrap/theme-twitter.git"
|
153
|
+
# rake theme:install name="cool-theme"
|
154
|
+
#
|
155
|
+
# Returns Success/failure messages.
|
156
|
+
desc "Install theme"
|
157
|
+
task :install do
|
158
|
+
if ENV["git"]
|
159
|
+
manifest = theme_from_git_url(ENV["git"])
|
160
|
+
name = manifest["name"]
|
161
|
+
else
|
162
|
+
name = ENV["name"].to_s.downcase
|
163
|
+
end
|
164
|
+
|
165
|
+
packaged_theme_path = JB::Path.build(:theme_packages, :node => name)
|
166
|
+
|
167
|
+
abort("rake aborted!
|
168
|
+
=> ERROR: 'name' cannot be blank") if name.empty?
|
169
|
+
abort("rake aborted!
|
170
|
+
=> ERROR: '#{packaged_theme_path}' directory not found.
|
171
|
+
=> Installable themes can be added via git. You can find some here: http://github.com/jekyllbootstrap
|
172
|
+
=> To download+install run: `rake theme:install git='[PUBLIC-CLONE-URL]'`
|
173
|
+
=> example : rake theme:install git='git@github.com:jekyllbootstrap/theme-the-program.git'
|
174
|
+
") unless FileTest.directory?(packaged_theme_path)
|
175
|
+
|
176
|
+
manifest = verify_manifest(packaged_theme_path)
|
177
|
+
|
178
|
+
# Get relative paths to packaged theme files
|
179
|
+
# Exclude directories as they'll be recursively created. Exclude meta-data files.
|
180
|
+
packaged_theme_files = []
|
181
|
+
FileUtils.cd(packaged_theme_path) {
|
182
|
+
Dir.glob("**/*.*") { |f|
|
183
|
+
next if ( FileTest.directory?(f) || f =~ /^(manifest|readme|packager)/i )
|
184
|
+
packaged_theme_files << f
|
185
|
+
}
|
186
|
+
}
|
187
|
+
|
188
|
+
# Mirror each file into the framework making sure to prompt if already exists.
|
189
|
+
packaged_theme_files.each do |filename|
|
190
|
+
file_install_path = File.join(JB::Path.base, filename)
|
191
|
+
if File.exist? file_install_path
|
192
|
+
next if ask("#{file_install_path} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
|
193
|
+
else
|
194
|
+
mkdir_p File.dirname(file_install_path)
|
195
|
+
cp_r File.join(packaged_theme_path, filename), file_install_path
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
puts "=> #{name} theme has been installed!"
|
200
|
+
puts "=> ---"
|
201
|
+
if ask("=> Want to switch themes now?", ['y', 'n']) == 'y'
|
202
|
+
system("rake switch_theme name='#{name}'")
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
# Public: Package a theme using the theme packager.
|
207
|
+
# The theme must be structured using valid JB API.
|
208
|
+
# In other words packaging is essentially the reverse of installing.
|
209
|
+
#
|
210
|
+
# name - String, Required name of the theme you want to package.
|
211
|
+
#
|
212
|
+
# Examples
|
213
|
+
#
|
214
|
+
# rake theme:package name="twitter"
|
215
|
+
#
|
216
|
+
# Returns Success/failure messages.
|
217
|
+
desc "Package theme"
|
218
|
+
task :package do
|
219
|
+
name = ENV["name"].to_s.downcase
|
220
|
+
theme_path = JB::Path.build(:themes, :node => name)
|
221
|
+
asset_path = JB::Path.build(:theme_assets, :node => name)
|
222
|
+
|
223
|
+
abort("rake aborted: name cannot be blank") if name.empty?
|
224
|
+
abort("rake aborted: '#{theme_path}' directory not found.") unless FileTest.directory?(theme_path)
|
225
|
+
abort("rake aborted: '#{asset_path}' directory not found.") unless FileTest.directory?(asset_path)
|
226
|
+
|
227
|
+
## Mirror theme's template directory (_includes)
|
228
|
+
packaged_theme_path = JB::Path.build(:themes, :root => JB::Path.build(:theme_packages, :node => name))
|
229
|
+
mkdir_p packaged_theme_path
|
230
|
+
cp_r theme_path, packaged_theme_path
|
231
|
+
|
232
|
+
## Mirror theme's asset directory
|
233
|
+
packaged_theme_assets_path = JB::Path.build(:theme_assets, :root => JB::Path.build(:theme_packages, :node => name))
|
234
|
+
mkdir_p packaged_theme_assets_path
|
235
|
+
cp_r asset_path, packaged_theme_assets_path
|
236
|
+
|
237
|
+
## Log packager version
|
238
|
+
packager = {"packager" => {"version" => CONFIG["theme_package_version"].to_s } }
|
239
|
+
open(JB::Path.build(:theme_packages, :node => "#{name}/packager.yml"), "w") do |page|
|
240
|
+
page.puts packager.to_yaml
|
241
|
+
end
|
242
|
+
|
243
|
+
puts "=> '#{name}' theme is packaged and available at: #{JB::Path.build(:theme_packages, :node => name)}"
|
244
|
+
end
|
245
|
+
|
246
|
+
end # end namespace :theme
|
247
|
+
|
248
|
+
# Internal: Download and process a theme from a git url.
|
249
|
+
# Notice we don't know the name of the theme until we look it up in the manifest.
|
250
|
+
# So we'll have to change the folder name once we get the name.
|
251
|
+
#
|
252
|
+
# url - String, Required url to git repository.
|
253
|
+
#
|
254
|
+
# Returns theme manifest hash
|
255
|
+
def theme_from_git_url(url)
|
256
|
+
tmp_path = JB::Path.build(:theme_packages, :node => "_tmp")
|
257
|
+
system("git clone #{url} #{tmp_path}")
|
258
|
+
manifest = verify_manifest(tmp_path)
|
259
|
+
new_path = JB::Path.build(:theme_packages, :node => manifest["name"])
|
260
|
+
if File.exist?(new_path) && ask("=> #{new_path} theme package already exists. Override?", ['y', 'n']) == 'n'
|
261
|
+
remove_dir(tmp_path)
|
262
|
+
abort("rake aborted: '#{manifest["name"]}' already exists as theme package.")
|
263
|
+
end
|
264
|
+
|
265
|
+
remove_dir(new_path) if File.exist?(new_path)
|
266
|
+
mv(tmp_path, new_path)
|
267
|
+
manifest
|
268
|
+
end
|
269
|
+
|
270
|
+
# Internal: Process theme package manifest file.
|
271
|
+
#
|
272
|
+
# theme_path - String, Required. File path to theme package.
|
273
|
+
#
|
274
|
+
# Returns theme manifest hash
|
275
|
+
def verify_manifest(theme_path)
|
276
|
+
manifest = File.join(theme_path, "manifest.yml")
|
277
|
+
abort("rake aborted: repo must contain valid manifest.yml") unless File.exist? manifest
|
278
|
+
manifest = YAML.load_file(manifest)
|
279
|
+
manifest
|
280
|
+
end
|
281
|
+
|
282
|
+
def ask(message, valid_options)
|
283
|
+
if valid_options
|
284
|
+
answer = get_stdin("#{message} #{valid_options.to_s.gsub(/"/, '').gsub(/, /,'/')} ") while !valid_options.include?(answer)
|
285
|
+
else
|
286
|
+
answer = get_stdin(message)
|
287
|
+
end
|
288
|
+
answer
|
289
|
+
end
|
290
|
+
|
291
|
+
def get_stdin(message)
|
292
|
+
print message
|
293
|
+
STDIN.gets.chomp
|
294
|
+
end
|
@@ -0,0 +1,124 @@
|
|
1
|
+
# This is the default format.
|
2
|
+
# For more see: https://github.com/mojombo/jekyll/wiki/Permalinks
|
3
|
+
permalink: /:categories/:year/:month/:day/:title
|
4
|
+
|
5
|
+
exclude: [".rvmrc", ".rbenv-version", "README.md", "Rakefile", "changelog.md"]
|
6
|
+
auto: true
|
7
|
+
pygments: true
|
8
|
+
|
9
|
+
# Themes are encouraged to use these universal variables
|
10
|
+
# so be sure to set them if your theme uses them.
|
11
|
+
#
|
12
|
+
title : dvmimports.org
|
13
|
+
tagline: Site Tagline
|
14
|
+
author :
|
15
|
+
name : Jorge L. Cangas
|
16
|
+
email : jorge.cangas@gmail.com
|
17
|
+
github : jcangas
|
18
|
+
twitter : jcangas
|
19
|
+
feedburner : feedname
|
20
|
+
|
21
|
+
# The production_url is only used when full-domain names are needed
|
22
|
+
# such as sitemap.txt
|
23
|
+
# Most places will/should use BASE_PATH to make the urls
|
24
|
+
#
|
25
|
+
# If you have set a CNAME (pages.github.com) set your custom domain here.
|
26
|
+
# Else if you are pushing to username.github.com, replace with your username.
|
27
|
+
# Finally if you are pushing to a GitHub project page, include the project name at the end.
|
28
|
+
#
|
29
|
+
production_url : http://dvmimports.org
|
30
|
+
|
31
|
+
# All Jekyll-Bootstrap specific configurations are namespaced into this hash
|
32
|
+
#
|
33
|
+
JB :
|
34
|
+
version : 0.2.0
|
35
|
+
|
36
|
+
# All links will be namespaced by BASE_PATH if defined.
|
37
|
+
# Links in your website should always be prefixed with {{BASE_PATH}}
|
38
|
+
# however this value will be dynamically changed depending on your deployment situation.
|
39
|
+
#
|
40
|
+
# CNAME (http://yourcustomdomain.com)
|
41
|
+
# DO NOT SET BASE_PATH
|
42
|
+
# (urls will be prefixed with "/" and work relatively)
|
43
|
+
#
|
44
|
+
# GitHub Pages (http://username.github.com)
|
45
|
+
# DO NOT SET BASE_PATH
|
46
|
+
# (urls will be prefixed with "/" and work relatively)
|
47
|
+
#
|
48
|
+
# GitHub Project Pages (http://username.github.com/project-name)
|
49
|
+
#
|
50
|
+
# A GitHub Project site exists in the `gh-pages` branch of one of your repositories.
|
51
|
+
# REQUIRED! Set BASE_PATH to: http://username.github.com/project-name
|
52
|
+
#
|
53
|
+
# CAUTION:
|
54
|
+
# - When in Localhost, your site will run from root "/" regardless of BASE_PATH
|
55
|
+
# - Only the following values are falsy: ["", null, false]
|
56
|
+
# - When setting BASE_PATH it must be a valid url.
|
57
|
+
# This means always setting the protocol (http|https) or prefixing with "/"
|
58
|
+
BASE_PATH : false
|
59
|
+
|
60
|
+
# By default, the asset_path is automatically defined relative to BASE_PATH plus the enabled theme.
|
61
|
+
# ex: [BASE_PATH]/assets/themes/[THEME-NAME]
|
62
|
+
#
|
63
|
+
# Override this by defining an absolute path to assets here.
|
64
|
+
# ex:
|
65
|
+
# http://s3.amazonaws.com/yoursite/themes/watermelon
|
66
|
+
# /assets
|
67
|
+
#
|
68
|
+
ASSET_PATH : false
|
69
|
+
|
70
|
+
# These paths are to the main pages Jekyll-Bootstrap ships with.
|
71
|
+
# Some JB helpers refer to these paths; change theme here if needed.
|
72
|
+
#
|
73
|
+
archive_path: /archive.html
|
74
|
+
categories_path : /categories.html
|
75
|
+
tags_path : /tags.html
|
76
|
+
|
77
|
+
# Settings for comments helper
|
78
|
+
# Set 'provider' to the comment provider you want to use.
|
79
|
+
# Set 'provider' to false to turn commenting off globally.
|
80
|
+
#
|
81
|
+
comments :
|
82
|
+
provider : false
|
83
|
+
disqus :
|
84
|
+
short_name :
|
85
|
+
livefyre :
|
86
|
+
site_id : 123
|
87
|
+
intensedebate :
|
88
|
+
account : 123abc
|
89
|
+
facebook :
|
90
|
+
appid : 123
|
91
|
+
num_posts: 5
|
92
|
+
width: 580
|
93
|
+
colorscheme: light
|
94
|
+
|
95
|
+
# Settings for analytics helper
|
96
|
+
# Set 'provider' to the analytics provider you want to use.
|
97
|
+
# Set 'provider' to false to turn analytics off globally.
|
98
|
+
#
|
99
|
+
analytics :
|
100
|
+
provider : false
|
101
|
+
google :
|
102
|
+
tracking_id : 'UA-123-12'
|
103
|
+
getclicky :
|
104
|
+
site_id :
|
105
|
+
|
106
|
+
# Settings for sharing helper.
|
107
|
+
# Sharing is for things like tweet, plusone, like, reddit buttons etc.
|
108
|
+
# Set 'provider' to the sharing provider you want to use.
|
109
|
+
# Set 'provider' to false to turn sharing off globally.
|
110
|
+
#
|
111
|
+
sharing :
|
112
|
+
provider : false
|
113
|
+
|
114
|
+
# Settings for all other include helpers can be defined by creating
|
115
|
+
# a hash with key named for the given helper. ex:
|
116
|
+
#
|
117
|
+
# pages_list :
|
118
|
+
# provider : "custom"
|
119
|
+
#
|
120
|
+
# Setting any helper's provider to 'custom' will bypass the helper code
|
121
|
+
# and include your custom code. Your custom file must be defined at:
|
122
|
+
# ./_includes/custom/[HELPER]
|
123
|
+
# where [HELPER] is the name of the helper you are overriding.
|
124
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
{% if site.safe and site.JB.analytics.provider and page.JB.analytics != false %}
|
2
|
+
|
3
|
+
{% case site.JB.analytics.provider %}
|
4
|
+
{% when "google" %}
|
5
|
+
{% include JB/analytics-providers/google %}
|
6
|
+
{% when "getclicky" %}
|
7
|
+
{% include JB/analytics-providers/getclicky %}
|
8
|
+
{% when "custom" %}
|
9
|
+
{% include custom/analytics %}
|
10
|
+
{% endcase %}
|
11
|
+
|
12
|
+
{% endif %}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<script type="text/javascript">
|
2
|
+
var clicky_site_ids = clicky_site_ids || [];
|
3
|
+
clicky_site_ids.push({{ site.JB.analytics.getclicky.site_id }});
|
4
|
+
(function() {
|
5
|
+
var s = document.createElement('script');
|
6
|
+
s.type = 'text/javascript';
|
7
|
+
s.async = true;
|
8
|
+
s.src = '//static.getclicky.com/js';
|
9
|
+
( document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0] ).appendChild( s );
|
10
|
+
})();
|
11
|
+
</script>
|
12
|
+
<noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/{{ site.JB.analytics.getclicky.site_id }}ns.gif" /></p></noscript>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<script type="text/javascript">
|
2
|
+
var _gaq = _gaq || [];
|
3
|
+
_gaq.push(['_setAccount', '{{ site.JB.analytics.google.tracking_id }}']);
|
4
|
+
_gaq.push(['_trackPageview']);
|
5
|
+
|
6
|
+
(function() {
|
7
|
+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
8
|
+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
9
|
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
10
|
+
})();
|
11
|
+
</script>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
{% comment %}<!--
|
2
|
+
The categories_list include is a listing helper for categories.
|
3
|
+
Usage:
|
4
|
+
1) assign the 'categories_list' variable to a valid array of tags.
|
5
|
+
2) include JB/categories_list
|
6
|
+
example:
|
7
|
+
<ul>
|
8
|
+
{% assign categories_list = site.categories %}
|
9
|
+
{% include JB/categories_list %}
|
10
|
+
</ul>
|
11
|
+
|
12
|
+
Notes:
|
13
|
+
Categories can be either a Hash of Category objects (hashes) or an Array of category-names (strings).
|
14
|
+
The encapsulating 'if' statement checks whether categories_list is a Hash or Array.
|
15
|
+
site.categories is a Hash while page.categories is an array.
|
16
|
+
|
17
|
+
This helper can be seen in use at: ../_layouts/default.html
|
18
|
+
-->{% endcomment %}
|
19
|
+
|
20
|
+
{% if site.JB.categories_list.provider == "custom" %}
|
21
|
+
{% include custom/categories_list %}
|
22
|
+
{% else %}
|
23
|
+
{% if categories_list.first[0] == null %}
|
24
|
+
{% for category in categories_list %}
|
25
|
+
<li><a href="{{ BASE_PATH }}{{ site.JB.categories_path }}#{{ category }}-ref">
|
26
|
+
{{ category | join: "/" }} <span>{{ site.categories[category].size }}</span>
|
27
|
+
</a></li>
|
28
|
+
{% endfor %}
|
29
|
+
{% else %}
|
30
|
+
{% for category in categories_list %}
|
31
|
+
<li><a href="{{ BASE_PATH }}{{ site.JB.categories_path }}#{{ category[0] }}-ref">
|
32
|
+
{{ category[0] | join: "/" }} <span>{{ category[1].size }}</span>
|
33
|
+
</a></li>
|
34
|
+
{% endfor %}
|
35
|
+
{% endif %}
|
36
|
+
{% endif %}
|
37
|
+
{% assign categories_list = nil %}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{% if site.JB.comments.provider and page.JB.comments != false %}
|
2
|
+
|
3
|
+
{% case site.JB.comments.provider %}
|
4
|
+
{% when "disqus" %}
|
5
|
+
{% include JB/comments-providers/disqus %}
|
6
|
+
{% when "livefyre" %}
|
7
|
+
{% include JB/comments-providers/livefyre %}
|
8
|
+
{% when "intensedebate" %}
|
9
|
+
{% include JB/comments-providers/intensedebate %}
|
10
|
+
{% when "facebook" %}
|
11
|
+
{% include JB/comments-providers/facebook %}
|
12
|
+
{% when "custom" %}
|
13
|
+
{% include custom/comments %}
|
14
|
+
{% endcase %}
|
15
|
+
|
16
|
+
{% endif %}
|