json_fields 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +90 -0
- data/Rakefile +6 -0
- data/app/controllers/application_controller.rb +3 -0
- data/app/helpers/json_fields_helper.rb +4 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/config/initializers/json_fields_form_builder.rb +5 -0
- data/json_fields.gemspec +29 -0
- data/lib/json_fields.rb +22 -0
- data/lib/json_fields/application_helper.rb +15 -0
- data/lib/json_fields/array_simple_structure.rb +31 -0
- data/lib/json_fields/base_structure.rb +15 -0
- data/lib/json_fields/configurable.rb +17 -0
- data/lib/json_fields/configuration_parser.rb +13 -0
- data/lib/json_fields/engine.rb +5 -0
- data/lib/json_fields/errors.rb +3 -0
- data/lib/json_fields/form_builder.rb +19 -0
- data/lib/json_fields/hash_simple_structure.rb +28 -0
- data/lib/json_fields/version.rb +3 -0
- data/vendor/assets/javascripts/json_fields.js +23 -0
- metadata +126 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7079d62f287d66cddd4463fd928cb5d2a09baaf8
|
4
|
+
data.tar.gz: dba147269b49c31a3e48fc17b3d5be977fae4f6b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e06ec241e16a7de469b77ee68fea07078b7eff34da9f40a6a215deb8fb0f36963a55f0591d2ae155a2640aafa51ea4cfec0356e54be764ba8d6782eb083e23ba
|
7
|
+
data.tar.gz: 76437d955afa436fafc02ef0b324706c7ab1c1fcfb2abfd2be0233c9725fab32e6d25bb1af5ea0b6bd93cd423acce596eb8de00f3aa8df572f99521288e9750c
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at jeremywoertink@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Jeremy Woertink
|
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
|
13
|
+
all 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
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
# JsonFields
|
2
|
+
|
3
|
+
This gem adds a simple UI to your form when you're dealing with [Postgres JSON](https://www.postgresql.org/docs/9.6/static/datatype-json.html).
|
4
|
+
|
5
|
+
Works with Rails 5.0+ (It probably works on 4.2 series as well, I just haven't tried it yet)
|
6
|
+
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
gem 'json_fields'
|
14
|
+
```
|
15
|
+
|
16
|
+
And then execute:
|
17
|
+
|
18
|
+
$ bundle
|
19
|
+
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
First setup the models that use the json fields. In your model, you'll use the `json_field` method which takes 2 arguments.
|
24
|
+
The first is the name of the attribute, and the second is a configuration string.
|
25
|
+
|
26
|
+
**NOTE:** There's only 2 supported options for the configuration string currently. `Array(Simple)` and `Hash(Simple)`. See [Configurations](#configurations) for more details.
|
27
|
+
|
28
|
+
In your model:
|
29
|
+
```ruby
|
30
|
+
class User < ApplicationRecord
|
31
|
+
json_field :settings, "Hash(Simple)"
|
32
|
+
json_field :likes, "Array(Simple)"
|
33
|
+
end
|
34
|
+
```
|
35
|
+
|
36
|
+
Next, in your form you'll use the `json_field`.
|
37
|
+
|
38
|
+
In your view:
|
39
|
+
```
|
40
|
+
= form_for(@user) do |f|
|
41
|
+
div
|
42
|
+
= f.label(:settings)
|
43
|
+
= f.json_field(:settings, class: 'form-control', wrapper_class: 'row')
|
44
|
+
div
|
45
|
+
= f.label(:likes)
|
46
|
+
= f.json_field(:likes, class: 'form-control', wrapper_class: 'row')
|
47
|
+
= f.submit('Save', class: 'btn')
|
48
|
+
```
|
49
|
+
|
50
|
+
In your controller:
|
51
|
+
```ruby
|
52
|
+
def user_params
|
53
|
+
params.require(:user).permit(settings: {}, likes: [])
|
54
|
+
end
|
55
|
+
```
|
56
|
+
|
57
|
+
## Configurations
|
58
|
+
|
59
|
+
The model's attribute configurations are used to determine how the fields should be setup. This format may change from `Array(Simple)` to maybe something like `Array(String)` to determine the type of fields. I'm still thinking on that one. For now, we will support a simple array and a simple hash.
|
60
|
+
|
61
|
+
Consider these two json structures:
|
62
|
+
|
63
|
+
```json
|
64
|
+
// Simple Hash
|
65
|
+
{ "theme": "dark", "wants_spam_emails": false, "version": 1 }
|
66
|
+
|
67
|
+
// Simple Array
|
68
|
+
[ "ruby", "python", "crystal", "elixir" ]
|
69
|
+
```
|
70
|
+
|
71
|
+
If you're storing your data as one of these two formats, then you'll use `Hash(Simple)` or `Array(Simple)`. More complex structures will be supported later.
|
72
|
+
|
73
|
+
|
74
|
+
## Development
|
75
|
+
|
76
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
77
|
+
|
78
|
+
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).
|
79
|
+
|
80
|
+
## Contributing
|
81
|
+
|
82
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/jwoertink/json_fields. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
83
|
+
|
84
|
+
## License
|
85
|
+
|
86
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
87
|
+
|
88
|
+
## Code of Conduct
|
89
|
+
|
90
|
+
Everyone interacting in the JsonFields project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/jwoertink/json_fields/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "json_fields"
|
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(__FILE__)
|
data/bin/setup
ADDED
data/json_fields.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "json_fields/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "json_fields"
|
8
|
+
spec.version = JsonFields::VERSION
|
9
|
+
spec.authors = ["Jeremy Woertink"]
|
10
|
+
spec.email = ["jeremywoertink@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Adds a UI for json fields}
|
13
|
+
spec.description = %q{Adds a UI for json fields}
|
14
|
+
spec.homepage = "https://github.com/jwoertink/json_fields"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_dependency "railties", ">= 4.2.0"
|
25
|
+
|
26
|
+
spec.add_development_dependency "bundler", "~> 1.15"
|
27
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
29
|
+
end
|
data/lib/json_fields.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require "active_record"
|
2
|
+
require "active_record/version"
|
3
|
+
require "active_support/core_ext/module"
|
4
|
+
require "json_fields/errors"
|
5
|
+
require "json_fields/base_structure"
|
6
|
+
require "json_fields/array_simple_structure"
|
7
|
+
require "json_fields/hash_simple_structure"
|
8
|
+
require "json_fields/configuration_parser"
|
9
|
+
require "json_fields/configurable"
|
10
|
+
require "json_fields/application_helper"
|
11
|
+
require "json_fields/form_builder"
|
12
|
+
require "json_fields/version"
|
13
|
+
|
14
|
+
module JsonFields
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
require "json_fields/engine"
|
19
|
+
|
20
|
+
ActiveSupport.on_load(:active_record) do
|
21
|
+
extend JsonFields::Configurable
|
22
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module JsonFields
|
2
|
+
module ApplicationHelper
|
3
|
+
|
4
|
+
def json_field(object_name, method, options = {})
|
5
|
+
klass = options[:object].class
|
6
|
+
if options[:class].blank?
|
7
|
+
options[:class] = 'json-field'
|
8
|
+
else
|
9
|
+
options[:class] += ' json-field'
|
10
|
+
end
|
11
|
+
klass.json_fields[method].template(object_name, method, options)
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module JsonFields
|
2
|
+
class ArraySimpleStructure < BaseStructure
|
3
|
+
|
4
|
+
# `object_name` is a String snake_case name of the object
|
5
|
+
# `method` is a Symbol of the method being called
|
6
|
+
# `options` is a Hash. `options[:object]` contains the instance of the object
|
7
|
+
# returns the HTML template to be used
|
8
|
+
def template(object_name, method, options)
|
9
|
+
obj = options[:object]
|
10
|
+
id = [object_name, method, 'json_field'].join('_')
|
11
|
+
|
12
|
+
content_tag(:div, id: id) do
|
13
|
+
html = content_tag(:a, 'Add Field', href: '#', class: 'btn btn-add add-json-fields', 'data-target' => id)
|
14
|
+
Array(obj.send(method)).collect.with_index { |value, idx|
|
15
|
+
html += content_tag(:div, class: ['template', options.delete(:wrapper_class)].compact.join(' ')) do
|
16
|
+
[text_field_tag("#{object_name}[#{method}][]", nil, value: value, class: 'json-field-control', id: nil, name: "#{object_name}[#{method}][]"),
|
17
|
+
content_tag(:a, '-', href: '#', class: 'btn btn-remove remove-json-fields')
|
18
|
+
].join.html_safe
|
19
|
+
end
|
20
|
+
}
|
21
|
+
html.html_safe
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
# Takes in values and returns a normal structure that can be saved
|
27
|
+
def assemble(values)
|
28
|
+
values
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module JsonFields
|
2
|
+
class BaseStructure
|
3
|
+
include ActionView::Context
|
4
|
+
include ActionView::Helpers::FormTagHelper
|
5
|
+
include ActionView::Helpers::TagHelper
|
6
|
+
|
7
|
+
def template(object_name, method, options)
|
8
|
+
raise "template must be defined in the subclass"
|
9
|
+
end
|
10
|
+
|
11
|
+
def assemble(values)
|
12
|
+
raise "assemble must be defined in the subclass"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module JsonFields
|
2
|
+
module Configurable
|
3
|
+
@@fields = {}
|
4
|
+
|
5
|
+
def json_field(attribute, json_structure)
|
6
|
+
@@fields[attribute] = JsonFields::ConfigurationParser.parse!(json_structure)
|
7
|
+
define_method("#{attribute}=") do |values|
|
8
|
+
value = self.class.json_fields[attribute].assemble(values)
|
9
|
+
self.write_attribute(attribute, value)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def json_fields
|
14
|
+
@@fields
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module JsonFields
|
2
|
+
class ConfigurationParser
|
3
|
+
|
4
|
+
# returns a Structure class based on the parsed data
|
5
|
+
def self.parse!(data)
|
6
|
+
data.match(/(\A[A-Z][A-Za-z]+)\((\w+)\)/)
|
7
|
+
raise JsonFields::ConfigurationError.new("Configuration data is incorrect: #{data}") if $1.nil? || $2.nil?
|
8
|
+
klass = "JsonFields::#{$1}#{$2}Structure".safe_constantize
|
9
|
+
raise JsonFields::ConfigurationError.new("No Structure found") if klass.nil?
|
10
|
+
klass.new
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module JsonFields
|
2
|
+
class FormBuilder < ActionView::Helpers::FormBuilder
|
3
|
+
|
4
|
+
JsonFields::ApplicationHelper.instance_methods.each do |selector|
|
5
|
+
src = <<-CODE
|
6
|
+
def #{selector}(method, options = {})
|
7
|
+
@template.send(#{selector.inspect}, @object_name, method, objectify_options(options))
|
8
|
+
end
|
9
|
+
CODE
|
10
|
+
class_eval src, __FILE__, __LINE__
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def objectify_options(options)
|
16
|
+
@default_options.merge(options.merge(:object => @object))
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module JsonFields
|
2
|
+
class HashSimpleStructure < BaseStructure
|
3
|
+
|
4
|
+
def template(object_name, method, options)
|
5
|
+
obj = options[:object]
|
6
|
+
id = [object_name, method, 'json_field'].join('_')
|
7
|
+
|
8
|
+
content_tag(:div, id: id) do
|
9
|
+
html = content_tag(:a, 'Add Field', href: '#', class: 'btn btn-add add-json-fields', 'data-target' => id)
|
10
|
+
Hash(obj.send(method)).collect.with_index { |(key, value), idx|
|
11
|
+
html += content_tag(:div, class: ['template', options.delete(:wrapper_class)].compact.join(' ')) do
|
12
|
+
[
|
13
|
+
text_field_tag("#{object_name}[#{method}][key][]", nil, value: key, class: 'json-field-control', id: nil),
|
14
|
+
text_field_tag("#{object_name}[#{method}][value][]", nil, value: value, class: 'json-field-control', id: nil),
|
15
|
+
content_tag(:a, '-', href: '#', class: 'btn btn-remove remove-json-fields')
|
16
|
+
].join.html_safe
|
17
|
+
end
|
18
|
+
}
|
19
|
+
html.html_safe
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
def assemble(values)
|
25
|
+
Hash[values[:key].zip(values[:value])]
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
$(function() {
|
2
|
+
|
3
|
+
// Add additional fields to the form
|
4
|
+
$(document).on('click', '.add-json-fields', function() {
|
5
|
+
$target = $("#"+$(this).data('target'));
|
6
|
+
template = $target.find('.template:last').clone();
|
7
|
+
if(typeof template === "undefined" || template === "") {
|
8
|
+
return false;
|
9
|
+
}
|
10
|
+
//r = new RegExp($(this).data('target') + "\\[(\\d+)\\]", "g");
|
11
|
+
//current_num = parseInt(r.exec(template)[1]);
|
12
|
+
//new_template = template.replace(r, $(this).data('target')+'['+(current_num+1)+']');
|
13
|
+
//$new_row = $('<div class="row template">'+new_template+'</div>');
|
14
|
+
$target.append(template);
|
15
|
+
return false;
|
16
|
+
});
|
17
|
+
|
18
|
+
// Remove the fields from the form
|
19
|
+
$(document).on('click', '.remove-json-fields', function() {
|
20
|
+
$(this).parents('.template:first').remove();
|
21
|
+
return false;
|
22
|
+
});
|
23
|
+
});
|
metadata
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: json_fields
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jeremy Woertink
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-10-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: railties
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 4.2.0
|
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.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.15'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.15'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.0'
|
69
|
+
description: Adds a UI for json fields
|
70
|
+
email:
|
71
|
+
- jeremywoertink@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- ".gitignore"
|
77
|
+
- ".rspec"
|
78
|
+
- ".travis.yml"
|
79
|
+
- CODE_OF_CONDUCT.md
|
80
|
+
- Gemfile
|
81
|
+
- LICENSE.txt
|
82
|
+
- README.md
|
83
|
+
- Rakefile
|
84
|
+
- app/controllers/application_controller.rb
|
85
|
+
- app/helpers/json_fields_helper.rb
|
86
|
+
- bin/console
|
87
|
+
- bin/setup
|
88
|
+
- config/initializers/json_fields_form_builder.rb
|
89
|
+
- json_fields.gemspec
|
90
|
+
- lib/json_fields.rb
|
91
|
+
- lib/json_fields/application_helper.rb
|
92
|
+
- lib/json_fields/array_simple_structure.rb
|
93
|
+
- lib/json_fields/base_structure.rb
|
94
|
+
- lib/json_fields/configurable.rb
|
95
|
+
- lib/json_fields/configuration_parser.rb
|
96
|
+
- lib/json_fields/engine.rb
|
97
|
+
- lib/json_fields/errors.rb
|
98
|
+
- lib/json_fields/form_builder.rb
|
99
|
+
- lib/json_fields/hash_simple_structure.rb
|
100
|
+
- lib/json_fields/version.rb
|
101
|
+
- vendor/assets/javascripts/json_fields.js
|
102
|
+
homepage: https://github.com/jwoertink/json_fields
|
103
|
+
licenses:
|
104
|
+
- MIT
|
105
|
+
metadata: {}
|
106
|
+
post_install_message:
|
107
|
+
rdoc_options: []
|
108
|
+
require_paths:
|
109
|
+
- lib
|
110
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
111
|
+
requirements:
|
112
|
+
- - ">="
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '0'
|
115
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
requirements: []
|
121
|
+
rubyforge_project:
|
122
|
+
rubygems_version: 2.6.11
|
123
|
+
signing_key:
|
124
|
+
specification_version: 4
|
125
|
+
summary: Adds a UI for json fields
|
126
|
+
test_files: []
|