zutils 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 1e0c353b3b2b3b77407418c79d536d43b6f00e152f411901e6a5c83e75c9416e
4
+ data.tar.gz: 6fa4d9937b5438192ca12e085bc75e1372e09aac5e5ea8bbb4925016e9da4608
5
+ SHA512:
6
+ metadata.gz: 54f3aae4db50fe1b471d3898b6132fd168552e7cddf730bad1b5666586191168f026e293b1dff3cf7bfad110b911b6cda17ba6e797a61a5993d6b7f434abc4c3
7
+ data.tar.gz: 74b97dec3f4b7ff874706014316c791f0ffdace82d68a870bb2b26e699612d9ac2bdd9b0b4fe87fb40e692026d78f40dee63b683b26eeccf971ea37d1375bfda
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
@@ -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 ricardo.viana@tjpi.jus.br. 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
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in zutils.gemspec
6
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Ricardo Viana
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,43 @@
1
+ # Zutils
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/zutils`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'zutils'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install zutils
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ 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.
30
+
31
+ 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).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/zutils. 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.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
+
41
+ ## Code of Conduct
42
+
43
+ Everyone interacting in the Zutils project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/zutils/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
@@ -0,0 +1,30 @@
1
+ <div class="btn-group">
2
+ <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
3
+ Ações
4
+ <span class="caret"></span>
5
+ <span class="sr-only">Toggle Dropdown</span>
6
+ </button>
7
+ <ul class="dropdown-menu" role="menu">
8
+ <li>
9
+ <%= link_to object, data: { toggle: 'tooltip', placement: 'top', title: 'Visualizar' } do %>
10
+ <i class="fa fa-eye"></i> Visualizar
11
+ <% end %>
12
+ </li>
13
+ <li>
14
+ <% if object.class == Array %>
15
+ <%= link_to eval_with_rescue("edit_#{[object].flatten.map{|x| x.class.to_s.underscore}.join("_")}_path(#{object[0].id}, #{object[1].id})"), data: { toggle: 'tooltip', placement: 'top', title: 'Editar' } do %>
16
+ <i class="fa fa-pencil"></i> Editar
17
+ <% end %>
18
+ <% else %>
19
+ <%= link_to eval_with_rescue("edit_#{[object].flatten.map{|x| x.class.to_s.underscore}.join("_")}_path(#{object.id})"), data: { toggle: 'tooltip', placement: 'top', title: 'Editar' } do %>
20
+ <i class="fa fa-pencil"></i> Editar
21
+ <% end %>
22
+ <% end %>
23
+ </li>
24
+ <li>
25
+ <%= link_to object, method: :delete, data: { confirm: 'Tem certeza?', toggle: 'tooltip', placement: 'top', title: 'Apagar' } do %>
26
+ <i class="fa fa-trash"></i> Apagar
27
+ <% end %>
28
+ </li>
29
+ </ul>
30
+ </div>
@@ -0,0 +1,61 @@
1
+ <% excluded_columns ||= [] %>
2
+ <% restricted_columns ||= {} %>
3
+ <% nested_resource ||= false %>
4
+ <% parent_resource ||= false %>
5
+ <% back_link ||= false %>
6
+
7
+ <% form_size_fields ||= (object.class.respond_to?('form_size_fields') ? object.class.form_size_fields : {}) %>
8
+ <% form_ordered_fields ||= (object.class.respond_to?('form_ordered_fields') ? object.class.form_ordered_fields : object.class.column_names) %>
9
+
10
+ <%= simple_form_for(nested_resource ? [parent_resource, object] : object) do |f| %>
11
+ <div class="box box-primary">
12
+ <div class="box-header with-border">
13
+ <h3 class="box-title">
14
+ Dados do <%=t object.class.model_name.human %>
15
+ <% if parent_resource %>
16
+ <%= link_to 'Cancelar', eval_with_rescue("#{parent_resource.class.model_name.to_s.downcase}_#{controller_name}_path(#{parent_resource.id})"), class: "btn btn-default btn-xs" %>
17
+ <% else %>
18
+ <%= link_to 'Cancelar', eval_with_rescue("#{controller_name}_path"), class: "btn btn-default btn-xs" %>
19
+ <% end %>
20
+ <%= f.submit 'Salvar', class: 'btn btn-primary btn-xs' %>
21
+ </h3>
22
+ </div>
23
+ <div class="box-body">
24
+ <div class="row">
25
+ <% (form_ordered_fields - ['id', 'created_at', 'updated_at', 'deleted_at'] - excluded_columns).each do |column| %>
26
+ <% wphtml = "col-md-#{form_size_fields[column.to_sym] || 12}" %>
27
+ <% if object.class.column_for_attribute(column).type == :text %>
28
+ <%= f.input column, input_html: { rows: 10, cols: 20 }, wrapper_html: { class: wphtml } %>
29
+ <% elsif [:date, :datetime].include?(object.class.column_for_attribute(column).type) %>
30
+ <%= f.input column, html5: true, wrapper_html: { class: wphtml } %>
31
+ <% elsif /_id$/ =~ column && object.respond_to?(column.split('_id')[0]) %>
32
+ <% if restricted_columns.keys.include?(column.to_sym) %>
33
+ <%= f.association column.split("_id")[0],
34
+ label: restricted_columns[column.to_sym][:label],
35
+ collection: restricted_columns[column.to_sym][:collection],
36
+ wrapper_html: { class: wphtml }
37
+ %>
38
+ <% else %>
39
+ <%= f.association column.split("_id")[0], wrapper_html: { class: wphtml } %>
40
+ <% end %>
41
+ <% else %>
42
+ <%= f.input column, wrapper_html: { class: wphtml } %>
43
+ <% end %>
44
+ <% end %>
45
+ </div>
46
+ </div>
47
+ <div class="box-footer">
48
+ <% if back_link %>
49
+ <%= link_to 'Cancelar', "javascript:history.back()", class: "btn btn-default" %>
50
+ <% else %>
51
+ <% if parent_resource %>
52
+ <%= link_to 'Cancelar', eval_with_rescue("#{parent_resource.class.model_name.to_s.downcase}_#{controller_name}_path(#{parent_resource.id})"), class: "btn btn-default" %>
53
+ <% else %>
54
+ <%= link_to 'Cancelar', eval_with_rescue("#{controller_name}_path"), class: "btn btn-default" %>
55
+ <% end %>
56
+ <% end %>
57
+
58
+ <%= f.submit class: "btn btn-primary" %>
59
+ </div>
60
+ </div>
61
+ <% end %>
@@ -0,0 +1,69 @@
1
+ <% exceptions ||= ['id', 'created_at', 'updated_at', 'deleted_at'] %>
2
+ <% search_fields ||= [] %>
3
+ <% sort_fields ||= [] %>
4
+ <% nested_resource ||= false %>
5
+ <% excluded_columns ||= [] %>
6
+
7
+ <div class='box box-primary'>
8
+ <div class="box-header with-border">
9
+ <h3 class="box-title">
10
+ <%=t Kernel.const_get(controller_name.singularize.camelize).model_name.human.pluralize %>
11
+ </h3>
12
+ </div>
13
+ <div class="box-body">
14
+ <% unless search_fields.empty? %>
15
+ <div class="row">
16
+ <%= search_form_for @q, url: eval(nested_resource ? "#{parent_resource}_#{controller_name}_path" : "#{controller_name}_path") do |f| %>
17
+ <% search_fields.each do |sf| %>
18
+ <%= f.input sf[:field], label: sf[:label], required: false, as: sf[:as], collection: sf[:collection], wrapper_html: { class: 'col-md-3' } %>
19
+ <% end %>
20
+ <div class="col-md-4 top-25">
21
+ <%= f.submit "Pesquisar", class: 'btn btn-primary' %>
22
+ </div>
23
+ <% end %>
24
+ </div>
25
+ <hr>
26
+ <% end %>
27
+ <% if list.empty? %>
28
+ <table class="table table-striped datatables">
29
+ <tbody>
30
+ <tr>
31
+ <td>Nenhum registro encontrado</td>
32
+ </tr>
33
+ </tbody>
34
+ </table>
35
+ <% else %>
36
+ <%= render 'shared/list', list: list, exceptions: exceptions, excluded_columns: excluded_columns, sort_fields: sort_fields %>
37
+ <% if defined? list.total_pages %>
38
+ <div class='col-md-4'>
39
+ <%= page_entries_info list, entry_name: 'resultado(s)' %>
40
+ </div>
41
+ <div class='col-md-8 text-right hidden-xs'>
42
+ <%= paginate list, window: 4 %>
43
+ </div>
44
+ <div class='col-md-8 text-center visible-xs'>
45
+ <%= paginate list, window: 1 %>
46
+ </div>
47
+ <% end %>
48
+ <% end %>
49
+ </div>
50
+
51
+ <div class="box-footer">
52
+ <% unless controller_name == 'users' %>
53
+ <% if can? :new, controller_name.singularize %>
54
+ <% if nested_resource == true %>
55
+ <% if parent_resource %>
56
+ <%= link_to eval("new_#{parent_resource}_#{controller_name.singularize}_path"), class: "btn btn-primary" do %>
57
+ <%= t('.new', default: t("helpers.links.new")) %> <%= Kernel.const_get(controller_name.singularize.camelize).model_name.human %> <i class='fa fa-plus'></i>
58
+ <% end %>
59
+ <% end %>
60
+ <% else %>
61
+ <%= link_to eval("new_#{controller_name.singularize}_path"), class: "btn btn-primary" do %>
62
+ <%= t('.new', default: t("helpers.links.new")) %> <%= Kernel.const_get(controller_name.singularize.camelize).model_name.human %> <i class='fa fa-plus'></i>
63
+ <% end %>
64
+ <% end %>
65
+ <% end %>
66
+ <% end %>
67
+ </div>
68
+
69
+ </div>
@@ -0,0 +1,56 @@
1
+ <% exceptions ||= ['id', 'created_at', 'updated_at', 'deleted_at'] %>
2
+ <% excluded_columns ||= [] %>
3
+ <% hide_actions ||= false %>
4
+ <% sort_fields ||= [] %>
5
+
6
+ <table class="table table-striped datatables">
7
+ <thead>
8
+ <tr>
9
+ <% unless list.empty? %>
10
+ <% (list.first.class.column_names - exceptions - excluded_columns).each do |column| %>
11
+ <% if sort_fields.include? column %>
12
+ <% if /_id$/ =~ column %>
13
+ <th><%= sort_link(@q, column, list.first.class.human_attribute_name(column.split("_id")[0])) %></th>
14
+ <% else %>
15
+ <th><%= sort_link(@q, column, list.first.class.human_attribute_name(column)) %></th>
16
+ <% end %>
17
+ <% else %>
18
+ <% if /_id$/ =~ column %>
19
+ <th><%= list.first.class.human_attribute_name(column.split("_id")[0]) %></th>
20
+ <% else %>
21
+ <th><%= list.first.class.human_attribute_name(column) %></th>
22
+ <% end %>
23
+ <% end %>
24
+ <% end %>
25
+ <% unless hide_actions %>
26
+ <th>Ações</th>
27
+ <% end %>
28
+ <% end %>
29
+ </tr>
30
+ </thead>
31
+ <tbody>
32
+ <% list.each do |object| %>
33
+ <tr>
34
+ <% (list.first.class.column_names - exceptions - excluded_columns).each do |column| %>
35
+ <td>
36
+ <% if object.send(column).class == Date or
37
+ object.send(column).class == DateTime or
38
+ object.send(column).class == ActiveSupport::TimeWithZone or
39
+ object.send(column).class == Time %>
40
+ <%=l object.send(column) %>
41
+ <% elsif /_id$/ =~ column && object.respond_to?(column.split('_id')[0]) %>
42
+ <%= object.send(column.split("_id")[0]).name %>
43
+ <% else %>
44
+ <%= object.send(column) %>
45
+ <% end %>
46
+ </td>
47
+ <% end %>
48
+ <% unless hide_actions %>
49
+ <td>
50
+ <%= render 'shared/action_links', object: object %>
51
+ </td>
52
+ <% end %>
53
+ </tr>
54
+ <% end %>
55
+ </tbody>
56
+ </table>
@@ -0,0 +1,80 @@
1
+ <% excluded_columns ||= [] %>
2
+ <% nested_resource ||= false %>
3
+ <% relationships ||= {} %>
4
+
5
+ <div class="box box-primary">
6
+ <div class="box-header with-border">
7
+ <h3 class="box-title"><%=t object.class.model_name.human %></h3>
8
+ <% if can? :edit, object %> <!--verificando se o usuario esta logado-->
9
+ <%= link_to eval_with_rescue("edit_#{controller_name.singularize}_path(#{object.id})"), class: "btn btn-warning btn-xs", data: { toggle: 'tooltip', placement: 'top', title: 'Editar' } do %>
10
+ <i class="fa fa-pencil"></i> Editar
11
+ <% end %>
12
+ <% end %>
13
+ <% if nested_resource %>
14
+ <%= link_to 'Listagem', eval_with_rescue("#{parent_resource.class.model_name.to_s.downcase}_#{controller_name}_path(#{parent_resource.id})"), class: "btn btn-default btn-xs" %>
15
+ <% else %>
16
+ <%= link_to 'Listagem', eval_with_rescue("#{controller_name}_path"), class: "btn btn-default btn-xs" %>
17
+ <% end %>
18
+ </div>
19
+ <div class="box-body no-padding">
20
+ <table class="table table-bordered table-striped no-padding datatables">
21
+ <% (object.class.column_names - ['id', 'created_at', 'updated_at', 'deleted_at'] - excluded_columns).each do |column| %>
22
+ <tr>
23
+ <th width='15%'><%= object.class.human_attribute_name(column) %></th>
24
+ <td>
25
+ <% if object.send(column).class == Date or
26
+ object.send(column).class == DateTime or
27
+ object.send(column).class == ActiveSupport::TimeWithZone or
28
+ object.send(column).class == Time %>
29
+ <%=l object.send(column) %>
30
+ <% elsif /_id$/ =~ column && object.respond_to?(column.split('_id')[0]) %>
31
+ <%= object.send(column.split("_id")[0]).name %>
32
+ <% else %>
33
+ <%= object.send(column) %>
34
+ <% end %>
35
+ </td>
36
+ </tr>
37
+ <% end %>
38
+ </table>
39
+ <% if relationships.size > 0 %>
40
+ <% relationships.each do |key, value| %>
41
+ <table class="table table-bordered table-striped no-padding datatables">
42
+ <caption>
43
+ <strong>
44
+ <%=t Kernel.const_get(key.to_s.singularize.camelize).model_name.human.pluralize %>
45
+ </strong>
46
+ </caption>
47
+ <thead>
48
+ <tr>
49
+ <% value.each do |v| %>
50
+ <th><%= Kernel.const_get(key.to_s.singularize.camelize).human_attribute_name(v) %></th>
51
+ <% end %>
52
+ </tr>
53
+ </thead>
54
+ <tbody>
55
+ <% object.send(key.to_s).each do |r| %>
56
+ <tr>
57
+ <% value.each do |v| %>
58
+ <td><%= r.send(v) %></td>
59
+ <% end %>
60
+ </tr>
61
+ <% end %>
62
+ </tbody>
63
+ </table>
64
+ <% end %>
65
+ <% end %>
66
+ </div>
67
+ <div class="box-footer">
68
+ <% if can? :edit, object %> <!--verificando se o usuario esta logado-->
69
+ <%= link_to eval_with_rescue("edit_#{controller_name.singularize}_path(#{object.id})"), class: "btn btn-warning", data: { toggle: 'tooltip', placement: 'top', title: 'Editar' } do %>
70
+ <i class="fa fa-pencil"></i> Editar
71
+ <% end %>
72
+ <% end %>
73
+
74
+ <% if nested_resource %>
75
+ <%= link_to 'Listagem', eval_with_rescue("#{parent_resource.class.model_name.to_s.downcase}_#{controller_name}_path(#{parent_resource.id})"), class: "btn btn-default" %>
76
+ <% else %>
77
+ <%= link_to 'Listagem', eval_with_rescue("#{controller_name}_path"), class: "btn btn-default" %>
78
+ <% end %>
79
+ </div>
80
+ </div>
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "zutils"
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
@@ -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,5 @@
1
+ module Zutils
2
+ class Engine < Rails::Engine
3
+ # Make it a Rails Engine
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ module Zutils
2
+ VERSION = "0.1.0"
3
+ end
data/lib/zutils.rb ADDED
@@ -0,0 +1,6 @@
1
+ require "zutils/version"
2
+ require "zutils/engine"
3
+
4
+ module Zutils
5
+ # Your code goes here...
6
+ end
data/zutils.gemspec ADDED
@@ -0,0 +1,39 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "zutils/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "zutils"
8
+ spec.version = Zutils::VERSION
9
+ spec.authors = ["Ricardo Viana"]
10
+ spec.email = ["zezim.ricardo@gmail.com"]
11
+
12
+ spec.summary = "Utilidades gerais para aplicações rails"
13
+ spec.description = "Utilidades gerais (views, models, helpers) para aplicações rails"
14
+ spec.homepage = "http://gitlab.tjpi.jus.br/"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
19
+ # if spec.respond_to?(:metadata)
20
+ # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
21
+ # else
22
+ # raise "RubyGems 2.0 or newer is required to protect against " \
23
+ # "public gem pushes."
24
+ # end
25
+
26
+ # Specify which files should be added to the gem when it is released.
27
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
28
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
29
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
30
+ end
31
+ spec.bindir = "exe"
32
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
33
+ spec.require_paths = ["lib"]
34
+
35
+ spec.add_dependency 'rails', '~> 5.0'
36
+
37
+ spec.add_development_dependency "bundler", "~> 1.16"
38
+ spec.add_development_dependency "rake", "~> 10.0"
39
+ end
metadata ADDED
@@ -0,0 +1,103 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: zutils
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Ricardo Viana
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-11-05 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: '5.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '5.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.16'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.16'
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
+ description: Utilidades gerais (views, models, helpers) para aplicações rails
56
+ email:
57
+ - zezim.ricardo@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - CODE_OF_CONDUCT.md
64
+ - Gemfile
65
+ - LICENSE.txt
66
+ - README.md
67
+ - Rakefile
68
+ - app/views/shared/_action_links.html.erb
69
+ - app/views/shared/_form.html.erb
70
+ - app/views/shared/_index.html.erb
71
+ - app/views/shared/_list.html.erb
72
+ - app/views/shared/_show.html.erb
73
+ - bin/console
74
+ - bin/setup
75
+ - lib/zutils.rb
76
+ - lib/zutils/engine.rb
77
+ - lib/zutils/version.rb
78
+ - zutils.gemspec
79
+ homepage: http://gitlab.tjpi.jus.br/
80
+ licenses:
81
+ - MIT
82
+ metadata: {}
83
+ post_install_message:
84
+ rdoc_options: []
85
+ require_paths:
86
+ - lib
87
+ required_ruby_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ requirements: []
98
+ rubyforge_project:
99
+ rubygems_version: 2.7.7
100
+ signing_key:
101
+ specification_version: 4
102
+ summary: Utilidades gerais para aplicações rails
103
+ test_files: []