fanforce-app-factory 2.0.0.rc26 → 2.0.0.rc27

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,7 +22,7 @@ class Fanforce::AppFactory::CLI::Env
22
22
  log "#{'Updated'.format(:green,:bold)} #{environment.to_s.titleize}#{has_workers ? '... and workers have' : ' has'} #{vars.size} env variables"
23
23
  end
24
24
 
25
- def push_env_to(environment, vars, create_worker_env=true)
25
+ def push_to(environment, vars, create_worker_env=true)
26
26
  environment = environment.to_sym
27
27
  vars.each {|k,v| puts " - #{k}" }
28
28
  workers_dir = "#{app.dir}/workers"
@@ -104,35 +104,16 @@ class Fanforce::AppFactory::CLI::Scripts
104
104
  end
105
105
  log divider '---------------------------------------------------------------------------------------------------+'
106
106
 
107
- if Fanforce::CLI::TYPE == :directory_of_apps
108
- confirm("\nYou are about to update #{Fanforce::CLI::Apps.total_count} apps in this directory. This cannot be undone.\n"+
109
- 'ARE YOU SURE?', true)
110
-
111
- Fanforce::CLI::Apps.each do |app, processed_count, total_count|
112
- log divider '+-------------------------------------------------------------------------------------------------'
113
- log "#{'APP'.format(:bold)} - #{app._id.upcase.gsub('-',' ').format(:bold)} (#{processed_count} of #{total_count})... "
114
- update_factory_for_app(app)
115
- end
116
- elsif Fanforce::CLI::TYPE == :single_app
117
- app = Fanforce::CLI::App.load(Fanforce::CLI::DIR)
118
- update_factory_for_app(app)
119
- end
120
107
 
121
- install_factory_gem_locally(version, local_path) if local_path
108
+ local_path ? install_local_factory_gem(version, local_path) : install_remote_factory_gem(version)
122
109
  puts ''
123
110
  end
124
111
 
125
- def update_factory_for_app(app)
126
- gemfile_filepath = Fanforce::AppFactory::CLI::Scaffolding.dir + '/Gemfile'
127
- file = Fanforce::AppFactory::CLI::ScaffoldingFile.new(gemfile_filepath, app)
128
- if file.update
129
- Fanforce::AppFactory::CLI::Bundler.new(app).setup
130
- else
131
- log('Gemfile up to date')
132
- end
112
+ def install_remote_factory_gem(version)
113
+ system "gem install fanforce-app-factory -v #{version}"
133
114
  end
134
115
 
135
- def install_factory_gem_locally(version, local_gem_path)
116
+ def install_local_factory_gem(version, local_gem_path)
136
117
  return if !local_gem_path
137
118
  gem_filepath = nil
138
119
  Dir.chdir(local_gem_path) do
@@ -1,5 +1,5 @@
1
1
  class Fanforce
2
2
  class AppFactory
3
- VERSION = '2.0.0.rc26'
3
+ VERSION = '2.0.0.rc27'
4
4
  end
5
5
  end
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: 2.0.0.rc26
4
+ version: 2.0.0.rc27
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors: