vns 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 48617bcac4f8a34c853d9cc1c46116c33c44d7c26c305ecd9f942e71df8b4824
4
- data.tar.gz: 3d671e3e0c757ce757bb3e5f1aa7071c5c1aabbd5554ffc45b472397240c9929
3
+ metadata.gz: fe1c277a047286ad18e02f1536bc192aa8327444a1d7cf2d6efa3c7d31fcd42e
4
+ data.tar.gz: 020472d1dd94083946b4b39a2e82647953e65ff592f3fccdfdf052f10f1e85b6
5
5
  SHA512:
6
- metadata.gz: 2537ef72e31061cdb4f1f059323d74f3486cf866276b9495fa68a789646e28d7beb23bd9737c5ee4301ee44b2f37f7359cf6d04e52264dde3094e0be89d32fd6
7
- data.tar.gz: 21b3c546ee8aadbd6c3721c7852beded6f26144d69b7a9a42a6e75207f331bb4c9f383abe7b301ae14a83b43ba46544bc50cdf309f31df9a32e73b5836ad18b7
6
+ metadata.gz: ae6143e3d7ee45ace9391a20183265ceb1bc89dc4cad7aeeb6620e75556ab88ee990e51c18ac734b565f6ad49b670142ed0fc820da317903100cfd73307b8501
7
+ data.tar.gz: f6d70a283e94d1d3eb0e1331ef7d9e07d4b2853923c25c2b9fb075b7c5f3397721654ffa78417f6eb4e5972764d25b8b7b53c39620ee03de72b8247d17aaa416
@@ -0,0 +1,42 @@
1
+ name: Ruby Gem
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ build:
11
+ name: Build + Publish
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v2
16
+ - name: Set up Ruby 2.6
17
+ uses: actions/setup-ruby@v1
18
+ with:
19
+ ruby-version: 2.6.x
20
+
21
+ - name: Publish to GPR
22
+ run: |
23
+ mkdir -p $HOME/.gem
24
+ touch $HOME/.gem/credentials
25
+ chmod 0600 $HOME/.gem/credentials
26
+ printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
27
+ gem build *.gemspec
28
+ gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
29
+ env:
30
+ GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
31
+ OWNER: ${{ github.repository_owner }}
32
+
33
+ - name: Publish to RubyGems
34
+ run: |
35
+ mkdir -p $HOME/.gem
36
+ touch $HOME/.gem/credentials
37
+ chmod 0600 $HOME/.gem/credentials
38
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
39
+ gem build *.gemspec
40
+ gem push *.gem
41
+ env:
42
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
@@ -0,0 +1,57 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ # Ignore Byebug command history file.
17
+ .byebug_history
18
+
19
+ ## Specific to RubyMotion:
20
+ .dat*
21
+ .repl_history
22
+ build/
23
+ *.bridgesupport
24
+ build-iPhoneOS/
25
+ build-iPhoneSimulator/
26
+
27
+ ## Specific to RubyMotion (use of CocoaPods):
28
+ #
29
+ # We recommend against adding the Pods directory to your .gitignore. However
30
+ # you should judge for yourself, the pros and cons are mentioned at:
31
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
32
+ #
33
+ # vendor/Pods/
34
+
35
+ ## Documentation cache and generated files:
36
+ /.yardoc/
37
+ /_yardoc/
38
+ /doc/
39
+ /rdoc/
40
+
41
+ ## Environment normalization:
42
+ /.bundle/
43
+ /vendor/bundle
44
+ /lib/bundler/man/
45
+
46
+ # for a library or gem, you might want to ignore these files since the code is
47
+ # intended to run in multiple environments; otherwise, check them in:
48
+ # Gemfile.lock
49
+ # .ruby-version
50
+ # .ruby-gemset
51
+
52
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
53
+ .rvmrc
54
+
55
+ # Used by RuboCop. Remote config files pulled in from inherit_from directive.
56
+ # .rubocop-https?--*
57
+
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gemspec
@@ -0,0 +1,61 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ vns (0.1.1)
5
+ activesupport
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activesupport (6.1.1)
11
+ concurrent-ruby (~> 1.0, >= 1.0.2)
12
+ i18n (>= 1.6, < 2)
13
+ minitest (>= 5.1)
14
+ tzinfo (~> 2.0)
15
+ zeitwerk (~> 2.3)
16
+ ast (2.4.1)
17
+ coderay (1.1.3)
18
+ concurrent-ruby (1.1.8)
19
+ i18n (1.8.7)
20
+ concurrent-ruby (~> 1.0)
21
+ method_source (0.9.2)
22
+ minitest (5.14.3)
23
+ parallel (1.20.1)
24
+ parser (2.7.2.0)
25
+ ast (~> 2.4.1)
26
+ pry (0.12.2)
27
+ coderay (~> 1.1.0)
28
+ method_source (~> 0.9.0)
29
+ rainbow (3.0.0)
30
+ rake (13.0.3)
31
+ regexp_parser (2.0.1)
32
+ rexml (3.2.4)
33
+ rubocop (1.6.1)
34
+ parallel (~> 1.10)
35
+ parser (>= 2.7.1.5)
36
+ rainbow (>= 2.2.2, < 4.0)
37
+ regexp_parser (>= 1.8, < 3.0)
38
+ rexml
39
+ rubocop-ast (>= 1.2.0, < 2.0)
40
+ ruby-progressbar (~> 1.7)
41
+ unicode-display_width (>= 1.4.0, < 2.0)
42
+ rubocop-ast (1.3.0)
43
+ parser (>= 2.7.1.5)
44
+ ruby-progressbar (1.10.1)
45
+ tzinfo (2.0.4)
46
+ concurrent-ruby (~> 1.0)
47
+ unicode-display_width (1.7.0)
48
+ zeitwerk (2.4.2)
49
+
50
+ PLATFORMS
51
+ ruby
52
+
53
+ DEPENDENCIES
54
+ bundler
55
+ pry
56
+ rake
57
+ rubocop
58
+ vns!
59
+
60
+ BUNDLED WITH
61
+ 2.1.4
@@ -0,0 +1,2 @@
1
+ require 'bundler/gem_tasks'
2
+ task default: :spec
data/lib/vns.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module VNS
2
- require 'person'
3
- require 'session'
2
+ require 'vns/person'
3
+ require 'vns/session'
4
4
  require 'active_support/all'
5
5
 
6
6
  class VNS
@@ -0,0 +1,13 @@
1
+ module VNS
2
+ class Person
3
+ attr_reader :id, :name
4
+ def initialize(id, name)
5
+ @id = id
6
+ @name = name
7
+ end
8
+
9
+ def to_s
10
+ "#{id}\t#{name}"
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,15 @@
1
+ module VNS
2
+ class Session
3
+ MAX_ALLOCATION = 25
4
+ attr_reader :id, :name
5
+
6
+ def initialize(id, name)
7
+ @id = id
8
+ @name = name
9
+ end
10
+
11
+ def to_s
12
+ "#{id}\t#{name}"
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,3 @@
1
+ module VNS
2
+ VERSION = '0.1.1'
3
+ end
@@ -0,0 +1,26 @@
1
+ lib = File.expand_path('lib', __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'vns/version'
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = 'vns'
7
+ s.version = VNS::VERSION
8
+ s.date = '2021-01-23'
9
+ s.summary = 'VNS'
10
+ s.description = 'A gem to execute Variable Neighborhood Search algorithm in optimization problems'
11
+ s.authors = ['Manuel Bustillo']
12
+ s.email = 'mayn13@gmail.com'
13
+ s.homepage = 'https://rubygems.org/exploradoresdemadrid/vns'
14
+ s.license = 'MIT'
15
+
16
+ s.files = Dir.chdir(File.expand_path('..', __FILE__)) do
17
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ end
19
+ s.require_paths = ['lib']
20
+
21
+ s.add_runtime_dependency 'activesupport'
22
+ s.add_development_dependency 'pry'
23
+ s.add_development_dependency 'rubocop'
24
+ s.add_development_dependency 'rake'
25
+ s.add_development_dependency 'bundler'
26
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Bustillo
@@ -87,7 +87,16 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
+ - ".github/workflows/gem-push.yml"
91
+ - ".gitignore"
92
+ - Gemfile
93
+ - Gemfile.lock
94
+ - Rakefile
90
95
  - lib/vns.rb
96
+ - lib/vns/person.rb
97
+ - lib/vns/session.rb
98
+ - lib/vns/version.rb
99
+ - vns.gemspec
91
100
  homepage: https://rubygems.org/exploradoresdemadrid/vns
92
101
  licenses:
93
102
  - MIT