simple_form_unique 0.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,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d7da132713634cbcd31b3dc9ae5435710767fe0b
4
+ data.tar.gz: 5d7576b5551a05539fd9b448b3f82fd51b1b1255
5
+ SHA512:
6
+ metadata.gz: f587781a5d1d0fb9ef774198cab6d8793f55885cceb2db67c02a54b3eb8eeb67d7ff80e6eeb67a72a7e573185cfbbbf824a9724441785187c71caa0a8f964894
7
+ data.tar.gz: 4d7a1e6cb416244e3c54fe808770ad3e81c62d898542d311a03b3d40231a3937d23ba6d591fe084471af8233fe096c05a8ef6175c61b5e2f1bc1cb624e6f09a4
@@ -0,0 +1,5 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
5
+ .idea
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in simple_form_unique.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 PRM Technologies, LLC; Peter Ragone
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.
22
+
@@ -0,0 +1,4 @@
1
+ Simple Form Unique
2
+
3
+ Adds searches the given model for any existing objects that already have the
4
+ value in the field passed in
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,5 @@
1
+ module SimpleFormUnique
2
+ class SearchController < ApplicationController
3
+
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ class UniqueInput < SimpleForm::Inputs::CollectionInput
2
+ def input wrapper_options
3
+ end
4
+
5
+ private
6
+ end
@@ -0,0 +1,6 @@
1
+ require "simple_form_unique/version"
2
+
3
+ module SimpleFormUnique
4
+ class Engine < ::Rails::Engine
5
+ end
6
+ end
@@ -0,0 +1,3 @@
1
+ module SimpleFormUnique
2
+ VERSION = "0.0"
3
+ end
@@ -0,0 +1,32 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "simple_form_unique/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "simple_form_unique"
7
+ s.version = SimpleFormUnique::VERSION
8
+ s.authors = ["Peter Ragone"]
9
+ s.email = ["peter@prmtech.com"]
10
+ s.license = 'MIT'
11
+ s.homepage = "http://github.com/pcragone/simple_form_unique"
12
+ s.summary = "Adds unique inputs to the simple_form library"
13
+ s.description = <<-eos
14
+ Sets a form to invalid if a value entered into the specified input is not unique
15
+ among all instances of that model; UI can display this as various formats, with
16
+ the default being a green 'Available' and a red 'Unavailable'
17
+ eos
18
+
19
+
20
+ s.rubyforge_project = "simple_form_unique"
21
+
22
+ s.files = `git ls-files`.split("\n")
23
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
24
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
25
+ s.require_paths = ["lib"]
26
+
27
+ # specify any dependencies here; for example:
28
+ # s.add_development_dependency "rspec"
29
+ s.add_runtime_dependency "rails", "~> 4.2"
30
+ s.add_runtime_dependency "simple_form", "~> 3.1"
31
+ # s.add_runtime_dependency "jquery-rails", ">= 1.0.14"
32
+ end
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: simple_form_unique
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.0'
5
+ platform: ruby
6
+ authors:
7
+ - Peter Ragone
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-02-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '4.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '4.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: simple_form
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.1'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.1'
41
+ description: "Sets a form to invalid if a value entered into the specified input is
42
+ not unique\namong all instances of that model; UI can display this as various formats,
43
+ with \nthe default being a green 'Available' and a red 'Unavailable'\n"
44
+ email:
45
+ - peter@prmtech.com
46
+ executables: []
47
+ extensions: []
48
+ extra_rdoc_files: []
49
+ files:
50
+ - ".gitignore"
51
+ - Gemfile
52
+ - LICENSE
53
+ - README.textile
54
+ - Rakefile
55
+ - app/assets/javascripts/simple_form.unique.js
56
+ - app/assets/stylesheets/simple_form.unique.css
57
+ - app/controllers/simple_form_unique/search_controller.rb
58
+ - app/inputs/unique_input.rb
59
+ - lib/simple_form_unique.rb
60
+ - lib/simple_form_unique/version.rb
61
+ - simple_form_unique.gemspec
62
+ homepage: http://github.com/pcragone/simple_form_unique
63
+ licenses:
64
+ - MIT
65
+ metadata: {}
66
+ post_install_message:
67
+ rdoc_options: []
68
+ require_paths:
69
+ - lib
70
+ required_ruby_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ requirements: []
81
+ rubyforge_project: simple_form_unique
82
+ rubygems_version: 2.4.3
83
+ signing_key:
84
+ specification_version: 4
85
+ summary: Adds unique inputs to the simple_form library
86
+ test_files: []