rails-dev-tools 1.1.5 → 1.2.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: 135b12a564b7385c03ecf9228ebaea81ad94462c0c6556b5f0af945499fdfd22
4
- data.tar.gz: 25e0dc4891e7a77b4691e7ed143d79c3eb61e55f5626a0964cb561893db9dbdc
3
+ metadata.gz: 4ce0c42ebdc654a21469d5d30830635b057b24ae30e0ab896c5f3ee3228a91e1
4
+ data.tar.gz: 879c2b636fb11248292bd4b590a333d2345f1ecdea56a2eec0d117a5ccd18ae5
5
5
  SHA512:
6
- metadata.gz: 1347f1fbaef506934cba6b1cf28b5e8ba9feb4ab3e6ff96216d45c614171443ef185844303436649aeb3e990eae4fce1996453c832bc3920978bdf2d8dda0c95
7
- data.tar.gz: 5b06f3e21a1e9a9987e3a59915d250ecd8877565fb322ef73714112a5d9bc607682142d6429cc28f2870f4caf497a9677c229bdb2bf1ca6b5bf5770964e8ee2a
6
+ metadata.gz: '082868603a862fac9384bcca812a4197511ac5e7b43ce18de1b49e53925f228ab8038779ca589ab8e318d5ad2b376b974e9209342abb67c9fd05609e62c2db23'
7
+ data.tar.gz: c54b03489f773e88a69180bd196f7678284c6709bf7f066b86cc995ea9c5889b9f6a15f10e60b74b8d7b98870cecb3a823e0ef7b8ba7bc7de57051ef97e5a9da
@@ -19,7 +19,7 @@ module Dev
19
19
  apps.each do |current_app|
20
20
  @project.current_app = current_app
21
21
  if @project.valid_app?
22
- @project.chdir_app
22
+ Dir.chdir @project.app_folder
23
23
  current_branch = `git rev-parse --abbrev-ref HEAD`
24
24
 
25
25
  print "Preparing to pull app "
@@ -14,7 +14,7 @@ module Dev
14
14
  if app.present? and commit_message.present?
15
15
  @project.current_app = app
16
16
  if @project.valid_app?
17
- @project.chdir_app
17
+ Dir.chdir @project.app_folder
18
18
  current_branch = `git rev-parse --abbrev-ref HEAD`
19
19
 
20
20
  print "Preparing to push app "
@@ -106,11 +106,10 @@ module Dev
106
106
  print "√\n".green
107
107
  puts "\t\tDone. Output from git:".cadetblue
108
108
  puts "\t\t#{git_output.split("\n").map(&:squish).join("\n\t\t")}".cadetblue
109
- puts
110
109
 
111
- print "\tMerging hotfix on develop.."
110
+ print "\tMerging release on develop.."
112
111
  exec "git checkout develop"
113
- exec "git merge --no-ff hotfix/#{version}"
112
+ exec "git merge --no-ff release/#{version}"
114
113
  git_output = exec "git push origin develop"
115
114
  if git_output.include?('fatal') or git_output.include?('rejected') or git_output.include?('error')
116
115
  print "X\n".red
@@ -17,7 +17,7 @@ module Dev
17
17
  apps.each do |current_app|
18
18
  @project.current_app = current_app
19
19
  if @project.valid_app?
20
- @project.chdir_app
20
+ Dir.chdir @project.app_folder
21
21
  current_branch = `git rev-parse --abbrev-ref HEAD`
22
22
 
23
23
  print "Status of app "
@@ -26,7 +26,7 @@ module Dev
26
26
 
27
27
  tested_apps.each do |current_app|
28
28
  @project.current_app = current_app
29
- @project.chdir_app
29
+ Dir.chdir @project.app_folder
30
30
 
31
31
  print "Eseguo test dell'app "
32
32
  print current_app.to_s.teal
data/lib/dev/project.rb CHANGED
@@ -63,22 +63,22 @@ module Dev
63
63
  end
64
64
 
65
65
  ##
66
- # Sposta la directory corrente nella cartella
66
+ # Ottiene la directory corrente nella cartella
67
67
  # dell'app specificata. Prende l'app corrente se non
68
68
  # viene specificata nessuna app.
69
69
  #
70
70
  # @param [String] app_name il nome dell'app.
71
71
  #
72
72
  # @return [nil]
73
- def chdir_app(app_name = self.current_app)
73
+ def app_folder(app_name = self.current_app)
74
74
  if self.type == :multi
75
75
  if app_name.in? self.main_apps
76
- Dir.chdir "#{self.folder}/main_apps/#{app_name}"
76
+ "#{self.folder}/main_apps/#{app_name}"
77
77
  elsif app_name.in? self.engines
78
- Dir.chdir "#{self.folder}/engines/#{app_name}"
78
+ "#{self.folder}/engines/#{app_name}"
79
79
  end
80
80
  elsif self.type == :single
81
- Dir.chdir self.folder
81
+ self.folder
82
82
  end
83
83
  end
84
84
 
@@ -90,7 +90,9 @@ module Dev
90
90
  #
91
91
  # @return [String] il file di versione dell'app.
92
92
  def app_version_file(app_name = self.current_app)
93
- "lib/#{app_name}/version.rb"
93
+ Dir.glob("#{app_folder(app_name)}/lib/**/version.rb").min do |file_name|
94
+ file_name.chars.count
95
+ end
94
96
  end
95
97
 
96
98
  ##
@@ -102,8 +104,8 @@ module Dev
102
104
  # @return [String] la versione dell'app.
103
105
  def app_version(app_name = self.current_app)
104
106
  chdir_app(app_name)
105
- if File.exists? "lib/#{app_name}/version.rb"
106
- File.read("lib/#{app_name}/version.rb")
107
+ if File.exists? app_version_file(app_name).to_s
108
+ File.read(app_version_file(app_name))
107
109
  .match(/VERSION = '([0-9\.]+)'\n/)
108
110
  .try(:captures).try(:first)
109
111
  else
data/lib/dev/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dev
2
- VERSION = '1.1.5'
2
+ VERSION = '1.2.1'
3
3
  end
@@ -10,7 +10,6 @@ module Dev
10
10
 
11
11
  def copy_config
12
12
  template "dev.yml.erb", "dev.yml" do |content|
13
- puts content.inspect.magenta
14
13
  content
15
14
  end
16
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-dev-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francesco Ballardin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-10 00:00:00.000000000 Z
11
+ date: 2018-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails