gemline 0.4.4 → 0.4.5

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: 742ba3f7b6e6f8c491852c705d2236c660e290e1
4
- data.tar.gz: 4c37e3b817a1b70cf4729fdde93971cb9e6b9e5e
2
+ SHA256:
3
+ metadata.gz: e3db9a6652fac1ac236055d4788dbf67546683d8dbab7d17a7af1c1aa523097e
4
+ data.tar.gz: 0613e6225bcb1016d8a0535dae98388455e4eb0b9ac415ea0e5c95c087c4f5e3
5
5
  SHA512:
6
- metadata.gz: 167098e6467eb8f334de634f43669e740db75a941a8ff4fd15aca1f8d6cb7a8fb076fb355dd85d4fe1daeaf208583712d566cb4bed7bf314a939818e16bb3d0d
7
- data.tar.gz: d36d9034de9bd6ec703bbe3cc0d88b787db76fe7cbe84472fc4ff84c555b9579fdba7921af300432fe2b9b5d780707c83418f906f42aff619b9a7dc86227a1d6
6
+ metadata.gz: 31a155836315d9bababfb8b505c6df2893213b5f7fb08ca20f4aed963c9e0acdd169324092093e8272caf116fa6c8cea15f41e8e4bd3601060e222f3e211df67
7
+ data.tar.gz: 1d21c18c40a0af36d350ad709437d94b7840eb046febea3ff8407ea8bf4d3c9e194cca535ba6caf666f2896a294e0e5ebebf3918aefe1092f9eb825bb5a1ba84
@@ -0,0 +1,32 @@
1
+ name: Ruby CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths-ignore:
8
+ - 'README.rdoc'
9
+ pull_request:
10
+ branches:
11
+ - main
12
+ paths-ignore:
13
+ - 'README.rdoc'
14
+ jobs:
15
+ test:
16
+ runs-on: ubuntu-latest
17
+ if: "contains(github.event.commits[0].message, '[ci skip]') == false"
18
+
19
+ strategy:
20
+ matrix:
21
+ ruby: [3.0.2, 2.7.4, 2.6.8]
22
+
23
+ steps:
24
+ - name: Checkout
25
+ uses: actions/checkout@v2
26
+ - name: Setup Ruby
27
+ uses: ruby/setup-ruby@v1
28
+ with:
29
+ ruby-version: ${{ matrix.ruby }}
30
+ bundler-cache: true
31
+ - name: Test
32
+ run: bundle exec rake spec
data/gemline.gemspec CHANGED
@@ -13,10 +13,10 @@ Gem::Specification.new do |gem|
13
13
  gem.name = "gemline"
14
14
  gem.require_paths = ["lib"]
15
15
 
16
- gem.version = '0.4.4'
16
+ gem.version = '0.4.5'
17
17
  gem.license = 'MIT'
18
18
 
19
- gem.add_dependency "clipboard", ">= 1.0.1"
19
+ gem.add_dependency "clipboard", ">= 1.3.5"
20
20
 
21
21
  # if RUBY_PLATFORM =~ /(win|w)32$/
22
22
  ## The clipboard gem doesn't do a platform-dependent check,
@@ -24,7 +24,7 @@ Gem::Specification.new do |gem|
24
24
  gem.add_dependency "ffi"
25
25
  # end
26
26
 
27
- gem.add_development_dependency "rake" # For Travis CI
28
- gem.add_development_dependency "rspec", ">= 3.3.0"
29
- gem.add_development_dependency "simplecov", ">= 0.7.1"
27
+ gem.add_development_dependency "rake"
28
+ gem.add_development_dependency "rspec", ">= 3.0"
29
+ gem.add_development_dependency "simplecov"
30
30
  end
data/lib/gemline.rb CHANGED
@@ -34,14 +34,12 @@ class Gemline
34
34
  !!@json.match(/(could not be found|does not exist)/)
35
35
  end
36
36
 
37
-
38
37
  private
39
38
 
40
39
  def self.get_rubygem_json(gem_name)
41
40
  uri = URI.parse("https://rubygems.org/api/v1/gems/#{gem_name}.json")
42
41
  http = Net::HTTP.new(uri.host, uri.port)
43
42
  http.use_ssl = true
44
- # http.verify_mode = OpenSSL::SSL::VERIFY_NONE
45
43
  request = Net::HTTP::Get.new(uri.request_uri)
46
44
  response = http.request(request)
47
45
  response.body
@@ -66,6 +64,7 @@ class Gemline
66
64
  options[:group] = [options[:group]].flatten.map { |x| x.to_sym }
67
65
  options[:group] = options[:group].first if options[:group].length == 1
68
66
  end
67
+
69
68
  options.inspect.delete('{}').gsub(/(?!\s)=>(?!\s)/, ' => ')
70
69
  end
71
70
 
@@ -85,5 +84,4 @@ class Gemline
85
84
  ## Yeah, I hate this too. But it does what I want -- silently fail if Clipboard fails.
86
85
  end
87
86
  end
88
-
89
87
  end
data/spec/spec_helper.rb CHANGED
@@ -1,25 +1,17 @@
1
- if RUBY_VERSION >= '1.9'
2
- require 'simplecov'
3
- SimpleCov.start do
4
- add_filter "/spec/"
5
- end
1
+ require 'simplecov'
2
+ SimpleCov.start do
3
+ add_filter "/spec/"
6
4
  end
7
5
 
8
6
  $LOAD_PATH.unshift(File.dirname(__FILE__))
9
7
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
10
8
 
11
- require 'rubygems'
12
9
  require 'gemline'
13
10
 
14
- require 'bundler'
15
- Bundler.setup
16
-
17
-
18
11
  RSpec.configure do |c|
19
12
  # c.mock_with :rr
20
13
  end
21
14
 
22
-
23
15
  def stub_rubygems_json_output
24
16
  Dir.glob(File.join(File.dirname(__FILE__),'samples', '*.json')).each do |f|
25
17
  gem_name = $1 if f =~ /\/([\w\-]+).json$/
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Alba
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-21 00:00:00.000000000 Z
11
+ date: 2021-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clipboard
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.1
19
+ version: 1.3.5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.1
26
+ version: 1.3.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: ffi
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -58,28 +58,28 @@ dependencies:
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 3.3.0
61
+ version: '3.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 3.3.0
68
+ version: '3.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 0.7.1
75
+ version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 0.7.1
82
+ version: '0'
83
83
  description: Grab the latest Gemfile 'gem' line for a specific Ruby gem
84
84
  email:
85
85
  - joe@joealba.com
@@ -88,9 +88,9 @@ executables:
88
88
  extensions: []
89
89
  extra_rdoc_files: []
90
90
  files:
91
+ - ".github/workflows/tests.yml"
91
92
  - ".gitignore"
92
93
  - ".rspec"
93
- - ".travis.yml"
94
94
  - Gemfile
95
95
  - README.rdoc
96
96
  - Rakefile
@@ -108,7 +108,7 @@ homepage: https://github.com/joealba/gemline
108
108
  licenses:
109
109
  - MIT
110
110
  metadata: {}
111
- post_install_message:
111
+ post_install_message:
112
112
  rdoc_options: []
113
113
  require_paths:
114
114
  - lib
@@ -123,9 +123,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  requirements: []
126
- rubyforge_project:
127
- rubygems_version: 2.4.8
128
- signing_key:
126
+ rubygems_version: 3.1.4
127
+ signing_key:
129
128
  specification_version: 4
130
129
  summary: ''
131
130
  test_files:
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- rvm:
2
- - 1.9.3
3
- - 2.1.8
4
- - 2.2.4
5
- - jruby-19mode
6
- - ruby-head