obs_deploy 0.2.3 → 0.2.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: 0c30ef3de78c4686ec7f27a73e2824653a845b86156c5c35d0d3458896195116
4
- data.tar.gz: 93d7393cb93c865a4a87e11cfa24eb4df35cfff12f5b3921da639adbee14b29d
3
+ metadata.gz: 5c5cefbf1ffca4ed2d230cd169498f9360900f937066e87191e9a0709fb6a8d4
4
+ data.tar.gz: 4b87d73be2eebec73b7a060db49bac63d548f22d4a65bb36247214af1c40d2fb
5
5
  SHA512:
6
- metadata.gz: f4b1b7da0b1112e5ac195f8fdcb5a373db76c2fa79fe10ba76753fbd0933ae834d23c4a2575f88e3ca52540c2ca9cc81464be0eb954c3a6ffd46b5f43895ce87
7
- data.tar.gz: 01dd7034cb873265620005cc2a6cd00e616ffa2c364397aa4a8be3358998831b5e7c8e4e354e17db165165b02e80a742e74227cb58050471f6b1b9e19c4c120d
6
+ metadata.gz: db9fdc959797fa2229398817caf16b821e81464e188a16fe6b9be35da1aed74e9fdd2151fb21b0ccb887a07c6b196fe11ce310587c2d53d45dae2939071b47e5
7
+ data.tar.gz: 2a8f6ac5f785efb947c4c40f57609c1cb8724fc7d7362bcadc848fc34083cefac99454c6daca47581cc195cd56357e94d97beaa99126c49036045cb32a8fd46a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- obs_deploy (0.2.3)
4
+ obs_deploy (0.2.4)
5
5
  cheetah
6
6
  dry-cli
7
7
  nokogiri
data/README.md CHANGED
@@ -61,6 +61,10 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
61
61
 
62
62
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
63
63
 
64
+ ### Fixtures
65
+
66
+ To generate the fixtures (located under `spec/fixtures`), we are using `curl -si $URL > $FIXTURE`
67
+
64
68
  ### Run the `bin/obs_deploy` on development:
65
69
 
66
70
  On the checked out source, run the following:
@@ -28,7 +28,19 @@ module ObsDeploy
28
28
  def has_migration?
29
29
  return true if github_diff.nil? || github_diff.empty?
30
30
 
31
- !!github_diff.match(%r{db/migrate})
31
+ github_diff.match?(%r{db/migrate})
32
+ end
33
+
34
+ def has_data_migration?
35
+ return true if github_diff.nil? || github_diff.empty?
36
+
37
+ github_diff.match(%r{db/data})
38
+ end
39
+
40
+ def data_migrations
41
+ return [] unless has_data_migration?
42
+
43
+ github_diff.match(%r{db/data/.*\.rb}).to_a
32
44
  end
33
45
 
34
46
  def migrations
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ObsDeploy
4
- VERSION = '0.2.3'
4
+ VERSION = '0.2.4'
5
5
  end
@@ -6,6 +6,7 @@ module ObsDeploy
6
6
 
7
7
  def initialize(dry_run: true, package_name: 'obs-api')
8
8
  @dry_run = dry_run
9
+ @package_name = package_name
9
10
  end
10
11
 
11
12
  def update
@@ -16,7 +17,7 @@ module ObsDeploy
16
17
  run ['zypper', '--non-interactive', '--gpg-auto-import-keys', 'refresh']
17
18
  end
18
19
 
19
- private
20
+ private
20
21
 
21
22
  def run(params)
22
23
  params
@@ -31,7 +32,7 @@ module ObsDeploy
31
32
  end
32
33
 
33
34
  def package_name
34
- ['obs-api']
35
+ [@package_name]
35
36
  end
36
37
 
37
38
  def update_params
@@ -41,5 +42,5 @@ module ObsDeploy
41
42
  def dry_run_params
42
43
  ['--dry-run --download-only']
43
44
  end
44
- end
45
+ end
45
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: obs_deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pereira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-20 00:00:00.000000000 Z
11
+ date: 2020-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler