fanforce-app-factory 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
File without changes
@@ -26,23 +26,26 @@ class FanforceApp::Sinatra < Sinatra::Base
26
26
  end
27
27
 
28
28
  def page(page, options={})
29
- current_dir = File.expand_path('../', __FILE__)
30
- if !File.exists?("#{settings.views}/#{page}.haml")
31
- if File.exists?("#{settings.views}/#{options[:com_dir]}/#{page}.haml")
29
+ gem_dir = Pathname.new(File.expand_path('../', __FILE__))
30
+ app_dir = Pathname.new(File.expand_path('../', settings.views))
31
+ app_views_dir = Pathname.new(settings.views)
32
+ gem_rel_dir = gem_dir.relative_path_from(app_views_dir).to_s
33
+ gem_abs_dir = File.expand_path(gem_rel_dir, app_views_dir)
34
+
35
+ if !File.exists?("#{app_dir}/views/#{page}.haml")
36
+ if File.exists?("#{app_dir}/views/#{options[:com_dir]}/#{page}.haml")
32
37
  page_path = :"#{options[:com_dir]}/#{page}"
33
38
  else
34
- rel_path = Pathname.new(current_dir).relative_path_from(Pathname.new(settings.views))
35
- page_path = :"#{rel_path}/views/#{page}" if File.exists?("#{rel_path}/views/#{page}.haml")
39
+ page_path = :"#{gem_rel_dir}/views/#{page}" if File.exists?("#{gem_abs_dir}/views/#{page}.haml")
36
40
  end
37
41
  end
38
42
  page_path ||= page
39
43
 
40
44
  if options[:layout] and FanforceApp.config.has_layout_for(page)
41
- if File.exists?("#{settings.views}/../layouts/#{options[:layout]}.haml")
45
+ if File.exists?("#{app_dir}/layouts/#{options[:layout]}.haml")
42
46
  options[:layout] = :"../layouts/#{options[:layout]}"
43
47
  else
44
- rel_path = Pathname.new(current_dir).relative_path_from(Pathname.new(settings.views))
45
- options[:layout] = :"#{rel_path}/layouts/#{options[:layout]}"
48
+ options[:layout] = :"#{gem_rel_dir}/layouts/#{options[:layout]}"
46
49
  end
47
50
  else
48
51
  options[:layout] = false
@@ -7,9 +7,10 @@ class FanforceApp::CoreConfig
7
7
  index: true,
8
8
  dashboard: true,
9
9
  add_initiative: true,
10
+ edit_initiative: true,
11
+ convert_pending_initiative: true,
10
12
  add_source: true,
11
13
  close_popup: true,
12
- edit_initiative: true,
13
14
  engage: true,
14
15
  new_message: true,
15
16
  source_details: true,
@@ -1,5 +1,5 @@
1
1
  class Fanforce
2
2
  module AppFactory
3
- VERSION = '1.1.0'
3
+ VERSION = '1.2.0'
4
4
  end
5
5
  end
@@ -1 +1 @@
1
- %h2 Add Initiative
1
+ %h2 Convert Pending Initiative
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fanforce-app-factory
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -340,7 +340,7 @@ extra_rdoc_files: []
340
340
  files:
341
341
  - .gitignore
342
342
  - .rbenv-gemsets
343
- - .rbenv-version
343
+ - .ruby-version
344
344
  - Gemfile
345
345
  - README.md
346
346
  - Rakefile