hellgrid 0.3.0 → 0.3.1

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
- SHA1:
3
- metadata.gz: 8cf6eaeb8266e3defb76dfd2356cf8afc48fe022
4
- data.tar.gz: 534f6360775cfaa91cc640d22944cc2d0373e2a6
2
+ SHA256:
3
+ metadata.gz: 5cdf916cc1b8a6b4aeed6730b2ab7d856bd387ba8377a144ee8edb836e0adaa0
4
+ data.tar.gz: 05ffd253f441d4917ff32f272c849975d94454048cef4c1920f0acd022207468
5
5
  SHA512:
6
- metadata.gz: 72f0cecdd42d996e20732e97dbb8bbda9e77b4a888330561f55417f934298d711134f85660bcba61c0732d308666666aa24623bd092b53d807acde9e304cb727
7
- data.tar.gz: d54c079d37e6c9eff6b1536a7a059e9fcd07a57fe348c6d063f163a7f12e14b6a62cd67f48f77c9b278c74634ef2aff921473c8908bf4f8f0f91b027655f3b6d
6
+ metadata.gz: a08a4f854e758b495248e9a67979aec90e0bf4b1c9b4ced939d469de86ca68e835a98378dbbedf1a5a28479bf7204a5776df1092c7dcbd7d45caa047cad6091d
7
+ data.tar.gz: ab8505e56b86ad4973515b715be12273e6af148470627477ce012ed1387cf8f88af8962e5eeae0eae03f9ee801a5d229857a41bf2f04a6cb9a5dbe8de4fd2f10
data/Gemfile.lock CHANGED
@@ -1,33 +1,41 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hellgrid (0.3.0)
4
+ hellgrid (0.3.1)
5
+ bundler (>= 1.11.0, < 1.17)
5
6
 
6
7
  GEM
7
8
  remote: https://rubygems.org/
8
9
  specs:
9
- diff-lcs (1.2.5)
10
- rspec (3.4.0)
11
- rspec-core (~> 3.4.0)
12
- rspec-expectations (~> 3.4.0)
13
- rspec-mocks (~> 3.4.0)
14
- rspec-core (3.4.2)
15
- rspec-support (~> 3.4.0)
16
- rspec-expectations (3.4.0)
10
+ diff-lcs (1.3)
11
+ docile (1.1.5)
12
+ json (2.1.0)
13
+ rspec (3.7.0)
14
+ rspec-core (~> 3.7.0)
15
+ rspec-expectations (~> 3.7.0)
16
+ rspec-mocks (~> 3.7.0)
17
+ rspec-core (3.7.1)
18
+ rspec-support (~> 3.7.0)
19
+ rspec-expectations (3.7.0)
17
20
  diff-lcs (>= 1.2.0, < 2.0)
18
- rspec-support (~> 3.4.0)
19
- rspec-mocks (3.4.1)
21
+ rspec-support (~> 3.7.0)
22
+ rspec-mocks (3.7.0)
20
23
  diff-lcs (>= 1.2.0, < 2.0)
21
- rspec-support (~> 3.4.0)
22
- rspec-support (3.4.1)
24
+ rspec-support (~> 3.7.0)
25
+ rspec-support (3.7.1)
26
+ simplecov (0.15.1)
27
+ docile (~> 1.1.0)
28
+ json (>= 1.8, < 3)
29
+ simplecov-html (~> 0.10.0)
30
+ simplecov-html (0.10.2)
23
31
 
24
32
  PLATFORMS
25
33
  ruby
26
34
 
27
35
  DEPENDENCIES
28
- bundler (~> 1.11, >= 1.11.0)
29
36
  hellgrid!
30
- rspec (~> 3.4, >= 3.4.0)
37
+ rspec (~> 3.7.0)
38
+ simplecov (~> 0.15.1)
31
39
 
32
40
  BUNDLED WITH
33
- 1.13.6
41
+ 1.16.1
data/bin/hellgrid CHANGED
@@ -1,28 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'pathname'
4
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', Pathname.new(__FILE__).realpath)
4
+ # XXX: BUNDLE_GEMFILE should be provided because the internals of bundler require a 'Gemfile' or '.bundle' to
5
+ # work properly. Without this the script will fail if there isn't a Gemfile somewhere up the directory chain
6
+ ENV['BUNDLE_GEMFILE'] ||= File.join(File.expand_path('../..', Pathname.new(__FILE__).realpath), 'Gemfile')
5
7
 
6
8
  require 'rubygems'
7
9
  require 'bundler/setup'
8
- require 'find'
9
10
 
10
11
  require 'hellgrid'
11
12
 
12
- recursive_search = !!(ARGV.delete('-r'))
13
- folders = ARGV.empty? ? [Dir.pwd] : ARGV
14
-
15
- folders.each do |folder|
16
- matrix = Hellgrid::Matrix.new
17
-
18
- Find.find(folder) do |path|
19
- if File.directory?(path) && File.exists?(File.join(path, 'Gemfile.lock'))
20
- matrix.add_project(Hellgrid::Project.new(folder, path))
21
- Find.prune unless recursive_search
22
- end
23
- end
24
-
25
- view = Hellgrid::Views::Console.new(matrix.sorted_by_most_used)
26
-
27
- view.render
28
- end
13
+ Hellgrid::CLI.start
data/exe/hellgrid ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'pathname'
4
+ # XXX: BUNDLE_GEMFILE should be provided because the internals of bundler require a 'Gemfile' or '.bundle' to
5
+ # work properly. Without this the script will fail if there isn't a Gemfile somewhere up the directory chain
6
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', Pathname.new(__FILE__).realpath)
7
+
8
+ require 'hellgrid'
9
+
10
+ Hellgrid::CLI.start
data/hellgrid.gemspec CHANGED
@@ -11,13 +11,15 @@ Gem::Specification.new do |s|
11
11
  s.summary = 'Gem version dependency matrix'
12
12
  s.authors = ['Deyan Dobrinov', 'Aleksandar Ivanov']
13
13
  s.email = ['engineering+hellgrid@fundingcircle.com']
14
- s.files = Dir.chdir(project_root) { Dir['lib/**/*.rb'] + Dir['bin/*'] + Dir['spec/**/*.rb'] + %w(Gemfile Gemfile.lock README.md hellgrid.gemspec) }
15
- s.executables = s.files.grep(/^bin\//) { |f| File.basename(f) }
14
+ s.files = Dir.chdir(project_root) { Dir['lib/**/*.rb'] + Dir['bin/*'] + Dir['exe/*'] + Dir['spec/**/*.rb'] + %w(Gemfile Gemfile.lock README.md hellgrid.gemspec) }
15
+ s.bindir = 'exe'
16
+ s.executables = s.files.grep(/^exe\//) { |f| File.basename(f) }
16
17
  s.test_files = s.files.grep(/^spec\//)
17
18
  s.require_paths = ['lib']
18
19
  s.homepage = 'https://github.com/FundingCircle/hellgrid'
19
20
  s.license = 'BSD-3-Clause'
20
21
 
22
+ s.add_runtime_dependency 'bundler', ['>= 1.11.0', '< 1.17']
23
+
21
24
  s.add_development_dependency 'rspec', '~> 3.4', '>= 3.4.0'
22
- s.add_development_dependency 'bundler', '~> 1.11', '>= 1.11.0'
23
25
  end
@@ -0,0 +1,33 @@
1
+ module Hellgrid
2
+ class CLI
3
+ def self.start(argv = ARGV)
4
+ new(argv).start
5
+ end
6
+
7
+ def initialize(argv = ARGV)
8
+ @argv = argv
9
+ end
10
+
11
+ attr_reader :argv
12
+
13
+ def start
14
+ recursive_search = !!(argv.delete('-r'))
15
+ folders = argv.empty? ? [Dir.pwd] : argv
16
+
17
+ folders.each do |folder|
18
+ matrix = Hellgrid::Matrix.new
19
+
20
+ Find.find(folder) do |path|
21
+ if File.directory?(path) && File.exists?(File.join(path, 'Gemfile.lock'))
22
+ matrix.add_project(Hellgrid::Project.new(folder, path))
23
+ Find.prune unless recursive_search
24
+ end
25
+ end
26
+
27
+ view = Hellgrid::Views::Console.new(matrix.sorted_by_most_used)
28
+
29
+ view.render
30
+ end
31
+ end
32
+ end
33
+ end
@@ -1,3 +1,3 @@
1
1
  module Hellgrid
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
data/lib/hellgrid.rb CHANGED
@@ -1,6 +1,9 @@
1
+ require 'bundler'
2
+ require 'find'
1
3
  require 'hellgrid/project'
2
4
  require 'hellgrid/matrix'
3
5
  require 'hellgrid/views/console'
6
+ require 'hellgrid/cli'
4
7
 
5
8
  module Hellgrid
6
9
  end
@@ -114,15 +114,11 @@ TABLE
114
114
  context 'when passing -r' do
115
115
  it 'searches recursively within folders if you flag it to' do
116
116
  Bundler.with_clean_env do
117
- expect(`cd #{PROJECT_ROOT} && #{PROJECT_ROOT}/bin/hellgrid -r`).to(
117
+ expect(`cd #{PROJECT_ROOT} && #{PROJECT_ROOT}/bin/hellgrid -r`.lines.first).to(
118
118
  include(
119
119
  'hellgrid',
120
120
  'spec/tmp/bar',
121
121
  'spec/tmp/in/foo',
122
- 'rspec',
123
- '3.4.0',
124
- '2.0.0',
125
- '3.0.0'
126
122
  )
127
123
  )
128
124
  end
metadata CHANGED
@@ -1,56 +1,56 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hellgrid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Deyan Dobrinov
8
8
  - Aleksandar Ivanov
9
9
  autorequire:
10
- bindir: bin
10
+ bindir: exe
11
11
  cert_chain: []
12
12
  date: 2016-09-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: rspec
15
+ name: bundler
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
19
- - !ruby/object:Gem::Version
20
- version: '3.4'
21
18
  - - ">="
22
19
  - !ruby/object:Gem::Version
23
- version: 3.4.0
24
- type: :development
20
+ version: 1.11.0
21
+ - - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: '1.17'
24
+ type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
- - - "~>"
29
- - !ruby/object:Gem::Version
30
- version: '3.4'
31
28
  - - ">="
32
29
  - !ruby/object:Gem::Version
33
- version: 3.4.0
30
+ version: 1.11.0
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.17'
34
34
  - !ruby/object:Gem::Dependency
35
- name: bundler
35
+ name: rspec
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.11'
40
+ version: '3.4'
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: 1.11.0
43
+ version: 3.4.0
44
44
  type: :development
45
45
  prerelease: false
46
46
  version_requirements: !ruby/object:Gem::Requirement
47
47
  requirements:
48
48
  - - "~>"
49
49
  - !ruby/object:Gem::Version
50
- version: '1.11'
50
+ version: '3.4'
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: 1.11.0
53
+ version: 3.4.0
54
54
  description:
55
55
  email:
56
56
  - engineering+hellgrid@fundingcircle.com
@@ -63,8 +63,10 @@ files:
63
63
  - Gemfile.lock
64
64
  - README.md
65
65
  - bin/hellgrid
66
+ - exe/hellgrid
66
67
  - hellgrid.gemspec
67
68
  - lib/hellgrid.rb
69
+ - lib/hellgrid/cli.rb
68
70
  - lib/hellgrid/matrix.rb
69
71
  - lib/hellgrid/project.rb
70
72
  - lib/hellgrid/version.rb
@@ -94,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
96
  version: '0'
95
97
  requirements: []
96
98
  rubyforge_project:
97
- rubygems_version: 2.5.1
99
+ rubygems_version: 2.7.3
98
100
  signing_key:
99
101
  specification_version: 4
100
102
  summary: Gem version dependency matrix
@@ -104,4 +106,3 @@ test_files:
104
106
  - spec/hellgrid/views/console_spec.rb
105
107
  - spec/hellgrid_spec.rb
106
108
  - spec/spec_helper.rb
107
- has_rdoc: