simple_form_materialize 1.1.1 → 1.2.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.
data/CHANGELOG.md CHANGED
@@ -1,6 +1,17 @@
1
1
  # Change Log
2
2
 
3
- ## v1.1.1
3
+ ## [1.2.0](https://github.com/chiefpansancolt/simple_form_materialize/releases/tag/1.2.0)
4
+
5
+ #### Features
6
+ - Upgrade circleci to support 2.6 ruby testing
7
+ - Drop 2.2 support for ruby
8
+ - Overall Repo updates
9
+ - Update Ralities support to be upto version 7
10
+
11
+ #### Bugs
12
+ - N/A
13
+
14
+ ## [1.1.1](https://github.com/chiefpansancolt/simple_form_materialize/releases/tag/v1.1.1)
4
15
 
5
16
  #### Features
6
17
  - Upgrade circleci to support 2.5, 2.4, 2.3, and 2.2 ruby testing
@@ -8,7 +19,7 @@
8
19
  #### Bugs
9
20
  - N/A
10
21
 
11
- ## v1.1.0
22
+ ## [1.1.0](https://github.com/chiefpansancolt/simple_form_materialize/releases/tag/v1.1.0)
12
23
 
13
24
  #### Features
14
25
  - Various Enhancements to the repo (#4)
@@ -17,10 +28,10 @@
17
28
  - Fix Input upload (#3)
18
29
  - Resolve dependency Issues (#1)
19
30
 
20
- ## v1.0.1
31
+ ## [1.0.1](https://github.com/chiefpansancolt/simple_form_materialize/releases/tag/v1.0.1)
21
32
  - Fix ReadMe typos
22
33
 
23
- ## v1.0.0
34
+ ## [1.0.0](https://github.com/chiefpansancolt/simple_form_materialize/releases/tag/v1.0.0)
24
35
 
25
36
  #### Features
26
37
  - Generate Materialize Configuration for Simple Form
data/Gemfile CHANGED
@@ -2,14 +2,14 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
6
+
5
7
  gemspec
6
8
 
9
+ gem "minitest-ci"
7
10
  gem "rails"
8
11
  gem "rubocop"
12
+ gem "rubocop-performance"
9
13
  gem "simplecov"
14
+ gem "simplecov-material"
10
15
  gem "yard"
11
-
12
- group :test do
13
- gem "codeclimate-test-reporter", require: false
14
- gem "minitest-ci"
15
- end
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Simple Form Materialize
2
2
 
3
- [![CircleCI](https://circleci.com/gh/techgurupezza/simple_form_materialize.svg?style=svg)](https://circleci.com/gh/techgurupezza/simple_form_materialize)
4
- [![Maintainability](https://api.codeclimate.com/v1/badges/aa4da7ff94af7db3bc66/maintainability)](https://codeclimate.com/github/techgurupezza/simple_form_materialize/maintainability)
5
- [![Test Coverage](https://api.codeclimate.com/v1/badges/aa4da7ff94af7db3bc66/test_coverage)](https://codeclimate.com/github/techgurupezza/simple_form_materialize/test_coverage)
3
+ [![CircleCI](https://circleci.com/gh/chiefpansancolt/simple_form_materialize.svg?style=svg)](https://circleci.com/gh/chiefpansancolt/simple_form_materialize)
4
+ [![Maintainability](https://api.codeclimate.com/v1/badges/2cc5ded694e91439568a/maintainability)](https://codeclimate.com/github/chiefpansancolt/simple_form_materialize/maintainability)
5
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/2cc5ded694e91439568a/test_coverage)](https://codeclimate.com/github/chiefpansancolt/simple_form_materialize/test_coverage)
6
6
  [![Gem](https://img.shields.io/gem/dt/simple_form_materialize.svg?style=flat-square)](https://rubygems.org/gems/simple_form_materialize)
7
7
  [![Gem](https://img.shields.io/gem/v/simple_form_materialize.svg?style=flat-square)](https://rubygems.org/gems/simple_form_materialize)
8
8
 
data/bin/publish ADDED
@@ -0,0 +1,68 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "pathname"
5
+ require "fileutils"
6
+ require_relative "../lib/simple_form_materialize/version"
7
+
8
+ # path to your application root.
9
+ APP_ROOT = Pathname.new File.expand_path("..", __dir__)
10
+ MASTER_CHECK = <<~MASTER_CHECK
11
+ if [ $(git symbolic-ref --short -q HEAD) != 'master' ];
12
+ then exit 1;
13
+ fi
14
+ MASTER_CHECK
15
+ VERSION_TYPES = %w(major minor patch).freeze
16
+
17
+ def system!(*args)
18
+ system(*args) || abort("\n== Command #{args} failed ==")
19
+ end
20
+
21
+ abort("\n== Version Type incorrect ==") unless VERSION_TYPES.include?(ARGV[0])
22
+
23
+ abort("\n== Not on master") unless system(MASTER_CHECK)
24
+
25
+ current_version = SimpleFormMaterialize::VERSION.split(".").map(&:to_i)
26
+
27
+ case ARGV[0]
28
+ when "major"
29
+ current_version[0] += 1
30
+ current_version[1] = 0
31
+ current_version[2] = 0
32
+ when "minor"
33
+ current_version[1] += 1
34
+ current_version[2] = 0
35
+ when "patch"
36
+ current_version[2] += 1
37
+ end
38
+
39
+ joined_version = current_version.join(".")
40
+
41
+ FileUtils.chdir APP_ROOT do
42
+ contents = <<~FILE
43
+ # frozen_string_literal: true
44
+
45
+ module SimpleFormMaterialize
46
+ VERSION = "#{joined_version}"
47
+ end
48
+ FILE
49
+
50
+ puts "== Updating version in Version file to #{joined_version} =="
51
+ File.write("lib/simple_form_materialize/version.rb", contents)
52
+
53
+ system! "git add lib/simple_form_materialize/version.rb"
54
+
55
+ puts "== Committing updated files =="
56
+ system! "git commit -m 'Version bump to #{joined_version}'"
57
+ system! "git push"
58
+
59
+ puts "== Building gem =="
60
+ system! "bundle exec rake build"
61
+
62
+ puts "== Publishing gem =="
63
+ built_gem_path = "pkg/simple_form_materialize-#{joined_version}.gem"
64
+ github_host = "https://rubygems.pkg.github.com/chiefpansancolt"
65
+
66
+ system! "gem push --key github --host #{github_host} #{built_gem_path}"
67
+ system! "gem push #{built_gem_path}"
68
+ end
@@ -4,7 +4,7 @@ require "rails/generators"
4
4
 
5
5
  module SimpleFormMaterialize
6
6
  class InstallGenerator < Rails::Generators::Base
7
- source_root File.expand_path("../../templates", __FILE__)
7
+ source_root File.expand_path("../templates", __dir__)
8
8
 
9
9
  desc "Creates a Simple Form Materialize config file"
10
10
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleFormMaterialize
4
- VERSION = "1.1.1".freeze
4
+ VERSION = "1.2.0"
5
5
  end
@@ -1,8 +1,8 @@
1
- # coding: utf-8
2
1
  # frozen_string_literal: true
3
- lib = File.expand_path('../lib', __FILE__)
2
+
3
+ lib = File.expand_path("lib", __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require 'simple_form_materialize/version'
5
+ require "simple_form_materialize/version"
6
6
 
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = "simple_form_materialize"
@@ -14,15 +14,15 @@ Gem::Specification.new do |spec|
14
14
  spec.summary = "Generator for Simple form config Materialized"
15
15
  spec.description = "This Gem provides a generator for a Materialized " \
16
16
  "simple_form config file"
17
- spec.homepage = "https://techgurupezza.github.io/simple_form_materialize/"
17
+ spec.homepage = "https://chiefpansancolt.github.io/simple_form_materialize/"
18
18
  spec.license = "MIT"
19
19
 
20
20
  spec.files = `git ls-files`.split("\n")
21
21
  spec.test_files = `git ls-files -- test/*`.split("\n")
22
22
  spec.require_paths = ["lib"]
23
23
 
24
- spec.required_ruby_version = ">= 2.2"
24
+ spec.required_ruby_version = ">= 2.3"
25
25
  spec.required_rubygems_version = "> 1.3.1"
26
26
 
27
- spec.add_dependency "railties", ">= 4.1.0", "< 5.2"
27
+ spec.add_dependency "railties", ">= 4.1.0", "< 7"
28
28
  end
@@ -4,7 +4,7 @@ require "test_helper"
4
4
 
5
5
  class InstallGeneratorTest < Rails::Generators::TestCase
6
6
  tests SimpleFormMaterialize::InstallGenerator
7
- destination File.expand_path("../../tmp", __FILE__)
7
+ destination File.expand_path("../tmp", __dir__)
8
8
  setup :prepare_destination
9
9
 
10
10
  test "assert files created" do
@@ -3,4 +3,9 @@
3
3
  require "test_helper"
4
4
 
5
5
  class SimpleFormMaterializeTest < Minitest::Test
6
+ def test_version
7
+ version = SimpleFormMaterialize::VERSION
8
+
9
+ assert(!version.nil?)
10
+ end
6
11
  end
data/test/test_helper.rb CHANGED
@@ -1,8 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "simplecov"
4
+ require "simplecov-material"
4
5
 
5
- SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
6
+ SimpleCov.formatter = SimpleCov::Formatter::MaterialFormatter
6
7
 
7
8
  SimpleCov.start do
8
9
  add_filter "/test/"
@@ -13,7 +14,7 @@ SimpleCov.minimum_coverage_by_file 90
13
14
  SimpleCov.minimum_coverage 90
14
15
 
15
16
  ENV["RAILS_ENV"] = "test"
16
- $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
17
+ $LOAD_PATH.unshift File.expand_path("../lib", __dir__)
17
18
 
18
19
  require "simple_form_materialize"
19
20
  require "rails_app/config/environment"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_form_materialize
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Pezza
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-12 00:00:00.000000000 Z
11
+ date: 2019-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 4.1.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '5.2'
22
+ version: '7'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: 4.1.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '5.2'
32
+ version: '7'
33
33
  description: This Gem provides a generator for a Materialized simple_form config file
34
34
  email:
35
35
  - pezza.chris@gmail.com
@@ -38,7 +38,7 @@ extensions: []
38
38
  extra_rdoc_files: []
39
39
  files:
40
40
  - ".circleci/config.yml"
41
- - ".codeclimate.yml"
41
+ - ".codeclimate.json"
42
42
  - ".github/CONTRIBUTING.md"
43
43
  - ".github/ISSUE_TEMPLATE.md"
44
44
  - ".github/PULL_REQUEST_TEMPLATE.md"
@@ -53,6 +53,7 @@ files:
53
53
  - Rakefile
54
54
  - _config.yml
55
55
  - bin/console
56
+ - bin/publish
56
57
  - bin/setup
57
58
  - lib/generators/simple_form_materialize/install_generator.rb
58
59
  - lib/generators/templates/assets/javascripts/init_form_materialize.coffee
@@ -90,7 +91,7 @@ files:
90
91
  - test/rails_app/public/favicon.ico
91
92
  - test/simple_form_materialize_test.rb
92
93
  - test/test_helper.rb
93
- homepage: https://techgurupezza.github.io/simple_form_materialize/
94
+ homepage: https://chiefpansancolt.github.io/simple_form_materialize/
94
95
  licenses:
95
96
  - MIT
96
97
  metadata: {}
@@ -102,15 +103,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
103
  requirements:
103
104
  - - ">="
104
105
  - !ruby/object:Gem::Version
105
- version: '2.2'
106
+ version: '2.3'
106
107
  required_rubygems_version: !ruby/object:Gem::Requirement
107
108
  requirements:
108
109
  - - ">"
109
110
  - !ruby/object:Gem::Version
110
111
  version: 1.3.1
111
112
  requirements: []
112
- rubyforge_project:
113
- rubygems_version: 2.6.12
113
+ rubygems_version: 3.0.3
114
114
  signing_key:
115
115
  specification_version: 4
116
116
  summary: Generator for Simple form config Materialized
data/.codeclimate.yml DELETED
@@ -1,45 +0,0 @@
1
- version: "2"
2
-
3
- checks:
4
- argument-count:
5
- enabled: true
6
- config:
7
- threshold: 4
8
- complex-logic:
9
- enabled: true
10
- config:
11
- threshold: 4
12
- file-lines:
13
- enabled: true
14
- config:
15
- threshold: 250
16
- method-complexity:
17
- enabled: true
18
- config:
19
- threshold: 5
20
- method-count:
21
- enabled: true
22
- config:
23
- threshold: 20
24
- method-lines:
25
- enabled: true
26
- config:
27
- threshold: 25
28
- nested-control-flow:
29
- enabled: true
30
- config:
31
- threshold: 4
32
- return-statements:
33
- enabled: true
34
- config:
35
- threshold: 4
36
- similar-code:
37
- enabled: true
38
- identical-code:
39
- enabled: true
40
- plugins:
41
- rubocop:
42
- enabled: true
43
- exclude_patterns:
44
- - test/rails_app
45
- - lib/generators/templates