lingohub 0.6.0 → 0.6.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
  SHA256:
3
- metadata.gz: bd55f8fec72532fd75d35d7de635dcb7f2210ba0e67532827b8431f4e601aa4e
4
- data.tar.gz: '09a178901ff24c0517a667df35c3e69d5eb27ed2964354a6346172caff4762d4'
3
+ metadata.gz: 8e714a52b6de55c4e5cc49d9638f624c69e31db00a4b764ac7f6747dfdc4c20e
4
+ data.tar.gz: 01dac716390a72b91b8408359faabeec767d91427dc4c9b211026ec744c2f165
5
5
  SHA512:
6
- metadata.gz: a0b0a46257a4267e6ecb9a05bb2fd501ae1ff4f733bd891168e62e11af7ca9e559eb111ba123cce8152b03830291eb9c3e0c9772f08bdbb0fb2846e4422b400c
7
- data.tar.gz: 29e51a7d6541cdac1d0a4f59e15434be3e1398b0ab593cc294c29466e211b80f04f847222527d2b7f36b26585a33a1f8f22fa33da3f702766ab7350122c91ee7
6
+ metadata.gz: 86cdc688619ee5608e911d99da6be9691f7928ea634ed175b568f5d6d3711db4c5a687b0c89cea8f2b30d95a1298bcc0b26302ea2d60839ad0c9e9a434aa519e
7
+ data.tar.gz: 30db4c51e63c2d4ec1348401941675edb690a14bc4a6e2c9a2e0e40c448a02ee245246800e3863627c9b1fcf1877656099054772b02f2bfb5bd1cbe6cde7d93b
@@ -1,3 +1,7 @@
1
+ ## 0.6.1
2
+
3
+ * removed unused method which generates chdir warnings
4
+
1
5
  ## 0.0.4
2
6
 
3
7
  * added command line help for: login, logout
data/README.md CHANGED
@@ -29,4 +29,4 @@ lingohub resource:down --locale 'de' --directory config/locales/de --project 'li
29
29
 
30
30
  ## License
31
31
 
32
- MIT License. Copyright 2017 lingohub GmbH. https://lingohub.com
32
+ MIT License. Copyright 2018 lingohub GmbH. https://lingohub.com
@@ -20,7 +20,7 @@ module Lingohub::Command
20
20
  def project_title(force=true)
21
21
  project_title = extract_project_title_from_args
22
22
  unless project_title
23
- project_title = extract_project_title_from_git || extract_project_title_from_dir_name ||
23
+ project_title = extract_project_title_from_dir_name ||
24
24
  raise(CommandFailed, "No project specified.\nRun this command from project folder or set it adding --project <title>") if force
25
25
  @autodetected_project_name = true
26
26
  end
@@ -38,42 +38,11 @@ module Lingohub::Command
38
38
  File.basename(dir)
39
39
  end
40
40
 
41
- def extract_project_title_from_git
42
- dir = Dir.pwd
43
- return unless remotes = git_remotes(dir)
44
-
45
- if remote = extract_option('--remote')
46
- remotes[remote]
47
- elsif remote = extract_app_from_git_config
48
- remotes[remote]
49
- else
50
- apps = remotes.values.uniq
51
- return apps.first if apps.size == 1
52
- end
53
- end
54
-
55
41
  def extract_app_from_git_config
56
42
  remote = git("config heroku.remote")
57
43
  remote == "" ? nil : remote
58
44
  end
59
45
 
60
- def git_remotes(base_dir=Dir.pwd)
61
- remotes = { }
62
- original_dir = Dir.pwd
63
- Dir.chdir(base_dir)
64
-
65
- # TODO
66
- # git("remote -v").split("\n").each do |remote|
67
- # name, url, method = remote.split(/\s/)
68
- # if url =~ /^git@#{heroku.host}:([\w\d-]+)\.git$/
69
- # remotes[name] = $1
70
- # end
71
- # end
72
-
73
- Dir.chdir(original_dir)
74
- remotes
75
- end
76
-
77
46
  def extract_option(options, default=true)
78
47
  values = options.is_a?(Array) ? options : [options]
79
48
  return unless opt_index = args.select { |a| values.include? a }.first
@@ -1,4 +1,4 @@
1
1
  module Lingohub
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  API_VERSION = 'v1'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lingohub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - lingohub GmbH
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-02 00:00:00.000000000 Z
11
+ date: 2019-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -114,8 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  requirements: []
117
- rubyforge_project:
118
- rubygems_version: 2.7.6
117
+ rubygems_version: 3.0.1
119
118
  signing_key:
120
119
  specification_version: 4
121
120
  summary: Client library and command-line tool to translate Ruby based apps with lingohub.