fanforce-plugin-factory 1.6.1 → 2.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. data/Rakefile +3 -1
  2. data/fanforce-plugin-factory.gemspec +21 -20
  3. data/lib/fanforce/app_factory/asset_framework/app_factory/_bootstrap_override.scss +1 -0
  4. data/lib/fanforce/app_factory/asset_framework/app_factory/directives/base-footer/_base-footer.coffee +6 -0
  5. data/lib/fanforce/app_factory/asset_framework/app_factory/directives/base-footer/_base-footer.scss +21 -0
  6. data/lib/fanforce/app_factory/asset_framework/app_factory/directives/campaign-footer/_campaign-footer.coffee +15 -0
  7. data/lib/fanforce/app_factory/asset_framework/app_factory/directives/campaign-footer/_campaign-footer.scss +4 -0
  8. data/lib/fanforce/app_factory/asset_framework/app_factory/directives/initiative-added/_initiative-added.coffee +15 -0
  9. data/lib/fanforce/app_factory/asset_framework/app_factory/directives/initiative-added/_initiative-added.scss +4 -0
  10. data/lib/fanforce/app_factory/asset_framework/app_factory/directives/page/_page.scss +6 -0
  11. data/lib/fanforce/app_factory/asset_framework/app_factory/vendors/moment.min.js +6 -0
  12. data/lib/fanforce/app_factory/directive_views/campaign-footer.haml +8 -0
  13. data/lib/fanforce/app_factory/directive_views/initiative-added.haml +8 -0
  14. data/lib/fanforce/app_factory/scaffolding/assets/css/._fembedded_native.scss.registry +4 -0
  15. data/lib/fanforce/app_factory/scaffolding/assets/css/fembedded_native.scss +21 -0
  16. data/lib/fanforce/app_factory/scaffolding/assets/js/._app-fembedded.coffee.registry +2 -0
  17. data/lib/fanforce/app_factory/scaffolding/assets/js/._fembedded_native.js.registry +2 -0
  18. data/lib/fanforce/app_factory/scaffolding/assets/js/fembedded_native.js +7 -0
  19. data/lib/fanforce/app_factory/scaffolding/layouts/._fembedded_native.haml.registry +3 -0
  20. data/lib/fanforce/app_factory/scaffolding/layouts/fembedded_native.haml +8 -0
  21. data/lib/fanforce/app_factory/sinatra/helper_routes/com_campaign.rb +11 -0
  22. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/directives/initiative-footer/_initiative-footer.scss +1 -17
  23. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/directives/initiative-searcher/_initiative-searcher.scss +4 -4
  24. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/directives/loading/_loading.scss +1 -1
  25. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/directives/start-arrow/_start-arrow.scss +3 -3
  26. data/lib/fanforce/plugin_factory/cli/lib/bitbucket.rb +1 -1
  27. data/lib/fanforce/plugin_factory/cli/lib/env.rb +1 -1
  28. data/lib/fanforce/plugin_factory/cli/lib/heroku.rb +67 -49
  29. data/lib/fanforce/plugin_factory/cli/lib/iron.rb +1 -3
  30. data/lib/fanforce/plugin_factory/cli/lib/scaffolding.rb +9 -3
  31. data/lib/fanforce/plugin_factory/cli/lib/scaffolding_file.rb +22 -8
  32. data/lib/fanforce/plugin_factory/cli/scripts/destroy.rb +11 -13
  33. data/lib/fanforce/plugin_factory/cli/scripts/push.rb +6 -12
  34. data/lib/fanforce/plugin_factory/cli/scripts/restart.rb +1 -7
  35. data/lib/fanforce/plugin_factory/core_config.rb +2 -2
  36. data/lib/fanforce/plugin_factory/directive_views/initiative-footer.haml +9 -8
  37. data/lib/fanforce/plugin_factory/plugin.rb +7 -0
  38. data/lib/fanforce/plugin_factory/scaffolding/._Gemfile.registry +1 -0
  39. data/lib/fanforce/plugin_factory/scaffolding/._Rakefile.registry +1 -0
  40. data/lib/fanforce/plugin_factory/scaffolding/._config.ru.registry +1 -0
  41. data/lib/fanforce/plugin_factory/scaffolding/._robots.txt.registry +1 -0
  42. data/lib/fanforce/plugin_factory/scaffolding/Gemfile +0 -1
  43. data/lib/fanforce/plugin_factory/scaffolding/Rakefile +0 -1
  44. data/lib/fanforce/plugin_factory/scaffolding/Routes.rb +5 -4
  45. data/lib/fanforce/plugin_factory/scaffolding/assets/css/._fembedded.scss.registry +1 -0
  46. data/lib/fanforce/plugin_factory/scaffolding/assets/css/fembedded.scss +1 -4
  47. data/lib/fanforce/plugin_factory/scaffolding/assets/js/._fembedded.js.registry +1 -0
  48. data/lib/fanforce/plugin_factory/scaffolding/assets/js/controllers/initialize.txt +2 -0
  49. data/lib/fanforce/plugin_factory/scaffolding/assets/js/fembedded.js +3 -1
  50. data/lib/fanforce/plugin_factory/scaffolding/assets/js/lib/._filters.coffee.registry +1 -0
  51. data/lib/fanforce/plugin_factory/scaffolding/assets/js/lib/filters.coffee +21 -1
  52. data/lib/fanforce/plugin_factory/scaffolding/assets/js/scripts/initialize.txt +2 -0
  53. data/lib/fanforce/plugin_factory/scaffolding/config.ru +6 -0
  54. data/lib/fanforce/plugin_factory/scaffolding/layouts/._fembedded.haml.registry +1 -0
  55. data/lib/fanforce/plugin_factory/scaffolding/layouts/fembedded.haml +11 -16
  56. data/lib/fanforce/plugin_factory/scaffolding/robots.txt +0 -1
  57. data/lib/fanforce/plugin_factory/sinatra/_load.rb +3 -3
  58. data/lib/fanforce/plugin_factory/sinatra/helper_routes/com_database.rb +4 -4
  59. data/lib/fanforce/plugin_factory/sinatra/helper_routes/com_initiative.rb +2 -1
  60. data/lib/fanforce/plugin_factory/version.rb +1 -1
  61. metadata +59 -25
  62. data/lib/fanforce/plugin_factory/asset_framework/plugin_factory/bootstrap/_bootstrap-overrides.scss +0 -18
  63. data/lib/fanforce/plugin_factory/scaffolding/assets/js/fembedded-app.coffee +0 -11
  64. data/lib/fanforce/plugin_factory/sinatra/helper_routes/com_broadcaster.rb +0 -7
@@ -29,7 +29,6 @@ class Fanforce::PluginFactory::CLI::Iron
29
29
  return puts "#{'Skipped '.format(:bold)} #{environment.to_s.titleize} has 0 workers" if workers.size == 0
30
30
 
31
31
  upload_processes = []
32
- FileUtils.cp("#{plugin.dir}/workers/.env/#{environment}.rb", "#{plugin.dir}/workers/.env/.#{environment}env.rb")
33
32
  workers.each do |filename|
34
33
  next if worker_filename and !filename.include?(worker_filename)
35
34
  code_name = filename.gsub('.worker', '')
@@ -39,12 +38,11 @@ class Fanforce::PluginFactory::CLI::Iron
39
38
  code.gem('fanforce-plugin-factory', factory_version)
40
39
  code.remote
41
40
  code.name = code_name
42
- code.file("#{plugin.dir}/workers/.env/.#{environment}env.rb")
41
+ code.file("#{plugin.dir}/workers/.env/#{environment}.rb", '.env')
43
42
 
44
43
  upload_processes << upload_iron_worker(iron_worker, code, filename, environment)
45
44
  end
46
45
  upload_processes.each { |pid| Process.waitpid(pid) }
47
- FileUtils.remove_file("#{plugin.dir}/workers/.env/.#{environment}env.rb")
48
46
  end
49
47
  end
50
48
 
@@ -30,9 +30,14 @@ class Fanforce::PluginFactory::CLI::Scaffolding
30
30
  # status = :exists, :current, :missing, :previous, :diverged, :forked
31
31
  change_data = {}
32
32
  files.each do |file|
33
- next change_data[file.filepath] = {
34
- status: File.directory?(file.filepath) ? :exists : :missing,
35
- } if File.directory?(file.scaffold_filepath)
33
+ if File.directory?(file.scaffold_filepath)
34
+ directory_exists = File.directory?(file.filepath)
35
+ change_data[file.filepath] = {status: directory_exists ? :exists : :missing}
36
+ if directory_exists and File.exists?("#{file.scaffold_filepath}initialize.txt") and Dir.glob("#{file.filepath}*").size == 0
37
+ change_data["#{file.filepath}initialize.txt"] = {status: :missing}
38
+ end
39
+ next
40
+ end
36
41
 
37
42
  status = file.status
38
43
  diff = file.diff_changes if [:previous,:diverged].include?(status)
@@ -58,6 +63,7 @@ class Fanforce::PluginFactory::CLI::Scaffolding
58
63
  def files
59
64
  Dir.glob("#{self.class.dir}/**/*", File::FNM_DOTMATCH).inject([]) do |files, scaffold_filepath|
60
65
  next files if scaffold_filepath =~ /\.registry$/
66
+ next files if scaffold_filepath =~ /\/initialize\.txt$/
61
67
  next files if scaffold_filepath =~ /\/\.\.?$/
62
68
  scaffold_filepath = "#{scaffold_filepath}/" if File.directory?(scaffold_filepath) and scaffold_filepath !~ /\/$/
63
69
  files << Fanforce::PluginFactory::CLI::ScaffoldingFile.new(scaffold_filepath, plugin)
@@ -18,8 +18,13 @@ class Fanforce::PluginFactory::CLI::ScaffoldingFile
18
18
 
19
19
  def create
20
20
  if File.directory?(scaffold_filepath)
21
- mkdir
22
- return nil
21
+ Dir.mkdir(filepath)
22
+ if File.exists?("#{scaffold_filepath}initialize.txt")
23
+ File.open("#{filepath}initialize.txt", 'w') {|f| f.write(File.open("#{scaffold_filepath}initialize.txt").read) }
24
+ end
25
+
26
+ log "#{'Created'.format(:green,:bold)} #{relativepath}"
27
+ return true
23
28
  end
24
29
 
25
30
  return update if File.exists?(filepath)
@@ -32,8 +37,21 @@ class Fanforce::PluginFactory::CLI::ScaffoldingFile
32
37
 
33
38
  def update
34
39
  if File.directory?(scaffold_filepath)
35
- mkdir
36
- return nil
40
+ created_dir = false
41
+ added_initialize_file = false
42
+ if !File.directory?(filepath)
43
+ Dir.mkdir(filepath)
44
+ log "#{'Created'.format(:green,:bold)} #{relativepath}"
45
+ created_dir = true
46
+ end
47
+
48
+ if File.exists?("#{scaffold_filepath}initialize.txt") and Dir.glob("#{filepath}*").size == 0
49
+ File.open("#{filepath}initialize.txt", 'w') {|f| f.write(File.open("#{scaffold_filepath}initialize.txt").read) }
50
+ log "#{'Added'.format(:green,:bold)} #{relativepath}initialize.txt" if !created_dir
51
+ added_initialize_file = true
52
+ end
53
+
54
+ return (created_dir || added_initialize_file) ? true : false
37
55
  end
38
56
  is_missing = is_missing?
39
57
  if !is_missing
@@ -79,10 +97,6 @@ class Fanforce::PluginFactory::CLI::ScaffoldingFile
79
97
 
80
98
  ######################################################################################################################
81
99
 
82
- def mkdir
83
- Dir.mkdir(filepath) if !File.directory?(filepath)
84
- end
85
-
86
100
  def extension
87
101
  @extension ||= scaffold_filepath.match(/([^\/\.]+)$/)[1].to_s.downcase
88
102
  end
@@ -18,19 +18,17 @@ class Fanforce::PluginFactory::CLI::Scripts
18
18
  log divider '+-----'
19
19
  confirm("You are about to delete both local and remote files for #{plugin_id}.\nARE YOU SURE?", true)
20
20
 
21
- # puts "\n---------------------------------------------------------------------------------------------------------------"
22
- # puts 'DELETING HEROKU APPS...'
23
- # [:staging,:production].each do |environment|
24
- # next if $Config[:heroku].blank? or $Config[:heroku][environment].blank?
25
- # heroku = auth_heroku(environment)
26
- # heroku_app_name = get_heroku_app_name(plugin, environment)
27
- # begin
28
- # heroku.delete_app(heroku_app_name)
29
- # puts "#{'Removed '.format(:green,:bold)}" + " #{heroku_app_name}"
30
- # rescue Exception => e
31
- # puts "#{'Already Removed'.format(:green,:bold)}" + " #{heroku_app_name}"
32
- # end
33
- # end
21
+ log divider '+-----------------------------------------------------------------------------------------------------'
22
+ log 'DELETING HEROKU APPS...'
23
+ [:staging,:production].each do |environment|
24
+ heroku = Fanforce::PluginFactory::CLI::Heroku.new(plugin, environment)
25
+ if heroku.app_exists?
26
+ heroku.destroy
27
+ log "#{'Removed '.format(:green,:bold)}" + " #{heroku.app_name}"
28
+ else
29
+ log "#{'Already Removed'.format(:green,:bold)}" + " #{heroku.app_name}"
30
+ end
31
+ end
34
32
 
35
33
  log divider '+-----------------------------------------------------------------------------------------------------'
36
34
  log 'REMOVING BITBUCKET REPOSITORY...'
@@ -35,8 +35,8 @@ class Fanforce::PluginFactory::CLI::Scripts
35
35
  end
36
36
 
37
37
  if [:all,:heroku].include?(command) and environment != :development
38
- heroku = Fanforce::PluginFactory::CLI::Heroku.new(plugin)
39
- heroku.ensure_heroku_app_exists(environment)
38
+ heroku = Fanforce::PluginFactory::CLI::Heroku.new(plugin, environment)
39
+ heroku.ensure_app_exists
40
40
  end
41
41
 
42
42
  if [:all,:iron].include?(command)
@@ -69,20 +69,14 @@ class Fanforce::PluginFactory::CLI::Scripts
69
69
  end
70
70
 
71
71
  def push_heroku(heroku, plugin, environment)
72
- case environment
73
- when :staging then env = :stg
74
- when :production then env = :prd
75
- end
76
- remote_name = "#{env}-heroku"
77
-
78
- heroku.setup(environment) if !(`git remote`).split(/\r?\n/).include?(remote_name)
72
+ heroku.ensure_git_remote_exists
79
73
 
80
74
  vars = Fanforce::PluginFactory::CLI::Env.new(plugin).vars(environment)
81
- heroku.update_config(environment, vars)
75
+ heroku.update_config(vars)
82
76
  log 'Updated ENV'.format(:green,:bold) + " on Heroku #{environment.to_s.titleize} (#{vars.size} variables)..."
83
77
 
84
- puts "\n#{'Pushing '.format(:green,:bold)}" + "latest commit to Heroku #{environment.to_s.titleize} (#{remote_name})..."
85
- console_command("git push #{remote_name} master", true)
78
+ puts "\n#{'Pushing '.format(:green,:bold)}" + "latest commit to Heroku #{environment.to_s.titleize} (#{heroku.git_remote_name})..."
79
+ console_command("git push #{heroku.git_remote_name} master", true)
86
80
  end
87
81
 
88
82
  end
@@ -25,13 +25,7 @@ class Fanforce::PluginFactory::CLI::Scripts
25
25
  FileUtils.mkdir("#{plugin.dir}/tmp") if !File.directory?("#{plugin.dir}/tmp")
26
26
  FileUtils.touch("#{plugin.dir}/tmp/restart.txt")
27
27
  elsif [:production, :staging].include?(environment)
28
- error 'Production and Staging are not working'
29
- if config[:heroku].blank? or config[:heroku][environment].blank?
30
- puts "#{'OOPS...'.format(:red,:bold)} #{environment} has not been setup on heroku"
31
- next
32
- end
33
- heroku = auth_heroku(environment)
34
- heroku.post_ps_restart get_heroku_app_name(plugin, environment)
28
+ Fanforce::PluginFactory::CLI::Heroku.new(plugin, environment).restart
35
29
  end
36
30
  log "#{"Restarted #{environment}".format(:bold,:green)} #{plugin.dir_name}"
37
31
  end
@@ -60,9 +60,9 @@ class Fanforce::Plugin::CoreConfig
60
60
  $: << File.join(@base_dir,'lib') if File.directory?("#{@base_dir}/lib")
61
61
  $: << @base_dir if File.directory?("#{@base_dir}")
62
62
 
63
- require "#{factory_dir}/sinatra/helper_routes/com_initiative"
64
- require "#{factory_dir}/sinatra/helper_routes/com_broadcaster"
63
+ require "#{factory_dir}/sinatra/helper_routes/app"
65
64
  require "#{factory_dir}/sinatra/helper_routes/com_database"
65
+ require "#{factory_dir}/sinatra/helper_routes/com_campaign"
66
66
  require "#{factory_dir}/sinatra/helper_routes/com_identifier"
67
67
  require "#{factory_dir}/sinatra/helper_routes/com_js_widget"
68
68
  require "#{factory_dir}/sinatra/helper_routes/plugin"
@@ -1,8 +1,9 @@
1
- .footer
2
- %label Save initiative as...
3
- .input-wrapper(onclick='$(this).find("input").focus()')
4
- .prefix {{prefix}}
5
- %input.form-control.input-sm(type='text' ng-disabled='is_disabled' ng-model='initiative_name')
6
- %button.btn.btn-sm.btn-primary(ng-click='save()' ng-disabled='is_disabled')
7
- %i.icon-plus.icon-white
8
- Create
1
+ %base-footer
2
+ .footer
3
+ %label Save initiative as...
4
+ .input-wrapper(onclick='$(this).find("input").focus()')
5
+ .prefix {{prefix}}
6
+ %input.form-control.input-sm(type='text' ng-disabled='is_disabled' ng-model='initiative_name')
7
+ %button.btn.btn-sm.btn-primary(ng-click='save()' ng-disabled='is_disabled')
8
+ %i.icon-plus.icon-white
9
+ Create
@@ -1,6 +1,8 @@
1
1
  require 'redis'
2
2
  require 'fileutils'
3
3
  require 'rack/jsonr'
4
+ require 'rack/jquery-params'
5
+ require 'rack/cors'
4
6
  require 'sinatra/base'
5
7
  require 'active_support/all'
6
8
  require 'fanforce/api'
@@ -52,9 +54,14 @@ class Fanforce::Plugin
52
54
  sprockets = SprocketsCompiler.setup(base_dir)
53
55
  return sprockets.index.call(env)
54
56
  end
57
+ return Rack::File.new("#{base_dir}").call(env) if env['PATH_INFO'] =~ /^\/(favicon.ico|robots.txt)/
58
+
55
59
  require_relative 'sinatra/_load'
56
60
  request = Rack::Request.new(env)
61
+ Sass::Plugin.options[:cache_location] = './tmp/sass-cache'
62
+ sass_options = {:cache_location => "path\to\tmp\sass-cache"}
57
63
  Rack::JSONR.intercept_method_override(env, request, request.params, :all)
64
+ Rack::JQueryParams.fix(env, :all)
58
65
  Sinatra.new.call(env)
59
66
  end
60
67
  end
@@ -1,3 +1,4 @@
1
1
  fanforce-plugin-factory-1.6.0:ae064a186c4105989dbb1fc1d89d297c4bb50645
2
2
  fanforce-plugin-factory-1.6.0:b4efb7323d5dd68f09d7a16c16d02880a0504284
3
3
  fanforce-plugin-factory-1.6.0:8b96f77d8bb7e7cea7a96b2bd9e580bd8b12dee8
4
+ fanforce-plugin-factory-2.0.0.rc1:804c185c4212d74d0be61e4f5f035d9eecbfa8be
@@ -1,3 +1,4 @@
1
1
  fanforce-plugin-factory-1.6.0:26cd00b1a8da9aae4cd70711b866f29140baeaff
2
2
  fanforce-plugin-factory-1.6.0:cee70a90994a4d0f268511a584ec90db09650ed2
3
3
  fanforce-plugin-factory-1.6.0:95c9666667a190e6c562393a68f22ab6f036f008
4
+ fanforce-plugin-factory-2.0.0.rc1:11e944488dcd7f8d930dfcde88e754ce22c3f4e1
@@ -2,3 +2,4 @@ fanforce-plugin-factory-1.6.0:caed161fa223c1350d5af2ad35473b0e70038655
2
2
  fanforce-plugin-factory-1.6.0:76016405e6284edb561d1e174d1ef8033461df64
3
3
  fanforce-plugin-factory-1.6.0:a9286ef7cb6e5c691e6d147cbf264262ee196837
4
4
  fanforce-plugin-factory-1.6.0:621e2a7626b0da72464346b506a47ef012912e23
5
+ fanforce-plugin-factory-2.0.0.rc1:a4e60d8212d23af4273165cf818249395987ba35
@@ -1,3 +1,4 @@
1
1
  fanforce-plugin-factory-1.6.0:fb35191721228a8b5315598705b637811e59ca56
2
2
  fanforce-plugin-factory-1.6.0:464b1266fdd658b516de626464a5aa8455cba664
3
3
  fanforce-plugin-factory-1.6.0:1fb3e86b6f8117f386bf3842718946d0157b7a0f
4
+ fanforce-plugin-factory-2.0.0.rc1:58638c3c3504e2eb8b52a7401607fc365325dbcd
@@ -1,6 +1,5 @@
1
1
  # PluginFactoryScaffolding : PARTIAL
2
2
  ########################################################################################################################
3
-
4
3
  source 'https://rubygems.org'
5
4
  ruby '1.9.3'
6
5
 
@@ -1,6 +1,5 @@
1
1
  # PluginFactoryScaffolding : PARTIAL
2
2
  ########################################################################################################################
3
-
4
3
  require 'bundler'; Bundler.setup
5
4
  require 'fanforce/plugin_factory'
6
5
 
@@ -17,17 +17,18 @@ class Plugin::Sinatra
17
17
  ######################################################################################################################
18
18
  # DATABASE
19
19
 
20
- #static '/:com_database_shortid/add_source.html', [] do route_add_source_ui end
21
- #static '/:com_database_shortid/source_details.html', [] do route_source_details_ui end
20
+ #static '/:com_database_shortid/add_database.html', [] do route_add_database_ui end
21
+ #static '/:com_database_shortid/view_profile.html', [] do route_view_profile_ui end
22
22
 
23
23
  ######################################################################################################################
24
24
  # PROCESSOR
25
25
 
26
26
 
27
27
  ######################################################################################################################
28
- # BROADCASTER
28
+ # CAMPAIGN
29
29
 
30
- #static '/:com_initiative_shortid/new_message.html', [] do route_new_message_ui end
30
+ #static '/:com_campaign_shortid/add_campaign.html', [] do route_add_campaign_ui end
31
+ #static '/:com_campaign_shortid/view_campaign.html', [] do route_view_campaign_ui end
31
32
 
32
33
  ######################################################################################################################
33
34
  # IDENTIFIER
@@ -2,3 +2,4 @@ fanforce-plugin-factory-1.6.0:90e4bd9c4abaeabd9f44b29bec97f76f8149054b
2
2
  fanforce-plugin-factory-1.6.0:290a0a53557bf6151cb9db03bd91e4ff75888ef1
3
3
  fanforce-plugin-factory-1.6.0:4bbddc05c99b42b72cc9b71036b1540db02b7842
4
4
  fanforce-plugin-factory-1.6.0:3100df670df8f5fb23b7e9fce2653228db080841
5
+ fanforce-plugin-factory-2.0.0.rc1:37b5ba82eda9b6058e6ee625916caa998dc0d64b
@@ -15,10 +15,7 @@
15
15
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
16
16
 
17
17
  html.fembedded-layout {
18
- body {
19
- overflow: hidden;
20
- background: #F4F8FC;
21
- }
18
+ body { overflow: hidden; background: white; }
22
19
  }
23
20
 
24
21
  // END PARTIAL /////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1,3 +1,4 @@
1
1
  fanforce-plugin-factory-1.6.0:130fe4541ada9247bd4224b54f744f17476d7e55
2
2
  fanforce-plugin-factory-1.6.0:89a46b16eb62e6dd5b68767cc9e2d39733eb94c0
3
3
  fanforce-plugin-factory-1.6.0:bd29cc97b29b1819d13004bbecd02ef8d161e2ac
4
+ fanforce-plugin-factory-2.0.0.rc1:d381adc3c98eb0d96afb32c12444487b6c1b16b3
@@ -0,0 +1,2 @@
1
+ This file exists to ensure the folder is added to git (since the directory is empty). You should
2
+ remove this file once you add some files.
@@ -1,12 +1,14 @@
1
1
  // PluginFactoryScaffolding : PARTIAL
2
2
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3
- //= require fembedded-app
3
+ //= require ./app-fembedded
4
4
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
5
5
  //= require plugin_factory/ui-select
6
+ //= require plugin_factory/vendors/moment.min
6
7
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
7
8
  //= require plugin_factory/directives
8
9
  //= require plugin_factory/lib
9
10
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
10
11
  //= require_tree ./lib
11
12
  //= require_tree ./controllers
13
+
12
14
  // END PARTIAL /////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1,3 +1,4 @@
1
1
  fanforce-plugin-factory-1.6.0:89ec4c29cda80ef22367c43e07f30c6feb53c92b
2
2
  fanforce-plugin-factory-1.6.0:aa4484417ba6f1b036316847cdff214ae3097f35
3
3
  fanforce-plugin-factory-1.6.0:34736a5dfd53d8a2fd2d137590d1d2f5d052f827
4
+ fanforce-plugin-factory-2.0.0.rc1:ad8f95e3b051e230e7f0abc90fd9fa07cb6dfed4
@@ -1,9 +1,29 @@
1
1
  # PluginFactoryScaffolding : PARTIAL
2
2
  ########################################################################################################################
3
3
 
4
- App.filter 'fromNow', (-> (date) ->
4
+ # FILTER: fromNow
5
+ ####################################################################################
6
+ App.filter('fromNow', ()-> (date) ->
5
7
  return 'never' if !date
6
8
  moment(date).fromNow()
7
9
  )
8
10
 
11
+ # FILTER: titleize
12
+ ####################################################################################
13
+ App.filter('titleize', -> (str) ->
14
+ return str if typeof str != 'string'
15
+ smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|of|on|or|the|to|vs?\.?|via)$/i
16
+ str.replace /([^\W_]+[^\s-]*) */g, (match, p1, index, title)->
17
+ return match.toLowerCase() if (index > 0 && index + p1.length != title.length && p1.search(smallWords) > -1) && (title.charAt(index - 2) != ":") && (title.charAt(index - 1).search(/[^\s-]/) < 0)
18
+ return match if (p1.substr(1).search(/[A-Z]|\../) > -1)
19
+ match.charAt(0).toUpperCase() + match.substr(1)
20
+ )
21
+
22
+ # FILTER: humanize
23
+ ####################################################################################
24
+ App.filter('humanize', -> (str) ->
25
+ return str if typeof str != 'string'
26
+ str.replace('_', ' ')
27
+ )
28
+
9
29
  # END PARTIAL ##########################################################################################################
@@ -0,0 +1,2 @@
1
+ This file exists to ensure the folder is added to git (since the directory is empty). You should
2
+ remove this file once you add some files.
@@ -3,6 +3,12 @@
3
3
  require 'bundler'; Bundler.setup
4
4
  require 'fanforce/plugin_factory'
5
5
 
6
+ use Rack::Cors do
7
+ allow do
8
+ origins '*'
9
+ resource '*', :headers => :any, :methods => [:get, :post, :options, :put, :delete], :max_age => 1728000
10
+ end
11
+ end
6
12
  run Fanforce::Plugin
7
13
 
8
14
  # END PARTIAL ##########################################################################################################
@@ -2,3 +2,4 @@ fanforce-plugin-factory-1.6.0:0af55ae841e12060b516293b45f0e792c2ed89b9
2
2
  fanforce-plugin-factory-1.6.0:750b6bdf56a47d700a45cc8e1d3a711933603f0d
3
3
  fanforce-plugin-factory-1.6.0:429f08694937012aa6731394fca2ff57e6600070
4
4
  fanforce-plugin-factory-1.6.0:fbda63d2f1b25138acc371c7be5d2e70f05886bf
5
+ fanforce-plugin-factory-2.0.0.rc1:0a8a72543f701e54c2f05f649a3a92ce2dc482e7
@@ -4,23 +4,18 @@
4
4
  %html.fembedded-layout(ng-app='fembedded')
5
5
  %head
6
6
  %title Fanforce Plugin
7
- %meta(charset='UTF-8')/
8
- %meta(http-equiv='X-UA-Compatible' content='IE=edge,chrome=1')/
9
- %meta(name='viewport' content='width=device-width')/
10
- %meta(http-equiv='Content-Type' content='text/html charset=iso-8859-1')/
11
- %meta(http-equiv='Content-Language' content='en-us')/
12
7
  :javascript
8
+ APP_ID = #{App._id.to_json}
13
9
  BASE_DOMAIN = #{Fanforce.base_domain.to_json}
14
10
  API_DOMAIN = #{Fanforce.api_domain.to_json}
11
+ APPS_BASE_DOMAIN = #{Fanforce.apps_base_domain.to_json}
12
+ = javascript 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.js'
13
+ = javascript 'http://ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.min.js'
15
14
  = javascript 'http://i.fanforce.dev/devforce.js'
16
- = javascript 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.js'
17
- = javascript 'http://ajax.googleapis.com/ajax/libs/angularjs/1.3.4/angular.min.js'
18
- = stylesheet 'fembedded'
19
- = javascript 'fembedded'
20
-
21
- %body(class=page_classes)
22
- .page-loading(ng-hide='app_is_loaded')
23
- %loading Page loading...
24
- .page-loaded(ng-show='app_is_loaded')
25
- .angular-view(ng-view)
26
- .standard-view= yield
15
+ = javascript "#{request.base_url}/assets/fembedded.js"
16
+ = stylesheet "#{request.base_url}/assets/fembedded.css"
17
+ %body
18
+ %loading(ng-hide='app_is_loaded') Page loading...
19
+ %page(class=page_classes ng-show='app_is_loaded' ng-class='{success: is_success}' ng-cloak)
20
+ %ng-view
21
+ = yield
@@ -1,6 +1,5 @@
1
1
  # PluginFactoryScaffolding : PARTIAL
2
2
  ########################################################################################################################
3
-
4
3
  User-agent: *
5
4
  Allow: /
6
5