codeclimate-yaml 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 09ba5979113592bfe69c17ea1ea515883bf8b236
4
- data.tar.gz: b8d0034a571105f3e3f29807fc9edce39e459c8e
3
+ metadata.gz: ae155d660630ed6c713004789de2769e17b3b945
4
+ data.tar.gz: 608a2c96b26ba25431cdd1af2494e456a0e05511
5
5
  SHA512:
6
- metadata.gz: b1aad8e2a33fa800765cd2f1997524dbb4604911b454695410ae0b02e3fad04a3f24046301fc568bcb982e029b231cb074d6d7f2ad28092c22286ebc889e7cdd
7
- data.tar.gz: ebb9b13db51c9ed988e66c009dd31ee4d08cff6d18c56bb7b4936e66ab5bba2d2305e97479cdbcecab53b257ccaebb6f798eca7bc8b8520a6cfccd527adf633c
6
+ metadata.gz: 1b8867df04a24d83ca590a9cce5ab200d3eae130a56f29e5629e102bfa133e94135d37be004eb86416f940e2d54285100bf0259ad293a1273f13be11c1d234d8
7
+ data.tar.gz: ff48f6a029744d085a9caaffc29847facef02316327cd66d81da69faf1595919f387cf84a4080a4121208253ee5bfcdf9a6448889fa33712d076032efae9795f
@@ -1,8 +1,12 @@
1
1
  module CC
2
2
  module Yaml
3
3
  module Nodes
4
- class LanguageList < Sequence
5
- type Language
4
+ class LanguageList < Mapping
5
+ LANGUAGES = %w[Ruby JavaScript Python PHP].freeze
6
+
7
+ LANGUAGES.each do |language|
8
+ map :"#{language}", to: Scalar[:bool], required: false
9
+ end
6
10
  end
7
11
  end
8
12
  end
data/lib/cc/yaml/nodes.rb CHANGED
@@ -5,7 +5,6 @@ module CC
5
5
  autoload :EngineList, "cc/yaml/nodes/engine_list"
6
6
  autoload :Glob, "cc/yaml/nodes/glob"
7
7
  autoload :GlobList, "cc/yaml/nodes/glob_list"
8
- autoload :Language, "cc/yaml/nodes/language"
9
8
  autoload :LanguageList, "cc/yaml/nodes/language_list"
10
9
  autoload :Mapping, "cc/yaml/nodes/mapping"
11
10
  autoload :Node, "cc/yaml/nodes/node"
@@ -1,5 +1,5 @@
1
1
  module CC
2
2
  module Yaml
3
- VERSION = "0.0.6".freeze
3
+ VERSION = "0.0.7".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codeclimate-yaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code Climate
@@ -50,7 +50,6 @@ files:
50
50
  - lib/cc/yaml/nodes/engine_list.rb
51
51
  - lib/cc/yaml/nodes/glob.rb
52
52
  - lib/cc/yaml/nodes/glob_list.rb
53
- - lib/cc/yaml/nodes/language.rb
54
53
  - lib/cc/yaml/nodes/language_list.rb
55
54
  - lib/cc/yaml/nodes/mapping.rb
56
55
  - lib/cc/yaml/nodes/node.rb
@@ -1,32 +0,0 @@
1
- module CC
2
- module Yaml
3
- module Nodes
4
- class Language < Scalar
5
- LANGUAGES = %w[Ruby JavaScript Python PHP].freeze
6
-
7
- def valid?
8
- LANGUAGES.include?(name)
9
- end
10
-
11
- def name
12
- to_s
13
- end
14
-
15
- def appears_to_be_mispelled_version_of?
16
- if !valid? && downcased_language_map.has_key?(name.downcase)
17
- downcased_language_map[self]
18
- else
19
- false
20
- end
21
- end
22
-
23
- def downcased_language_map
24
- @downcased_language_map ||=
25
- LANGUAGES.each_with_object({}) do |language, obj|
26
- obj[language.downcase] = language
27
- end
28
- end
29
- end
30
- end
31
- end
32
- end