puffer 0.0.24 → 0.0.25

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.24
1
+ 0.0.25
data/config/routes.rb CHANGED
@@ -1,4 +1,4 @@
1
- Rails.application.routes.draw do
1
+ Puffer::Engine.routes.draw do
2
2
 
3
3
  namespace :admin do
4
4
  root :to => 'dashboard#index'
data/lib/puffer/engine.rb CHANGED
@@ -1,10 +1,5 @@
1
1
  module Puffer
2
2
  class Engine < Rails::Engine
3
- config.paths.add 'app/components', :eager_load => true
4
3
  config.autoload_paths << File.join(root, 'lib')
5
-
6
- initializer "puffer.add_view_paths", :after => :add_view_paths do |app|
7
- Puffer::Component::Base.view_paths = paths["app/components"].existent
8
- end
9
4
  end
10
5
  end
@@ -0,0 +1,36 @@
1
+ module Puffer
2
+ module Extensions
3
+ module Rails
4
+ module Engine
5
+ module Configuration
6
+ extend ActiveSupport::Concern
7
+
8
+ included do
9
+ alias_method_chain :paths, :components
10
+ end
11
+
12
+ module InstanceMethods
13
+ def paths_with_components
14
+ @paths ||= begin
15
+ paths = paths_without_components
16
+ paths.add 'app/components', :eager_load => true
17
+ paths
18
+ end
19
+ end
20
+ end
21
+ end
22
+
23
+ extend ActiveSupport::Concern
24
+
25
+ included do
26
+ initializer :"puffer.add_view_paths", :after => :add_view_paths do |app|
27
+ Puffer::Component::Base.prepend_view_path paths["app/components"].existent
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+
35
+ Rails::Engine::Configuration.send :include, Puffer::Extensions::Rails::Engine::Configuration
36
+ Rails::Engine.send :include, Puffer::Extensions::Rails::Engine
@@ -22,7 +22,7 @@ module Puffer
22
22
 
23
23
  def puffer_controller controller
24
24
  if controller.configuration.group
25
- puffer = Rails.application.routes.puffer
25
+ puffer = ::Rails.application.routes.puffer
26
26
  namespace = @scope[:module]
27
27
 
28
28
  unless puffer[namespace]
data/lib/puffer.rb CHANGED
@@ -1,16 +1,17 @@
1
1
  require 'kaminari'
2
2
 
3
- require 'puffer/engine'
4
3
  require 'puffer/extensions/activerecord'
5
4
  require 'puffer/extensions/controller'
6
5
  require 'puffer/extensions/core'
7
6
  require 'puffer/extensions/mapper'
8
7
  require 'puffer/extensions/form'
8
+ require 'puffer/extensions/engine'
9
+ require 'puffer/engine'
9
10
 
10
11
  module Puffer
11
12
 
12
13
  module Component
13
- autoload :Base, 'puffer/component'
14
+ autoload :Base, 'puffer/component'
14
15
 
15
16
  mattr_accessor :_mappings
16
17
  self._mappings = {}
data/puffer.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{puffer}
8
- s.version = "0.0.24"
8
+ s.version = "0.0.25"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{pyromaniac}]
@@ -107,6 +107,7 @@ Gem::Specification.new do |s|
107
107
  "lib/puffer/extensions/activerecord.rb",
108
108
  "lib/puffer/extensions/controller.rb",
109
109
  "lib/puffer/extensions/core.rb",
110
+ "lib/puffer/extensions/engine.rb",
110
111
  "lib/puffer/extensions/form.rb",
111
112
  "lib/puffer/extensions/mapper.rb",
112
113
  "lib/puffer/field.rb",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puffer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.25
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-09-09 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &21317520 !ruby/object:Gem::Requirement
16
+ requirement: &22403120 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *21317520
24
+ version_requirements: *22403120
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: kaminari
27
- requirement: &21316380 !ruby/object:Gem::Requirement
27
+ requirement: &22402300 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *21316380
35
+ version_requirements: *22402300
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: apotomo
38
- requirement: &21315460 !ruby/object:Gem::Requirement
38
+ requirement: &22401520 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *21315460
46
+ version_requirements: *22401520
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: sqlite3
49
- requirement: &21314520 !ruby/object:Gem::Requirement
49
+ requirement: &22400520 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *21314520
57
+ version_requirements: *22400520
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rspec-rails
60
- requirement: &21313840 !ruby/object:Gem::Requirement
60
+ requirement: &22399860 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *21313840
68
+ version_requirements: *22399860
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: capybara
71
- requirement: &21313040 !ruby/object:Gem::Requirement
71
+ requirement: &22398960 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *21313040
79
+ version_requirements: *22398960
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: database_cleaner
82
- requirement: &21287460 !ruby/object:Gem::Requirement
82
+ requirement: &22372900 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *21287460
90
+ version_requirements: *22372900
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: guard
93
- requirement: &21286500 !ruby/object:Gem::Requirement
93
+ requirement: &22371680 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *21286500
101
+ version_requirements: *22371680
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: libnotify
104
- requirement: &21285340 !ruby/object:Gem::Requirement
104
+ requirement: &22370680 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *21285340
112
+ version_requirements: *22370680
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: guard-rspec
115
- requirement: &21283680 !ruby/object:Gem::Requirement
115
+ requirement: &22369860 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '0'
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *21283680
123
+ version_requirements: *22369860
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: forgery
126
- requirement: &21282900 !ruby/object:Gem::Requirement
126
+ requirement: &22368680 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *21282900
134
+ version_requirements: *22368680
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: fabrication
137
- requirement: &21281780 !ruby/object:Gem::Requirement
137
+ requirement: &22367440 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: '0'
143
143
  type: :development
144
144
  prerelease: false
145
- version_requirements: *21281780
145
+ version_requirements: *22367440
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: jeweler
148
- requirement: &21280760 !ruby/object:Gem::Requirement
148
+ requirement: &22366340 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ! '>='
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: '0'
154
154
  type: :development
155
155
  prerelease: false
156
- version_requirements: *21280760
156
+ version_requirements: *22366340
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: nested_set
159
- requirement: &21279780 !ruby/object:Gem::Requirement
159
+ requirement: &22365440 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - ! '>='
@@ -164,7 +164,7 @@ dependencies:
164
164
  version: '0'
165
165
  type: :development
166
166
  prerelease: false
167
- version_requirements: *21279780
167
+ version_requirements: *22365440
168
168
  description: In Soviet Russia puffer admins you
169
169
  email: kinwizard@gmail.com
170
170
  executables: []
@@ -263,6 +263,7 @@ files:
263
263
  - lib/puffer/extensions/activerecord.rb
264
264
  - lib/puffer/extensions/controller.rb
265
265
  - lib/puffer/extensions/core.rb
266
+ - lib/puffer/extensions/engine.rb
266
267
  - lib/puffer/extensions/form.rb
267
268
  - lib/puffer/extensions/mapper.rb
268
269
  - lib/puffer/field.rb
@@ -368,7 +369,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
368
369
  version: '0'
369
370
  segments:
370
371
  - 0
371
- hash: 793759235087980983
372
+ hash: -2583020713337993814
372
373
  required_rubygems_version: !ruby/object:Gem::Requirement
373
374
  none: false
374
375
  requirements: