geordi 3.2.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/CHANGELOG.md +10 -1
  4. data/Gemfile.lock +1 -1
  5. data/README.md +111 -142
  6. data/Rakefile +18 -8
  7. data/geordi.gemspec +1 -0
  8. data/lib/geordi/COMMAND_TEMPLATE +3 -1
  9. data/lib/geordi/commands/chromedriver_update.rb +2 -2
  10. data/lib/geordi/commands/commit.rb +0 -5
  11. data/lib/geordi/commands/console.rb +8 -11
  12. data/lib/geordi/commands/create_databases.rb +2 -1
  13. data/lib/geordi/commands/cucumber.rb +13 -15
  14. data/lib/geordi/commands/delete_dumps.rb +0 -1
  15. data/lib/geordi/commands/deploy.rb +11 -11
  16. data/lib/geordi/commands/drop_databases.rb +0 -6
  17. data/lib/geordi/commands/dump.rb +9 -17
  18. data/lib/geordi/commands/firefox.rb +2 -5
  19. data/lib/geordi/commands/migrate.rb +1 -1
  20. data/lib/geordi/commands/rake.rb +3 -1
  21. data/lib/geordi/commands/rspec.rb +5 -9
  22. data/lib/geordi/commands/security_update.rb +14 -15
  23. data/lib/geordi/commands/server.rb +1 -1
  24. data/lib/geordi/commands/setup.rb +2 -11
  25. data/lib/geordi/commands/shell.rb +7 -8
  26. data/lib/geordi/commands/unit.rb +1 -1
  27. data/lib/geordi/commands/update.rb +0 -11
  28. data/lib/geordi/commands/vnc.rb +1 -3
  29. data/lib/geordi/commands/with_rake.rb +1 -1
  30. data/lib/geordi/cucumber.rb +2 -2
  31. data/lib/geordi/util.rb +11 -3
  32. data/lib/geordi/version.rb +1 -1
  33. metadata +6 -33
  34. data/exe/cap-all +0 -4
  35. data/exe/console-for +0 -4
  36. data/exe/cuc +0 -4
  37. data/exe/cuc-show +0 -4
  38. data/exe/cuc-vnc-setup +0 -4
  39. data/exe/deploy-to-production +0 -4
  40. data/exe/dump-for +0 -8
  41. data/exe/gitpt +0 -4
  42. data/exe/load-dump +0 -4
  43. data/exe/migrate-all +0 -4
  44. data/exe/rs +0 -4
  45. data/exe/run_tests +0 -4
  46. data/exe/shell-for +0 -4
  47. data/exe/tests +0 -4
  48. data/lib/geordi/commands/eurest.rb +0 -4
@@ -5,7 +5,7 @@ def unit
5
5
  invoke_cmd 'yarn_install'
6
6
 
7
7
  Interaction.announce 'Running Test::Unit'
8
- Util.system! 'bundle exec rake test'
8
+ Util.system! Util.binstub('rake'), 'test'
9
9
  else
10
10
  Interaction.note 'Test::Unit not employed.'
11
11
  end
@@ -3,17 +3,6 @@ long_desc <<-LONGDESC
3
3
  Example: `geordi update`
4
4
 
5
5
  Performs: `git pull`, `bundle install` (if necessary) and migrates (if applicable).
6
-
7
- After updating, loads a dump into the development db when called with the
8
- `--dump` option:
9
-
10
- geordi update -d staging
11
-
12
- After updating, runs all tests when called with the `--test` option:
13
-
14
- geordi update -t
15
-
16
- See `geordi help update` for details.
17
6
  LONGDESC
18
7
 
19
8
  option :dump, type: :string, aliases: '-d', banner: 'TARGET',
@@ -4,11 +4,9 @@ Example: `geordi vnc` or `geordi vnc --setup`
4
4
 
5
5
  Launch a VNC session to the hidden screen where `geordi cucumber` runs Selenium
6
6
  tests.
7
-
8
- When called with `--setup`, will guide through the setup of VNC.
9
7
  LONGDESC
10
8
 
11
- option :setup, type: :boolean
9
+ option :setup, type: :boolean, desc: 'Guide through the setup of VNC'
12
10
 
13
11
  def vnc
14
12
  if options.setup
@@ -5,7 +5,7 @@ def with_rake
5
5
  invoke_cmd 'yarn_install'
6
6
 
7
7
  Interaction.announce 'Running tests with `rake`'
8
- Util.system! 'rake'
8
+ Util.system! Util.binstub('rake')
9
9
  else
10
10
  Interaction.note '`rake` does not run tests.'
11
11
  :did_not_perform
@@ -74,7 +74,7 @@ module Geordi
74
74
  unless argv.include?('--format') || argv.include?('-f')
75
75
  format_args = spinner_available? ? ['--format', 'CucumberSpinner::CuriousProgressBarFormatter'] : ['--format', 'progress']
76
76
  end
77
- [use_firefox_for_selenium, 'b', 'cucumber', format_args, escape_shell_args(argv)].flatten.compact.join(' ')
77
+ [use_firefox_for_selenium, Util.binstub('cucumber'), format_args, escape_shell_args(argv)].flatten.compact.join(' ')
78
78
  end
79
79
 
80
80
  def parallel_execution_command
@@ -87,7 +87,7 @@ module Geordi
87
87
 
88
88
  [
89
89
  use_firefox_for_selenium,
90
- 'b parallel_test -t ' + type_arg,
90
+ 'bundle exec parallel_test -t ' + type_arg,
91
91
  %(-o '#{command_line_options.join(' ')} --tags "#{not_tag('@solo')}"'),
92
92
  "-- #{features.join(' ')}",
93
93
  ].compact.join(' ')
@@ -62,13 +62,21 @@ module Geordi
62
62
  end
63
63
  end
64
64
 
65
+ def binstub(executable, *arguments)
66
+ binstub_file = "bin/#{executable}"
67
+
68
+ command = File.exists?(binstub_file) ? [binstub_file] : ['bundle exec', executable]
69
+ command.push(*arguments)
70
+ command.join(' ')
71
+ end
72
+
65
73
  def console_command(environment)
66
74
  if gem_major_version('rails') == 2
67
75
  'script/console ' + environment
68
76
  elsif gem_major_version('rails') == 3
69
- 'bundle exec rails console ' + environment
77
+ binstub 'rails', 'console', environment
70
78
  else
71
- "bundle exec rails console -e #{environment}"
79
+ binstub 'rails', 'console -e', environment
72
80
  end
73
81
  end
74
82
 
@@ -76,7 +84,7 @@ module Geordi
76
84
  if gem_major_version('rails') == 2
77
85
  'script/server ""'
78
86
  else
79
- 'bundle exec rails server'
87
+ binstub 'rails', 'server'
80
88
  end
81
89
  end
82
90
 
@@ -1,3 +1,3 @@
1
1
  module Geordi
2
- VERSION = '3.2.0'.freeze
2
+ VERSION = '4.0.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geordi
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-15 00:00:00.000000000 Z
11
+ date: 2020-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -30,23 +30,9 @@ email:
30
30
  - henning.koch@makandra.de
31
31
  executables:
32
32
  - b
33
- - cap-all
34
- - console-for
35
- - cuc
36
- - cuc-show
37
- - cuc-vnc-setup
38
- - deploy-to-production
39
- - dump-for
40
33
  - dumple
41
34
  - geordi
42
- - gitpt
43
35
  - launchy_browser
44
- - load-dump
45
- - migrate-all
46
- - rs
47
- - run_tests
48
- - shell-for
49
- - tests
50
36
  extensions: []
51
37
  extra_rdoc_files: []
52
38
  files:
@@ -60,23 +46,9 @@ files:
60
46
  - README.md
61
47
  - Rakefile
62
48
  - exe/b
63
- - exe/cap-all
64
- - exe/console-for
65
- - exe/cuc
66
- - exe/cuc-show
67
- - exe/cuc-vnc-setup
68
- - exe/deploy-to-production
69
- - exe/dump-for
70
49
  - exe/dumple
71
50
  - exe/geordi
72
- - exe/gitpt
73
51
  - exe/launchy_browser
74
- - exe/load-dump
75
- - exe/migrate-all
76
- - exe/rs
77
- - exe/run_tests
78
- - exe/shell-for
79
- - exe/tests
80
52
  - geordi.gemspec
81
53
  - lib/geordi.rb
82
54
  - lib/geordi/COMMAND_TEMPLATE
@@ -98,7 +70,6 @@ files:
98
70
  - lib/geordi/commands/deploy.rb
99
71
  - lib/geordi/commands/drop_databases.rb
100
72
  - lib/geordi/commands/dump.rb
101
- - lib/geordi/commands/eurest.rb
102
73
  - lib/geordi/commands/firefox.rb
103
74
  - lib/geordi/commands/migrate.rb
104
75
  - lib/geordi/commands/png_optimize.rb
@@ -130,7 +101,9 @@ homepage: http://makandra.com
130
101
  licenses:
131
102
  - MIT
132
103
  metadata: {}
133
- post_install_message: "* Binary `geordi` installed\n"
104
+ post_install_message: |
105
+ * Binary `geordi` installed
106
+ * Geordi 4.0.0 has removed its deprecated executables. If you want to invoke these commands like before, you may create aliases on your machine. For the alias mapping, please refer to https://github.com/makandra/geordi/commit/68fa92acb146ebde3acb92d7b9556bd4eaa2b4ff
134
107
  rdoc_options: []
135
108
  require_paths:
136
109
  - lib
@@ -145,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
118
  - !ruby/object:Gem::Version
146
119
  version: '0'
147
120
  requirements: []
148
- rubygems_version: 3.0.3
121
+ rubygems_version: 3.1.4
149
122
  signing_key:
150
123
  specification_version: 4
151
124
  summary: Collection of command line tools we use in our daily work with Ruby, Rails
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- puts 'DEPRECATED: Use `geordi ca[pistrano]` instead'
4
- exec 'geordi', 'capistrano', *ARGV
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- puts 'DEPRECATED: Use `geordi con[sole]` instead'
4
- exec 'geordi', 'console', *ARGV
data/exe/cuc DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- puts 'DEPRECATED: Use `geordi cu[cumber]` instead'
4
- exec 'geordi', 'cucumber', *ARGV
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- puts 'DEPRECATED: Use `geordi vn[c]` instead'
4
- exec 'geordi', 'vnc'
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- puts 'DEPRECATED: Use `geordi vn[c] --setup` instead'
4
- exec 'geordi', 'vnc', '--setup'
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- puts 'DEPRECATED: Use `geordi dep[loy]` instead'
4
- exec 'geordi', 'deploy'
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- if (i = ARGV.index '-s')
4
- ARGV[i] = '-l'
5
- end
6
-
7
- puts 'DEPRECATED: Use `geordi du[mp]` instead'
8
- exec 'geordi', 'dump', *ARGV
data/exe/gitpt DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- puts 'DEPRECATED: Use `geordi com[mit]` instead'
4
- exec 'geordi', 'commit'
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- puts 'DEPRECATED: Use `geordi du[mp] -l` instead'
4
- exec 'geordi', 'dump', '-l', *ARGV
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- puts 'DEPRECATED: Use `geordi m[igrate]` instead'
4
- exec 'geordi', 'migrate'
data/exe/rs DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- puts 'DEPRECATED: Use `geordi rs[pec]` instead'
4
- exec 'geordi', 'rspec', *ARGV
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- puts 'DEPRECATED: Use `geordi f[irefox]` instead'
4
- exec 'geordi', 'firefox', *ARGV
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- puts 'DEPRECATED: Use `geordi sh[ell]` instead'
4
- exec 'geordi', 'shell', *ARGV
data/exe/tests DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- puts 'DEPRECATED: Use `geordi t[est]` instead'
4
- exec 'geordi', 'test'
@@ -1,4 +0,0 @@
1
- desc 'eurest', 'Open the current Eurest cantina menu', hide: true
2
- def eurest
3
- Util.system! %(file="Speiseplan_KW`date +%V`.pdf" && wget -O/tmp/$file http://www.eurest-extranet.de/eurest/export/sites/default/sigma-technopark/de/downloads/$file && xdg-open /tmp/$file)
4
- end