uniqueness 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,18 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.3.0
4
+ - 2.2.4
5
+ - 2.1.8
6
+ - 2.0.0
7
+ - 1.9.3
8
+ - jruby-19mode
9
+ - rbx-2
10
+ before_install:
11
+ - gem install bundler -v '~> 1.11'
12
+ gemfile:
13
+ - gemfiles/40.gemfile
14
+ - gemfiles/41.gemfile
15
+ - gemfiles/42.gemfile
16
+ - gemfiles/50.gemfile
17
+ cache:
18
+ - bundler
@@ -0,0 +1,15 @@
1
+ appraise '40' do
2
+ gem 'rails', '~> 4.0.0'
3
+ end
4
+
5
+ appraise '41' do
6
+ gem 'rails', '~> 4.1.0'
7
+ end
8
+
9
+ appraise '42' do
10
+ gem 'rails', '~> 4.2.0'
11
+ end
12
+
13
+ appraise '50' do
14
+ gem 'rails', '5.0.0.beta3'
15
+ end
@@ -0,0 +1,29 @@
1
+ I love pull requests. Here's a quick guide:
2
+
3
+ 1. Fork the repo.
4
+
5
+ 2. Run the tests. We only take pull requests with passing tests, and it's great
6
+ to know that you have a clean slate: `bundle && rake`
7
+
8
+ 3. Add a test for your change. Only refactoring and documentation changes
9
+ require no new tests. If you are adding functionality or fixing a bug, we need
10
+ a test!
11
+
12
+ 4. Make the test pass.
13
+
14
+ 5. Run `rubocop` and fix code style issues.
15
+
16
+ 6. Push to your fork and submit a pull request.
17
+
18
+
19
+ At this point you're waiting on us. We like to at least comment on, if not
20
+ accept, pull requests within three business days (and, typically, one business
21
+ day). We may suggest some changes or improvements or alternatives.
22
+
23
+ Some things that will increase the chance that your pull request is accepted,
24
+ taken straight from the Ruby on Rails guide:
25
+
26
+ * Use Rails idioms and helpers
27
+ * Include tests that fail without your code, and pass with it
28
+ * Update the documentation, the surrounding one, examples elsewhere, guides,
29
+ whatever is affected by your contribution
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in uniqueness.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Omar Abdel-Wahab
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,43 @@
1
+ # Uniqueness
2
+
3
+ [![Code Climate](https://codeclimate.com/github/owahab/uniqueness/badges/gpa.svg)](https://codeclimate.com/github/owahab/uniqueness)
4
+ [![Build Status](https://travis-ci.org/owahab/uniqueness.svg?branch=master)](https://travis-ci.org/owahab/uniqueness)
5
+ [![Coverage Status](https://coveralls.io/repos/github/owahab/uniqueness/badge.svg?branch=master)](https://coveralls.io/github/owahab/uniqueness?branch=master)
6
+
7
+ Rails recently introduced `has_secure_token` but it's very primitive.
8
+ Meet the competition.
9
+
10
+ [Documentation](http://www.rubydoc.info/github/owahab/uniqueness)
11
+
12
+ ## Installation
13
+
14
+ Add this line to your application's Gemfile:
15
+
16
+ ```ruby
17
+ gem 'uniqueness'
18
+ ```
19
+
20
+ And then execute:
21
+
22
+ $ bundle
23
+
24
+ Or install it yourself as:
25
+
26
+ $ gem install uniqueness
27
+
28
+ ## Usage
29
+
30
+
31
+
32
+ ## Development
33
+
34
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
35
+
36
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
37
+
38
+ ## Contributing
39
+
40
+ Please see CONTRIBUTING.md for details.
41
+
42
+ ## Credits
43
+ recognition was originally written by Omar Abdel-Wahab.
@@ -0,0 +1,7 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake'
3
+ require 'rspec/core/rake_task'
4
+
5
+ RSpec::Core::RakeTask.new(:spec)
6
+ task test: :spec
7
+ task default: :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "uniqueness"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 4.0.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,124 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ uniqueness (0.5.0)
5
+ activerecord (>= 4.0.0)
6
+ railties (>= 4.0.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (4.0.13)
12
+ actionpack (= 4.0.13)
13
+ mail (~> 2.5, >= 2.5.4)
14
+ actionpack (4.0.13)
15
+ activesupport (= 4.0.13)
16
+ builder (~> 3.1.0)
17
+ erubis (~> 2.7.0)
18
+ rack (~> 1.5.2)
19
+ rack-test (~> 0.6.2)
20
+ activemodel (4.0.13)
21
+ activesupport (= 4.0.13)
22
+ builder (~> 3.1.0)
23
+ activerecord (4.0.13)
24
+ activemodel (= 4.0.13)
25
+ activerecord-deprecated_finders (~> 1.0.2)
26
+ activesupport (= 4.0.13)
27
+ arel (~> 4.0.0)
28
+ activerecord-deprecated_finders (1.0.4)
29
+ activesupport (4.0.13)
30
+ i18n (~> 0.6, >= 0.6.9)
31
+ minitest (~> 4.2)
32
+ multi_json (~> 1.3)
33
+ thread_safe (~> 0.1)
34
+ tzinfo (~> 0.3.37)
35
+ appraisal (2.1.0)
36
+ bundler
37
+ rake
38
+ thor (>= 0.14.0)
39
+ arel (4.0.2)
40
+ builder (3.1.4)
41
+ concurrent-ruby (1.0.1)
42
+ coveralls (0.8.13)
43
+ json (~> 1.8)
44
+ simplecov (~> 0.11.0)
45
+ term-ansicolor (~> 1.3)
46
+ thor (~> 0.19.1)
47
+ tins (~> 1.6.0)
48
+ diff-lcs (1.2.5)
49
+ docile (1.1.5)
50
+ erubis (2.7.0)
51
+ i18n (0.7.0)
52
+ json (1.8.3)
53
+ mail (2.6.4)
54
+ mime-types (>= 1.16, < 4)
55
+ mime-types (3.0)
56
+ mime-types-data (~> 3.2015)
57
+ mime-types-data (3.2016.0221)
58
+ minitest (4.7.5)
59
+ multi_json (1.11.2)
60
+ rack (1.5.5)
61
+ rack-test (0.6.3)
62
+ rack (>= 1.0)
63
+ rails (4.0.13)
64
+ actionmailer (= 4.0.13)
65
+ actionpack (= 4.0.13)
66
+ activerecord (= 4.0.13)
67
+ activesupport (= 4.0.13)
68
+ bundler (>= 1.3.0, < 2.0)
69
+ railties (= 4.0.13)
70
+ sprockets-rails (~> 2.0)
71
+ railties (4.0.13)
72
+ actionpack (= 4.0.13)
73
+ activesupport (= 4.0.13)
74
+ rake (>= 0.8.7)
75
+ thor (>= 0.18.1, < 2.0)
76
+ rake (10.5.0)
77
+ rspec (3.4.0)
78
+ rspec-core (~> 3.4.0)
79
+ rspec-expectations (~> 3.4.0)
80
+ rspec-mocks (~> 3.4.0)
81
+ rspec-core (3.4.4)
82
+ rspec-support (~> 3.4.0)
83
+ rspec-expectations (3.4.0)
84
+ diff-lcs (>= 1.2.0, < 2.0)
85
+ rspec-support (~> 3.4.0)
86
+ rspec-mocks (3.4.1)
87
+ diff-lcs (>= 1.2.0, < 2.0)
88
+ rspec-support (~> 3.4.0)
89
+ rspec-support (3.4.1)
90
+ simplecov (0.11.2)
91
+ docile (~> 1.1.0)
92
+ json (~> 1.8)
93
+ simplecov-html (~> 0.10.0)
94
+ simplecov-html (0.10.0)
95
+ sprockets (3.5.2)
96
+ concurrent-ruby (~> 1.0)
97
+ rack (> 1, < 3)
98
+ sprockets-rails (2.3.3)
99
+ actionpack (>= 3.0)
100
+ activesupport (>= 3.0)
101
+ sprockets (>= 2.8, < 4.0)
102
+ sqlite3 (1.3.11)
103
+ term-ansicolor (1.3.2)
104
+ tins (~> 1.0)
105
+ thor (0.19.1)
106
+ thread_safe (0.3.5)
107
+ tins (1.6.0)
108
+ tzinfo (0.3.48)
109
+
110
+ PLATFORMS
111
+ ruby
112
+
113
+ DEPENDENCIES
114
+ appraisal
115
+ bundler (~> 1.11)
116
+ coveralls
117
+ rails (~> 4.0.0)
118
+ rake (~> 10.0)
119
+ rspec
120
+ sqlite3
121
+ uniqueness!
122
+
123
+ BUNDLED WITH
124
+ 1.11.2
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 4.1.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,128 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ uniqueness (0.5.0)
5
+ activerecord (>= 4.0.0)
6
+ railties (>= 4.0.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (4.1.15)
12
+ actionpack (= 4.1.15)
13
+ actionview (= 4.1.15)
14
+ mail (~> 2.5, >= 2.5.4)
15
+ actionpack (4.1.15)
16
+ actionview (= 4.1.15)
17
+ activesupport (= 4.1.15)
18
+ rack (~> 1.5.2)
19
+ rack-test (~> 0.6.2)
20
+ actionview (4.1.15)
21
+ activesupport (= 4.1.15)
22
+ builder (~> 3.1)
23
+ erubis (~> 2.7.0)
24
+ activemodel (4.1.15)
25
+ activesupport (= 4.1.15)
26
+ builder (~> 3.1)
27
+ activerecord (4.1.15)
28
+ activemodel (= 4.1.15)
29
+ activesupport (= 4.1.15)
30
+ arel (~> 5.0.0)
31
+ activesupport (4.1.15)
32
+ i18n (~> 0.6, >= 0.6.9)
33
+ json (~> 1.7, >= 1.7.7)
34
+ minitest (~> 5.1)
35
+ thread_safe (~> 0.1)
36
+ tzinfo (~> 1.1)
37
+ appraisal (2.1.0)
38
+ bundler
39
+ rake
40
+ thor (>= 0.14.0)
41
+ arel (5.0.1.20140414130214)
42
+ builder (3.2.2)
43
+ concurrent-ruby (1.0.1)
44
+ coveralls (0.8.13)
45
+ json (~> 1.8)
46
+ simplecov (~> 0.11.0)
47
+ term-ansicolor (~> 1.3)
48
+ thor (~> 0.19.1)
49
+ tins (~> 1.6.0)
50
+ diff-lcs (1.2.5)
51
+ docile (1.1.5)
52
+ erubis (2.7.0)
53
+ i18n (0.7.0)
54
+ json (1.8.3)
55
+ mail (2.6.4)
56
+ mime-types (>= 1.16, < 4)
57
+ mime-types (3.0)
58
+ mime-types-data (~> 3.2015)
59
+ mime-types-data (3.2016.0221)
60
+ minitest (5.8.4)
61
+ rack (1.5.5)
62
+ rack-test (0.6.3)
63
+ rack (>= 1.0)
64
+ rails (4.1.15)
65
+ actionmailer (= 4.1.15)
66
+ actionpack (= 4.1.15)
67
+ actionview (= 4.1.15)
68
+ activemodel (= 4.1.15)
69
+ activerecord (= 4.1.15)
70
+ activesupport (= 4.1.15)
71
+ bundler (>= 1.3.0, < 2.0)
72
+ railties (= 4.1.15)
73
+ sprockets-rails (~> 2.0)
74
+ railties (4.1.15)
75
+ actionpack (= 4.1.15)
76
+ activesupport (= 4.1.15)
77
+ rake (>= 0.8.7)
78
+ thor (>= 0.18.1, < 2.0)
79
+ rake (10.5.0)
80
+ rspec (3.4.0)
81
+ rspec-core (~> 3.4.0)
82
+ rspec-expectations (~> 3.4.0)
83
+ rspec-mocks (~> 3.4.0)
84
+ rspec-core (3.4.4)
85
+ rspec-support (~> 3.4.0)
86
+ rspec-expectations (3.4.0)
87
+ diff-lcs (>= 1.2.0, < 2.0)
88
+ rspec-support (~> 3.4.0)
89
+ rspec-mocks (3.4.1)
90
+ diff-lcs (>= 1.2.0, < 2.0)
91
+ rspec-support (~> 3.4.0)
92
+ rspec-support (3.4.1)
93
+ simplecov (0.11.2)
94
+ docile (~> 1.1.0)
95
+ json (~> 1.8)
96
+ simplecov-html (~> 0.10.0)
97
+ simplecov-html (0.10.0)
98
+ sprockets (3.5.2)
99
+ concurrent-ruby (~> 1.0)
100
+ rack (> 1, < 3)
101
+ sprockets-rails (2.3.3)
102
+ actionpack (>= 3.0)
103
+ activesupport (>= 3.0)
104
+ sprockets (>= 2.8, < 4.0)
105
+ sqlite3 (1.3.11)
106
+ term-ansicolor (1.3.2)
107
+ tins (~> 1.0)
108
+ thor (0.19.1)
109
+ thread_safe (0.3.5)
110
+ tins (1.6.0)
111
+ tzinfo (1.2.2)
112
+ thread_safe (~> 0.1)
113
+
114
+ PLATFORMS
115
+ ruby
116
+
117
+ DEPENDENCIES
118
+ appraisal
119
+ bundler (~> 1.11)
120
+ coveralls
121
+ rails (~> 4.1.0)
122
+ rake (~> 10.0)
123
+ rspec
124
+ sqlite3
125
+ uniqueness!
126
+
127
+ BUNDLED WITH
128
+ 1.11.2
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 4.2.0"
6
+
7
+ gemspec :path => "../"