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
data/LICENSE
CHANGED
@@ -1,4 +1,10 @@
|
|
1
|
-
Copyright (c) 2009 Jeff Watkins
|
1
|
+
Copyright (c) 2009-2010 Jeff Watkins
|
2
|
+
|
3
|
+
Plugin code adapted from the Ruby On Rails plugin code, which is copyright 2005
|
4
|
+
by Ryan Tomayko (rtomayko@gmail.com) and available under the MIT license:
|
5
|
+
(http://www.opensource.org/licenses/mit-license.php)
|
6
|
+
|
7
|
+
|
2
8
|
|
3
9
|
Apache License
|
4
10
|
Version 2.0, January 2004
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
@@ -33,7 +33,7 @@ all:
|
|
33
33
|
# but they may be included in the wrong order. So it's usually best to
|
34
34
|
# specify them explicitly
|
35
35
|
- src/css/reset.css
|
36
|
-
- src/css/<%=name%>.
|
36
|
+
- src/css/<%=name%>.css
|
37
37
|
|
38
38
|
jsnib:
|
39
39
|
# Create a JSNIB package file for each folder in the src/nibs folder.
|
@@ -2,118 +2,118 @@
|
|
2
2
|
|
3
3
|
/* Styles for UI elements that have been selected.
|
4
4
|
*/
|
5
|
-
.selected
|
5
|
+
.c-selected
|
6
6
|
{
|
7
7
|
}
|
8
8
|
|
9
9
|
/* Styles applied to views that are disabled. Not all browsers support the
|
10
10
|
disabled pseudo selector, so Coherent applies the disabled class instead.
|
11
11
|
*/
|
12
|
-
.disabled
|
12
|
+
.c-disabled
|
13
13
|
{
|
14
14
|
}
|
15
15
|
|
16
16
|
/* Views that are read-only will have these styles.
|
17
17
|
*/
|
18
|
-
.read-only
|
18
|
+
.c-read-only
|
19
19
|
{
|
20
20
|
}
|
21
21
|
|
22
22
|
/* When a view is displaying the placeholder value for a null value, the view
|
23
23
|
will have this class name.
|
24
24
|
*/
|
25
|
-
.
|
25
|
+
.c-placeholder
|
26
26
|
{
|
27
27
|
}
|
28
28
|
|
29
29
|
/* Since not all browsers support the focus pseudo selector, Coherent applies
|
30
30
|
the focused class to all views that accept first responder status.
|
31
31
|
*/
|
32
|
-
.focused
|
32
|
+
.c-focused
|
33
33
|
{
|
34
34
|
}
|
35
35
|
|
36
|
-
.hover
|
36
|
+
.c-hover
|
37
37
|
{
|
38
38
|
}
|
39
39
|
|
40
|
-
.asc
|
40
|
+
.c-asc
|
41
41
|
{
|
42
42
|
}
|
43
43
|
|
44
|
-
.desc
|
44
|
+
.c-desc
|
45
45
|
{
|
46
46
|
}
|
47
47
|
|
48
|
-
.active
|
48
|
+
.c-active
|
49
49
|
{
|
50
50
|
}
|
51
51
|
|
52
|
-
.updating
|
52
|
+
.c-updating
|
53
53
|
{
|
54
54
|
}
|
55
55
|
|
56
|
-
.invisible
|
56
|
+
.c-invisible
|
57
57
|
{
|
58
58
|
}
|
59
59
|
|
60
|
-
.invalid
|
60
|
+
.c-invalid
|
61
61
|
{
|
62
62
|
}
|
63
63
|
|
64
|
-
.inserted
|
64
|
+
.c-inserted
|
65
65
|
{
|
66
66
|
}
|
67
67
|
|
68
|
-
.deleted
|
68
|
+
.c-deleted
|
69
69
|
{
|
70
70
|
}
|
71
71
|
|
72
|
-
.replacing
|
72
|
+
.c-replacing
|
73
73
|
{
|
74
74
|
}
|
75
75
|
|
76
|
-
.loading
|
76
|
+
.c-loading
|
77
77
|
{
|
78
78
|
}
|
79
79
|
|
80
|
-
.first
|
80
|
+
.c-first
|
81
81
|
{
|
82
82
|
}
|
83
83
|
|
84
|
-
.last
|
84
|
+
.c-last
|
85
85
|
{
|
86
86
|
}
|
87
87
|
|
88
|
-
.drag-and-drop-copy
|
88
|
+
.c-drag-and-drop-copy
|
89
89
|
{
|
90
90
|
}
|
91
91
|
|
92
|
-
.drag-and-drop-move
|
92
|
+
.c-drag-and-drop-move
|
93
93
|
{
|
94
94
|
}
|
95
95
|
|
96
|
-
.drag-and-drop-link
|
96
|
+
.c-drag-and-drop-link
|
97
97
|
{
|
98
98
|
}
|
99
99
|
|
100
|
-
.drag-and-drop-no
|
100
|
+
.c-drag-and-drop-no
|
101
101
|
{
|
102
102
|
}
|
103
103
|
|
104
|
-
.
|
104
|
+
.c-window-inactive
|
105
105
|
{
|
106
106
|
}
|
107
107
|
|
108
|
-
.outline-expanded
|
108
|
+
.c-outline-expanded
|
109
109
|
{
|
110
110
|
}
|
111
111
|
|
112
|
-
.outline-leaf
|
112
|
+
.c-outline-leaf
|
113
113
|
{
|
114
114
|
}
|
115
115
|
|
116
|
-
.outline-disclosure-button
|
116
|
+
.c-outline-disclosure-button
|
117
117
|
{
|
118
118
|
}
|
119
119
|
|
data/bin/coherent
CHANGED
@@ -35,6 +35,10 @@ when 'demo'
|
|
35
35
|
|
36
36
|
generator= ARGV.shift
|
37
37
|
RubiGen::Scripts::Generate.new.run(ARGV, :generator => generator)
|
38
|
+
when 'plugin'
|
39
|
+
require File.join(File.dirname(__FILE__), "../lib/plugin")
|
40
|
+
ARGV.shift
|
41
|
+
Coherent::Commands::Plugin.parse!
|
38
42
|
else
|
39
43
|
APP_ROOT= find_app_root || Dir.pwd
|
40
44
|
|
data/coherent.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{coherent}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.4.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jeff Watkins"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-03-26}
|
13
13
|
s.default_executable = %q{coherent}
|
14
14
|
s.description = %q{Tools for building Coherent application or modules.}
|
15
15
|
s.email = %q{jeff@metrocat.org}
|
@@ -55,19 +55,6 @@ Gem::Specification.new do |s|
|
|
55
55
|
"generators/class/USAGE",
|
56
56
|
"generators/class/class_generator.rb",
|
57
57
|
"generators/class/templates/@name@.js.erb",
|
58
|
-
"generators/gallery_sample/USAGE",
|
59
|
-
"generators/gallery_sample/gallery_sample_generator.rb",
|
60
|
-
"generators/gallery_sample/templates/src/nibs/@name@/@name@.css",
|
61
|
-
"generators/gallery_sample/templates/src/nibs/@name@/@name@.html",
|
62
|
-
"generators/gallery_sample/templates/src/nibs/@name@/@name@.jsnib.erb",
|
63
|
-
"generators/gallery_sample/templates/src/nibs/@name@/@name@.json",
|
64
|
-
"generators/gallery_sample/templates/src/nibs/@name@/images/next.gif",
|
65
|
-
"generators/gallery_sample/templates/src/nibs/@name@/images/prev.gif",
|
66
|
-
"generators/gallery_sample/templates/src/nibs/@name@/photos/molly-1.jpg",
|
67
|
-
"generators/gallery_sample/templates/src/nibs/@name@/photos/molly-2.jpg",
|
68
|
-
"generators/gallery_sample/templates/src/nibs/@name@/photos/molly-3.jpg",
|
69
|
-
"generators/gallery_sample/templates/src/nibs/@name@/photos/molly-4.jpg",
|
70
|
-
"generators/gallery_sample/templates/src/nibs/@name@/photos/molly-5.jpg",
|
71
58
|
"generators/nib/USAGE",
|
72
59
|
"generators/nib/nib_generator.rb",
|
73
60
|
"generators/nib/templates/@name@.css.erb",
|
@@ -75,9 +62,26 @@ Gem::Specification.new do |s|
|
|
75
62
|
"generators/nib/templates/@name@.jsnib.erb",
|
76
63
|
"lib/coherent.rb",
|
77
64
|
"lib/distilery.rb",
|
65
|
+
"lib/distilery/bundle-task.rb",
|
78
66
|
"lib/distilery/coherent-asset-filter.rb",
|
79
67
|
"lib/distilery/nib-file.rb",
|
80
|
-
"lib/
|
68
|
+
"lib/plugin.rb",
|
69
|
+
"lib/plugin/commands.rb",
|
70
|
+
"lib/plugin/commands/discover.rb",
|
71
|
+
"lib/plugin/commands/info.rb",
|
72
|
+
"lib/plugin/commands/install.rb",
|
73
|
+
"lib/plugin/commands/list.rb",
|
74
|
+
"lib/plugin/commands/plugin.rb",
|
75
|
+
"lib/plugin/commands/remove.rb",
|
76
|
+
"lib/plugin/commands/source.rb",
|
77
|
+
"lib/plugin/commands/sources.rb",
|
78
|
+
"lib/plugin/commands/unsource.rb",
|
79
|
+
"lib/plugin/commands/update.rb",
|
80
|
+
"lib/plugin/environment.rb",
|
81
|
+
"lib/plugin/plugin.rb",
|
82
|
+
"lib/plugin/recursive-http-fetcher.rb",
|
83
|
+
"lib/plugin/repositories.rb",
|
84
|
+
"lib/plugin/repository.rb"
|
81
85
|
]
|
82
86
|
s.homepage = %q{http://coherentjs.org}
|
83
87
|
s.rdoc_options = ["--charset=UTF-8"]
|
@@ -33,7 +33,7 @@ all:
|
|
33
33
|
# but they may be included in the wrong order. So it's usually best to
|
34
34
|
# specify them explicitly
|
35
35
|
- src/css/reset.css
|
36
|
-
- src/css/<%=name%>.
|
36
|
+
- src/css/<%=name%>.css
|
37
37
|
|
38
38
|
jsnib:
|
39
39
|
# Create a JSNIB package file for each folder in the src/nibs folder.
|
@@ -2,118 +2,118 @@
|
|
2
2
|
|
3
3
|
/* Styles for UI elements that have been selected.
|
4
4
|
*/
|
5
|
-
.selected
|
5
|
+
.c-selected
|
6
6
|
{
|
7
7
|
}
|
8
8
|
|
9
9
|
/* Styles applied to views that are disabled. Not all browsers support the
|
10
10
|
disabled pseudo selector, so Coherent applies the disabled class instead.
|
11
11
|
*/
|
12
|
-
.disabled
|
12
|
+
.c-disabled
|
13
13
|
{
|
14
14
|
}
|
15
15
|
|
16
16
|
/* Views that are read-only will have these styles.
|
17
17
|
*/
|
18
|
-
.read-only
|
18
|
+
.c-read-only
|
19
19
|
{
|
20
20
|
}
|
21
21
|
|
22
22
|
/* When a view is displaying the placeholder value for a null value, the view
|
23
23
|
will have this class name.
|
24
24
|
*/
|
25
|
-
.
|
25
|
+
.c-placeholder
|
26
26
|
{
|
27
27
|
}
|
28
28
|
|
29
29
|
/* Since not all browsers support the focus pseudo selector, Coherent applies
|
30
30
|
the focused class to all views that accept first responder status.
|
31
31
|
*/
|
32
|
-
.focused
|
32
|
+
.c-focused
|
33
33
|
{
|
34
34
|
}
|
35
35
|
|
36
|
-
.hover
|
36
|
+
.c-hover
|
37
37
|
{
|
38
38
|
}
|
39
39
|
|
40
|
-
.asc
|
40
|
+
.c-asc
|
41
41
|
{
|
42
42
|
}
|
43
43
|
|
44
|
-
.desc
|
44
|
+
.c-desc
|
45
45
|
{
|
46
46
|
}
|
47
47
|
|
48
|
-
.active
|
48
|
+
.c-active
|
49
49
|
{
|
50
50
|
}
|
51
51
|
|
52
|
-
.updating
|
52
|
+
.c-updating
|
53
53
|
{
|
54
54
|
}
|
55
55
|
|
56
|
-
.invisible
|
56
|
+
.c-invisible
|
57
57
|
{
|
58
58
|
}
|
59
59
|
|
60
|
-
.invalid
|
60
|
+
.c-invalid
|
61
61
|
{
|
62
62
|
}
|
63
63
|
|
64
|
-
.inserted
|
64
|
+
.c-inserted
|
65
65
|
{
|
66
66
|
}
|
67
67
|
|
68
|
-
.deleted
|
68
|
+
.c-deleted
|
69
69
|
{
|
70
70
|
}
|
71
71
|
|
72
|
-
.replacing
|
72
|
+
.c-replacing
|
73
73
|
{
|
74
74
|
}
|
75
75
|
|
76
|
-
.loading
|
76
|
+
.c-loading
|
77
77
|
{
|
78
78
|
}
|
79
79
|
|
80
|
-
.first
|
80
|
+
.c-first
|
81
81
|
{
|
82
82
|
}
|
83
83
|
|
84
|
-
.last
|
84
|
+
.c-last
|
85
85
|
{
|
86
86
|
}
|
87
87
|
|
88
|
-
.drag-and-drop-copy
|
88
|
+
.c-drag-and-drop-copy
|
89
89
|
{
|
90
90
|
}
|
91
91
|
|
92
|
-
.drag-and-drop-move
|
92
|
+
.c-drag-and-drop-move
|
93
93
|
{
|
94
94
|
}
|
95
95
|
|
96
|
-
.drag-and-drop-link
|
96
|
+
.c-drag-and-drop-link
|
97
97
|
{
|
98
98
|
}
|
99
99
|
|
100
|
-
.drag-and-drop-no
|
100
|
+
.c-drag-and-drop-no
|
101
101
|
{
|
102
102
|
}
|
103
103
|
|
104
|
-
.
|
104
|
+
.c-window-inactive
|
105
105
|
{
|
106
106
|
}
|
107
107
|
|
108
|
-
.outline-expanded
|
108
|
+
.c-outline-expanded
|
109
109
|
{
|
110
110
|
}
|
111
111
|
|
112
|
-
.outline-leaf
|
112
|
+
.c-outline-leaf
|
113
113
|
{
|
114
114
|
}
|
115
115
|
|
116
|
-
.outline-disclosure-button
|
116
|
+
.c-outline-disclosure-button
|
117
117
|
{
|
118
118
|
}
|
119
119
|
|
data/lib/distilery.rb
CHANGED
@@ -0,0 +1,37 @@
|
|
1
|
+
require "#{$script_dir}/tasks/javascript-task.rb"
|
2
|
+
|
3
|
+
class BundleTask < JavascriptTask
|
4
|
+
|
5
|
+
content_type "js"
|
6
|
+
output_type "jsbundle"
|
7
|
+
|
8
|
+
# NibTask handles files that end in .jsnib
|
9
|
+
def handles_file?(file)
|
10
|
+
['js', 'css'].include?(file.content_type)
|
11
|
+
end
|
12
|
+
|
13
|
+
def process_file(file)
|
14
|
+
destination= File.expand_path(remove_prefix||"")
|
15
|
+
jsfile= JavascriptFile.new(@name_concat)
|
16
|
+
|
17
|
+
if (!@concat.empty?)
|
18
|
+
@concat << @concatenation_join_string||""
|
19
|
+
end
|
20
|
+
|
21
|
+
case file.content_type
|
22
|
+
when "js"
|
23
|
+
@concat << file.filtered_content(options)
|
24
|
+
@debug << file.debug_content(options)
|
25
|
+
when "css"
|
26
|
+
included_content= file.filtered_content(options)
|
27
|
+
included_content= file.minify_content(included_content)
|
28
|
+
|
29
|
+
included_content= jsfile.escape_embeded_content(included_content)
|
30
|
+
|
31
|
+
@concat << "NIB.asset('#{file.relative_to_folder(destination)}', '#{included_content}');\n"
|
32
|
+
else
|
33
|
+
file.warning "Unknown file type: #{file.content_type}"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|