gurney_client 0.1.6 → 0.2.0

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
  SHA256:
3
- metadata.gz: bb46098ee5a2a49bdccf9bb4d5db373b2ce5847ae1398f30fe2a676a9d732b07
4
- data.tar.gz: 78b5b151888f590897f8869ae6d30788b4d4398ff122ef63525fd4048cb1bbd0
3
+ metadata.gz: 66191c965c8b5f4cc1286891aa9b3b60a3d8fc62ec1bc6f25787003fc1c19c3b
4
+ data.tar.gz: b4237a5f20d4b5b0b469d348cf283a9504b4e2fed1ed9a5d678d287a4b64ebd5
5
5
  SHA512:
6
- metadata.gz: 0e1bf0ed5a79b112999cd347f383de248a2fbb5ff0c85a0ef1250e19bafde7b089f6e94b04b19d1c39f17791b6db0cf452bceb03b2d43e2d60beb4cc940305ec
7
- data.tar.gz: c007024b0dc4197d983c66ba8182f7847fb04b4af8650cc6597f30f5fee5f89f7cd3e0bf16d92bfa47af276edb0dfcf2545752d61370498887b63cfa66c917f0
6
+ metadata.gz: 43ad1ed35a79fc1a53561069d0645a3b5bbc112ea6ae275f0fa9ab89ba8a343c345ab163cc37fba2ab90f849f7d04c26d159f62daf69e18bc4e1291eba29755d
7
+ data.tar.gz: cdb663765cbceeb6740aaa6748d9c911e9ead3940e44bb51c211df905ddd56a0c42ffdd5bacc12c1c72ae806fbb13345ac97bbd627e8a74db4f2fe1977ac57e7
data/Gemfile CHANGED
@@ -4,3 +4,4 @@ gemspec
4
4
 
5
5
  gem 'rspec'
6
6
  gem 'byebug'
7
+ gem 'rake'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gurney_client (0.1.6)
4
+ gurney_client (0.2.0)
5
5
  bundler (< 3)
6
6
  colorize (~> 0.8)
7
7
  git (~> 1.5)
@@ -13,14 +13,17 @@ GEM
13
13
  byebug (11.0.1)
14
14
  colorize (0.8.1)
15
15
  diff-lcs (1.3)
16
- git (1.5.0)
17
- httparty (0.17.1)
16
+ git (1.6.0)
17
+ rchardet (~> 1.8)
18
+ httparty (0.17.3)
18
19
  mime-types (~> 3.0)
19
20
  multi_xml (>= 0.5.2)
20
- mime-types (3.3)
21
+ mime-types (3.3.1)
21
22
  mime-types-data (~> 3.2015)
22
23
  mime-types-data (3.2019.1009)
23
24
  multi_xml (0.6.0)
25
+ rake (13.0.1)
26
+ rchardet (1.8.0)
24
27
  rspec (3.9.0)
25
28
  rspec-core (~> 3.9.0)
26
29
  rspec-expectations (~> 3.9.0)
@@ -41,7 +44,8 @@ PLATFORMS
41
44
  DEPENDENCIES
42
45
  byebug
43
46
  gurney_client!
47
+ rake
44
48
  rspec
45
49
 
46
50
  BUNDLED WITH
47
- 1.17.2
51
+ 2.1.4
data/lib/gurney.rb CHANGED
@@ -4,6 +4,7 @@ require_relative 'gurney/dependency'
4
4
  require_relative 'gurney/source/base'
5
5
  require_relative 'gurney/source/yarn'
6
6
  require_relative 'gurney/source/bundler'
7
+ require_relative 'gurney/source/ruby_version'
7
8
  require_relative 'gurney/api'
8
9
  require_relative 'gurney/cli/option_parser'
9
10
  require_relative 'gurney/cli'
data/lib/gurney/cli.rb CHANGED
@@ -71,6 +71,9 @@ module Gurney
71
71
  bundler_source = Gurney::Source::Bundler.new(gemfile_lock: read_file(g, options.hook || options.client_hook, branch, 'Gemfile.lock'))
72
72
  dependencies.concat bundler_source.dependencies || []
73
73
 
74
+ ruby_version_source = Gurney::Source::RubyVersion.new(ruby_version: read_file(g, options.hook || options.client_hook, branch, '.ruby-version'))
75
+ dependencies.concat ruby_version_source.dependencies || []
76
+
74
77
  dependencies.compact!
75
78
 
76
79
  api = Gurney::Api.new(base_url: options.api_url, token: options.api_token)
@@ -0,0 +1,27 @@
1
+ require 'bundler'
2
+
3
+ module Gurney
4
+ module Source
5
+ class RubyVersion < Base
6
+
7
+ def initialize(ruby_version:)
8
+ @ruby_version = ruby_version&.strip
9
+ end
10
+
11
+ def present?
12
+ @ruby_version && @ruby_version.size > 0
13
+ end
14
+
15
+ def dependencies
16
+ if present?
17
+ [Dependency.new(ecosystem: 'ruby', name: 'ruby', version: @ruby_version)]
18
+ end
19
+ end
20
+
21
+ private
22
+
23
+ attr_reader :gemfile_lock
24
+
25
+ end
26
+ end
27
+ end
@@ -1,3 +1,3 @@
1
1
  module Gurney
2
- VERSION = "0.1.6"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gurney_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Schaflitzl
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-05 00:00:00.000000000 Z
11
+ date: 2020-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -94,6 +94,7 @@ files:
94
94
  - lib/gurney/dependency.rb
95
95
  - lib/gurney/source/base.rb
96
96
  - lib/gurney/source/bundler.rb
97
+ - lib/gurney/source/ruby_version.rb
97
98
  - lib/gurney/source/yarn.rb
98
99
  - lib/gurney/version.rb
99
100
  homepage: https://github.com/makandra/gurney
@@ -115,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
116
  - !ruby/object:Gem::Version
116
117
  version: '0'
117
118
  requirements: []
118
- rubygems_version: 3.0.1
119
+ rubygems_version: 3.1.2
119
120
  signing_key:
120
121
  specification_version: 4
121
122
  summary: Gurney is a small tool to extract yarn and RubyGems dependencies from project