bhf 0.4.30 → 0.4.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/bhf.rb +42 -1
  2. metadata +14 -15
  3. data/lib/engine.rb +0 -42
data/lib/bhf.rb CHANGED
@@ -1,8 +1,49 @@
1
1
  def d(var)
2
2
  raise var.inspect.split(', ').join(",\n")
3
3
  end
4
+ require 'haml'
5
+ require 'kaminari'
6
+
7
+ module Bhf
8
+ class Engine < Rails::Engine
9
+
10
+ # Config defaults
11
+ config.page_title = nil
12
+ config.mount_at = 'bhf'
13
+ config.on_login_fail = :root_url
14
+ config.logout_path = :logout_path
15
+ config.session_auth_name = :is_admin
16
+ config.session_account_id = :admin_account_id
17
+ config.account_model = 'User'
18
+ config.account_model_find_method = 'find'
19
+ config.css = []
20
+
21
+ config.routes = lambda {
22
+ namespace :bhf, path: Bhf::Engine.config.mount_at do
23
+ root to: 'application#index'
24
+
25
+ get 'page/:page', to: 'pages#show', as: :page
26
+
27
+ scope ':platform' do
28
+ resources :entries, except: [:index] do
29
+ put :sort, on: :collection
30
+
31
+ resources :embed_entries, except: [:index, :show], as: :embed
32
+ post :duplicate, on: :member
33
+ end
34
+ end
35
+
36
+ end
37
+ }
38
+
39
+
40
+ config.remove_default_routes = false
41
+
42
+ # config.bhf_logic = YAML::load(IO.read('config/bhf.yml'))
43
+
44
+ end
45
+ end
4
46
 
5
- require 'engine' if defined?(Rails) && Rails::VERSION::MAJOR == 3
6
47
  require 'bhf/i18n'
7
48
  require 'bhf/active_record/active_record'
8
49
  require 'bhf/active_record/upload'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bhf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.30
4
+ version: 0.4.31
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: 2013-01-27 00:00:00.000000000Z
12
+ date: 2013-02-16 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70240072088560 !ruby/object:Gem::Requirement
16
+ requirement: &70320863617360 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70240072088560
24
+ version_requirements: *70320863617360
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: kaminari
27
- requirement: &70240072086020 !ruby/object:Gem::Requirement
27
+ requirement: &70320863616880 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.12.4
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70240072086020
35
+ version_requirements: *70320863616880
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: haml-rails
38
- requirement: &70240072075760 !ruby/object:Gem::Requirement
38
+ requirement: &70320863616340 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.3.4
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70240072075760
46
+ version_requirements: *70320863616340
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: sass-rails
49
- requirement: &70240072074000 !ruby/object:Gem::Requirement
49
+ requirement: &70320863611700 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 3.1.4
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70240072074000
57
+ version_requirements: *70320863611700
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: mootools-rails
60
- requirement: &70240072072700 !ruby/object:Gem::Requirement
60
+ requirement: &70320863611040 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: 1.0.1
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70240072072700
68
+ version_requirements: *70320863611040
69
69
  description: Gets you there on time
70
70
  email: anton.pawlik@gmail.com
71
71
  executables: []
@@ -158,7 +158,6 @@ files:
158
158
  - lib/bhf/platform.rb
159
159
  - lib/bhf/settings.rb
160
160
  - lib/bhf/view_helpers.rb
161
- - lib/engine.rb
162
161
  - lib/rails/generators/bhf/templates/initializer.rb
163
162
  - vendor/assets/images/bhf/ajax_loader.gif
164
163
  - vendor/assets/images/bhf/bg.png
@@ -190,7 +189,7 @@ files:
190
189
  - vendor/assets/stylesheets/bhf/reset.css.sass
191
190
  - vendor/assets/stylesheets/bhf/typo.css.scss
192
191
  - README.md
193
- homepage: http://github.com/antpaw/bahnhof
192
+ homepage: http://github.com/antpaw/bhf
194
193
  licenses: []
195
194
  post_install_message:
196
195
  rdoc_options: []
@@ -213,5 +212,5 @@ rubyforge_project: nowarning
213
212
  rubygems_version: 1.8.10
214
213
  signing_key:
215
214
  specification_version: 3
216
- summary: Agnostic rails backend
215
+ summary: Agnostic Rails backend
217
216
  test_files: []
data/lib/engine.rb DELETED
@@ -1,42 +0,0 @@
1
- require 'haml'
2
- require 'kaminari'
3
-
4
- module Bhf
5
- class Engine < Rails::Engine
6
-
7
- # Config defaults
8
- config.page_title = nil
9
- config.mount_at = 'bhf'
10
- config.on_login_fail = :root_url
11
- config.logout_path = :logout_path
12
- config.session_auth_name = :is_admin
13
- config.session_account_id = :admin_account_id
14
- config.account_model = 'User'
15
- config.account_model_find_method = 'find'
16
- config.css = []
17
-
18
- config.routes = lambda {
19
- namespace :bhf, path: Bhf::Engine.config.mount_at do
20
- root to: 'application#index'
21
-
22
- get 'page/:page', to: 'pages#show', as: :page
23
-
24
- scope ':platform' do
25
- resources :entries, except: [:index] do
26
- put :sort, on: :collection
27
-
28
- resources :embed_entries, except: [:index, :show], as: :embed
29
- post :duplicate, on: :member
30
- end
31
- end
32
-
33
- end
34
- }
35
-
36
-
37
- config.remove_default_routes = false
38
-
39
- # config.bhf_logic = YAML::load(IO.read('config/bhf.yml'))
40
-
41
- end
42
- end