template_params 0.1.1 → 0.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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +30 -50
- data/CHANGELOG.md +14 -0
- data/Gemfile +1 -0
- data/Rakefile +2 -1
- data/lib/template_params.rb +1 -0
- data/lib/template_params/assertion.rb +1 -0
- data/lib/template_params/version.rb +2 -1
- data/template_params.gemspec +7 -6
- metadata +21 -19
- data/bin/console +0 -15
- data/bin/rake +0 -17
- data/bin/rubocop +0 -17
- data/bin/setup +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9b7dd2146c332f228b1f6773e5617b8b78ba2d8
|
4
|
+
data.tar.gz: 6d8aba9787cb5dedc864eae7f54b22c8e832c732
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7883a7013a4360d2a6318062e8ea55673d19d1be32d0e53e35cdaf8d904234083a6cf925ff3ae369b18468dceb1b9cc5a346172f5f107bbfbfb24b5128aa7812
|
7
|
+
data.tar.gz: a1ddd3987abc8adaf292c82d9f0cf161190349e4041f4332192d7021577804616159f410610e1acc3217450926f056db2e5a0c8e7657c83e4d9a792abb7873b1
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,14 +1,38 @@
|
|
1
1
|
AllCops:
|
2
|
-
TargetRubyVersion: 2.
|
2
|
+
TargetRubyVersion: 2.2
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
Layout/AlignParameters:
|
5
|
+
EnforcedStyle: with_fixed_indentation
|
6
|
+
|
7
|
+
# Used consistently, both leading and trailing styles are valid, but
|
8
|
+
# Singlebrook happens to use the trailing style.
|
9
|
+
Layout/DotPosition:
|
10
|
+
EnforcedStyle: trailing
|
11
|
+
|
12
|
+
Layout/MultilineMethodCallBraceLayout:
|
13
|
+
Enabled: false
|
14
|
+
|
15
|
+
Layout/MultilineMethodCallIndentation:
|
16
|
+
EnforcedStyle: indented
|
17
|
+
|
18
|
+
Layout/MultilineOperationIndentation:
|
19
|
+
EnforcedStyle: indented
|
20
|
+
|
21
|
+
# Not a useful metric compared to, e.g. `AbcSize`.
|
22
|
+
Metrics/BlockLength:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
# Not a useful metric compared to, e.g. `AbcSize`.
|
26
|
+
Metrics/ClassLength:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
# Not a useful metric compared to, e.g. `AbcSize`.
|
7
30
|
Metrics/MethodLength:
|
8
31
|
Enabled: false
|
9
32
|
|
10
|
-
|
11
|
-
|
33
|
+
# Use numbers wherever you like in your variables. Who cares.
|
34
|
+
Naming/VariableNumber:
|
35
|
+
Enabled: false
|
12
36
|
|
13
37
|
# Use the semantic style. If a block has side effects use `do`, and if it is
|
14
38
|
# pure use `{}`. This style is too nuanced for a linter, so the cop is
|
@@ -19,11 +43,6 @@ Style/BlockDelimiters:
|
|
19
43
|
Style/BracesAroundHashParameters:
|
20
44
|
EnforcedStyle: context_dependent
|
21
45
|
|
22
|
-
# Used consistently, both leading and trailing styles are valid, but
|
23
|
-
# Singlebrook happens to use the trailing style.
|
24
|
-
Style/DotPosition:
|
25
|
-
EnforcedStyle: trailing
|
26
|
-
|
27
46
|
# Use double negation wherever it would otherwise be impractical to convert
|
28
47
|
# a value to an actual boolean.
|
29
48
|
Style/DoubleNegation:
|
@@ -41,41 +60,6 @@ Style/IfUnlessModifier:
|
|
41
60
|
Style/GuardClause:
|
42
61
|
Enabled: false
|
43
62
|
|
44
|
-
# In a multiline method call, put the closing parenthesis on its own line.
|
45
|
-
# The first argument may either be on the first line, or the second. Both of the
|
46
|
-
# following are correct:
|
47
|
-
#
|
48
|
-
# ```
|
49
|
-
# # A. correct
|
50
|
-
# create(:user,
|
51
|
-
# client: foo,
|
52
|
-
# long_line: blah
|
53
|
-
# )
|
54
|
-
#
|
55
|
-
# # B. also correct
|
56
|
-
# create(
|
57
|
-
# :user,
|
58
|
-
# client: foo,
|
59
|
-
# long_line: blah
|
60
|
-
# )
|
61
|
-
#
|
62
|
-
# # C. not preferred
|
63
|
-
# user = create :user,
|
64
|
-
# client: foo,
|
65
|
-
# long_line: blah
|
66
|
-
# ```
|
67
|
-
#
|
68
|
-
# Rubocop supports B, but not A. This project allows both, so this cop is
|
69
|
-
# disabled.
|
70
|
-
Style/MultilineMethodCallBraceLayout:
|
71
|
-
Enabled: false
|
72
|
-
|
73
|
-
Style/MultilineMethodCallIndentation:
|
74
|
-
EnforcedStyle: indented
|
75
|
-
|
76
|
-
Style/MultilineOperationIndentation:
|
77
|
-
EnforcedStyle: indented
|
78
|
-
|
79
63
|
# This is a new cop in rubocop 0.41, and I'm not sure if I want to adopt it yet.
|
80
64
|
Style/NumericLiteralPrefix:
|
81
65
|
Enabled: false
|
@@ -101,7 +85,3 @@ Style/StringLiterals:
|
|
101
85
|
# acceptable. See https://github.com/bbatsov/rubocop/issues/2736 for discussion.
|
102
86
|
Style/TrivialAccessors:
|
103
87
|
AllowPredicates: true
|
104
|
-
|
105
|
-
# Use numbers wherever you like in your variables. Who cares.
|
106
|
-
Style/VariableNumber:
|
107
|
-
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# template_params Changelog
|
2
2
|
|
3
|
+
## 0.2.0 (2017-09-27)
|
4
|
+
|
5
|
+
Breaking changes
|
6
|
+
|
7
|
+
- Drop support for EoL rubies (< 2.2)
|
8
|
+
|
9
|
+
New features
|
10
|
+
|
11
|
+
- Allow method_source 0.9
|
12
|
+
|
13
|
+
Fixed
|
14
|
+
|
15
|
+
- None
|
16
|
+
|
3
17
|
## 0.1.1 (2016-10-10)
|
4
18
|
|
5
19
|
Just updating a few development tools and writing a little documentation.
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require "bundler/gem_tasks"
|
3
4
|
|
4
5
|
require "rubocop/rake_task"
|
@@ -12,4 +13,4 @@ end
|
|
12
13
|
# Default task: lint then test
|
13
14
|
task default: [] # in case it hasn't been set
|
14
15
|
Rake::Task[:default].clear
|
15
|
-
task default: [
|
16
|
+
task default: %i[rubocop spec]
|
data/lib/template_params.rb
CHANGED
data/template_params.gemspec
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
# coding: utf-8
|
2
1
|
# frozen_string_literal: true
|
2
|
+
|
3
3
|
lib = File.expand_path("../lib", __FILE__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
5
|
require "template_params/version"
|
@@ -9,18 +9,19 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.version = TemplateParams::VERSION
|
10
10
|
spec.authors = ["Jared Beck"]
|
11
11
|
spec.email = ["jared@jaredbeck.com"]
|
12
|
-
spec.summary = "Parameter assertions for
|
12
|
+
spec.summary = "Parameter assertions for view templates"
|
13
13
|
spec.homepage = "https://github.com/jaredbeck/template_params"
|
14
14
|
spec.license = "MIT"
|
15
15
|
spec.files = `git ls-files -z`.
|
16
16
|
split("\x0").
|
17
|
-
reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
reject { |f| f.match(%r{^(bin|test|spec|features)/}) }
|
18
18
|
spec.bindir = "exe"
|
19
19
|
spec.executables = []
|
20
20
|
spec.require_paths = ["lib"]
|
21
|
-
spec.
|
21
|
+
spec.required_ruby_version = ">= 2.2"
|
22
|
+
spec.add_runtime_dependency "method_source", [">= 0.8.2", "< 0.10"]
|
22
23
|
spec.add_development_dependency "bundler", "~> 1.10"
|
23
24
|
spec.add_development_dependency "rake", "~> 10.0"
|
24
|
-
spec.add_development_dependency "rspec"
|
25
|
-
spec.add_development_dependency "rubocop"
|
25
|
+
spec.add_development_dependency "rspec", "~> 3.4"
|
26
|
+
spec.add_development_dependency "rubocop", "~> 0.50.0"
|
26
27
|
end
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: template_params
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jared Beck
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: method_source
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.8.2
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0.10'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 0.8.2
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0.10'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: bundler
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,30 +62,30 @@ dependencies:
|
|
56
62
|
name: rspec
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
|
-
- - "
|
65
|
+
- - "~>"
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
67
|
+
version: '3.4'
|
62
68
|
type: :development
|
63
69
|
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
|
-
- - "
|
72
|
+
- - "~>"
|
67
73
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
74
|
+
version: '3.4'
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: rubocop
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
72
78
|
requirements:
|
73
|
-
- - "
|
79
|
+
- - "~>"
|
74
80
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
81
|
+
version: 0.50.0
|
76
82
|
type: :development
|
77
83
|
prerelease: false
|
78
84
|
version_requirements: !ruby/object:Gem::Requirement
|
79
85
|
requirements:
|
80
|
-
- - "
|
86
|
+
- - "~>"
|
81
87
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
88
|
+
version: 0.50.0
|
83
89
|
description:
|
84
90
|
email:
|
85
91
|
- jared@jaredbeck.com
|
@@ -97,10 +103,6 @@ files:
|
|
97
103
|
- LICENSE.txt
|
98
104
|
- README.md
|
99
105
|
- Rakefile
|
100
|
-
- bin/console
|
101
|
-
- bin/rake
|
102
|
-
- bin/rubocop
|
103
|
-
- bin/setup
|
104
106
|
- lib/template_params.rb
|
105
107
|
- lib/template_params/assertion.rb
|
106
108
|
- lib/template_params/version.rb
|
@@ -117,7 +119,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
117
119
|
requirements:
|
118
120
|
- - ">="
|
119
121
|
- !ruby/object:Gem::Version
|
120
|
-
version: '
|
122
|
+
version: '2.2'
|
121
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
124
|
requirements:
|
123
125
|
- - ">="
|
@@ -125,8 +127,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
127
|
version: '0'
|
126
128
|
requirements: []
|
127
129
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.5.
|
130
|
+
rubygems_version: 2.4.5.3
|
129
131
|
signing_key:
|
130
132
|
specification_version: 4
|
131
|
-
summary: Parameter assertions for
|
133
|
+
summary: Parameter assertions for view templates
|
132
134
|
test_files: []
|
data/bin/console
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require "bundler/setup"
|
5
|
-
require "template_params"
|
6
|
-
|
7
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
-
# with your gem easier. You can also use a different console, if you like.
|
9
|
-
|
10
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
-
# require "pry"
|
12
|
-
# Pry.start
|
13
|
-
|
14
|
-
require "irb"
|
15
|
-
IRB.start
|
data/bin/rake
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
#
|
4
|
-
# This file was generated by Bundler.
|
5
|
-
#
|
6
|
-
# The application 'rake' is installed as part of a gem, and
|
7
|
-
# this file is here to facilitate running it.
|
8
|
-
#
|
9
|
-
|
10
|
-
require "pathname"
|
11
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
12
|
-
Pathname.new(__FILE__).realpath)
|
13
|
-
|
14
|
-
require "rubygems"
|
15
|
-
require "bundler/setup"
|
16
|
-
|
17
|
-
load Gem.bin_path("rake", "rake")
|
data/bin/rubocop
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
#
|
4
|
-
# This file was generated by Bundler.
|
5
|
-
#
|
6
|
-
# The application 'rubocop' is installed as part of a gem, and
|
7
|
-
# this file is here to facilitate running it.
|
8
|
-
#
|
9
|
-
|
10
|
-
require "pathname"
|
11
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
12
|
-
Pathname.new(__FILE__).realpath)
|
13
|
-
|
14
|
-
require "rubygems"
|
15
|
-
require "bundler/setup"
|
16
|
-
|
17
|
-
load Gem.bin_path("rubocop", "rubocop")
|