fume 0.6.7 → 0.7.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 (47) hide show
  1. data/CHANGELOG.md +7 -0
  2. data/VERSION +1 -1
  3. data/fume.gemspec +4 -1
  4. data/lib/fume/app_setting_loader.rb +13 -0
  5. data/lib/fume/authlogic.rb +1 -1
  6. data/lib/fume/cancan.rb +1 -1
  7. data/lib/fume/rails_ext.rb +16 -1
  8. data/lib/fume/railtie.rb +2 -2
  9. data/lib/fume/simple_nav.rb +49 -0
  10. data/lib/fume.rb +2 -1
  11. metadata +42 -64
  12. data/lib/fume/simple_theme.rb +0 -59
  13. data/rails_generators/fume/simple_theme/simple_theme_gen.rb +0 -9
  14. data/rails_generators/fume/simple_theme/templates/public/stylesheets/reset.css +0 -89
  15. data/rails_generators/fume/simple_theme/templates/public/stylesheets/reset.less +0 -1
  16. data/rails_generators/fume/simple_theme/templates/public/themes/simple_theme/demo.html +0 -513
  17. data/rails_generators/fume/simple_theme/templates/public/themes/simple_theme/simple-theme-ie-patch.js +0 -19
  18. data/rails_generators/fume/simple_theme/templates/public/themes/simple_theme/simple-theme.css +0 -864
  19. data/rails_generators/fume/simple_theme/templates/public/themes/simple_theme/simple-theme.less +0 -539
  20. data/rails_generators/fume/simple_theme/templates/public/themes/simple_theme/src/base.less +0 -9
  21. data/rails_generators/fume/simple_theme/templates/public/themes/simple_theme/src/function.less +0 -17
  22. data/rails_generators/fume/simple_theme/templates/public/themes/simple_theme/src/layout.less +0 -432
  23. data/rails_generators/fume/simple_theme/templates/public/themes/simple_theme/src/reset.less +0 -18
  24. data/rails_generators/fume/simple_theme/templates/public/themes/simple_theme/src/vendor/yui-3.0/base.css +0 -80
  25. data/rails_generators/fume/simple_theme/templates/public/themes/simple_theme/src/vendor/yui-3.0/fonts.css +0 -47
  26. data/rails_generators/fume/simple_theme/templates/public/themes/simple_theme/src/vendor/yui-3.0/reset.css +0 -126
  27. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-1.4.2.js +0 -6240
  28. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.js +0 -10921
  29. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-bg_flat_30_cccccc_40x100.png +0 -0
  30. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-bg_flat_50_5c5c5c_40x100.png +0 -0
  31. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-bg_glass_20_555555_1x400.png +0 -0
  32. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-bg_glass_40_0078a3_1x400.png +0 -0
  33. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-bg_glass_40_ffc73d_1x400.png +0 -0
  34. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-bg_gloss-wave_25_333333_500x100.png +0 -0
  35. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-bg_highlight-soft_80_eeeeee_1x100.png +0 -0
  36. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-bg_inset-soft_25_000000_1x100.png +0 -0
  37. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-bg_inset-soft_30_f58400_1x100.png +0 -0
  38. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-icons_222222_256x240.png +0 -0
  39. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-icons_4b8e0b_256x240.png +0 -0
  40. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-icons_a83300_256x240.png +0 -0
  41. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-icons_cccccc_256x240.png +0 -0
  42. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-icons_ffffff_256x240.png +0 -0
  43. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness.css +0 -480
  44. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-i18n-1.8.js +0 -1176
  45. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery.ba-bbq-1.2.1.js +0 -1137
  46. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery.corner-2.09.js +0 -239
  47. data/rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery.timepicker-0.2.1.js +0 -413
data/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+
2
+
3
+ ## 0.7.0:
4
+ - add action_attr_accessor method
5
+ - depend rails_i18n
6
+ - rename simple\_theme to simple_nav and rewirte
7
+ - auto require config/application.*.rb
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.7
1
+ 0.7.0
data/fume.gemspec CHANGED
@@ -19,10 +19,13 @@ Gem::Specification.new do |s|
19
19
 
20
20
  # rails
21
21
  s.add_runtime_dependency "rails", "~> 3.0.10"
22
+ s.add_runtime_dependency "rails-i18n", "~> 0.1.6"
23
+
24
+ # require library
25
+ s.add_runtime_dependency "hashie", "~> 1.1.0"
22
26
 
23
27
  # library
24
28
  s.add_runtime_dependency "timeliness", "~> 0.3.4"
25
- s.add_runtime_dependency "hashie", "~> 1.1.0"
26
29
  s.add_runtime_dependency "addressable", "~> 2.2.6"
27
30
 
28
31
  # rails plugin
@@ -0,0 +1,13 @@
1
+ module Fume
2
+
3
+ class AppSettingLoader
4
+
5
+ def self.try_enable(app)
6
+ %w[application.extra.rb application.local.rb].each do |config_filename|
7
+ path = Rails.root.join("config", config_filename)
8
+ require path if File.exists?(path)
9
+ end
10
+ end
11
+
12
+ end
13
+ end
@@ -1,6 +1,6 @@
1
1
  module Fume
2
2
  module Authlogic
3
- def self.try_enable
3
+ def self.try_enable(app)
4
4
  if defined? ::Authlogic
5
5
  ActionController::Base.send :include, ControllerExtensions
6
6
  end
data/lib/fume/cancan.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Fume
2
2
  module Cancan
3
- def self.try_enable
3
+ def self.try_enable(app)
4
4
  if defined? ::CanCan
5
5
  ActionController::Base.send :include, ControllerExtensions
6
6
  end
@@ -1,6 +1,6 @@
1
1
  module Fume
2
2
  module RailsExt
3
- def self.try_enable
3
+ def self.try_enable(app)
4
4
  if defined? ::ActionController
5
5
  ActionController::Base.send :include, ControllerExtensions
6
6
  end
@@ -13,6 +13,21 @@ module Fume
13
13
  helper_method :public_path, :public_url
14
14
  end
15
15
 
16
+ module ClassMethods
17
+ def action_attr_accessor(syms, options = {})
18
+ [ syms ].flatten.each do |sym|
19
+ class_eval(<<-EOS, __FILE__, __LINE__ + 1)
20
+ def self.#{sym}(obj)
21
+ before_filter { |c| c.send(:#{sym}=, obj) }
22
+ end
23
+
24
+ attr_accessor :#{sym}
25
+ helper_method :#{sym}, :#{sym}=
26
+ EOS
27
+ end
28
+ end
29
+ end
30
+
16
31
  module InstanceMethods
17
32
 
18
33
  protected
data/lib/fume/railtie.rb CHANGED
@@ -2,12 +2,12 @@ require "rails/railtie"
2
2
 
3
3
  module Fume
4
4
  class Railtie < ::Rails::Railtie
5
- initializer 'fume.initialize', :after => :after_initialize do
5
+ initializer 'fume.initialize', :after => :after_initialize do |app|
6
6
  Fume.constants.each do |name|
7
7
  ext_module = Fume.const_get(name)
8
8
 
9
9
  if ext_module.respond_to?(:try_enable)
10
- ext_module.try_enable
10
+ ext_module.try_enable(app)
11
11
  end
12
12
  end
13
13
  end
@@ -0,0 +1,49 @@
1
+ require "hashie"
2
+
3
+ module Fume
4
+ module SimpleNav
5
+
6
+ def self.try_enable(app)
7
+ ActionView::Base.send :include, HelperExtensions
8
+ end
9
+
10
+ module HelperExtensions
11
+
12
+ def simple_nav(attr_reader_name)
13
+ value = self.send(attr_reader_name)
14
+ tag = SimpleNavTag.new({
15
+ :helper => self,
16
+ :value => value,
17
+ :active_class => "active"
18
+ })
19
+
20
+ if block_given?
21
+ yield tag
22
+ return nil
23
+ else
24
+ return tag
25
+ end
26
+ end
27
+
28
+ class SimpleNavTag < Hashie::Mash
29
+
30
+ def li_tag(value, options = {}, &block)
31
+ self.content_tag(value, :li, options, &block)
32
+ end
33
+
34
+ def content_tag(value, tag_name, options = {}, &block)
35
+ if value == self.value
36
+ if options[:class]
37
+ options[:class] += " #{self.active_class}"
38
+ else
39
+ options[:class] = "#{self.active_class}"
40
+ end
41
+ end
42
+
43
+ helper.content_tag(tag_name, options, &block)
44
+ end
45
+ end
46
+
47
+ end
48
+ end
49
+ end
data/lib/fume.rb CHANGED
@@ -13,5 +13,6 @@ module Fume
13
13
  autoload :Authlogic
14
14
  autoload :RailsExt
15
15
  autoload :Cancan
16
- autoload :SimpleTheme
16
+ autoload :SimpleNav
17
+ autoload :AppSettingLoader
17
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fume
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.7
4
+ version: 0.7.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-23 00:00:00.000000000Z
12
+ date: 2011-08-30 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70240664927880 !ruby/object:Gem::Requirement
16
+ requirement: &70181391275120 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,21 +21,21 @@ dependencies:
21
21
  version: 3.0.10
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70240664927880
24
+ version_requirements: *70181391275120
25
25
  - !ruby/object:Gem::Dependency
26
- name: timeliness
27
- requirement: &70240664927240 !ruby/object:Gem::Requirement
26
+ name: rails-i18n
27
+ requirement: &70181391270320 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
31
31
  - !ruby/object:Gem::Version
32
- version: 0.3.4
32
+ version: 0.1.6
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70240664927240
35
+ version_requirements: *70181391270320
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: hashie
38
- requirement: &70240664926660 !ruby/object:Gem::Requirement
38
+ requirement: &70181391269700 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,21 @@ dependencies:
43
43
  version: 1.1.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70240664926660
46
+ version_requirements: *70181391269700
47
+ - !ruby/object:Gem::Dependency
48
+ name: timeliness
49
+ requirement: &70181391268960 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 0.3.4
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: *70181391268960
47
58
  - !ruby/object:Gem::Dependency
48
59
  name: addressable
49
- requirement: &70240664919760 !ruby/object:Gem::Requirement
60
+ requirement: &70181391268400 !ruby/object:Gem::Requirement
50
61
  none: false
51
62
  requirements:
52
63
  - - ~>
@@ -54,10 +65,10 @@ dependencies:
54
65
  version: 2.2.6
55
66
  type: :runtime
56
67
  prerelease: false
57
- version_requirements: *70240664919760
68
+ version_requirements: *70181391268400
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: authlogic
60
- requirement: &70240664919200 !ruby/object:Gem::Requirement
71
+ requirement: &70181391267740 !ruby/object:Gem::Requirement
61
72
  none: false
62
73
  requirements:
63
74
  - - ~>
@@ -65,10 +76,10 @@ dependencies:
65
76
  version: 3.0.3
66
77
  type: :runtime
67
78
  prerelease: false
68
- version_requirements: *70240664919200
79
+ version_requirements: *70181391267740
69
80
  - !ruby/object:Gem::Dependency
70
81
  name: formtastic
71
- requirement: &70240664918560 !ruby/object:Gem::Requirement
82
+ requirement: &70181391265980 !ruby/object:Gem::Requirement
72
83
  none: false
73
84
  requirements:
74
85
  - - ~>
@@ -76,10 +87,10 @@ dependencies:
76
87
  version: 1.2.4
77
88
  type: :runtime
78
89
  prerelease: false
79
- version_requirements: *70240664918560
90
+ version_requirements: *70181391265980
80
91
  - !ruby/object:Gem::Dependency
81
92
  name: cancan
82
- requirement: &70240664918020 !ruby/object:Gem::Requirement
93
+ requirement: &70181391265480 !ruby/object:Gem::Requirement
83
94
  none: false
84
95
  requirements:
85
96
  - - ~>
@@ -87,10 +98,10 @@ dependencies:
87
98
  version: 1.6.5
88
99
  type: :runtime
89
100
  prerelease: false
90
- version_requirements: *70240664918020
101
+ version_requirements: *70181391265480
91
102
  - !ruby/object:Gem::Dependency
92
103
  name: symbolize
93
- requirement: &70240664917400 !ruby/object:Gem::Requirement
104
+ requirement: &70181391264680 !ruby/object:Gem::Requirement
94
105
  none: false
95
106
  requirements:
96
107
  - - ~>
@@ -98,10 +109,10 @@ dependencies:
98
109
  version: 3.2.0
99
110
  type: :runtime
100
111
  prerelease: false
101
- version_requirements: *70240664917400
112
+ version_requirements: *70181391264680
102
113
  - !ruby/object:Gem::Dependency
103
114
  name: meta_search
104
- requirement: &70240664916860 !ruby/object:Gem::Requirement
115
+ requirement: &70181391264040 !ruby/object:Gem::Requirement
105
116
  none: false
106
117
  requirements:
107
118
  - - ~>
@@ -109,10 +120,10 @@ dependencies:
109
120
  version: 1.0.6
110
121
  type: :runtime
111
122
  prerelease: false
112
- version_requirements: *70240664916860
123
+ version_requirements: *70181391264040
113
124
  - !ruby/object:Gem::Dependency
114
125
  name: kaminari
115
- requirement: &70240664916160 !ruby/object:Gem::Requirement
126
+ requirement: &70181391263380 !ruby/object:Gem::Requirement
116
127
  none: false
117
128
  requirements:
118
129
  - - ~>
@@ -120,10 +131,10 @@ dependencies:
120
131
  version: 0.12.4
121
132
  type: :runtime
122
133
  prerelease: false
123
- version_requirements: *70240664916160
134
+ version_requirements: *70181391263380
124
135
  - !ruby/object:Gem::Dependency
125
136
  name: version
126
- requirement: &70240664915460 !ruby/object:Gem::Requirement
137
+ requirement: &70181391262860 !ruby/object:Gem::Requirement
127
138
  none: false
128
139
  requirements:
129
140
  - - ! '>='
@@ -131,7 +142,7 @@ dependencies:
131
142
  version: '0'
132
143
  type: :development
133
144
  prerelease: false
134
- version_requirements: *70240664915460
145
+ version_requirements: *70181391262860
135
146
  description: a simple rails scaffold.
136
147
  email:
137
148
  - Sunteya@gmail.com
@@ -140,17 +151,19 @@ extensions: []
140
151
  extra_rdoc_files: []
141
152
  files:
142
153
  - .gitignore
154
+ - CHANGELOG.md
143
155
  - Gemfile
144
156
  - README.md
145
157
  - Rakefile
146
158
  - VERSION
147
159
  - fume.gemspec
148
160
  - lib/fume.rb
161
+ - lib/fume/app_setting_loader.rb
149
162
  - lib/fume/authlogic.rb
150
163
  - lib/fume/cancan.rb
151
164
  - lib/fume/rails_ext.rb
152
165
  - lib/fume/railtie.rb
153
- - lib/fume/simple_theme.rb
166
+ - lib/fume/simple_nav.rb
154
167
  - lib/generators/fume/simple_scaffold/USAGE
155
168
  - lib/generators/fume/simple_scaffold/simple_scaffold_generator.rb
156
169
  - lib/generators/fume/simple_scaffold/templates/_form.html.erb
@@ -162,41 +175,6 @@ files:
162
175
  - rails_generators/fume/rspec/rspec_gen.rb
163
176
  - rails_generators/fume/rspec/templates/spec/support/erb_macros.rb
164
177
  - rails_generators/fume/rspec/templates/spec/support/fume_controller_macros.rb
165
- - rails_generators/fume/simple_theme/simple_theme_gen.rb
166
- - rails_generators/fume/simple_theme/templates/public/stylesheets/reset.css
167
- - rails_generators/fume/simple_theme/templates/public/stylesheets/reset.less
168
- - rails_generators/fume/simple_theme/templates/public/themes/simple_theme/demo.html
169
- - rails_generators/fume/simple_theme/templates/public/themes/simple_theme/simple-theme-ie-patch.js
170
- - rails_generators/fume/simple_theme/templates/public/themes/simple_theme/simple-theme.css
171
- - rails_generators/fume/simple_theme/templates/public/themes/simple_theme/simple-theme.less
172
- - rails_generators/fume/simple_theme/templates/public/themes/simple_theme/src/base.less
173
- - rails_generators/fume/simple_theme/templates/public/themes/simple_theme/src/function.less
174
- - rails_generators/fume/simple_theme/templates/public/themes/simple_theme/src/layout.less
175
- - rails_generators/fume/simple_theme/templates/public/themes/simple_theme/src/reset.less
176
- - rails_generators/fume/simple_theme/templates/public/themes/simple_theme/src/vendor/yui-3.0/base.css
177
- - rails_generators/fume/simple_theme/templates/public/themes/simple_theme/src/vendor/yui-3.0/fonts.css
178
- - rails_generators/fume/simple_theme/templates/public/themes/simple_theme/src/vendor/yui-3.0/reset.css
179
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-1.4.2.js
180
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.js
181
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness.css
182
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-bg_flat_30_cccccc_40x100.png
183
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-bg_flat_50_5c5c5c_40x100.png
184
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-bg_glass_20_555555_1x400.png
185
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-bg_glass_40_0078a3_1x400.png
186
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-bg_glass_40_ffc73d_1x400.png
187
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-bg_gloss-wave_25_333333_500x100.png
188
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-bg_highlight-soft_80_eeeeee_1x100.png
189
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-bg_inset-soft_25_000000_1x100.png
190
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-bg_inset-soft_30_f58400_1x100.png
191
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-icons_222222_256x240.png
192
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-icons_4b8e0b_256x240.png
193
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-icons_a83300_256x240.png
194
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-icons_cccccc_256x240.png
195
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-1.8.ui-darkness/ui-icons_ffffff_256x240.png
196
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery-ui-i18n-1.8.js
197
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery.ba-bbq-1.2.1.js
198
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery.corner-2.09.js
199
- - rails_generators/fume/simple_theme/templates/public/themes/vendor/jquery.timepicker-0.2.1.js
200
178
  - spec/fume/cancan_spec.rb
201
179
  - spec/spec.opts
202
180
  - spec/spec_helper.rb
@@ -214,7 +192,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
214
192
  version: '0'
215
193
  segments:
216
194
  - 0
217
- hash: 4138645098247265020
195
+ hash: -3149688421727667146
218
196
  required_rubygems_version: !ruby/object:Gem::Requirement
219
197
  none: false
220
198
  requirements:
@@ -223,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
201
  version: '0'
224
202
  segments:
225
203
  - 0
226
- hash: 4138645098247265020
204
+ hash: -3149688421727667146
227
205
  requirements: []
228
206
  rubyforge_project:
229
207
  rubygems_version: 1.8.7
@@ -1,59 +0,0 @@
1
- module Fume
2
- module SimpleTheme
3
-
4
- def self.try_enable
5
- ActionController::Base.send :include, ControllerExtensions
6
- end
7
-
8
- module ControllerExtensions
9
- extend ActiveSupport::Concern
10
-
11
- included do
12
- helper_method :sec_nav, :main_nav
13
- helper RailsHelpers
14
- end
15
-
16
- module ClassMethods
17
- def sec_nav_highlight(name)
18
- class_eval do
19
- before_filter { |c| c.instance_variable_set(:@sec_nav, name) }
20
- end
21
- end
22
-
23
- def main_nav_highlight(name)
24
- class_eval do
25
- before_filter { |c| c.instance_variable_set(:@main_nav, name) }
26
- end
27
- end
28
- end
29
-
30
- module RailsHelpers
31
-
32
- def sec_nav(name, options = {}, &block)
33
- if @sec_nav == name
34
- if options[:class]
35
- options[:class] += " active"
36
- else
37
- options[:class] = "active"
38
- end
39
- end
40
- content = capture(&block)
41
- content_tag(:li, content, options)
42
- end
43
-
44
- def main_nav(name, options = {}, &block)
45
- if @main_nav == name
46
- if options[:class]
47
- options[:class] += " active"
48
- else
49
- options[:class] = "active"
50
- end
51
- end
52
- content = capture(&block)
53
- content_tag(:li, content, options)
54
- end
55
- end
56
-
57
- end
58
- end
59
- end
@@ -1,9 +0,0 @@
1
- class SimpleThemeGen < Fume::Gen::Base
2
-
3
- def manifest
4
- record do |m|
5
- cp_files m, File.join("public", "themes", "**", "*")
6
- cp_files m, File.join("public", "stylesheets", "*.css")
7
- end
8
- end
9
- end
@@ -1,89 +0,0 @@
1
- html {
2
- color: #000000;
3
- background: #ffffff;
4
- }
5
- body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td {
6
- margin: 0;
7
- padding: 0;
8
- }
9
- table {
10
- border-collapse: collapse;
11
- border-spacing: 0;
12
- }
13
- fieldset, img { border: 0; }
14
- address, caption, cite, code, dfn, em, strong, th, var {
15
- font-style: normal;
16
- font-weight: normal;
17
- }
18
- li { list-style: none; }
19
- caption, th { text-align: left; }
20
- h1, h2, h3, h4, h5, h6 {
21
- font-size: 100%;
22
- font-weight: normal;
23
- }
24
- q:before { content: ''; }
25
- q:after { content: ''; }
26
- abbr, acronym {
27
- border: 0;
28
- font-variant: normal;
29
- }
30
- sup { vertical-align: text-top; }
31
- sub { vertical-align: text-bottom; }
32
- input, textarea, select {
33
- font-family: inherit;
34
- font-size: inherit;
35
- font-weight: inherit;
36
- }
37
- input, textarea, select { *font-size: 100%; }
38
- legend { color: #000000; }
39
- body {
40
- font: 13px/1.231 arial, helvetica, clean, sans-serif;
41
- *font-size: small;
42
- *font: x-small;
43
- }
44
- select, input, button, textarea { font: 99% arial, helvetica, clean, sans-serif; }
45
- table {
46
- font-size: inherit;
47
- font: 100%;
48
- }
49
- pre, code, kbd, samp, tt {
50
- font-family: monospace;
51
- *font-size: 108%;
52
- line-height: 100%;
53
- }
54
- h1 { font-size: 138.5%; }
55
- h2 { font-size: 123.1%; }
56
- h3 { font-size: 108%; }
57
- h1, h2, h3 { margin: 1em 0; }
58
- h1, h2, h3, h4, h5, h6, strong { font-weight: bold; }
59
- abbr, acronym {
60
- border-bottom: 1px dotted #000000;
61
- cursor: help;
62
- }
63
- em { font-style: italic; }
64
- blockquote, ul, ol, dl { margin: 1em; }
65
- ol, ul, dl { margin-left: 2em; }
66
- ol li { list-style: decimal outside; }
67
- ul li { list-style: disc outside; }
68
- dl dd { margin-left: 1em; }
69
- th, td {
70
- border: 1px solid #000000;
71
- padding: 0.5em;
72
- }
73
- th {
74
- font-weight: bold;
75
- text-align: center;
76
- }
77
- caption {
78
- margin-bottom: 0.5em;
79
- text-align: center;
80
- }
81
- p, fieldset, table, pre { margin-bottom: 1em; }
82
- input[type=text], input[type=password], textarea {
83
- width: 12.25em;
84
- *width: 11.9em;
85
- }
86
- ol li { list-style: none; }
87
- ul li { list-style: none; }
88
- th, td { border: none; }
89
- input[type=text], input[type=password], textarea { width: auto; }
@@ -1 +0,0 @@
1
- @import "../themes/simple_theme/src/reset.less";