hound-cli 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b89a4735478ae361c8ceb6b011cccfa6ac3998e2
4
- data.tar.gz: 37153e19c497dc5ed3ae55dd334bd148ad0bd0b9
3
+ metadata.gz: 52b4b8c36d2cb010ab4f2f8de819bfe5f53da7e9
4
+ data.tar.gz: 882d323cdc4c303662ea9e879904f1e4b3647277
5
5
  SHA512:
6
- metadata.gz: 6f155614d92206828989769f61ab2d64f2c1b520cecdc3e63135fd9b9f01752dee64bd0702c72f751efee643e340e39f248345f7b4322bcc028bf116de6adf42
7
- data.tar.gz: 80ca915125a56bf107e58a5e5f41ff37fbe8ea786608c00ab73052fbdb5d203f35a51382cafca06320d449d61aadfe80cb3b8ce80027d02afaaa940941529054
6
+ metadata.gz: c8e0da9b2e3f4ca3ca1a52987264b9e1434b6088b8d37c543590207cfd491a0a7ff900ce84eb0a81877559730132bdf5a740b1ece21bd59aa1e9878162343e25
7
+ data.tar.gz: 74af28d773e13dfa09073f4757712f2fb75d5ac0d8556be363080c06af1fa44bcb8a0c1ef4bd6d3cbc688a715926b07add7461840b1d753912d8000932bb6c84
data/hound.gemspec CHANGED
@@ -18,7 +18,6 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ["lib"]
19
19
 
20
20
  spec.add_dependency "colorize", "~> 0.7", ">= 0.7.7"
21
- spec.add_dependency "activesupport", "~> 4.2", ">= 4.2.6"
22
21
  spec.add_dependency "rest-client", "~> 1.8", ">= 1.8.0"
23
22
  spec.add_dependency "commander", "~> 4.4", ">= 4.4.0"
24
23
 
@@ -18,7 +18,7 @@ module Hound
18
18
  private
19
19
 
20
20
  def name_from_class
21
- self.class.name.demodulize.underscore
21
+ self.class.name.split("::").pop.underscore
22
22
  end
23
23
  end
24
24
  end
@@ -6,7 +6,7 @@ module Hound
6
6
  linter_names = LINTER_NAMES if linter_names.empty?
7
7
  linter_names.map do |linter|
8
8
  ensure_valid_linter(linter)
9
- "Hound::Config::#{linter.classify}".constantize.new
9
+ Module.const_get("Hound::Config::#{linter.capitalize}").new
10
10
  end
11
11
  end
12
12
 
@@ -7,7 +7,7 @@ class HoundConfig
7
7
 
8
8
  def self.enabled_for?(linter_name)
9
9
  # disabled if linter_name key does not exist in hound.yml
10
- return false unless content.has_key?(linter_name)
10
+ return false unless content.key?(linter_name)
11
11
  options = options_for(linter_name)
12
12
  # enabled if linter_name key exists and enabled key is not defined.
13
13
  return true unless options.keys.select { |k| k.downcase === "enabled" }.any?
@@ -16,7 +16,7 @@ class HoundConfig
16
16
  end
17
17
 
18
18
  def self.options_for(linter_name)
19
- return content[linter_name] if content.try(:has_key?, linter_name)
19
+ return content[linter_name] if content.respond_to?(:key?) && content.key?(linter_name)
20
20
  Hash.new
21
21
  end
22
22
 
@@ -0,0 +1,8 @@
1
+ class String
2
+ def underscore
3
+ gsub(/::/, '/')
4
+ .gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
5
+ .gsub(/([a-z\d])([A-Z])/, '\1_\2')
6
+ .tr("-", "_").downcase
7
+ end
8
+ end
data/lib/hound/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Hound
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/hound.rb CHANGED
@@ -1,9 +1,9 @@
1
1
  require "colorize"
2
2
  require "rest-client"
3
- require "active_support/all"
4
3
  require "yaml"
5
4
 
6
5
  require "hound/version"
6
+ require "hound/string_ext"
7
7
  require "hound/errors"
8
8
  require "hound/parser"
9
9
  require "hound/hound_config"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hound-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Platanus
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-12 00:00:00.000000000 Z
11
+ date: 2016-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -30,26 +30,6 @@ dependencies:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: 0.7.7
33
- - !ruby/object:Gem::Dependency
34
- name: activesupport
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '4.2'
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- version: 4.2.6
43
- type: :runtime
44
- prerelease: false
45
- version_requirements: !ruby/object:Gem::Requirement
46
- requirements:
47
- - - "~>"
48
- - !ruby/object:Gem::Version
49
- version: '4.2'
50
- - - ">="
51
- - !ruby/object:Gem::Version
52
- version: 4.2.6
53
33
  - !ruby/object:Gem::Dependency
54
34
  name: rest-client
55
35
  requirement: !ruby/object:Gem::Requirement
@@ -178,6 +158,7 @@ files:
178
158
  - lib/hound/hound_config.rb
179
159
  - lib/hound/parser.rb
180
160
  - lib/hound/rules_updater.rb
161
+ - lib/hound/string_ext.rb
181
162
  - lib/hound/version.rb
182
163
  homepage:
183
164
  licenses: []