hss 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/.rubocop.yml +2 -0
  4. data/.travis.yml +1 -1
  5. data/Rakefile +3 -3
  6. data/bin/hss +1 -1
  7. data/lib/helpers/command.rb +0 -1
  8. data/lib/helpers/default.rb +0 -1
  9. data/lib/helpers/expand.rb +0 -1
  10. data/lib/helpers/external.rb +0 -1
  11. data/lib/helpers/shortcut.rb +0 -1
  12. data/lib/hss.rb +2 -5
  13. data/lib/version.rb +1 -2
  14. data/spec/hss_spec.rb +1 -1
  15. data/spec/test/good_helpers/default.rb +0 -1
  16. data/spec/test/good_helpers/shortcut.rb +0 -1
  17. metadata +3 -31
  18. data/Gemfile.lock +0 -69
  19. data/vendor/cache/ast-1.1.0.gem +0 -0
  20. data/vendor/cache/coveralls-0.7.0.gem +0 -0
  21. data/vendor/cache/diff-lcs-1.2.5.gem +0 -0
  22. data/vendor/cache/docile-1.1.1.gem +0 -0
  23. data/vendor/cache/fuubar-1.3.2.gem +0 -0
  24. data/vendor/cache/hashr-0.0.22.gem +0 -0
  25. data/vendor/cache/mime-types-2.0.gem +0 -0
  26. data/vendor/cache/multi_json-1.8.2.gem +0 -0
  27. data/vendor/cache/parser-2.1.1.gem +0 -0
  28. data/vendor/cache/powerpack-0.0.9.gem +0 -0
  29. data/vendor/cache/rainbow-1.1.4.gem +0 -0
  30. data/vendor/cache/rake-10.1.1.gem +0 -0
  31. data/vendor/cache/rest-client-1.6.7.gem +0 -0
  32. data/vendor/cache/rspec-2.14.1.gem +0 -0
  33. data/vendor/cache/rspec-core-2.14.7.gem +0 -0
  34. data/vendor/cache/rspec-expectations-2.14.4.gem +0 -0
  35. data/vendor/cache/rspec-mocks-2.14.4.gem +0 -0
  36. data/vendor/cache/rubocop-0.16.0.gem +0 -0
  37. data/vendor/cache/ruby-progressbar-1.3.2.gem +0 -0
  38. data/vendor/cache/simplecov-0.8.2.gem +0 -0
  39. data/vendor/cache/simplecov-html-0.8.0.gem +0 -0
  40. data/vendor/cache/slop-3.4.7.gem +0 -0
  41. data/vendor/cache/term-ansicolor-1.2.2.gem +0 -0
  42. data/vendor/cache/thor-0.18.1.gem +0 -0
  43. data/vendor/cache/tins-0.13.1.gem +0 -0
  44. data/vendor/cache/travis-lint-1.7.0.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7de0f7377bbf2146c440d1887801387de8fc962b
4
- data.tar.gz: 22d69611fc2b3ef0b390870956e997c1176b9fd9
3
+ metadata.gz: a3581eeed1ac365b90cffbdbfe549635ed110864
4
+ data.tar.gz: 57f02e1a14a2bba09e5e5dbb2471173dba77136b
5
5
  SHA512:
6
- metadata.gz: 6fb132254e0eb4009d4c533f61093bef8d8d7cb068eac18ca1a4ef9df1e24c971c08fb1b299bc8f79a9d6fc582deac537df55a6ab29929c8ef36224ac27bc9bc
7
- data.tar.gz: 1c9ca1115b1f0a65324ebc710f89589c1ddd0773c65d3ffafbafd78071029e073e2e032ca357b1192e1cd103f657da6f104157c5fe2373bd361fad2865f763e4
6
+ metadata.gz: 45354b0f2d9d9cf8f52ccb8dc88499b40641f64e540d30a94a4edeb2d7e133e8c742a669a5a770593d5d06df87dd3d46d5942e15fc3286259ec1d52a7b101936
7
+ data.tar.gz: f944b7dbf95e7087d668649ff0cff6d974d67dfb808cd9c7e39c054232218c5552331c7cd115b2a7868884b38d81ae43b15477028e81c9802652d907afe01d82
data/.gitignore CHANGED
@@ -1,4 +1,6 @@
1
+ .bundle/
1
2
  pkg/*.gem
2
3
  coverage/
3
4
  .coveralls.yml
4
5
  scp_test
6
+ Gemfile.lock
data/.rubocop.yml CHANGED
@@ -3,3 +3,5 @@ AllCops:
3
3
  - spec/test/bad_helpers/module.rb
4
4
  Encoding:
5
5
  Enabled: false
6
+ HashSyntax:
7
+ Enabled: false
data/.travis.yml CHANGED
@@ -4,7 +4,7 @@ before_script:
4
4
  language: ruby
5
5
  cache: bundler
6
6
  rvm:
7
- - ruby-head
7
+ - 2.1.0
8
8
  - 2.0.0
9
9
  - 1.9.3
10
10
  notifications:
data/Rakefile CHANGED
@@ -18,8 +18,8 @@ end
18
18
 
19
19
  desc 'Run travis-lint on .travis.yml'
20
20
  task :travislint do
21
- fail 'There is an issue with your .travis.yml' unless system('travis-lint')
21
+ print 'There may be an issue with your .travis.yml' unless system('travis-lint')
22
22
  end
23
23
 
24
- task default: [:spec, :travislint, :rubocop, :build, :install]
25
- task release: [:bundle]
24
+ task :default => [:spec, :travislint, :rubocop, :build, :install]
25
+ task :release => [:bundle]
data/bin/hss CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'hss'
4
4
 
5
- My_Handler = HSS::Handler.new(config: ENV['HSS_CONFIG'])
5
+ My_Handler = HSS::Handler.new(:config => ENV['HSS_CONFIG'])
6
6
 
7
7
  if ARGV == ['version']
8
8
  puts HSS::VERSION
@@ -2,7 +2,6 @@ require 'English'
2
2
 
3
3
  ##
4
4
  # Runs a shell command and returns the output
5
-
6
5
  class HSS::Parser
7
6
  private
8
7
 
@@ -1,6 +1,5 @@
1
1
  ##
2
2
  # Provides a helper to have default values
3
-
4
3
  class HSS::Parser
5
4
  private
6
5
 
@@ -1,6 +1,5 @@
1
1
  ##
2
2
  # Expand a shortcode based the config hash
3
-
4
3
  class HSS::Parser
5
4
  private
6
5
 
@@ -2,7 +2,6 @@ require 'yaml'
2
2
 
3
3
  ##
4
4
  # Load values from an external YAML hash
5
-
6
5
  class HSS::Parser
7
6
  private
8
7
 
@@ -1,6 +1,5 @@
1
1
  ##
2
2
  # Allow shortcut expansion from the config
3
-
4
3
  class HSS::Parser
5
4
  private
6
5
 
data/lib/hss.rb CHANGED
@@ -4,7 +4,6 @@ require 'version'
4
4
 
5
5
  ##
6
6
  # HSS module provides a helper for SSH shortcuts
7
-
8
7
  module HSS
9
8
  DEFAULT_CONFIG = '~/.hss.yml'
10
9
  DEFAULT_LIBRARY = Pathname.new(__FILE__).realpath.split[0].to_s + '/helpers'
@@ -20,14 +19,13 @@ module HSS
20
19
 
21
20
  ##
22
21
  # Handlers load configurations and control their use
23
-
24
22
  class Handler
25
23
  attr_reader :patterns, :config, :helpers
26
24
 
27
25
  ## Make a new handler with a config and parser
28
26
 
29
27
  def initialize(params = {})
30
- params = { config: params } if params.is_a? String
28
+ params = { :config => params } if params.is_a? String
31
29
  load_config(params[:config])
32
30
  @helpers = []
33
31
  load_helpers(params[:helpers])
@@ -63,7 +61,7 @@ module HSS
63
61
 
64
62
  def load_helpers(helper_path = nil)
65
63
  helper_path ||= HSS::DEFAULT_LIBRARY
66
- helper_path = File.absolute_path(helper_path)
64
+ helper_path = File.expand_path(helper_path)
67
65
  Dir.glob(helper_path + '/*').each do |helper|
68
66
  begin
69
67
  require helper
@@ -77,7 +75,6 @@ module HSS
77
75
 
78
76
  ##
79
77
  # Parser objects exist as containers for helper methods
80
-
81
78
  class Parser
82
79
  ##
83
80
  # The config is scoped here so it is available to helpers
data/lib/version.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  ##
2
2
  # Define the version
3
-
4
3
  module HSS
5
- VERSION = '0.2.8'
4
+ VERSION = '0.2.9'
6
5
  end
data/spec/hss_spec.rb CHANGED
@@ -6,7 +6,7 @@ describe HSS do
6
6
 
7
7
  describe '::VERSION' do
8
8
  it 'follows the semantic version scheme' do
9
- expect(HSS::VERSION).to match /\d+\.\d+\.\d+/
9
+ expect(HSS::VERSION).to match(/\d+\.\d+\.\d+/)
10
10
  end
11
11
  end
12
12
 
@@ -1,6 +1,5 @@
1
1
  ##
2
2
  # Provides a helper to have default values
3
-
4
3
  class HSS::Parser
5
4
  def default(a, b)
6
5
  a.nil? || a.empty? ? b : a
@@ -1,6 +1,5 @@
1
1
  ##
2
2
  # Allow shortcut expansion from the config
3
-
4
3
  class HSS::Parser
5
4
  def shortcut(input)
6
5
  @config['shortcuts'][input]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-25 00:00:00.000000000 Z
11
+ date: 2014-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -120,7 +120,6 @@ files:
120
120
  - ".rubocop.yml"
121
121
  - ".travis.yml"
122
122
  - Gemfile
123
- - Gemfile.lock
124
123
  - LICENSE
125
124
  - README.md
126
125
  - Rakefile
@@ -148,32 +147,6 @@ files:
148
147
  - spec/test/good_helpers/shortcut.rb
149
148
  - spec/test/incomplete.yml
150
149
  - spec/test/invalid.yml
151
- - vendor/cache/ast-1.1.0.gem
152
- - vendor/cache/coveralls-0.7.0.gem
153
- - vendor/cache/diff-lcs-1.2.5.gem
154
- - vendor/cache/docile-1.1.1.gem
155
- - vendor/cache/fuubar-1.3.2.gem
156
- - vendor/cache/hashr-0.0.22.gem
157
- - vendor/cache/mime-types-2.0.gem
158
- - vendor/cache/multi_json-1.8.2.gem
159
- - vendor/cache/parser-2.1.1.gem
160
- - vendor/cache/powerpack-0.0.9.gem
161
- - vendor/cache/rainbow-1.1.4.gem
162
- - vendor/cache/rake-10.1.1.gem
163
- - vendor/cache/rest-client-1.6.7.gem
164
- - vendor/cache/rspec-2.14.1.gem
165
- - vendor/cache/rspec-core-2.14.7.gem
166
- - vendor/cache/rspec-expectations-2.14.4.gem
167
- - vendor/cache/rspec-mocks-2.14.4.gem
168
- - vendor/cache/rubocop-0.16.0.gem
169
- - vendor/cache/ruby-progressbar-1.3.2.gem
170
- - vendor/cache/simplecov-0.8.2.gem
171
- - vendor/cache/simplecov-html-0.8.0.gem
172
- - vendor/cache/slop-3.4.7.gem
173
- - vendor/cache/term-ansicolor-1.2.2.gem
174
- - vendor/cache/thor-0.18.1.gem
175
- - vendor/cache/tins-0.13.1.gem
176
- - vendor/cache/travis-lint-1.7.0.gem
177
150
  homepage: https://github.com/akerl/hss
178
151
  licenses:
179
152
  - MIT
@@ -194,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
167
  version: '0'
195
168
  requirements: []
196
169
  rubyforge_project:
197
- rubygems_version: 2.0.3
170
+ rubygems_version: 2.0.14
198
171
  signing_key:
199
172
  specification_version: 4
200
173
  summary: SSH helper
@@ -214,4 +187,3 @@ test_files:
214
187
  - spec/test/good_helpers/shortcut.rb
215
188
  - spec/test/incomplete.yml
216
189
  - spec/test/invalid.yml
217
- has_rdoc:
data/Gemfile.lock DELETED
@@ -1,69 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- hss (0.2.8)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- ast (1.1.0)
10
- coveralls (0.7.0)
11
- multi_json (~> 1.3)
12
- rest-client
13
- simplecov (>= 0.7)
14
- term-ansicolor
15
- thor
16
- diff-lcs (1.2.5)
17
- docile (1.1.1)
18
- fuubar (1.3.2)
19
- rspec (>= 2.14.0, < 3.1.0)
20
- ruby-progressbar (~> 1.3)
21
- hashr (0.0.22)
22
- mime-types (2.0)
23
- multi_json (1.8.2)
24
- parser (2.1.1)
25
- ast (~> 1.1)
26
- slop (~> 3.4, >= 3.4.5)
27
- powerpack (0.0.9)
28
- rainbow (1.1.4)
29
- rake (10.1.1)
30
- rest-client (1.6.7)
31
- mime-types (>= 1.16)
32
- rspec (2.14.1)
33
- rspec-core (~> 2.14.0)
34
- rspec-expectations (~> 2.14.0)
35
- rspec-mocks (~> 2.14.0)
36
- rspec-core (2.14.7)
37
- rspec-expectations (2.14.4)
38
- diff-lcs (>= 1.1.3, < 2.0)
39
- rspec-mocks (2.14.4)
40
- rubocop (0.16.0)
41
- parser (~> 2.1)
42
- powerpack (~> 0.0.6)
43
- rainbow (>= 1.1.4)
44
- ruby-progressbar (1.3.2)
45
- simplecov (0.8.2)
46
- docile (~> 1.1.0)
47
- multi_json
48
- simplecov-html (~> 0.8.0)
49
- simplecov-html (0.8.0)
50
- slop (3.4.7)
51
- term-ansicolor (1.2.2)
52
- tins (~> 0.8)
53
- thor (0.18.1)
54
- tins (0.13.1)
55
- travis-lint (1.7.0)
56
- hashr (~> 0.0.22)
57
-
58
- PLATFORMS
59
- ruby
60
-
61
- DEPENDENCIES
62
- coveralls
63
- fuubar
64
- hss!
65
- parser
66
- rake
67
- rspec
68
- rubocop
69
- travis-lint
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file