Top Level Namespace
Defined Under Namespace
Modules: Calatrava, HamlSupport
Classes: Dir
Constant Summary
collapse
- FEATURES_DIR =
File.join('.', 'features').freeze
- FEATURE_RESULTS_DIR =
File.join('.', 'results').freeze
Instance Method Summary
collapse
Instance Method Details
#artifact(path, env = nil) ⇒ Object
1
2
3
4
5
|
# File 'lib/calatrava/tasks/artifact.rb', line 1
def artifact(path, env = nil)
artifact_dir = env.nil? ? "artifacts/" : "artifacts/#{env}/"
mkdir_p artifact_dir
cp path, artifact_dir, :preserve => true
end
|
#artifact_dir(source_path, name) ⇒ Object
7
8
9
10
11
|
# File 'lib/calatrava/tasks/artifact.rb', line 7
def artifact_dir(source_path, name)
artifact_dir_path = "artifacts/#{name}/"
mkdir_p artifact_dir_path
sh "cp -R #{source_path}/* #{artifact_dir_path}"
end
|
#artifact_path(sub_path) ⇒ Object
13
14
15
|
# File 'lib/calatrava/tasks/artifact.rb', line 13
def artifact_path(sub_path)
File.join("artifacts", sub_path)
end
|
#coffee(in_dir_or_file, out_dir) ⇒ Object
5
6
7
8
9
10
|
# File 'lib/calatrava/tasks/assets.rb', line 5
def coffee(in_dir_or_file, out_dir)
if !Dir["#{in_dir_or_file}/**/*.coffee"].empty? || File.exists?(in_dir_or_file)
$stdout.puts "coffee #{in_dir_or_file} -> #{out_dir}"
sh "node_modules/coffee-script/bin/coffee --compile --output #{out_dir} #{in_dir_or_file}"
end
end
|
#cp_ne(source, dest_dir) ⇒ Object
1
2
3
|
# File 'lib/calatrava/tasks/assets.rb', line 1
def cp_ne(source, dest_dir)
cp Dir[source], dest_dir
end
|
#notify(message) ⇒ Object
1
2
3
4
5
6
7
8
9
10
|
# File 'lib/calatrava/templates/kernel/watchr.rb', line 1
def notify(message)
growlnotify = `which growlnotify`.chomp
if !growlnotify.empty?
system "#{growlnotify} -m \"#{message}\" loganberry-bb"
end
notify_send = `which notify-send`.chomp
unless notify_send.empty?
system "#{notify_send} -t 100 'loagnberry-bb' '#{message}'"
end
end
|