public_uid 1.0.1 → 1.0.1.1

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: e60e9adac30a4438f4749528b067dc3574adf28e
4
- data.tar.gz: fb17f29505924fad7949a2b173b6ff15b76910e4
3
+ metadata.gz: a31599fa3aa29faf3a86df0a77aee9d2b9b2cb4f
4
+ data.tar.gz: e544912942f5b8faae225bae4c9e820cc7a809ea
5
5
  SHA512:
6
- metadata.gz: caca27924c4a11a42333a5e0da57c41441056988d35e58a2e4c49314619b920f95020a7e5c3c01336f7e8d29e5700224975cc4fec316db076b6fd594f0ec376a
7
- data.tar.gz: 05e33a8dabd884f4b369591d249f1073969f173293f33be3a8997512bcdc68ef72699837704be8ed8978d0dd954c7d929486e64b0a5398aea1ea74f87e6e4e9b
6
+ metadata.gz: ba3666a7f34f4e389553044a60f8e89195ed6c6d878d74998c96936e6440ce2c06299813bc7652e9616e80209220910dd9e1d5f3bb1cdb9044c2b7b35cf015a9
7
+ data.tar.gz: 251ed4921e5e9c6bbf59ad8639451fff7b50b8451d9c74abf8455a7b4d2f33863488d6a88adc745a4747887fe37a9712c15a207f48ac2c2b2f103a96822b3499
data/Gemfile CHANGED
@@ -2,5 +2,3 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in public_uid.gemspec
4
4
  gemspec
5
-
6
- gem "activerecord", '~> 3.2'
@@ -1,3 +1,3 @@
1
1
  module PublicUid
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.1.1"
3
3
  end
data/lib/public_uid.rb CHANGED
@@ -5,4 +5,4 @@ require "public_uid/model"
5
5
  require "public_uid/generators/number_random"
6
6
  require "public_uid/generators/range_string"
7
7
 
8
- require 'orm/active_record'
8
+ require 'orm/active_record' if defined?(ActiveRecord::Base)
data/public_uid.gemspec CHANGED
@@ -23,4 +23,5 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "rake"
24
24
  spec.add_development_dependency "minitest", "~> 5"
25
25
  spec.add_development_dependency "sqlite3"
26
+ spec.add_development_dependency "activerecord", '~> 3.2'
26
27
  end
@@ -0,0 +1,15 @@
1
+ class TestConf
2
+ class << self
3
+ def supported_orms
4
+ %w(active_record)
5
+ end
6
+
7
+ def orm_modules
8
+ @orm_modules ||= []
9
+ end
10
+
11
+ def add_orm_module(konstant)
12
+ orm_modules << konstant
13
+ end
14
+ end
15
+ end
data/test/test_helper.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  require 'pathname'
2
2
  require 'bundler/setup'
3
3
  require 'minitest/autorun'
4
- require 'public_uid'
5
4
 
6
5
  class Minitest::Spec
7
6
  class << self
@@ -9,26 +8,15 @@ class Minitest::Spec
9
8
  end
10
9
  end
11
10
 
12
- class TestConf
13
- class << self
14
- def root_path
15
- Pathname.new(File.expand_path '../..', __FILE__)
16
- end
17
-
18
- def orm_modules
19
- @orm_modules ||= []
20
- end
11
+ ROOT_PATH = Pathname.new(File.expand_path '../..', __FILE__)
12
+ require ROOT_PATH.join 'test', 'support', 'test_conf'
21
13
 
22
- def add_orm_module(konstant)
23
- orm_modules << konstant
24
- end
25
- end
14
+ TestConf.supported_orms.each do |orm|
15
+ require orm
26
16
  end
27
17
 
28
- ['active_record'].each do |orm|
29
- begin
30
- load TestConf.root_path.join 'test', 'support', 'orm', "#{orm}.rb"
31
- rescue LoadError
32
- raise "ORM #{orm} not available"
33
- end
18
+ require 'public_uid'
19
+
20
+ TestConf.supported_orms.each do |orm|
21
+ load ROOT_PATH.join 'test', 'support', 'orm', "#{orm}.rb"
34
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: public_uid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Valent
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-02 00:00:00.000000000 Z
11
+ date: 2014-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: orm_adapter
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: activerecord
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: '3.2'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: '3.2'
83
97
  description: Automatic generates public unique identifier for model
84
98
  email:
85
99
  - equivalent@eq8.eu
@@ -108,6 +122,7 @@ files:
108
122
  - test/models/model_with_custom_generator_test.rb
109
123
  - test/models/model_with_generator_defaults_test.rb
110
124
  - test/support/orm/active_record.rb
125
+ - test/support/test_conf.rb
111
126
  - test/test_helper.rb
112
127
  homepage: https://github.com/equivalent/public_uid
113
128
  licenses:
@@ -141,4 +156,5 @@ test_files:
141
156
  - test/models/model_with_custom_generator_test.rb
142
157
  - test/models/model_with_generator_defaults_test.rb
143
158
  - test/support/orm/active_record.rb
159
+ - test/support/test_conf.rb
144
160
  - test/test_helper.rb