remote_partial 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,24 @@
1
1
  module RemotePartial
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
4
4
 
5
5
  # History
6
6
  # =======
7
7
  #
8
+ # 0.2.1 Initial migrate issue
9
+ # ---------------------------
10
+ # As you need to load the application, before you can migrate, the
11
+ # RemotePartial.define statements would be called before the partial migration
12
+ # could be called. This would raise an error:
13
+ #
14
+ # "Could not find table 'remote_partial_partials'".
15
+ #
16
+ # So define has to check if a partials table exists, before running build. This
17
+ # version adds that check
18
+ #
19
+ # Also improved the way Webmock was loaded, and made some mods to make engine
20
+ # more Rails 4 friendly
21
+ #
8
22
  # 0.2.0 UTF-8 Fix
9
23
  # ---------------
10
24
  # Fixes a fundamental flaw in earlier versions. Previously the encoding used in
@@ -1,16 +1,19 @@
1
1
  require "remote_partial/engine"
2
2
  require_relative '../app/models/remote_partial/exceptions'
3
3
 
4
- begin
5
- require 'webmock'
6
- WebMock.disable! if defined?(WebMock)
7
- rescue LoadError
8
- # Ignore - WebMock not available
9
- end
10
4
  module RemotePartial
11
5
 
12
6
  def self.define(args = {})
13
- Builder.build(args)
7
+ if Partial.table_exists?
8
+ Builder.build(args)
9
+ else
10
+ unless @remote_partial_table_missing_message_logged
11
+ message = "RemotePartial.define will not run until the '#{Partial.table_name}' table exists. See RemotePartial README"
12
+ puts message
13
+ Rails.logger.warn message
14
+ @remote_partial_table_missing_message_logged = true
15
+ end
16
+ end
14
17
  end
15
18
 
16
19
  def self.partial_location
@@ -1 +1 @@
1
- <strong id="ct" class="big">Friday, July 5, 2013 at 3:50:55 PM</strong>
1
+ <strong id="ct" class="big">Tuesday, July 9, 2013 at 11:37:26 AM</strong>
@@ -7,7 +7,7 @@ Dummy::Application.configure do
7
7
  config.cache_classes = false
8
8
 
9
9
  # Log error messages when you accidentally call methods on nil.
10
- config.whiny_nils = true
10
+ config.whiny_nils = false
11
11
 
12
12
  # Show full error reports and disable caching
13
13
  config.consider_all_requests_local = true
@@ -12,7 +12,7 @@ Dummy::Application.configure do
12
12
  config.static_cache_control = "public, max-age=3600"
13
13
 
14
14
  # Log error messages when you accidentally call methods on nil
15
- config.whiny_nils = true
15
+ config.whiny_nils = false
16
16
 
17
17
  # Show full error reports and disable caching
18
18
  config.consider_all_requests_local = true
Binary file
Binary file