jets-gems 0.1.0 → 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: bcd49cdb9d4fbeb73f0bb86077b77b860b5e1c6fe73a646ad5b0983bb9d953b7
4
- data.tar.gz: 74ddd300cf6ef1ba835202723016b70be059fcb361a8d381578f4b5b27ae8c37
3
+ metadata.gz: 0d18468f092340cd60022baef19a0014e4c748e25cb8ffc2607d48999652d531
4
+ data.tar.gz: 123290696ff086843bb334e6922804ab3f31e93c16dc8ad41ac54bc43c367725
5
5
  SHA512:
6
- metadata.gz: f55241adf0c2a7b46fc661ef935620b030673c9e0acb4e50bcd187943c8916ef9f199914d2e7f07a07e016d670a58765de8bd075babb506528b113504da828d6
7
- data.tar.gz: c649a95ae12e854abb1b6076663832ceaa4508fdbe17f51412b42a20d2aee108472f888016d952e0711d896d8ff4aef94332e6e102ecb578790a323c10f24f40
6
+ metadata.gz: 256c8573adf8312f191100e8c0750ca606fb8d19d3fca97bdb7e7671854cfbfd9e8d7314c201b1a9dc35615230cb5cb3388f41968c92619e64854130ca74fcdc
7
+ data.tar.gz: a505aa3f8e16047620eb0d8c9b745eca1f51b3b84e1f3eb3c38f179795b7d7a5107c26c4097928e0e4ad317ca06253bdcf58266bd58ff8103a81cae8eb4b0132
data/CHANGELOG.md CHANGED
@@ -3,5 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## [0.2.0]
7
+ - generalized weird_gem check
8
+ - report ruby version also
9
+ - update gems
10
+
6
11
  ## [0.1.0]
7
12
  - Initial release
data/Gemfile.lock ADDED
@@ -0,0 +1,39 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ jets-gems (0.1.0)
5
+ gems
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ diff-lcs (1.3)
11
+ gems (1.1.1)
12
+ json
13
+ json (2.2.0)
14
+ rake (10.5.0)
15
+ rspec (3.8.0)
16
+ rspec-core (~> 3.8.0)
17
+ rspec-expectations (~> 3.8.0)
18
+ rspec-mocks (~> 3.8.0)
19
+ rspec-core (3.8.2)
20
+ rspec-support (~> 3.8.0)
21
+ rspec-expectations (3.8.4)
22
+ diff-lcs (>= 1.2.0, < 2.0)
23
+ rspec-support (~> 3.8.0)
24
+ rspec-mocks (3.8.1)
25
+ diff-lcs (>= 1.2.0, < 2.0)
26
+ rspec-support (~> 3.8.0)
27
+ rspec-support (3.8.2)
28
+
29
+ PLATFORMS
30
+ ruby
31
+
32
+ DEPENDENCIES
33
+ bundler
34
+ jets-gems!
35
+ rake (~> 10.0)
36
+ rspec (~> 3.0)
37
+
38
+ BUNDLED WITH
39
+ 2.0.2
@@ -157,23 +157,10 @@ EOL
157
157
  #
158
158
  # Thanks: https://gist.github.com/aelesbao/1414b169a79162b1d795 and
159
159
  # https://stackoverflow.com/questions/5165950/how-do-i-get-a-list-of-gems-that-are-installed-that-have-native-extensions
160
- def specs_with_extensions
161
- # puts "Jets::Gems::Check#specs_with_extensions".color:red)
162
- # puts "BUNDLE_GEMFILE #{ENV['BUNDLE_GEMFILE'].inspect}"
163
- # puts "Jets.root #{Jets.root}"
164
- # puts "Dir.pwd #{Dir.pwd}"
165
- # ENV['BUNDLE_GEMFILE'] = nil
166
- # puts "BUNDLE_GEMFILE2 #{ENV['BUNDLE_GEMFILE'].inspect}"
167
- # gemfile = IO.readlines("#{Dir.pwd}/Gemfile")
168
- # puts gemfile
169
-
170
- specs = Gem::Specification.each.select { |spec| spec.extensions.any? }
171
- specs.reject! { |spec| weird_gems.include?(spec.name) }
172
- specs
173
- end
174
-
175
160
  def gemspec_compiled_gems
176
- specs_with_extensions.map(&:full_name)
161
+ specs = Gem::Specification.each.select { |spec| spec.extensions.any? }
162
+ specs.reject! { |spec| weird_gem?(spec.name) }
163
+ specs.map(&:full_name)
177
164
  end
178
165
 
179
166
  # Filter out the weird special case gems that bundler deletes?
@@ -183,8 +170,10 @@ EOL
183
170
  # The gem json has been deleted. It was installed at:
184
171
  # /home/ec2-user/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/json-2.1.0
185
172
  #
186
- def weird_gems
187
- %w[json]
173
+ def weird_gem?(name)
174
+ command = "bundle show #{name} 2>&1"
175
+ output = `#{command}`
176
+ output.include?("has been deleted")
188
177
  end
189
178
  end
190
179
  end
@@ -21,7 +21,7 @@ module Jets::Gems
21
21
  if md = gem_name.match(version_pattern)
22
22
  name, version = md[1], md[2]
23
23
  threads << Thread.new do
24
- call_api("report/missing?name=#{name}&version=#{version}", async: true)
24
+ call_api("report/missing?name=#{name}&version=#{version}&ruby_version=#{RUBY_VERSION}", async: true)
25
25
  end
26
26
  else
27
27
  puts "WARN: Unable to extract the version from the gem name."
@@ -1,5 +1,5 @@
1
1
  module Jets
2
2
  module Gems
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jets-gems
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-30 00:00:00.000000000 Z
11
+ date: 2019-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gems
@@ -78,6 +78,7 @@ files:
78
78
  - ".travis.yml"
79
79
  - CHANGELOG.md
80
80
  - Gemfile
81
+ - Gemfile.lock
81
82
  - LICENSE.txt
82
83
  - README.md
83
84
  - Rakefile
@@ -114,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
115
  - !ruby/object:Gem::Version
115
116
  version: '0'
116
117
  requirements: []
117
- rubygems_version: 3.0.3
118
+ rubygems_version: 3.0.6
118
119
  signing_key:
119
120
  specification_version: 4
120
121
  summary: Library manages pre-compiled Lambda Gems for Jets Ruby Serverless Framework