dply 0.3.3 → 0.3.4

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: 29b858fa9d36e91f13a1136c63e1ab90822a8cc06f561656de7b71d013435b3c
4
- data.tar.gz: 9516217208aa220291ee6e882070ee4d77776e479f6acaca354e405b12235644
3
+ metadata.gz: c1977ebe3a85d14aa607bbe886439ac8fd914a9a5622455604de86dc5a92ce9c
4
+ data.tar.gz: 8820cbf3a600d4c64d604fbcb1318a7c3bf65dc75337dd008bc9b387c665ad26
5
5
  SHA512:
6
- metadata.gz: d5b2a86f4a6a98020d1ca414a22fb08758d08596a344f3f30f0639c2b4a74f977404d3bcc607be5cae6def03102802f7446af82381c7c863a81c73393ba68cde
7
- data.tar.gz: c346852ec95ed4f55634173e78a399fa775b559911385179eac052eb92d9757f34af3cd14633a578127b40ea568e816a75a26504d024be93c85f720bdf85e0ce
6
+ metadata.gz: 7c01d534aa672ed1558f6999606e073ac7660b1504eefa0c902460a28e6362d7af43a32a63602e26e3b24d3a1466030c7c9c8b777ce4809fa261cb4a2f4eb167
7
+ data.tar.gz: be4e873ffbf2a109a44212313bfde650dbf04fb686c983cb14d87a18c2f41c4d2657e051c36113f358afb0190ce50962c0a07da24fa1543ed43c1ef8bb5bb1ef
@@ -1,3 +1,4 @@
1
+ require 'dply/constants'
1
2
  require 'dply/pkgs'
2
3
  require 'dply/helper'
3
4
 
@@ -14,8 +15,9 @@ module Dply
14
15
 
15
16
  def run
16
17
  opts.parse!(@argv)
17
- error "pkgs.yml cannot be a symlink" if File.symlink? "pkgs.yml"
18
- pkgs = Pkgs.new("pkgs.yml")
18
+ path = Constants::PKGS_YML
19
+ error "#{path} cannot be a symlink" if File.symlink? path
20
+ pkgs = Pkgs.new(path)
19
21
  pkgs.install(build_mode: @options[:build_mode])
20
22
  puts "installed"
21
23
  end
@@ -0,0 +1,6 @@
1
+ module Dply
2
+ module Constants
3
+ PKGS_YML = "dply/pkgs.yml"
4
+ end
5
+ end
6
+
@@ -4,6 +4,7 @@ require_relative 'helper'
4
4
  require_relative 'rpm'
5
5
  require_relative 'pkgs'
6
6
  require_relative 'elf'
7
+ require_relative 'constants'
7
8
 
8
9
  module Dply
9
10
  class Deplist
@@ -21,7 +22,7 @@ module Dply
21
22
  tmp_dir do
22
23
  logger.info "(in #{Dir.pwd})"
23
24
  cmd "tar xf #{@tar_path}"
24
- pkgs_list = Pkgs.new("pkgs.yml").runtime
25
+ pkgs_list = Pkgs.new(Constants::PKGS_YML).runtime
25
26
 
26
27
  @libs_files_map = libs_files_map
27
28
  libs = @libs_files_map.keys
@@ -4,6 +4,7 @@ require_relative 'helper'
4
4
  require_relative 'bundle'
5
5
  require_relative 'linker'
6
6
  require_relative 'pkgs'
7
+ require_relative 'constants'
7
8
  require 'etc'
8
9
 
9
10
  module Dply
@@ -24,8 +25,9 @@ module Dply
24
25
  end
25
26
 
26
27
  def install_pkgs(build_mode: false)
27
- return if not File.exists? "pkgs.yml"
28
- pkgs = Pkgs.new("pkgs.yml")
28
+ pkgs_yml = Constants::PKGS_YML
29
+ return if not File.exists? pkgs_yml
30
+ pkgs = Pkgs.new(pkgs_yml)
29
31
  return if pkgs.installed?(build_mode: build_mode)
30
32
  drake_install build_mode
31
33
  end
@@ -1,3 +1,3 @@
1
1
  module Dply
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
@@ -22,8 +22,9 @@ module Dply
22
22
  it "doesn't throw an error when pkgs.yml has the required pkgs" do
23
23
  pkgs_data = { "pkgs" => ["libattr"], "build_pkgs" => [] }
24
24
  tmp_dir do
25
- File.write "pkgs.yml", YAML.dump(pkgs_data)
26
- system! "tar czf test.tar.gz pkgs.yml libacl.so.1"
25
+ FileUtils.mkdir "dply"
26
+ File.write "dply/pkgs.yml", YAML.dump(pkgs_data)
27
+ system! "tar czf test.tar.gz dply/pkgs.yml libacl.so.1"
27
28
  deplist = Deplist.new("test.tar.gz")
28
29
  silence_warnings do
29
30
  expect { deplist.verify! }.to output(/all dependencies satisfied/).to_stdout_from_any_process
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dply
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neeraj
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-31 00:00:00.000000000 Z
11
+ date: 2019-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-elf
@@ -96,6 +96,7 @@ files:
96
96
  - lib/dply/cli/task.rb
97
97
  - lib/dply/code_archive.rb
98
98
  - lib/dply/command.rb
99
+ - lib/dply/constants.rb
99
100
  - lib/dply/curl.rb
100
101
  - lib/dply/custom_logger.rb
101
102
  - lib/dply/deplist.rb
@@ -179,12 +180,10 @@ files:
179
180
  - spec/test_data/sample_repo/Gemfile
180
181
  - spec/test_data/sample_repo/Rakefile
181
182
  - spec/test_data/sample_repo/app.rb
182
- - spec/test_data/sample_repo/application-override.yml
183
- - spec/test_data/sample_repo/application.yml
184
183
  - spec/test_data/sample_repo/dply/app.rb
185
184
  - spec/test_data/sample_repo/dply/config/test.erb
185
+ - spec/test_data/sample_repo/dply/pkgs.yml
186
186
  - spec/test_data/sample_repo/lib/libacl.so.1
187
- - spec/test_data/sample_repo/pkgs.yml
188
187
  - spec/webserver.rb
189
188
  - test/sample_data/build.tar.gz
190
189
  - test/sample_data/build.tar.gz.md5
@@ -254,12 +253,10 @@ test_files:
254
253
  - spec/test_data/sample_repo/Gemfile
255
254
  - spec/test_data/sample_repo/Rakefile
256
255
  - spec/test_data/sample_repo/app.rb
257
- - spec/test_data/sample_repo/application-override.yml
258
- - spec/test_data/sample_repo/application.yml
259
256
  - spec/test_data/sample_repo/dply/app.rb
260
257
  - spec/test_data/sample_repo/dply/config/test.erb
258
+ - spec/test_data/sample_repo/dply/pkgs.yml
261
259
  - spec/test_data/sample_repo/lib/libacl.so.1
262
- - spec/test_data/sample_repo/pkgs.yml
263
260
  - spec/webserver.rb
264
261
  - test/sample_data/build.tar.gz
265
262
  - test/sample_data/build.tar.gz.md5
@@ -1,2 +0,0 @@
1
- db:
2
- host: asdf-override
@@ -1,3 +0,0 @@
1
- db:
2
- host: asdf
3
- port: 5432