syntax_tree-disable_ternary 1.0.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: 1b0d642d68e52b7c88ba93c33629a19fd2a795e960dfd56f0828828e4ee2e75d
4
+ data.tar.gz: a1da0b12263459746174bec6a6ddfd5fa26f9caba9c9c25036b1010bce738d7a
5
+ SHA512:
6
+ metadata.gz: 43d323be4cf0406ff29237141e1ad8c5617e57f4f82704319cf3b967e7daf338fb8a15e693a21c8f898464b47538ad6f406959ea891d739576280cdd3f2e0730
7
+ data.tar.gz: 4314e26841c799fb477a92646ccc2b47f8b93cb22b4c5d20d39e7df1b40011f5ccbeb847284a7ce162b3b46e0469b053f69607ff81d3c45aa60109a20ecf697e
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in syntax_tree-disable_ternary.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
data/Gemfile.lock ADDED
@@ -0,0 +1,19 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ syntax_tree-disable_ternary (1.0.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ rake (13.0.6)
10
+
11
+ PLATFORMS
12
+ arm64-darwin-21
13
+
14
+ DEPENDENCIES
15
+ rake (~> 13.0)
16
+ syntax_tree-disable_ternary!
17
+
18
+ BUNDLED WITH
19
+ 2.4.1
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 David Taylor
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,6 @@
1
+ # syntax_tree disable_ternary plugin
2
+
3
+ ## Usage
4
+
5
+ 1. Install `syntax_tree-disable_ternary` gem
6
+ 2. Run `stree` with `--plugins=disable_ternary` (or add it to `.streerc`)
data/Rakefile ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ task default: %i[]
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SyntaxTree
4
+ module DisableTernary
5
+ VERSION = "1.0.0"
6
+ end
7
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SyntaxTree
4
+ module Ternaryable
5
+ class << self
6
+ def call(q, node)
7
+ false
8
+ end
9
+ end
10
+ end
11
+ end
metadata ADDED
@@ -0,0 +1,51 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: syntax_tree-disable_ternary
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Discourse Team
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-01-06 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - Gemfile
20
+ - Gemfile.lock
21
+ - LICENSE.txt
22
+ - README.md
23
+ - Rakefile
24
+ - lib/syntax_tree/disable_ternary.rb
25
+ - lib/syntax_tree/disable_ternary/version.rb
26
+ homepage: https://github.com/discourse/syntax_tree-disable_ternary
27
+ licenses:
28
+ - MIT
29
+ metadata:
30
+ homepage_uri: https://github.com/discourse/syntax_tree-disable_ternary
31
+ source_code_uri: https://github.com/discourse/syntax_tree-disable_ternary
32
+ post_install_message:
33
+ rdoc_options: []
34
+ require_paths:
35
+ - lib
36
+ required_ruby_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 2.7.0
41
+ required_rubygems_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ requirements: []
47
+ rubygems_version: 3.3.26
48
+ signing_key:
49
+ specification_version: 4
50
+ summary: syntax_tree plugin to prevent converting `if` expressions to ternary.
51
+ test_files: []