fulmar 1.10.0 → 1.10.1

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
  SHA1:
3
- metadata.gz: 375aee75cd020abdfdefb0622dd2f90e547c31c0
4
- data.tar.gz: 8b8ae5c411d00386e02ad4be9ef1d515d0f541b1
3
+ metadata.gz: c6e4cd1b4895e08c5b2548ea7680e13071e5a1d7
4
+ data.tar.gz: 3f141c76b47aab32bd21a40a4629d79df2c92c95
5
5
  SHA512:
6
- metadata.gz: 44e7234acfce670e208e86ca23f299b31488049f0d9578e0ba252806d0a329c5c17b205b8a3c42f3567ed73519d9cf939f89c3270ffba1e651e3e313e84dbeda
7
- data.tar.gz: 0d0c3b6b2e6501f5c2a2df70f017147622f420f0c6ea909903515aa36c2689fd2c9d17914aa482983352ef978afd1826767821f0ccc485a1e5267d02b31f4862
6
+ metadata.gz: d1bedf9ff9ee0780bfe6056dc9b295d43aa4d13d32f114e052090e059860c1abb394088efc9d4a7ac1c9fc617b5db3ca885c72e513d3e827774d35575fe901b5
7
+ data.tar.gz: 8ea30f40735b20aa8b0d18256c6c1467d8060fc5d0227f756b21dd75545d8e00128c69c135f83a22376530b146dbe9b927e92d720672b9834488aad0c38a8bb8
data/README.md CHANGED
@@ -25,7 +25,7 @@ Fulmar 2.0 will support these features via plugins.
25
25
 
26
26
  ## Prerequisites
27
27
 
28
- Fulmar currently requires the [mysql2](https://github.com/brianmario/mysql2) gem which
28
+ Fulmar 1.9 currently requires the [mysql2](https://github.com/brianmario/mysql2) gem which
29
29
  requires the mysql header files. So on a linux system, you want to install
30
30
  libmariadbclient-dev/libmysqlclient-dev or similar.
31
31
 
@@ -12,7 +12,6 @@ require 'fulmar/domain/service/file_sync_service'
12
12
 
13
13
  require 'fulmar/infrastructure/service/composer_service'
14
14
  require 'fulmar/infrastructure/service/shell_service'
15
- require 'fulmar/infrastructure/service/git_service'
16
15
  require 'fulmar/infrastructure/service/copy_service'
17
16
  require 'fulmar/infrastructure/service/ssh_config_service'
18
17
 
@@ -1,4 +1,4 @@
1
1
  # Provides a global version number
2
2
  module Fulmar
3
- VERSION = '1.10.0'
3
+ VERSION = '1.10.1'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fulmar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Siegl
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-02-10 00:00:00.000000000 Z
12
+ date: 2017-02-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -134,7 +134,6 @@ files:
134
134
  - lib/fulmar/infrastructure/service/copy_service.rb
135
135
  - lib/fulmar/infrastructure/service/database/database_service.rb
136
136
  - lib/fulmar/infrastructure/service/flow_service.rb
137
- - lib/fulmar/infrastructure/service/git_service.rb
138
137
  - lib/fulmar/infrastructure/service/shell_service.rb
139
138
  - lib/fulmar/infrastructure/service/ssh_config_service.rb
140
139
  - lib/fulmar/infrastructure/service/transfer/base.rb
@@ -1,72 +0,0 @@
1
- require 'rugged'
2
-
3
- module Fulmar
4
- module Infrastructure
5
- module Service
6
- # Provides access to to the local git repository
7
- class GitService
8
- attr_accessor :git
9
-
10
- DEFAULT_CONFIG = {
11
- local_path: '.',
12
- git: {
13
- branch: nil
14
- }
15
- }
16
-
17
- def initialize(config)
18
- @config = config
19
- @config.merge(DEFAULT_CONFIG)
20
-
21
- unless @config[:git][:branch]
22
- @config[:git][:branch] = case config.environment
23
- when :preview
24
- 'preview'
25
- when :live
26
- 'release'
27
- else
28
- 'master'
29
- end
30
- end
31
-
32
- @git = Rugged::Repository.new(@config[:git_path].blank? ? @config[:local_path] : @config[:git_path]) # :log => Logger.new(STDOUT)
33
- end
34
-
35
- def branches
36
- @git.branches.collect(&:name)
37
- end
38
-
39
- def feature_branches
40
- branches.select { |name| name.match(/^feature_/) }.sort
41
- end
42
-
43
- def preview_branches
44
- branches.select { |name| name.match(/^preview_/) }.sort
45
- end
46
-
47
- def current_hash
48
- @git.head.target_id
49
- end
50
-
51
- def current_branch
52
- @git.head.name.split('/').last
53
- end
54
-
55
- def checkout(branch_name = derive_branch_name)
56
- if branches.include?(branch_name)
57
- @git.checkout(branches.first)
58
- else
59
- branches = @git.branches.select { |b| b.name.match(/\/#{branch_name}$/) }
60
- fail "Cannot find a valid branch, last search was for #{branch_name}" unless branches.any?
61
- @git.checkout(branches.first)
62
- end
63
- end
64
-
65
- # The current preview branch is the alphabetically last preview branch
66
- def derive_branch_name
67
- @config[:git][:branch] == 'preview' ? preview_branches.last : @config[:git][:branch]
68
- end
69
- end
70
- end
71
- end
72
- end