uniq_identifier 0.0.1 → 0.0.2

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: 1b83fa51ff88933f8636a88302ae1f820d434589
4
- data.tar.gz: d9502b8b8119eadcaed4226bb6f6c114255f4b0c
3
+ metadata.gz: b65e5a80f91751f11f0dbd70fd572ace568665cf
4
+ data.tar.gz: 17334d6d08293100d0215ffb8f3560783ed163cc
5
5
  SHA512:
6
- metadata.gz: 4302b4de5568b7009943169f9c455af6e1495335ae66cc68e0182e431f0e5e4d9ddb220f2889d111ee863b1113b4afae1da513ba2f3d0c98c4221773cbe52cac
7
- data.tar.gz: e1b71a71532dfdc247f9752e5c1411a32f1bde1ce435ed1e6964c83359b8b514790596a1359228b68cab37cab640a763b325543e907487c523625d1fca55812c
6
+ metadata.gz: 22c5f051f9c1232245c749f176371107695eb9b9271e32b49f968e045c786c466faa12d7f0588b8b99f27670ae744ff7ef029b4685235b4bcdd03419423c773c
7
+ data.tar.gz: 90a31bceb24b4f509c4c92756b41b4eeea21b79adaca776c389a5d684bef20f845fdc4fdbe33081e77595c3300924453bfb089be8bb665227606d522f5ce2473
data/.coveralls.yml ADDED
@@ -0,0 +1 @@
1
+ service_name: travis-ci
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --format documentation --color --fail-fast
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.2
4
+ script: bundle exec rspec spec
data/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ ### VERSION 0.0.2
2
+
3
+ * Enhancements
4
+ * Liitle enhancement
5
+
6
+ ### VERSION 0.0.1
7
+
8
+ * Skeleton and first parsing
data/Gemfile CHANGED
@@ -6,11 +6,14 @@ gemspec
6
6
  group :test do
7
7
  case ENV['ADAPTER']
8
8
  when nil, 'active_record'
9
- gem 'sqlite3'
9
+ gem 'sqlite3', platform: 'ruby'
10
10
  gem 'activerecord'
11
11
  when 'mongoid'
12
12
  gem 'mongoid'
13
13
  else
14
- raise "Unknow adatper: #{ENV['ADAPTER']}"
14
+ raise "Unknown model adapter: #{ENV["ADAPTER"]}"
15
15
  end
16
+ gem 'coveralls', require: false
17
+ gem 'pry'
18
+ gem 'ammeter'
16
19
  end
data/README.md CHANGED
@@ -1,6 +1,14 @@
1
1
  # UniqIdentifier
2
2
 
3
- This gem add uuid on your model.
3
+ [![Code Climate](https://codeclimate.com/github/joel/uniq_identifier.png)](https://codeclimate.com/github/joel/uniq_identifier)
4
+
5
+ [![Dependency Status](https://gemnasium.com/joel/uniq_identifier.png)](https://gemnasium.com/joel/uniq_identifier)
6
+
7
+ [![Build Status](https://travis-ci.org/joel/uniq_identifier.png?branch=master)](https://travis-ci.org/joel/uniq_identifier) (Travis CI)
8
+
9
+ [![Coverage Status](https://coveralls.io/repos/joel/uniq_identifier/badge.png)](https://coveralls.io/r/joel/uniq_identifier)
10
+
11
+ Add an uniq identifier on your models. For make your model agnostic from backend unique identifier.
4
12
 
5
13
  ## Installation
6
14
 
@@ -20,31 +28,51 @@ Or install it yourself as:
20
28
 
21
29
  ## Usage
22
30
 
23
- add this on your model. For example.
24
-
25
- for ActiveRecord
31
+ add uuid in your model like that:
26
32
 
27
- ```
33
+ ```ruby
28
34
  class Foo < ActiveRecord::Base
29
35
  uniq_identifier
30
36
  end
31
37
  ```
32
38
 
33
- for Mongoid
39
+ ```ruby
40
+ foo = Foo.new
41
+ foo.id # => nil
42
+ foo.uuid # => "0c6bbc03-a269-44e2-8075-f442e1aac0c8"
43
+ ```
34
44
 
45
+ ```ruby
46
+ foo.create!
47
+ foo.id # => 1
35
48
  ```
36
- class Foo
37
- include Mongoid::Document
38
- uniq_identifier
39
- end
49
+
50
+ ```ruby
51
+ my_foo = Foo.where(uuid: "0c6bbc03-a269-44e2-8075-f442e1aac0c8")
52
+ my_foo.id # => 1
40
53
  ```
41
54
 
42
- you have this:
55
+ ## Configuration
43
56
 
57
+ add app/config/initializers/uniq_identifier.rb
58
+
59
+ ```ruby
60
+ UniqIdentifier.configuration do |conf|
61
+ conf.generator = SecureRandom
62
+ end
44
63
  ```
45
- Foo.new.uuid # => "2d931510-d99f-494a-8c67-87feb05e1594"
64
+
65
+ you can use the generator
66
+
67
+ ```ruby
68
+ rails g uniq_identifier:install
69
+ rails g uniq_identifier:add <model>
46
70
  ```
71
+ for mongoid use
47
72
 
73
+ ```ruby
74
+ rails g uniq_identifier:add <model> --orm=mongoid
75
+ ```
48
76
  ## Contributing
49
77
 
50
78
  1. Fork it ( https://github.com/[my-github-username]/uniq_identifier/fork )
data/Rakefile CHANGED
@@ -1,2 +1,31 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
2
3
 
4
+ RSpec::Core::RakeTask.new(:generators) do |task|
5
+ task.pattern = 'spec/generators/**/*_spec.rb'
6
+ end
7
+
8
+ RSpec::Core::RakeTask.new(:uniq_identifier) do |task|
9
+ task.pattern = 'spec/uniq_identifier/**/*_spec.rb'
10
+ end
11
+
12
+ task :default => [ :spec ]
13
+
14
+ desc 'Run all specs'
15
+ task 'spec' do
16
+ Rake::Task['generators'].invoke
17
+ return_code1 = $?.exitstatus
18
+
19
+ Rake::Task['uniq_identifier'].invoke
20
+ return_code2 = $?.exitstatus
21
+
22
+ fail if return_code1 != 0 || return_code2 != 0
23
+ end
24
+
25
+ desc 'Run specs for all adapters'
26
+ task :spec_all do
27
+ %w[active_record mongoid].each do |model_adapter|
28
+ puts "ADAPTER = #{model_adapter}"
29
+ system "ADAPTER=#{model_adapter} rake"
30
+ end
31
+ end
@@ -0,0 +1,48 @@
1
+ require 'rails/generators/active_record' if defined?(ActiveRecord)
2
+ require 'rails/generators/migration'
3
+
4
+ module UniqIdentifier
5
+ module Generators
6
+ class AddGenerator < Rails::Generators::NamedBase
7
+ include Rails::Generators::Migration
8
+ class_option :orm, type: :string, default: :active_record
9
+
10
+ source_root File.expand_path('../templates', __FILE__)
11
+
12
+ def self.next_migration_number(path)
13
+ ActiveRecord::Generators::Base.next_migration_number(path)
14
+ end
15
+
16
+ desc <<DESC
17
+ description :
18
+ add migration file to choosen model
19
+ rails generate uniq_identifier:add model_name --orm=mongoid
20
+ rails generate uniq_identifier:add model_name
21
+ DESC
22
+ def add_migration_file
23
+ migration_template 'migration.rb', "db/migrate/add_uuid_#{file_path}.rb" if options.orm == :active_record
24
+
25
+ hook = 'uniq_identifier'
26
+ data = "\n"
27
+ data += indent("#{hook}")
28
+
29
+ if options.orm == 'mongoid'
30
+ data += "\n"
31
+ data += indent("field :uuid, type: String")
32
+ end
33
+
34
+ if options.orm == :active_record
35
+ header = "class #{class_name} < ActiveRecord::Base"
36
+ else
37
+ header = 'include Mongoid::Document'
38
+ end
39
+
40
+ model_path = File.join('app', 'models', "#{file_path}.rb")
41
+ inject_into_file model_path, data, after: header, verbose: true
42
+
43
+ readme("./README-#{options.orm}")
44
+ end
45
+ end
46
+
47
+ end
48
+ end
@@ -0,0 +1,18 @@
1
+ module UniqIdentifier
2
+ module Generators
3
+ class InstallGenerator < Rails::Generators::Base
4
+
5
+ source_root File.expand_path('../templates', __FILE__)
6
+
7
+ desc <<DESC
8
+ description :
9
+ copy uniq_identifier configuration to an initializer.
10
+ rails generate uniq_identifier:install
11
+ DESC
12
+ def copy_initializer_file
13
+ template 'uniq_identifier.rb', "config/initializers/uniq_identifier.rb"
14
+ end
15
+ end
16
+
17
+ end
18
+ end
@@ -0,0 +1,8 @@
1
+ Now, you just have to run the migration using rake command:
2
+
3
+ rake db:migrate
4
+
5
+ and you will be able to add the uniq_identifier method inside all models you want
6
+ add an uniq identifier.
7
+
8
+ ===============================================================================
@@ -0,0 +1,4 @@
1
+ You will be able to add the uniq_identifier method inside all models you want
2
+ add an uniq identifier.
3
+
4
+ ===============================================================================
@@ -0,0 +1,8 @@
1
+ class UniqIdentifierAddUuid<%= class_name %> < ActiveRecord::Migration
2
+ def change
3
+ change_table(:<%= plural_name %>) do |t|
4
+ t.string :uuid
5
+ end
6
+ add_index(:<%= plural_name %>, :uuid)
7
+ end
8
+ end
@@ -0,0 +1,3 @@
1
+ UniqIdentifier.configure do |conf|
2
+ # conf.generator = SecureRandom
3
+ end
@@ -0,0 +1,11 @@
1
+ require 'securerandom'
2
+
3
+ module UniqIdentifier
4
+ class Configuration
5
+ attr_accessor :generator
6
+
7
+ def initialize
8
+ self.generator = SecureRandom
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,17 @@
1
+ require_relative 'configuration'
2
+
3
+ module UniqIdentifier
4
+ module Configure
5
+
6
+ attr_writer :configuration
7
+
8
+ def configuration
9
+ @configuration ||= Configuration.new
10
+ end
11
+
12
+ def configure
13
+ yield(configuration)
14
+ end
15
+
16
+ end
17
+ end
@@ -0,0 +1,9 @@
1
+ module UniqIdentifier
2
+ class FakeGenerator
3
+
4
+ def self.uuid
5
+ "0c6bbc03-a269-44e2-8075-f442e1aac0c8"
6
+ end
7
+
8
+ end
9
+ end
@@ -3,8 +3,12 @@ require 'securerandom'
3
3
  module UniqIdentifier
4
4
  module Hook
5
5
 
6
+ def self.included(base)
7
+ base.extend(self)
8
+ end
9
+
6
10
  def set_uniq_identifier
7
- self.uuid = SecureRandom.uuid
11
+ self.send(:uuid=, UniqIdentifier.configuration.generator.uuid)
8
12
  end
9
13
  end
10
14
  end
@@ -0,0 +1,20 @@
1
+ require 'uniq_identifier'
2
+ require 'rails'
3
+
4
+ module UniqIdentifier
5
+ class Railtie < Rails::Railtie
6
+ initializer 'uniq_identifier.initialize' do
7
+ ActiveSupport.on_load(:active_record) do
8
+ ActiveRecord::Base.send :extend, UniqIdentifier
9
+ end
10
+
11
+ config.before_initialize do
12
+ ::Mongoid::Document.module_eval do
13
+ def self.included(base)
14
+ base.extend UniqIdentifier
15
+ end
16
+ end
17
+ end if defined?(Mongoid)
18
+ end
19
+ end
20
+ end
@@ -1,3 +1,3 @@
1
1
  module UniqIdentifier
2
- VERSION = "0.0.1"
2
+ VERSION = '0.0.2'
3
3
  end
@@ -1,7 +1,10 @@
1
- require_relative "uniq_identifier/version"
2
- require_relative "uniq_identifier/hook"
1
+ require_relative 'uniq_identifier/railtie' if defined?(Rails)
2
+ require_relative 'uniq_identifier/hook'
3
+ require_relative 'uniq_identifier/configure'
4
+ require_relative 'uniq_identifier/fake_generator'
3
5
 
4
6
  module UniqIdentifier
7
+ extend Configure
5
8
 
6
9
  def uniq_identifier
7
10
  include Hook
@@ -0,0 +1,58 @@
1
+ require 'spec_helper'
2
+
3
+ require 'rails/generators'
4
+ require 'ammeter/init'
5
+
6
+ # Generators are not automatically loaded by Rails
7
+ require_relative '../../../lib/generators/uniq_identifier/add_generator'
8
+
9
+ module UniqIdentifier
10
+ module Generators
11
+ describe AddGenerator, skip: true do
12
+ let(:user_content) do
13
+ <<-CONTENT
14
+ class User < ActiveRecord::Base
15
+ end
16
+ CONTENT
17
+ end
18
+
19
+ # Tell the generator where to put its output (what it thinks of as Rails.root)
20
+ destination File.expand_path('../../../../tmp', __FILE__)
21
+
22
+ before do
23
+ prepare_destination
24
+ FileUtils.mkdir_p "#{destination_root}/app/models"
25
+ File.open("#{destination_root}/app/models/user.rb", 'w+') do |file|
26
+ file.write(user_content)
27
+ end
28
+ end
29
+
30
+ after do
31
+ FileUtils.rm_rf destination_root
32
+ end
33
+
34
+ describe 'the generated files' do
35
+ before do
36
+ expect(AddGenerator).to receive(:next_migration_number) { '20141008141816' }
37
+ run_generator ['User']
38
+ end
39
+
40
+ describe 'add hook' do
41
+ let(:file_path) { "#{destination_root}/app/models/user.rb" }
42
+ subject { file(file_path) }
43
+ specify do
44
+ expect(File.new(file_path)).to match(/uniq_identifier/)
45
+ end
46
+ end
47
+
48
+ describe 'generate migration' do
49
+ let(:file_path) { 'db/migrate/20141008141816_add_uuid_user.rb' }
50
+ subject { file(file_path) }
51
+ specify do
52
+ expect(File.exists?("#{destination_root}/#{file_path}")).to be_truthy
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,48 @@
1
+ require 'spec_helper'
2
+
3
+ require 'rails/generators'
4
+ require 'ammeter/init'
5
+
6
+ # Generators are not automatically loaded by Rails
7
+ require_relative '../../../lib/generators/uniq_identifier/add_generator'
8
+
9
+ module UniqIdentifier
10
+ module Generators
11
+ describe AddGenerator, skip: true do
12
+ # Tell the generator where to put its output (what it thinks of as Rails.root)
13
+ destination File.expand_path('../../../../tmp', __FILE__)
14
+ let(:user_content) do
15
+ <<-CONTENT
16
+ class User
17
+ include Mongoid::Document
18
+ end
19
+ CONTENT
20
+ end
21
+ before do
22
+ prepare_destination
23
+ FileUtils.mkdir_p "#{destination_root}/app/models"
24
+ File.open("#{destination_root}/app/models/user.rb", 'w+') do |file|
25
+ file.write(user_content)
26
+ end
27
+ end
28
+
29
+ after do
30
+ FileUtils.rm_rf destination_root
31
+ end
32
+
33
+ describe 'the generated files' do
34
+ before do
35
+ run_generator ['User', '--orm=mongoid']
36
+ end
37
+
38
+ describe 'add hook' do
39
+ let(:file_path) { 'app/models/user.rb' }
40
+ subject { file(file_path) }
41
+ specify do
42
+ expect(File.new(file_path)).to match(/uniq_identifier/)
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,40 @@
1
+ require 'spec_helper'
2
+
3
+ require 'rails/generators'
4
+ require 'ammeter/init'
5
+
6
+ # Generators are not automatically loaded by Rails
7
+ require_relative '../../../lib/generators/uniq_identifier/install_generator'
8
+
9
+ module UniqIdentifier
10
+ module Generators
11
+ describe InstallGenerator do
12
+ # Tell the generator where to put its output (what it thinks of as Rails.root)
13
+ destination File.expand_path('../../../../tmp', __FILE__)
14
+
15
+ before do
16
+ prepare_destination
17
+ end
18
+
19
+ after do
20
+ FileUtils.rm_rf destination_root
21
+ end
22
+
23
+ describe 'the generated files' do
24
+ before do
25
+ run_generator
26
+ end
27
+
28
+ describe 'the spec' do
29
+ let(:file_path) { 'config/initializers/uniq_identifier.rb' }
30
+
31
+ subject { file(file_path) }
32
+
33
+ specify do
34
+ expect(File.exists?("#{destination_root}/#{file_path}")).to be_truthy
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,21 @@
1
1
  require 'uniq_identifier'
2
2
  require 'bundler/setup'
3
+ require 'coveralls'
4
+
5
+ begin
6
+ require 'pry'
7
+ rescue LoadError
8
+ end
9
+
10
+ Coveralls.wear!
3
11
 
4
12
  ENV['ADAPTER'] ||= 'active_record'
5
13
  load File.dirname(__FILE__) + "/support/adapters/#{ENV['ADAPTER']}.rb"
14
+
15
+ UniqIdentifier.configure do |conf|
16
+ conf.generator = UniqIdentifier::FakeGenerator
17
+ end
18
+
19
+ RSpec.configure do |c|
20
+ c.run_all_when_everything_filtered = true
21
+ end
@@ -1,6 +1,6 @@
1
1
  test:
2
2
  sessions:
3
3
  default:
4
- database: whatever
4
+ database: godfather
5
5
  hosts:
6
6
  - localhost:27017
@@ -0,0 +1,2 @@
1
+ User.destroy_all
2
+ user.create(name: 'John Doe')
@@ -1,7 +1,9 @@
1
1
  ActiveRecord::Schema.define do
2
2
  self.verbose = false
3
+
3
4
  create_table(:users) do |t|
4
5
  t.string :name
5
6
  t.string :uuid
7
+ t.timestamps
6
8
  end
7
9
  end
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+
3
+ module UniqIdentifier
4
+ describe Configuration do
5
+
6
+ describe '#default' do
7
+ specify do
8
+ expect(subject.generator).to eql(SecureRandom)
9
+ end
10
+ end
11
+ end
12
+ end
@@ -6,4 +6,14 @@ describe UniqIdentifier do
6
6
  specify do
7
7
  expect(user.uuid).to match(/(.*)-(.*)-(.*)-(.*)-(.*)/)
8
8
  end
9
+
10
+ context 'persistence' do
11
+ let(:user_id) { user.id }
12
+
13
+ before { user.save! }
14
+
15
+ specify do
16
+ expect(User.find(user_id).uuid).to match(/(.*)-(.*)-(.*)-(.*)-(.*)/)
17
+ end
18
+ end
9
19
  end
@@ -1,23 +1,23 @@
1
1
  require_relative 'lib/uniq_identifier/version'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
- spec.name = "uniq_identifier"
4
+ spec.name = 'uniq_identifier'
5
5
  spec.version = UniqIdentifier::VERSION
6
- spec.authors = ["Joel AZEMAR"]
7
- spec.email = ["joel.azemar@gmail.com"]
8
- spec.summary = %q{This gem add uuid on your model.}
9
- spec.description = %q{This gem add uuid on your model. for agnostic backend}
10
- spec.homepage = "https://github.com/FinalCAD/uniq_identifier"
11
- spec.license = "MIT"
6
+ spec.authors = ['Joel AZEMAR']
7
+ spec.email = ['joel.azemar@gmail.com']
8
+ spec.summary = %q{Add an uniq identifier}
9
+ spec.description = %q{Add an uniq identifier on your models}
10
+ spec.homepage = ''
11
+ spec.license = 'MIT'
12
12
 
13
13
  spec.files = `git ls-files -z`.split("\x0")
14
14
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
15
15
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
16
- spec.require_paths = ["lib"]
16
+ spec.require_paths = ['lib']
17
17
 
18
- spec.add_development_dependency "bundler", "~> 1.7"
19
- spec.add_development_dependency "rake", "~> 10.0"
20
- spec.add_development_dependency "rspec", "~> 3.0"
18
+ # spec.add_development_dependency 'bundler', '~> 1.7'
19
+ # spec.add_development_dependency 'rake', '~> 10.4'
20
+ spec.add_development_dependency 'rspec', '~> 3.1'
21
21
 
22
- spec.required_ruby_version = '~> 2.1'
23
- end
22
+ # spec.required_ruby_version = '~> 2.2'
23
+ end
metadata CHANGED
@@ -1,80 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uniq_identifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel AZEMAR
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-09 00:00:00.000000000 Z
11
+ date: 2015-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.7'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.7'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '10.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '10.0'
41
13
  - !ruby/object:Gem::Dependency
42
14
  name: rspec
43
15
  requirement: !ruby/object:Gem::Requirement
44
16
  requirements:
45
17
  - - "~>"
46
18
  - !ruby/object:Gem::Version
47
- version: '3.0'
19
+ version: '3.1'
48
20
  type: :development
49
21
  prerelease: false
50
22
  version_requirements: !ruby/object:Gem::Requirement
51
23
  requirements:
52
24
  - - "~>"
53
25
  - !ruby/object:Gem::Version
54
- version: '3.0'
55
- description: This gem add uuid on your model. for agnostic backend
26
+ version: '3.1'
27
+ description: Add an uniq identifier on your models
56
28
  email:
57
29
  - joel.azemar@gmail.com
58
30
  executables: []
59
31
  extensions: []
60
32
  extra_rdoc_files: []
61
33
  files:
34
+ - ".coveralls.yml"
62
35
  - ".gitignore"
36
+ - ".rspec"
37
+ - ".travis.yml"
38
+ - CHANGELOG.md
63
39
  - Gemfile
64
40
  - LICENSE.txt
65
41
  - README.md
66
42
  - Rakefile
43
+ - lib/generators/uniq_identifier/add_generator.rb
44
+ - lib/generators/uniq_identifier/install_generator.rb
45
+ - lib/generators/uniq_identifier/templates/README-active_record
46
+ - lib/generators/uniq_identifier/templates/README-mongoid
47
+ - lib/generators/uniq_identifier/templates/migration.rb
48
+ - lib/generators/uniq_identifier/templates/uniq_identifier.rb
67
49
  - lib/uniq_identifier.rb
50
+ - lib/uniq_identifier/configuration.rb
51
+ - lib/uniq_identifier/configure.rb
52
+ - lib/uniq_identifier/fake_generator.rb
68
53
  - lib/uniq_identifier/hook.rb
54
+ - lib/uniq_identifier/railtie.rb
69
55
  - lib/uniq_identifier/version.rb
56
+ - spec/generators/active_record/add_generator_spec.rb
57
+ - spec/generators/mongoid/add_generator_spec.rb
58
+ - spec/generators/uniq_identifier/install_generator_spec.rb
70
59
  - spec/spec_helper.rb
71
60
  - spec/support/adapters/active_record.rb
72
61
  - spec/support/adapters/mongoid.rb
73
62
  - spec/support/adapters/mongoid.yml
63
+ - spec/support/data.rb
74
64
  - spec/support/schema.rb
65
+ - spec/uniq_identifier/configuration_spec.rb
75
66
  - spec/uniq_identifier/uniq_identifier_spec.rb
76
67
  - uniq_identifier.gemspec
77
- homepage: https://github.com/FinalCAD/uniq_identifier
68
+ homepage: ''
78
69
  licenses:
79
70
  - MIT
80
71
  metadata: {}
@@ -84,9 +75,9 @@ require_paths:
84
75
  - lib
85
76
  required_ruby_version: !ruby/object:Gem::Requirement
86
77
  requirements:
87
- - - "~>"
78
+ - - ">="
88
79
  - !ruby/object:Gem::Version
89
- version: '2.1'
80
+ version: '0'
90
81
  required_rubygems_version: !ruby/object:Gem::Requirement
91
82
  requirements:
92
83
  - - ">="
@@ -94,14 +85,19 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
85
  version: '0'
95
86
  requirements: []
96
87
  rubyforge_project:
97
- rubygems_version: 2.4.2
88
+ rubygems_version: 2.4.1
98
89
  signing_key:
99
90
  specification_version: 4
100
- summary: This gem add uuid on your model.
91
+ summary: Add an uniq identifier
101
92
  test_files:
93
+ - spec/generators/active_record/add_generator_spec.rb
94
+ - spec/generators/mongoid/add_generator_spec.rb
95
+ - spec/generators/uniq_identifier/install_generator_spec.rb
102
96
  - spec/spec_helper.rb
103
97
  - spec/support/adapters/active_record.rb
104
98
  - spec/support/adapters/mongoid.rb
105
99
  - spec/support/adapters/mongoid.yml
100
+ - spec/support/data.rb
106
101
  - spec/support/schema.rb
102
+ - spec/uniq_identifier/configuration_spec.rb
107
103
  - spec/uniq_identifier/uniq_identifier_spec.rb