coherent 0.3.0 → 0.4.0
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.
- data/LICENSE +7 -1
- data/VERSION +1 -1
- data/app_generators/coherent/templates/distil.yml.erb +1 -1
- data/app_generators/coherent/templates/src/css/@name@.css.erb +26 -26
- data/bin/coherent +4 -0
- data/coherent.gemspec +20 -16
- data/demo_generators/gallery/templates/distil.yml.erb +1 -1
- data/demo_generators/gallery/templates/src/css/@name@.css.erb +26 -26
- data/lib/distilery.rb +1 -1
- data/lib/distilery/bundle-task.rb +37 -0
- data/lib/distilery/coherent-asset-filter.rb +2 -2
- data/lib/distilery/nib-file.rb +1 -1
- data/lib/plugin.rb +83 -0
- data/lib/plugin/commands.rb +12 -0
- data/lib/plugin/commands/discover.rb +78 -0
- data/lib/plugin/commands/info.rb +29 -0
- data/lib/plugin/commands/install.rb +76 -0
- data/lib/plugin/commands/list.rb +55 -0
- data/lib/plugin/commands/plugin.rb +105 -0
- data/lib/plugin/commands/remove.rb +29 -0
- data/lib/plugin/commands/source.rb +34 -0
- data/lib/plugin/commands/sources.rb +33 -0
- data/lib/plugin/commands/unsource.rb +36 -0
- data/lib/plugin/commands/update.rb +42 -0
- data/lib/plugin/environment.rb +97 -0
- data/lib/plugin/plugin.rb +160 -0
- data/lib/plugin/recursive-http-fetcher.rb +71 -0
- data/lib/plugin/repositories.rb +92 -0
- data/lib/plugin/repository.rb +36 -0
- metadata +20 -16
- data/generators/gallery_sample/USAGE +0 -5
- data/generators/gallery_sample/gallery_sample_generator.rb +0 -48
- data/generators/gallery_sample/templates/src/nibs/@name@/@name@.css +0 -116
- data/generators/gallery_sample/templates/src/nibs/@name@/@name@.html +0 -6
- data/generators/gallery_sample/templates/src/nibs/@name@/@name@.jsnib.erb +0 -40
- data/generators/gallery_sample/templates/src/nibs/@name@/@name@.json +0 -25
- data/generators/gallery_sample/templates/src/nibs/@name@/images/next.gif +0 -0
- data/generators/gallery_sample/templates/src/nibs/@name@/images/prev.gif +0 -0
- data/generators/gallery_sample/templates/src/nibs/@name@/photos/molly-1.jpg +0 -0
- data/generators/gallery_sample/templates/src/nibs/@name@/photos/molly-2.jpg +0 -0
- data/generators/gallery_sample/templates/src/nibs/@name@/photos/molly-3.jpg +0 -0
- data/generators/gallery_sample/templates/src/nibs/@name@/photos/molly-4.jpg +0 -0
- data/generators/gallery_sample/templates/src/nibs/@name@/photos/molly-5.jpg +0 -0
- data/lib/distilery/nib-task.rb +0 -83
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/distilery/nib-task.rb
DELETED
@@ -1,83 +0,0 @@
|
|
1
|
-
require "#{$script_dir}/tasks/multiple-output-task.rb"
|
2
|
-
require "#{$script_dir}/tasks/javascript-task.rb"
|
3
|
-
|
4
|
-
class NibTask < MultipleOutputTask
|
5
|
-
|
6
|
-
def self.task_name
|
7
|
-
"jsnib"
|
8
|
-
end
|
9
|
-
|
10
|
-
def source_type
|
11
|
-
"js"
|
12
|
-
end
|
13
|
-
|
14
|
-
def output_type
|
15
|
-
"jsnib"
|
16
|
-
end
|
17
|
-
|
18
|
-
# NibTask handles files that end in .jsnib
|
19
|
-
def handles_file?(file_name)
|
20
|
-
"#{file_name}"[/\.jsnib$/]
|
21
|
-
end
|
22
|
-
|
23
|
-
def validate_file(file)
|
24
|
-
|
25
|
-
return if (!File.exists?($lint_command))
|
26
|
-
|
27
|
-
tmp= Tempfile.new("jsl.conf")
|
28
|
-
|
29
|
-
conf_files= [ "jsl.conf",
|
30
|
-
"#{ENV['HOME']}/.jsl.conf",
|
31
|
-
@options.jsl_conf
|
32
|
-
]
|
33
|
-
|
34
|
-
jsl_conf= conf_files.find { |f| File.exists?(f) }
|
35
|
-
|
36
|
-
tmp << File.read(jsl_conf)
|
37
|
-
tmp << "\n"
|
38
|
-
|
39
|
-
external_projects.each { |project|
|
40
|
-
tmp << "+include #{project["include"]}\n"
|
41
|
-
}
|
42
|
-
|
43
|
-
file.dependencies.each { |f|
|
44
|
-
tmp << "+process #{f}\n"
|
45
|
-
}
|
46
|
-
|
47
|
-
tmp << "+process #{file}\n"
|
48
|
-
|
49
|
-
tmp.close()
|
50
|
-
|
51
|
-
command= "#{$lint_command} -nologo -nofilelisting -conf #{tmp.path}"
|
52
|
-
|
53
|
-
stdin, stdout, stderr= Open3.popen3(command)
|
54
|
-
stdin.close
|
55
|
-
output= stdout.read
|
56
|
-
errors= stderr.read
|
57
|
-
|
58
|
-
tmp.delete
|
59
|
-
|
60
|
-
output= output.split("\n")
|
61
|
-
summary= output.pop
|
62
|
-
match= summary.match(/(\d+)\s+error\(s\), (\d+)\s+warning\(s\)/)
|
63
|
-
if (match)
|
64
|
-
@target.error_count+= match[1].to_i
|
65
|
-
@target.warning_count+= match[2].to_i
|
66
|
-
end
|
67
|
-
|
68
|
-
output= output.join("\n")
|
69
|
-
|
70
|
-
if (!output.empty?)
|
71
|
-
puts output
|
72
|
-
puts
|
73
|
-
end
|
74
|
-
|
75
|
-
end
|
76
|
-
|
77
|
-
def validate_files
|
78
|
-
@included_files.each { |f|
|
79
|
-
validate_file(f)
|
80
|
-
}
|
81
|
-
end
|
82
|
-
|
83
|
-
end
|