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.
Files changed (44) hide show
  1. data/LICENSE +7 -1
  2. data/VERSION +1 -1
  3. data/app_generators/coherent/templates/distil.yml.erb +1 -1
  4. data/app_generators/coherent/templates/src/css/@name@.css.erb +26 -26
  5. data/bin/coherent +4 -0
  6. data/coherent.gemspec +20 -16
  7. data/demo_generators/gallery/templates/distil.yml.erb +1 -1
  8. data/demo_generators/gallery/templates/src/css/@name@.css.erb +26 -26
  9. data/lib/distilery.rb +1 -1
  10. data/lib/distilery/bundle-task.rb +37 -0
  11. data/lib/distilery/coherent-asset-filter.rb +2 -2
  12. data/lib/distilery/nib-file.rb +1 -1
  13. data/lib/plugin.rb +83 -0
  14. data/lib/plugin/commands.rb +12 -0
  15. data/lib/plugin/commands/discover.rb +78 -0
  16. data/lib/plugin/commands/info.rb +29 -0
  17. data/lib/plugin/commands/install.rb +76 -0
  18. data/lib/plugin/commands/list.rb +55 -0
  19. data/lib/plugin/commands/plugin.rb +105 -0
  20. data/lib/plugin/commands/remove.rb +29 -0
  21. data/lib/plugin/commands/source.rb +34 -0
  22. data/lib/plugin/commands/sources.rb +33 -0
  23. data/lib/plugin/commands/unsource.rb +36 -0
  24. data/lib/plugin/commands/update.rb +42 -0
  25. data/lib/plugin/environment.rb +97 -0
  26. data/lib/plugin/plugin.rb +160 -0
  27. data/lib/plugin/recursive-http-fetcher.rb +71 -0
  28. data/lib/plugin/repositories.rb +92 -0
  29. data/lib/plugin/repository.rb +36 -0
  30. metadata +20 -16
  31. data/generators/gallery_sample/USAGE +0 -5
  32. data/generators/gallery_sample/gallery_sample_generator.rb +0 -48
  33. data/generators/gallery_sample/templates/src/nibs/@name@/@name@.css +0 -116
  34. data/generators/gallery_sample/templates/src/nibs/@name@/@name@.html +0 -6
  35. data/generators/gallery_sample/templates/src/nibs/@name@/@name@.jsnib.erb +0 -40
  36. data/generators/gallery_sample/templates/src/nibs/@name@/@name@.json +0 -25
  37. data/generators/gallery_sample/templates/src/nibs/@name@/images/next.gif +0 -0
  38. data/generators/gallery_sample/templates/src/nibs/@name@/images/prev.gif +0 -0
  39. data/generators/gallery_sample/templates/src/nibs/@name@/photos/molly-1.jpg +0 -0
  40. data/generators/gallery_sample/templates/src/nibs/@name@/photos/molly-2.jpg +0 -0
  41. data/generators/gallery_sample/templates/src/nibs/@name@/photos/molly-3.jpg +0 -0
  42. data/generators/gallery_sample/templates/src/nibs/@name@/photos/molly-4.jpg +0 -0
  43. data/generators/gallery_sample/templates/src/nibs/@name@/photos/molly-5.jpg +0 -0
  44. data/lib/distilery/nib-task.rb +0 -83
@@ -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