Skip to content

Commit 0949b9d

Browse files
committed
Transfered content from cdi-spec.org infra
0 parents  commit 0949b9d

File tree

110 files changed

+23678
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+23678
-0
lines changed

Rakefile

+211
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
# This file is a rake build file. The purpose of this file is to simplify
2+
# setting up and using Awestruct. It's not required to use Awestruct, though it
3+
# does save you time (hopefully). If you don't want to use rake, just ignore or
4+
# delete this file.
5+
#
6+
# If you're just getting started, execute this command to install Awestruct and
7+
# the libraries on which it depends:
8+
#
9+
# rake setup
10+
#
11+
# The setup task installs the necessary libraries according to which Ruby
12+
# environment you are using. If you want the libraries kept inside the project,
13+
# execute this command instead:
14+
#
15+
# rake setup[local]
16+
#
17+
# IMPORTANT: To install gems, you'll need development tools on your machine,
18+
# which include a C compiler, the Ruby development libraries and some other
19+
# development libraries as well.
20+
#
21+
# There are also tasks for running Awestruct. The build will auto-detect
22+
# whether you are using Bundler and, if you are, wrap calls to awestruct in
23+
# `bundle exec`.
24+
#
25+
# To run in Awestruct in development mode, execute:
26+
#
27+
# rake
28+
#
29+
# To clean the generated site before you build, execute:
30+
#
31+
# rake clean preview
32+
#
33+
# To deploy using the production profile, execute:
34+
#
35+
# rake deploy
36+
#
37+
# To get a list of all tasks, execute:
38+
#
39+
# rake -T
40+
#
41+
# Now you're Awestruct with rake!
42+
43+
$use_bundle_exec = true
44+
$install_gems = ['awestruct -v "~> 0.5.0"', 'rb-inotify -v "~> 0.9.0"']
45+
$awestruct_cmd = nil
46+
task :default => :preview
47+
48+
desc 'Setup the environment to run Awestruct'
49+
task :setup, [:env] => :init do |task, args|
50+
next if !which('awestruct').nil?
51+
52+
if File.exist? 'Gemfile'
53+
if args[:env] == 'local'
54+
require 'fileutils'
55+
FileUtils.remove_file 'Gemfile.lock', true
56+
FileUtils.remove_dir '.bundle', true
57+
system 'bundle install --binstubs=_bin --path=.bundle'
58+
else
59+
if !(system 'bundle install')
60+
msg 'Installing bundler'
61+
if args[:env] == 'local'
62+
system "gem install --bindir=_bin --install-dir=.bundle bundler"
63+
else
64+
system "gem install bundler"
65+
end
66+
if !(system 'bundle install')
67+
msg 'Installation failed. Reinstall ruby or use sudo'
68+
end
69+
end
70+
71+
end
72+
else
73+
if args[:env] == 'local'
74+
$install_gems.each do |gem|
75+
msg "Installing #{gem}..."
76+
system "gem install --bindir=_bin --install-dir=.bundle #{gem}"
77+
end
78+
else
79+
$install_gems.each do |gem|
80+
msg "Installing #{gem}..."
81+
system "gem install #{gem}"
82+
end
83+
end
84+
end
85+
msg 'Run awestruct using `awestruct` or `rake`'
86+
# Don't execute any more tasks, need to reset env
87+
exit 0
88+
end
89+
90+
desc 'Update the environment to run Awestruct'
91+
task :update => :init do
92+
if File.exist? 'Gemfile'
93+
system 'bundle update'
94+
else
95+
system 'gem update awestruct'
96+
end
97+
# Don't execute any more tasks, need to reset env
98+
exit 0
99+
end
100+
101+
desc 'Build and preview the site locally in development mode'
102+
task :preview => :check do
103+
run_awestruct '-d'
104+
end
105+
106+
# provide a serve task for those used to Jekyll commands
107+
desc 'An alias to the preview task'
108+
task :serve => :preview
109+
110+
desc 'Generate the site using the specified profile (default: development)'
111+
task :gen, [:profile] => :check do |task, args|
112+
profile = args[:profile] || 'development'
113+
profile = 'production' if profile == 'prod'
114+
run_awestruct "-P #{profile} -g --force"
115+
end
116+
117+
desc 'Generate the site and deploy to production'
118+
task :deploy => :check do
119+
run_awestruct '-P production -g --force --deploy'
120+
end
121+
122+
desc 'Clean out generated site and temporary files'
123+
task :clean, :spec do |task, args|
124+
require 'fileutils'
125+
dirs = ['.awestruct', '.sass-cache', '_site']
126+
if args[:spec] == 'all'
127+
dirs << '_tmp'
128+
end
129+
dirs.each do |dir|
130+
FileUtils.remove_dir dir unless !File.directory? dir
131+
end
132+
end
133+
134+
# Perform initialization steps, such as setting up the PATH
135+
task :init do
136+
# Detect using gems local to project
137+
if File.exist? '_bin'
138+
ENV['PATH'] = "_bin#{File::PATH_SEPARATOR}#{ENV['PATH']}"
139+
ENV['GEM_HOME'] = '.bundle'
140+
end
141+
end
142+
143+
desc 'Check to ensure the environment is properly configured'
144+
task :check => :init do
145+
if !File.exist? 'Gemfile'
146+
if which('awestruct').nil?
147+
msg 'Could not find awestruct.', :warn
148+
msg 'Run `rake setup` or `rake setup[local]` to install from RubyGems.'
149+
# Enable once the rubygem-awestruct RPM is available
150+
#msg 'Run `sudo yum install rubygem-awestruct` to install via RPM. (Fedora >= 18)'
151+
exit 1
152+
else
153+
$use_bundle_exec = false
154+
next
155+
end
156+
end
157+
158+
begin
159+
require 'bundler'
160+
Bundler.setup
161+
rescue LoadError
162+
$use_bundle_exec = false
163+
rescue StandardError => e
164+
msg e.message, :warn
165+
if which('awestruct').nil?
166+
msg 'Run `rake setup` or `rake setup[local]` to install required gems from RubyGems.'
167+
else
168+
msg 'Run `rake update` to install additional required gems from RubyGems.'
169+
end
170+
exit e.status_code
171+
end
172+
end
173+
174+
# Execute Awestruct
175+
def run_awestruct(args)
176+
system "#{$use_bundle_exec ? 'bundle exec ' : ''}awestruct #{args}"
177+
end
178+
179+
# A cross-platform means of finding an executable in the $PATH.
180+
# Respects $PATHEXT, which lists valid file extensions for executables on Windows
181+
#
182+
# which 'awestruct'
183+
# => /usr/bin/awestruct
184+
def which(cmd, opts = {})
185+
unless $awestruct_cmd.nil? || opts[:clear_cache]
186+
return $awestruct_cmd
187+
end
188+
189+
$awestruct_cmd = nil
190+
exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
191+
ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
192+
exts.each do |ext|
193+
candidate = File.join path, "#{cmd}#{ext}"
194+
if File.executable? candidate
195+
$awestruct_cmd = candidate
196+
return $awestruct_cmd
197+
end
198+
end
199+
end
200+
return $awestruct_cmd
201+
end
202+
203+
# Print a message to STDOUT
204+
def msg(text, level = :info)
205+
case level
206+
when :warn
207+
puts "\e[31m#{text}\e[0m"
208+
else
209+
puts "\e[33m#{text}\e[0m"
210+
end
211+
end

cdi-spec.org.iml

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="RUBY_MODULE" version="4">
3+
<component name="CompassSettings">
4+
<option name="compassExecutableFilePath" value="$USER_HOME$/.rvm/gems/ruby-2.3.1@www.cdi-spec.org/gems/compass-1.0.3/bin/compass" />
5+
<option name="importPaths">
6+
<list>
7+
<option value="$USER_HOME$/.rvm/gems/ruby-2.2.3/gems/compass-core-1.0.3/stylesheets" />
8+
</list>
9+
</option>
10+
</component>
11+
<component name="NewModuleRootManager" inherit-compiler-output="true">
12+
<exclude-output />
13+
<content url="file://$MODULE_DIR$" />
14+
<orderEntry type="jdk" jdkName="RVM: ruby-2.3.1 [www.cdi-spec.org]" jdkType="RUBY_SDK" />
15+
<orderEntry type="sourceFolder" forTests="false" />
16+
<orderEntry type="library" scope="PROVIDED" name="ansi (v1.5.0, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
17+
<orderEntry type="library" scope="PROVIDED" name="asciidoctor (v1.5.5, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
18+
<orderEntry type="library" scope="PROVIDED" name="asciidoctor-diagram (v1.5.4, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
19+
<orderEntry type="library" scope="PROVIDED" name="ast (v2.3.0, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
20+
<orderEntry type="library" scope="PROVIDED" name="autoprefixer-rails (v6.7.2, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
21+
<orderEntry type="library" scope="PROVIDED" name="awestruct (v0.5.7, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
22+
<orderEntry type="library" scope="PROVIDED" name="bootstrap-sass (v3.3.7, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
23+
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.12.3, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
24+
<orderEntry type="library" scope="PROVIDED" name="chunky_png (v1.3.8, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
25+
<orderEntry type="library" scope="PROVIDED" name="coderay (v1.1.1, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
26+
<orderEntry type="library" scope="PROVIDED" name="compass (v1.0.3, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
27+
<orderEntry type="library" scope="PROVIDED" name="compass-core (v1.0.3, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
28+
<orderEntry type="library" scope="PROVIDED" name="compass-import-once (v1.0.5, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
29+
<orderEntry type="library" scope="PROVIDED" name="domain_name (v0.5.20161129, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
30+
<orderEntry type="library" scope="PROVIDED" name="em-websocket (v0.5.1, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
31+
<orderEntry type="library" scope="PROVIDED" name="eventmachine (v1.2.2, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
32+
<orderEntry type="library" scope="PROVIDED" name="execjs (v2.7.0, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
33+
<orderEntry type="library" scope="PROVIDED" name="ffi (v1.9.17, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
34+
<orderEntry type="library" scope="PROVIDED" name="formatador (v0.2.5, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
35+
<orderEntry type="library" scope="PROVIDED" name="git (v1.3.0, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
36+
<orderEntry type="library" scope="PROVIDED" name="guard (v2.14.1, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
37+
<orderEntry type="library" scope="PROVIDED" name="guard-compat (v1.2.1, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
38+
<orderEntry type="library" scope="PROVIDED" name="guard-livereload (v2.5.2, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
39+
<orderEntry type="library" scope="PROVIDED" name="haml (v4.0.7, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
40+
<orderEntry type="library" scope="PROVIDED" name="htmlcompressor (v0.3.1, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
41+
<orderEntry type="library" scope="PROVIDED" name="http-cookie (v1.0.3, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
42+
<orderEntry type="library" scope="PROVIDED" name="http_parser.rb (v0.6.0, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
43+
<orderEntry type="library" scope="PROVIDED" name="listen (v3.1.5, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
44+
<orderEntry type="library" scope="PROVIDED" name="little-plugger (v1.1.4, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
45+
<orderEntry type="library" scope="PROVIDED" name="logging (v2.1.0, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
46+
<orderEntry type="library" scope="PROVIDED" name="lumberjack (v1.0.11, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
47+
<orderEntry type="library" scope="PROVIDED" name="method_source (v0.8.2, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
48+
<orderEntry type="library" scope="PROVIDED" name="mime-types (v2.99.3, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
49+
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.12.1, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
50+
<orderEntry type="library" scope="PROVIDED" name="nenv (v0.3.0, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
51+
<orderEntry type="library" scope="PROVIDED" name="netrc (v0.11.0, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
52+
<orderEntry type="library" scope="PROVIDED" name="notiffany (v0.1.1, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
53+
<orderEntry type="library" scope="PROVIDED" name="oga (v1.3.1, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
54+
<orderEntry type="library" scope="PROVIDED" name="parallel (v1.10.0, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
55+
<orderEntry type="library" scope="PROVIDED" name="pry (v0.10.4, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
56+
<orderEntry type="library" scope="PROVIDED" name="rack (v1.6.5, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
57+
<orderEntry type="library" scope="PROVIDED" name="rake (v12.0.0, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
58+
<orderEntry type="library" scope="PROVIDED" name="rb-fsevent (v0.9.8, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
59+
<orderEntry type="library" scope="PROVIDED" name="rb-inotify (v0.9.8, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
60+
<orderEntry type="library" scope="PROVIDED" name="redcarpet (v3.4.0, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
61+
<orderEntry type="library" scope="PROVIDED" name="rest-client (v1.8.0, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
62+
<orderEntry type="library" scope="PROVIDED" name="ruby-ll (v2.1.2, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
63+
<orderEntry type="library" scope="PROVIDED" name="ruby_dep (v1.5.0, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
64+
<orderEntry type="library" scope="PROVIDED" name="sass (v3.4.23, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
65+
<orderEntry type="library" scope="PROVIDED" name="shellany (v0.0.1, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
66+
<orderEntry type="library" scope="PROVIDED" name="slim (v3.0.7, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
67+
<orderEntry type="library" scope="PROVIDED" name="slop (v3.6.0, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
68+
<orderEntry type="library" scope="PROVIDED" name="temple (v0.7.7, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
69+
<orderEntry type="library" scope="PROVIDED" name="thor (v0.19.4, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
70+
<orderEntry type="library" scope="PROVIDED" name="tilt (v2.0.6, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
71+
<orderEntry type="library" scope="PROVIDED" name="uglifier (v3.0.4, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
72+
<orderEntry type="library" scope="PROVIDED" name="unf (v0.1.4, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
73+
<orderEntry type="library" scope="PROVIDED" name="unf_ext (v0.0.7.2, RVM: ruby-2.3.1 [www.cdi-spec.org]) [gem]" level="application" />
74+
</component>
75+
</module>

0 commit comments

Comments
 (0)