plezi 0.12.5 → 0.12.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b816b64c0253a8cc724c6a65b74b3a4cf4373e5f
4
- data.tar.gz: 8cb2f0ae9079365b974359edd41fbee38e825b1f
3
+ metadata.gz: fd6066ad34f74ff29d617a7e1a535b07dfc0608c
4
+ data.tar.gz: 16ee892e498e466a8b11dabc484f053729b11f81
5
5
  SHA512:
6
- metadata.gz: bf2cb30f5e04bf28a923f814a0feb6e1ac9d31d65f41fe5e37a8a2ef9064fa4a92d14c3a4fca12a3efd915251fde6a917bf0c340e12eec663f7b7022ca79f681
7
- data.tar.gz: 01e4dea1f3f911d55b60947de7a4d7952825a4909f7b59f6544c5afe0c9b6d07a22b491c199144ccb8f2a142b511764acfbfe3cd5f0667c995a57b4e108f46d4
6
+ metadata.gz: e7f514c042d6c7e20c54948b3343765a68a71c2485155de4e14dbb7f2337daf5990a877e37b8e1c0aa65e609d4bfa4859cff221a9e1cdd962df2ee93352d16e5
7
+ data.tar.gz: 18e245d1ba234960b72ba5ab5a65ecb05843a96097fb30d4480884d1532f79b84ca16bced7f650898fbe2f6b9c8e474d64a823e739b2286f5cc621f0a3693de6
@@ -2,6 +2,12 @@
2
2
 
3
3
  ***
4
4
 
5
+ Change log v.0.12.6
6
+
7
+ **Template Fix**: Heroku would load the `environment.rb` file while deploying the application. This would cause Plezi's server to kick in and hang deployment. This issue was circumvented by renaming the `environment.rb` file to `initialize.rb`. Thanks to Adrian Gomez for exposing the issue (issue#9)
8
+
9
+ ***
10
+
5
11
  Change log v.0.12.5
6
12
 
7
13
  **Fix**: Placebo's older Rack recognition required that Rack be required within the gemfile of the application. This is no longer the case. Now `start_placebo` can also be used in a non-Rack environment (i.e. when disabling the server using: `Plezi.protocol = :placebo`). This allows writing Plezi based "worker" scripts that aren't web servers but can send and receive messages from the main application.
@@ -59,7 +59,7 @@ module Plezi
59
59
  app_tree["assets"]["welcome.html"] ||= IO.read(File.join(@root,"resources" ,"welcome_page.html")).gsub('appname', app_name)
60
60
 
61
61
  # app core files.
62
- app_tree["environment.rb"] ||= IO.read File.join(@root,"resources" ,"environment.rb")
62
+ app_tree["initialize.rb"] ||= IO.read File.join(@root,"resources" ,"initialize.rb").gsub('appname', app_name)
63
63
  app_tree["routes.rb"] ||= IO.read File.join(@root,"resources" ,"routes.rb")
64
64
  app_tree["rakefile"] ||= IO.read File.join(@root,"resources" ,"rakefile")
65
65
  app_tree["Procfile"] ||= ""
@@ -70,15 +70,15 @@ module Plezi
70
70
  app_tree["Gemfile"] << "\n\n\nruby '#{RUBY_VERSION}'\n"
71
71
 
72
72
  # set up config files
73
- app_tree["config"] ||= {}
74
- app_tree["config"]["oauth.rb"] ||= IO.read(File.join(@root,"resources" ,"oauth_config.rb"))
75
- app_tree["config"]["active_record.rb"] ||= IO.read(File.join(@root,"resources" ,"db_ac_config.rb"))
76
- app_tree["config"]["sequel.rb"] ||= IO.read(File.join(@root,"resources" ,"db_sequel_config.rb"))
77
- app_tree["config"]["datamapper.rb"] ||= IO.read(File.join(@root,"resources" ,"db_dm_config.rb"))
78
- app_tree["config"]["haml.rb"] ||= IO.read(File.join(@root,"resources" ,"haml_config.rb"))
79
- app_tree["config"]["slim.rb"] ||= IO.read(File.join(@root,"resources" ,"slim_config.rb"))
80
- app_tree["config"]["i18n.rb"] ||= IO.read(File.join(@root,"resources" ,"i18n_config.rb"))
81
- app_tree["config"]["redis.rb"] ||= (IO.read(File.join(@root,"resources" ,"redis_config.rb"))).gsub('appsecret', "#{app_name}_#{SecureRandom.hex}")
73
+ app_tree["initialize"] ||= {}
74
+ app_tree["initialize"]["oauth.rb"] ||= IO.read(File.join(@root,"resources" ,"oauth_config.rb"))
75
+ app_tree["initialize"]["active_record.rb"] ||= IO.read(File.join(@root,"resources" ,"db_ac_config.rb"))
76
+ app_tree["initialize"]["sequel.rb"] ||= IO.read(File.join(@root,"resources" ,"db_sequel_config.rb"))
77
+ app_tree["initialize"]["datamapper.rb"] ||= IO.read(File.join(@root,"resources" ,"db_dm_config.rb"))
78
+ app_tree["initialize"]["haml.rb"] ||= IO.read(File.join(@root,"resources" ,"haml_config.rb"))
79
+ app_tree["initialize"]["slim.rb"] ||= IO.read(File.join(@root,"resources" ,"slim_config.rb"))
80
+ app_tree["initialize"]["i18n.rb"] ||= IO.read(File.join(@root,"resources" ,"i18n_config.rb"))
81
+ app_tree["initialize"]["redis.rb"] ||= (IO.read(File.join(@root,"resources" ,"redis_config.rb"))).gsub('appsecret', "#{app_name}_#{SecureRandom.hex}")
82
82
 
83
83
  #set up database stub folders
84
84
  app_tree["db"] ||= {}
@@ -1,3 +1,3 @@
1
1
  module Plezi
2
- VERSION = "0.12.5"
2
+ VERSION = "0.12.6"
3
3
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "iodine", "~> 0.1.8"
21
+ spec.add_dependency "iodine", "~> 0.1.9"
22
22
  spec.add_development_dependency "bundler", "~> 1.7"
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
24
 
@@ -2,7 +2,7 @@
2
2
  # encoding: UTF-8
3
3
 
4
4
  # load all framework and gems
5
- load ::File.expand_path(File.join("..", "environment.rb"), __FILE__)
5
+ load ::File.expand_path(File.join("..", "initialize.rb"), __FILE__)
6
6
 
7
7
  # set up the routes
8
8
  load ::File.expand_path(File.join("..", "routes.rb"), __FILE__)
@@ -23,17 +23,17 @@ Bundler.require(:default, ENV['ENV'].to_s.to_sym)
23
23
  # require tilt/sass in a thread safe way (before multi-threading cycle begins)
24
24
  require 'tilt/sass' if defined?(::Slim) && defined?(::Sass)
25
25
 
26
- # set up Plezi's logs - Heroku logs to STDOUT, this machine logs to log file
27
- Iodine.logger = Logger.new(File.expand_path(File.join 'logs','server.log'))
26
+ # # set up Plezi's logs to a log file?
27
+ # Iodine.logger = Logger.new(File.expand_path(File.join 'logs','server.log')) unless ENV["DYNO"]
28
28
 
29
- # set the session token name
29
+ # set the session token name?
30
30
  Iodine::Http.session_token = 'appname_uui'
31
31
 
32
32
  ## Allow forking? ONLY if your code is fully scalable across processes.
33
33
  # Iodine.processes = 4
34
34
 
35
35
  # load all config files
36
- Dir[File.join "{config}", "**" , "*.rb"].each {|file| load File.expand_path(file)}
36
+ Dir[File.join "{initialize}", "**" , "*.rb"].each {|file| load File.expand_path(file)}
37
37
 
38
38
  # load all library files
39
39
  Dir[File.join "{lib}", "**" , "*.rb"].each {|file| load File.expand_path(file)}
@@ -1,8 +1,8 @@
1
1
  # load all framework and gems
2
- load ::File.expand_path(File.join("..", "environment.rb"), __FILE__)
2
+ load ::File.expand_path(File.join("..", "initialize.rb"), __FILE__)
3
3
 
4
4
  # Make sure the server doesn't start
5
- NO_PLEZI_AUTO_START = true
5
+ Iodine.protocol = false
6
6
 
7
7
  # create a default task
8
8
  desc "The default task will simply remind you to call 'rake -T'."
@@ -492,8 +492,8 @@ end
492
492
  # mem_print_proc.call
493
493
  # Plezi.run_every 30, &mem_print_proc
494
494
 
495
- require 'redis'
496
- ENV['PL_REDIS_URL'] ||= ENV['REDIS_URL'] || ENV['REDISCLOUD_URL'] || ENV['REDISTOGO_URL'] || "redis://test:1234@pub-redis-11008.us-east-1-4.5.ec2.garantiadata.com:11008"
495
+ # require 'redis'
496
+ # ENV['PL_REDIS_URL'] ||= ENV['REDIS_URL'] || ENV['REDISCLOUD_URL'] || ENV['REDISTOGO_URL'] || "redis://test:1234@pub-redis-11008.us-east-1-4.5.ec2.garantiadata.com:11008"
497
497
  # Plezi.processes = 3
498
498
 
499
499
  Plezi.threads = 9
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plezi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.5
4
+ version: 0.12.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boaz Segev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-31 00:00:00.000000000 Z
11
+ date: 2015-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iodine
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.1.8
19
+ version: 0.1.9
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.1.8
26
+ version: 0.1.9
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -118,9 +118,9 @@ files:
118
118
  - resources/db_dm_config.rb
119
119
  - resources/db_sequel_config.rb
120
120
  - resources/en.yml
121
- - resources/environment.rb
122
121
  - resources/haml_config.rb
123
122
  - resources/i18n_config.rb
123
+ - resources/initialize.rb
124
124
  - resources/mini_app.rb
125
125
  - resources/mini_exec.rb
126
126
  - resources/mini_welcome_page.html