diff --git a/Gemfile b/Gemfile index 1b25118..f8e247c 100644 --- a/Gemfile +++ b/Gemfile @@ -1,14 +1,11 @@ source "https://rubygems.org" -gem "rails", ">= 4.0" +gemspec group :development do gem "bundler" - if RUBY_VERSION >= "2.3" - gem "jeweler", ">= 2.1.2", platform: :mri, github: 'technicalpickles/jeweler' - end - + gem "bump" #gem "json", ">= 1.9" gem "pry-byebug" diff --git a/Rakefile b/Rakefile index 0c62870..a3be250 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,5 @@ # encoding: utf-8 +# frozen_string_literal: true require 'rubygems' require 'bundler' @@ -10,24 +11,7 @@ rescue Bundler::BundlerError => e exit e.status_code end require 'rake' - -if RUBY_VERSION >= "2.3" - require 'jeweler' - Jeweler::Tasks.new do |gem| - # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options - gem.name = "datagrid" - gem.homepage = "http://github.com/bogdan/datagrid" - gem.license = "MIT" - gem.summary = %Q{Ruby gem to create datagrids} - gem.description = %Q{This allows you to easily build datagrid aka data tables with sortable columns and filters} - gem.email = "agresso@gmail.com" - gem.authors = ["Bogdan Gusiev"] - gem.required_ruby_version = '>= 2.0' - # dependencies defined in Gemfile - end - Jeweler::RubygemsDotOrgTasks.new -end - +require 'bundler/gem_tasks' require 'rspec/core' require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) do |spec| diff --git a/VERSION b/VERSION deleted file mode 100644 index 308b6fa..0000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.6.2 \ No newline at end of file diff --git a/datagrid.gemspec b/datagrid.gemspec index da48e99..86d8f8f 100644 --- a/datagrid.gemspec +++ b/datagrid.gemspec @@ -1,179 +1,41 @@ -# Generated by jeweler -# DO NOT EDIT THIS FILE DIRECTLY -# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec' -# -*- encoding: utf-8 -*- -# stub: datagrid 1.6.1 ruby lib +# frozen_string_literal: true +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +require "datagrid/version" Gem::Specification.new do |s| - s.name = "datagrid".freeze - s.version = "1.6.1" - - s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= - s.require_paths = ["lib".freeze] - s.authors = ["Bogdan Gusiev".freeze] + s.name = "datagrid" + s.version = Datagrid::VERSION + s.require_paths = ["lib"] + s.authors = ["Bogdan Gusiev"] s.date = "2020-09-07" - s.description = "This allows you to easily build datagrid aka data tables with sortable columns and filters".freeze - s.email = "agresso@gmail.com".freeze + s.summary = "Ruby gem to create datagrids" + s.description = "This allows you to easily build datagrid aka data tables with sortable columns and filters" + s.email = "agresso@gmail.com" s.extra_rdoc_files = [ "LICENSE.txt", "Readme.markdown" ] s.files = [ - ".document", - ".rspec", - ".travis.yml", - "Gemfile", "LICENSE.txt", - "Rakefile", + "CHANGELOG.md", "Readme.markdown", - "VERSION", - "app/assets/stylesheets/datagrid.sass", - "app/views/datagrid/_enum_checkboxes.html.erb", - "app/views/datagrid/_form.html.erb", - "app/views/datagrid/_head.html.erb", - "app/views/datagrid/_order_for.html.erb", - "app/views/datagrid/_range_filter.html.erb", - "app/views/datagrid/_row.html.erb", - "app/views/datagrid/_table.html.erb", "datagrid.gemspec", - "lib/datagrid.rb", - "lib/datagrid/active_model.rb", - "lib/datagrid/column_names_attribute.rb", - "lib/datagrid/columns.rb", - "lib/datagrid/columns/column.rb", - "lib/datagrid/configuration.rb", - "lib/datagrid/core.rb", - "lib/datagrid/drivers.rb", - "lib/datagrid/drivers/abstract_driver.rb", - "lib/datagrid/drivers/active_record.rb", - "lib/datagrid/drivers/array.rb", - "lib/datagrid/drivers/mongo_mapper.rb", - "lib/datagrid/drivers/mongoid.rb", - "lib/datagrid/drivers/sequel.rb", - "lib/datagrid/engine.rb", - "lib/datagrid/filters.rb", - "lib/datagrid/filters/base_filter.rb", - "lib/datagrid/filters/boolean_enum_filter.rb", - "lib/datagrid/filters/boolean_filter.rb", - "lib/datagrid/filters/composite_filters.rb", - "lib/datagrid/filters/date_filter.rb", - "lib/datagrid/filters/date_time_filter.rb", - "lib/datagrid/filters/default_filter.rb", - "lib/datagrid/filters/dynamic_filter.rb", - "lib/datagrid/filters/enum_filter.rb", - "lib/datagrid/filters/extended_boolean_filter.rb", - "lib/datagrid/filters/float_filter.rb", - "lib/datagrid/filters/integer_filter.rb", - "lib/datagrid/filters/ranged_filter.rb", - "lib/datagrid/filters/select_options.rb", - "lib/datagrid/filters/string_filter.rb", - "lib/datagrid/form_builder.rb", - "lib/datagrid/helper.rb", - "lib/datagrid/locale/en.yml", - "lib/datagrid/ordering.rb", - "lib/datagrid/renderer.rb", - "lib/datagrid/rspec.rb", - "lib/datagrid/scaffold.rb", - "lib/datagrid/utils.rb", - "lib/tasks/datagrid_tasks.rake", - "spec/datagrid/active_model_spec.rb", - "spec/datagrid/column_names_attribute_spec.rb", - "spec/datagrid/columns/column_spec.rb", - "spec/datagrid/columns_spec.rb", - "spec/datagrid/core_spec.rb", - "spec/datagrid/drivers/active_record_spec.rb", - "spec/datagrid/drivers/array_spec.rb", - "spec/datagrid/drivers/mongo_mapper_spec.rb", - "spec/datagrid/drivers/mongoid_spec.rb", - "spec/datagrid/drivers/sequel_spec.rb", - "spec/datagrid/filters/base_filter_spec.rb", - "spec/datagrid/filters/boolean_enum_filter_spec.rb", - "spec/datagrid/filters/composite_filters_spec.rb", - "spec/datagrid/filters/date_filter_spec.rb", - "spec/datagrid/filters/date_time_filter_spec.rb", - "spec/datagrid/filters/dynamic_filter_spec.rb", - "spec/datagrid/filters/enum_filter_spec.rb", - "spec/datagrid/filters/extended_boolean_filter_spec.rb", - "spec/datagrid/filters/float_filter_spec.rb", - "spec/datagrid/filters/integer_filter_spec.rb", - "spec/datagrid/filters/string_filter_spec.rb", - "spec/datagrid/filters_spec.rb", - "spec/datagrid/form_builder_spec.rb", - "spec/datagrid/helper_spec.rb", - "spec/datagrid/ordering_spec.rb", - "spec/datagrid/scaffold_spec.rb", - "spec/datagrid/stylesheet_spec.rb", - "spec/datagrid/utils_spec.rb", - "spec/datagrid_spec.rb", - "spec/spec_helper.rb", - "spec/support/active_record.rb", - "spec/support/configuration.rb", - "spec/support/i18n_helpers.rb", - "spec/support/matchers.rb", - "spec/support/mongo_mapper.rb", - "spec/support/mongoid.rb", - "spec/support/sequel.rb", - "spec/support/simple_report.rb", - "spec/support/test_partials/_actions.html.erb", - "spec/support/test_partials/client/datagrid/_form.html.erb", - "spec/support/test_partials/client/datagrid/_head.html.erb", - "spec/support/test_partials/client/datagrid/_order_for.html.erb", - "spec/support/test_partials/client/datagrid/_row.html.erb", - "spec/support/test_partials/client/datagrid/_table.html.erb", - "spec/support/test_partials/custom_checkboxes/_enum_checkboxes.html.erb", - "spec/support/test_partials/custom_form/_form.html.erb", - "spec/support/test_partials/custom_range/_range_filter.html.erb", - "templates/base.rb.erb", - "templates/controller.rb.erb", - "templates/grid.rb.erb", - "templates/index.html.erb" ] - s.homepage = "http://github.com/bogdan/datagrid".freeze - s.licenses = ["MIT".freeze] - s.required_ruby_version = Gem::Requirement.new(">= 2.0".freeze) - s.rubygems_version = "3.0.8".freeze - s.summary = "Ruby gem to create datagrids".freeze - - if s.respond_to? :specification_version then - s.specification_version = 4 + s.files += `git ls-files | grep -E '^(app|lib|templates)'`.split("\n") + s.homepage = "http://github.com/bogdan/datagrid" + s.licenses = ["MIT"] + s.required_ruby_version = Gem::Requirement.new(">= 2.0") + s.rubygems_version = "3.0.8" + url = 'https://github.com/bogdan/datagrid' + s.metadata = { + "homepage_uri" => url, + "bug_tracker_uri" => "#{url}/issues", + "documentation_uri" => "#{url}/wiki", + "changelog_uri" => "#{url}/blob/master/CHANGELOG.md", + "source_code_uri" => url, + } - if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then - s.add_runtime_dependency(%q.freeze, [">= 4.0"]) - s.add_development_dependency(%q.freeze, [">= 0"]) - s.add_development_dependency(%q.freeze, [">= 2.1.2"]) - s.add_development_dependency(%q.freeze, [">= 0"]) - s.add_development_dependency(%q.freeze, [">= 3"]) - s.add_development_dependency(%q.freeze, [">= 0"]) - s.add_development_dependency(%q.freeze, ["~> 1.4"]) - s.add_development_dependency(%q.freeze, [">= 0"]) - s.add_development_dependency(%q.freeze, [">= 0"]) - s.add_development_dependency(%q.freeze, [">= 0"]) - s.add_development_dependency(%q.freeze, [">= 0"]) - else - s.add_dependency(%q.freeze, [">= 4.0"]) - s.add_dependency(%q.freeze, [">= 0"]) - s.add_dependency(%q.freeze, [">= 2.1.2"]) - s.add_dependency(%q.freeze, [">= 0"]) - s.add_dependency(%q.freeze, [">= 3"]) - s.add_dependency(%q.freeze, [">= 0"]) - s.add_dependency(%q.freeze, ["~> 1.4"]) - s.add_dependency(%q.freeze, [">= 0"]) - s.add_dependency(%q.freeze, [">= 0"]) - s.add_dependency(%q.freeze, [">= 0"]) - s.add_dependency(%q.freeze, [">= 0"]) - end - else - s.add_dependency(%q.freeze, [">= 4.0"]) - s.add_dependency(%q.freeze, [">= 0"]) - s.add_dependency(%q.freeze, [">= 2.1.2"]) - s.add_dependency(%q.freeze, [">= 0"]) - s.add_dependency(%q.freeze, [">= 3"]) - s.add_dependency(%q.freeze, [">= 0"]) - s.add_dependency(%q.freeze, ["~> 1.4"]) - s.add_dependency(%q.freeze, [">= 0"]) - s.add_dependency(%q.freeze, [">= 0"]) - s.add_dependency(%q.freeze, [">= 0"]) - s.add_dependency(%q.freeze, [">= 0"]) - end + s.add_dependency(%q, [">= 4.0"]) end diff --git a/lib/datagrid/version.rb b/lib/datagrid/version.rb new file mode 100644 index 0000000..082aca5 --- /dev/null +++ b/lib/datagrid/version.rb @@ -0,0 +1,3 @@ +module Datagrid + VERSION = "1.6.2" +end