trailblazer-compat 0.1.2 → 0.1.3

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: a87137cd62ece252507795dc3827decf12a7af0a
4
- data.tar.gz: f125592d8350be4c655f4eb86b9c4a1b4e6ef323
3
+ metadata.gz: 3c990782f938602fc6bfd44bfffba0377f4b3872
4
+ data.tar.gz: 48a1016eec98977ba17cae4e3bd8d330adf7e7bf
5
5
  SHA512:
6
- metadata.gz: 1fe430099274c39dca277202863000c4613272f51db956ac48461c47d8683c627aa8ea2eae473f2b13ee42fd644378c109c5ffceb452844ca23acee856c15405
7
- data.tar.gz: d6922d7858014f9ba381d056d19e85893ee5ee0877d994ea8a320e8a3f61ec329b4a5c3dfcebdd07e7cca4243358eb4d75a2550cae7c17ada439a4885d6a95e4
6
+ metadata.gz: 7b1bd36842587b15299938b5dd0395debb84c5144ccf58257aa41ad16e258d93fee547934e9f4eb8bbcd4c7be9f88922d063fe0ceb73b3b83bcbe76166776d61
7
+ data.tar.gz: b61144559445bb3546922e1c4c88fb97d8ab2dc6b29414b5681b4d183a5913949a0eab193f41919e0bb1a63189f80ab21501ac7478652c23e325a169760d2ca8
data/CHANGES.md CHANGED
@@ -1,6 +1,11 @@
1
+ # 0.1.3
2
+
3
+ * `compat` now works in non-Rails projects, too. Thanks @pnomolos!
4
+
1
5
  # 0.1.2
2
6
 
3
7
  * Fix a circular dependency problem in some environments, when loading `ApplicationController`.
8
+ * `compat` now also supports TRB 2.1.
4
9
 
5
10
  # 0.1.1
6
11
 
@@ -1,7 +1,6 @@
1
1
  require "reform/rails"
2
2
  require "trailblazer/1.1/rails/railtie"
3
3
 
4
- require "trailblazer/1.1/operation"
5
4
  # TODO: remove that once i18n, validations etc in Reform/AM are sorted.
6
5
  Trailblazer::V1_1::Operation.contract_class.class_eval do
7
6
  def self.name
@@ -11,12 +10,9 @@ Trailblazer::V1_1::Operation.contract_class.class_eval do
11
10
  end
12
11
 
13
12
  # Automatically set model_name on operation's contract when `Op::Model` is included.
14
- require "trailblazer/1.1/operation/model"
15
13
  require "trailblazer/1.1/operation/model/active_model"
16
14
  Trailblazer::V1_1::Operation::Model::DSL.module_eval do
17
15
  include Trailblazer::V1_1::Operation::Model::ActiveModel # ::contract.
18
16
  end
19
17
 
20
- require "trailblazer/1.1/autoloading"
21
18
  require "trailblazer/1.1/rails/autoloading"
22
-
@@ -32,7 +32,11 @@ require "trailblazer/operation/nested" # 2.x
32
32
 
33
33
  Trailblazer::V2::Operation = ::Trailblazer::Operation # copy TRB2 Operation constant to a safe place.
34
34
 
35
- require "trailblazer/1.1/rails"
35
+ require "trailblazer/1.1/operation"
36
+ require "trailblazer/1.1/operation/model"
37
+ require "trailblazer/1.1/autoloading"
38
+
39
+ require "trailblazer/1.1/rails" if defined?(Rails)
36
40
 
37
41
  Trailblazer.send(:remove_const, :Operation)
38
42
  Trailblazer.send(:const_set, :Operation, Trailblazer::V1_1::Operation) # TRB::Op is now TRB 1.1
@@ -1,5 +1,5 @@
1
1
  module Trailblazer
2
2
  module Compat
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trailblazer-compat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-21 00:00:00.000000000 Z
11
+ date: 2017-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trailblazer