midas-guilded 0.1.4 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ == 0.1.5 2009-03-24
2
+
3
+ * Added g_apply_style helper
4
+ * Added functionality to put CSS link tags in the HTML header, where they belong
5
+
6
+
1
7
  == 0.1.4 2009-03-17
2
8
 
3
9
  * Added include_component? method for testing if a component type is already present in the Guilded elements collection
data/PostInstall.txt CHANGED
@@ -1,4 +1,36 @@
1
1
 
2
2
  For more information on guilded-base, see http://guilded-base.rubyforge.org
3
3
 
4
+ Usage:
4
5
 
6
+ Generate:
7
+
8
+ script/generate guilded_config
9
+ script/generate guilded_assets
10
+
11
+
12
+ Edit the settings file at config/initializers/load_guilded_settings.rb. Change any of these settings to reflect how
13
+ you would like Guilded to be configured. If you change where any file(s) are configured to be located, then also move
14
+ the respective file(s).
15
+
16
+ Next you must make a call to the view helper to apply the CSS It should be placed in your layout:
17
+
18
+ <%= g_apply_style %>
19
+
20
+ There is also a view helper to apply the JavaScript. You can place this at the bottom of your layouts (so you
21
+ do not have to include it in every template):
22
+
23
+ <%= g_apply_behavior %>
24
+
25
+ You also must reset the Guilded singleton that manages everything after each rendering. The best way to do this is a before
26
+ filter in your application controller:
27
+
28
+ before_filter :reset_guilded
29
+
30
+ #...
31
+
32
+ protected
33
+
34
+ def reset_guilded
35
+ Guilded::Guilder.instance.reset!
36
+ end
data/README.rdoc CHANGED
@@ -1,11 +1,9 @@
1
1
  = guilded-base
2
2
 
3
- http://github.com/midas/guilded-base/tree/master
3
+ http://github.com/midas/guilded/tree/master
4
4
 
5
5
  == DESCRIPTION
6
6
 
7
- Warning: This project just started and there are no stable releases available yet.
8
-
9
7
  Guilded is a framework for building web based components centered around current web standards and best practices. The current
10
8
  framework is written in ruby, but could be ported to other languages.
11
9
 
@@ -79,7 +77,7 @@ The Guilded-Base gem contains the framework to build Guilded components.
79
77
 
80
78
  Add to environment file:
81
79
 
82
- config.gem "guilded", :version => '0.1.4'
80
+ config.gem "guilded", :version => '0.1.8'
83
81
 
84
82
  Run:
85
83
 
@@ -95,6 +93,28 @@ Edit the settings file at config/initializers/load_guilded_settings.rb. Change
95
93
  you would like Guilded to be configured. If you change where any file(s) are configured to be located, then also move
96
94
  the respective file(s).
97
95
 
96
+ Next you must make a call to the view helper to apply the CSS It should be placed in your layout:
97
+
98
+ <%= g_apply_style %>
99
+
100
+ There is also a view helper to apply the JavaScript. You can place this at the bottom of your layouts (so you
101
+ do not have to include it in every template):
102
+
103
+ <%= g_apply_behavior %>
104
+
105
+ You also must reset the Guilded singleton that manages everything after each rendering. The best way to do this is a before
106
+ filter in your application controller:
107
+
108
+ before_filter :reset_guilded
109
+
110
+ #...
111
+
112
+ protected
113
+
114
+ def reset_guilded
115
+ Guilded::Guilder.instance.reset!
116
+ end
117
+
98
118
 
99
119
  == LICENSE
100
120
 
data/guilded.gemspec CHANGED
@@ -2,23 +2,23 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{guilded}
5
- s.version = "0.1.4"
5
+ s.version = "0.1.8"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["C. Jason Harrelson (midas)"]
9
- s.date = %q{2009-03-17}
10
- s.description = %q{Warning: This project just started and there are no stable releases available yet. Guilded is a framework for building web based components centered around current web standards and best practices. The current framework is written in ruby, but could be ported to other languages. Guilded intends to provide a toolset for creating and consuming reusable web components. Currently, this problem domain is filled with JavaScript frameworks. These frameworks are wonderful and work very well. However, they do not degrade and are not accessible. Guilded seeks to provide the same level of "componentization" and ease of use without sacrificing degradability and accessibility. Guilded will achieve these goals by applying each technology at our disposal to do what it was intended. XHTML will be employed for content. CSS used for layout and styling. Behavior will be added to a component with JavaScript through progressive enhancement. The user will have the best experience with a Guilded component when CSS and JavaScript are enabled in their browser, but will still be able to use the component when CSS and JavaScript are disabled. Guilded will use jQuery as it's base JavaScript framework. jQuery was chosen because it lends itself to progressive enhancement due to the way it was authored. In addition, the tight integration of jQuery's selectors with CSS selectors is also highly desirable. When authoring a Guilded component, it is encouraged to write the behavior code as a jQuery plugin. This will allow the jQuery plugin to be used outside of the Guilded project, if desired. Guilded also seeks to provide a standardized CSS framework for creating layouts that are reusable and predictable. Guilded will utilize the currently existing RubyGems system to package its components. A new Guilded component will be packaged in a Gem and have a dependency on the guilded gem. The Guilded-Base gem contains the framework to build Guilded components.}
9
+ s.date = %q{2009-03-24}
10
+ s.description = %q{Guilded is a framework for building web based components centered around current web standards and best practices. The current framework is written in ruby, but could be ported to other languages. Guilded intends to provide a toolset for creating and consuming reusable web components. Currently, this problem domain is filled with JavaScript frameworks. These frameworks are wonderful and work very well. However, they do not degrade and are not accessible. Guilded seeks to provide the same level of "componentization" and ease of use without sacrificing degradability and accessibility. Guilded will achieve these goals by applying each technology at our disposal to do what it was intended. XHTML will be employed for content. CSS used for layout and styling. Behavior will be added to a component with JavaScript through progressive enhancement. The user will have the best experience with a Guilded component when CSS and JavaScript are enabled in their browser, but will still be able to use the component when CSS and JavaScript are disabled. Guilded will use jQuery as it's base JavaScript framework. jQuery was chosen because it lends itself to progressive enhancement due to the way it was authored. In addition, the tight integration of jQuery's selectors with CSS selectors is also highly desirable. When authoring a Guilded component, it is encouraged to write the behavior code as a jQuery plugin. This will allow the jQuery plugin to be used outside of the Guilded project, if desired. Guilded also seeks to provide a standardized CSS framework for creating layouts that are reusable and predictable. Guilded will utilize the currently existing RubyGems system to package its components. A new Guilded component will be packaged in a Gem and have a dependency on the guilded gem. The Guilded-Base gem contains the framework to build Guilded components.}
11
11
  s.email = ["jason@lookforwardenterprises.com"]
12
12
  s.extra_rdoc_files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.rdoc"]
13
13
  s.files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.rdoc", "Rakefile", "guilded.gemspec", "lib/guilded.rb", "lib/guilded/component_def.rb", "lib/guilded/exceptions.rb", "lib/guilded/guilder.rb", "lib/guilded/rails.rb", "lib/guilded/rails/active_record/human_attribute_hint.rb", "lib/guilded/rails/active_record/human_attribute_override.rb", "lib/guilded/rails/helpers.rb", "lib/guilded/rails/view_helpers.rb", "rails_generators/guilded_assets/guilded_assets_generator.rb", "rails_generators/guilded_assets/templates/guilded.js", "rails_generators/guilded_assets/templates/guilded.min.js", "rails_generators/guilded_assets/templates/jquery-1.2.6.js", "rails_generators/guilded_assets/templates/jquery-1.2.6.min.js", "rails_generators/guilded_assets/templates/jquery-1.3.2.js", "rails_generators/guilded_assets/templates/jquery-1.3.2.min.js", "rails_generators/guilded_assets/templates/reset-min.css", "rails_generators/guilded_config/guilded_config_generator.rb", "rails_generators/guilded_config/templates/load_guilded_settings.rb", "script/console", "script/destroy", "script/generate", "spec/guilded/component_def_spec.rb", "spec/guilded/guilder_spec.rb", "spec/guilded_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "tasks/rails.rake", "tasks/rspec.rake"]
14
14
  s.has_rdoc = true
15
- s.homepage = %q{http://github.com/midas/guilded-base/tree/master}
15
+ s.homepage = %q{http://github.com/midas/guilded/tree/master}
16
16
  s.post_install_message = %q{PostInstall.txt}
17
17
  s.rdoc_options = ["--main", "README.rdoc"]
18
18
  s.require_paths = ["lib"]
19
19
  s.rubyforge_project = %q{guilded}
20
20
  s.rubygems_version = %q{1.3.1}
21
- s.summary = %q{Warning: This project just started and there are no stable releases available yet}
21
+ s.summary = %q{Guilded is a framework for building web based components centered around current web standards and best practices}
22
22
 
23
23
  if s.respond_to? :specification_version then
24
24
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
data/lib/guilded.rb CHANGED
@@ -71,7 +71,7 @@ require 'guilded/rails/active_record/human_attribute_override'
71
71
  # <%= g_load_alerter :skin => 'blueish', :id => 'load_alerter' %>
72
72
  #
73
73
  module Guilded
74
- VERSION = '0.1.4'
74
+ VERSION = '0.1.8'
75
75
  end
76
76
 
77
77
  ActionView::Base.send( :include, Guilded::Rails::ViewHelpers ) if defined?( ActionView )
@@ -178,6 +178,7 @@ module Guilded
178
178
  @css_path = GUILDED_CONFIG[:css_path]
179
179
  @css_folder = GUILDED_CONFIG[:css_folder]
180
180
  @reset_css = GUILDED_CONFIG[:reset_css]
181
+ #@do_reset_css = GUILDED_CONFIG[:do_reset_css]
181
182
  @env = GUILDED_CONFIG[:environment]
182
183
  @env ||= :production
183
184
  @js_path.freeze
@@ -187,6 +188,7 @@ module Guilded
187
188
  @guilded_js.freeze
188
189
  @css_folder.freeze
189
190
  @reset_css.freeze
191
+ #@do_reset_css.freeze
190
192
  @env.freeze
191
193
  end
192
194
 
@@ -11,14 +11,16 @@ module Guilded
11
11
  # call to g_apply_behavior will not output anything.
12
12
  #
13
13
  def g_apply_behavior
14
- g = Guilded::Guilder.instance
15
- html = stylesheet_link_tag( g.combined_css_srcs, :cache => "cache/#{g.css_cache_name}" )
16
- html << javascript_include_tag( g.combined_js_srcs, :cache => "cache/#{g.js_cache_name}" )
17
- html << g.generate_javascript_init
18
- g.reset!
14
+ self.output_buffer.sub!( /<!-- guilded.styles -->/, stylesheet_link_tag( Guilded::Guilder.instance.combined_css_srcs, :cache => "cache/#{Guilded::Guilder.instance.css_cache_name}" ) )
15
+ html = javascript_include_tag( Guilded::Guilder.instance.combined_js_srcs, :cache => "cache/#{Guilded::Guilder.instance.js_cache_name}" )
16
+ html << Guilded::Guilder.instance.generate_javascript_init
19
17
  html
20
18
  end
21
19
 
20
+ def g_apply_style
21
+ "<!-- guilded.styles -->"
22
+ end
23
+
22
24
  # Generates the base javascript includes, if they have not alreay been included.
23
25
  #
24
26
  # def g_includes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: midas-guilded
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - C. Jason Harrelson (midas)
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-17 00:00:00 -07:00
12
+ date: 2009-03-24 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -32,7 +32,7 @@ dependencies:
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.8.0
34
34
  version:
35
- description: "Warning: This project just started and there are no stable releases available yet. Guilded is a framework for building web based components centered around current web standards and best practices. The current framework is written in ruby, but could be ported to other languages. Guilded intends to provide a toolset for creating and consuming reusable web components. Currently, this problem domain is filled with JavaScript frameworks. These frameworks are wonderful and work very well. However, they do not degrade and are not accessible. Guilded seeks to provide the same level of \"componentization\" and ease of use without sacrificing degradability and accessibility. Guilded will achieve these goals by applying each technology at our disposal to do what it was intended. XHTML will be employed for content. CSS used for layout and styling. Behavior will be added to a component with JavaScript through progressive enhancement. The user will have the best experience with a Guilded component when CSS and JavaScript are enabled in their browser, but will still be able to use the component when CSS and JavaScript are disabled. Guilded will use jQuery as it's base JavaScript framework. jQuery was chosen because it lends itself to progressive enhancement due to the way it was authored. In addition, the tight integration of jQuery's selectors with CSS selectors is also highly desirable. When authoring a Guilded component, it is encouraged to write the behavior code as a jQuery plugin. This will allow the jQuery plugin to be used outside of the Guilded project, if desired. Guilded also seeks to provide a standardized CSS framework for creating layouts that are reusable and predictable. Guilded will utilize the currently existing RubyGems system to package its components. A new Guilded component will be packaged in a Gem and have a dependency on the guilded gem. The Guilded-Base gem contains the framework to build Guilded components."
35
+ description: Guilded is a framework for building web based components centered around current web standards and best practices. The current framework is written in ruby, but could be ported to other languages. Guilded intends to provide a toolset for creating and consuming reusable web components. Currently, this problem domain is filled with JavaScript frameworks. These frameworks are wonderful and work very well. However, they do not degrade and are not accessible. Guilded seeks to provide the same level of "componentization" and ease of use without sacrificing degradability and accessibility. Guilded will achieve these goals by applying each technology at our disposal to do what it was intended. XHTML will be employed for content. CSS used for layout and styling. Behavior will be added to a component with JavaScript through progressive enhancement. The user will have the best experience with a Guilded component when CSS and JavaScript are enabled in their browser, but will still be able to use the component when CSS and JavaScript are disabled. Guilded will use jQuery as it's base JavaScript framework. jQuery was chosen because it lends itself to progressive enhancement due to the way it was authored. In addition, the tight integration of jQuery's selectors with CSS selectors is also highly desirable. When authoring a Guilded component, it is encouraged to write the behavior code as a jQuery plugin. This will allow the jQuery plugin to be used outside of the Guilded project, if desired. Guilded also seeks to provide a standardized CSS framework for creating layouts that are reusable and predictable. Guilded will utilize the currently existing RubyGems system to package its components. A new Guilded component will be packaged in a Gem and have a dependency on the guilded gem. The Guilded-Base gem contains the framework to build Guilded components.
36
36
  email:
37
37
  - jason@lookforwardenterprises.com
38
38
  executables: []
@@ -81,7 +81,7 @@ files:
81
81
  - tasks/rails.rake
82
82
  - tasks/rspec.rake
83
83
  has_rdoc: true
84
- homepage: http://github.com/midas/guilded-base/tree/master
84
+ homepage: http://github.com/midas/guilded/tree/master
85
85
  post_install_message: PostInstall.txt
86
86
  rdoc_options:
87
87
  - --main
@@ -106,6 +106,6 @@ rubyforge_project: guilded
106
106
  rubygems_version: 1.2.0
107
107
  signing_key:
108
108
  specification_version: 2
109
- summary: "Warning: This project just started and there are no stable releases available yet"
109
+ summary: Guilded is a framework for building web based components centered around current web standards and best practices
110
110
  test_files: []
111
111