activerecord-oracle_enhanced-adapter-monky_patch_755 0.0.3 → 0.1.0

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: 0a0c559f94c59c569eb24be966079815ee59926e
4
- data.tar.gz: 509fdb2ae14da698151a5d9d7c13ad16e551e662
3
+ metadata.gz: 1f52477ecfea60965cab665db9538b9ec3628e8a
4
+ data.tar.gz: 233d34227e9b5f6862f632348e644c74dbd389b2
5
5
  SHA512:
6
- metadata.gz: 1ffe403b46c1b0504d94dda327489a55b6148da4babbfddbf5ab3fd8e0c70bd68fc1f34549c8a93b7ded8eb22b583ab738caee59c36273d8b66bf0926f750f96
7
- data.tar.gz: d65c7cd75f69a82f20e835627b75ab4d4a5cb5d7a376a5598b6e01a3f22887e2fd7c889bc6d6bfa60d072fb26228787d1b92209a5cca8a02d7db8c687b0d9373
6
+ metadata.gz: fee727e8ec1ee52b3279c61992463e6ee9cdbf3861879d52a6024293997dbdaefd21fc7538eced4b7a332a7037ce7de0dfc741b0f2012532a1a1845e53d56fdd
7
+ data.tar.gz: 0a2d87e55362fd8afdb70d7a11eca11c5582c225f28add0763cb7e7df773ec75a33d6f6a4168dcad72829473c91e6a7ae89bd245ca0b3695e4b8ea12baf8e88b
data/README.md CHANGED
@@ -24,7 +24,7 @@ $ gem install activerecord-oracle_enhanced-adapter-monky_patch_755
24
24
 
25
25
  ## Target
26
26
 
27
- * 'activerecord', '~>4.2.1', '<=4.2.7'
27
+ * 'activerecord', '~>4.2.1'
28
28
  * 'activerecord-oracle_enhanced-adapter', '~> 1.6.0'
29
29
 
30
30
  ## Motivation
@@ -1,8 +1,7 @@
1
1
  module OracleEnhanced
2
- class MonkeyPatch755Railtie < ::Rails::Railtie
3
- ActiveSupport.on_load(:active_record) do
4
- require 'activerecord/monkey_patch'
5
- require 'activerecord/monkey_patch/rails4'
6
- end
2
+ require 'oracle_enhanced/monkey_patch_755/hooks'
3
+
4
+ if defined? ::Rails::Railtie
5
+ require 'oracle_enhanced/monkey_patch_755/railtie'
7
6
  end
8
7
  end
@@ -1,3 +1,5 @@
1
+ require 'activerecord/monkey_patch/rails4'
2
+
1
3
  #
2
4
  # This code is a monkey patch for oracle-enhanced ISSUE #755.
3
5
  #
@@ -7,8 +9,8 @@ module ActiveRecord
7
9
  module MonkeyPatch
8
10
  def adjust_timezone_offset(opts)
9
11
  if ActiveRecord::Base.connection_config[:adapter] != 'oracle_enhanced' ||
10
- Gem::Version.create(Rails.version) < Gem::Version.create(MINIMUM_SUPPORTED_VERSION) ||
11
- Gem::Version.create(Rails.version) > Gem::Version.create(MAXIMUM_SUPPORTED_VERSION)
12
+ ActiveRecord::VERSION::MAJOR != SUPPORTED_MAJOR_VERSION ||
13
+ ActiveRecord.version < Gem::Version.create(MINIMUM_SUPPORTED_VERSION)
12
14
  return opts
13
15
  end
14
16
 
@@ -1,7 +1,7 @@
1
1
  module ActiveRecord
2
2
  module MonkeyPatch
3
+ SUPPORTED_MAJOR_VERSION = 4
3
4
  MINIMUM_SUPPORTED_VERSION = '4.2.1'.freeze
4
- MAXIMUM_SUPPORTED_VERSION = '4.2.7.1'.freeze
5
5
  end
6
6
 
7
7
  #
@@ -0,0 +1,11 @@
1
+ module OracleEnhanced
2
+ module MonkeyPatch755
3
+ class Hooks
4
+ def self.init
5
+ ActiveSupport.on_load(:active_record) do
6
+ require 'activerecord/monkey_patch'
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ module OracleEnhanced
2
+ module MonkeyPatch755
3
+ class Railtie < ::Rails::Railtie
4
+ initializer 'activerecord-oracle_enhanced-adapter-monky_patch_755' do
5
+ OracleEnhanced::MonkeyPatch755::Hooks.init
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ module OracleEnhanced
2
+ module MonkeyPatch755
3
+ VERSION = '0.1.0'.freeze
4
+ end
5
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-oracle_enhanced-adapter-monky_patch_755
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Koichi ITO
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-15 00:00:00.000000000 Z
11
+ date: 2016-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -17,9 +17,6 @@ dependencies:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 4.2.1
20
- - - "<="
21
- - !ruby/object:Gem::Version
22
- version: 4.2.7.1
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,9 +24,6 @@ dependencies:
27
24
  - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: 4.2.1
30
- - - "<="
31
- - !ruby/object:Gem::Version
32
- version: 4.2.7.1
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: activerecord-oracle_enhanced-adapter
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -69,7 +63,9 @@ files:
69
63
  - lib/activerecord-oracle_enhanced-adapter-monky_patch_755.rb
70
64
  - lib/activerecord/monkey_patch.rb
71
65
  - lib/activerecord/monkey_patch/rails4.rb
72
- - lib/activerecord/monkey_patch/version.rb
66
+ - lib/oracle_enhanced/monkey_patch_755/hooks.rb
67
+ - lib/oracle_enhanced/monkey_patch_755/railtie.rb
68
+ - lib/oracle_enhanced/monkey_patch_755/version.rb
73
69
  homepage: http://github.com/koic/oracle-enhanced-monky_patch_755
74
70
  licenses:
75
71
  - MIT
@@ -95,4 +91,3 @@ signing_key:
95
91
  specification_version: 4
96
92
  summary: 'A monkey patch for oracle-enhanced ISSUE #755.'
97
93
  test_files: []
98
- has_rdoc:
@@ -1,5 +0,0 @@
1
- module ActiveRecord
2
- module MonkeyPatch
3
- VERSION = '0.0.3'.freeze
4
- end
5
- end