ora-cli 0.1.5 → 0.1.6

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
  SHA1:
3
- metadata.gz: 6c15a94f308634de50dadc0091af974f17604444
4
- data.tar.gz: d098f2287871fcfb812105fe67b1d15ee42d2afa
3
+ metadata.gz: 27cee6ca32c233568f67bfdd067c9ac6a5c266c5
4
+ data.tar.gz: 5dfdd57300ccfb07ee65767ce5fa0953a35a9424
5
5
  SHA512:
6
- metadata.gz: db5ccc9016a09bef6c6085370d7d6054686e7db023cfebbcb48e4b4a898c8b0ebc3c84874c48a88940001a52153e297389c84866d101480e5a0ccb1aa4d841b4
7
- data.tar.gz: 871390f48d88e53970181fe63fc80b0b19c945787f7e6b5d535c9395d76a329d0dfc128dae71439b2094c9f7f283329b1aebbda12e60ee302a90a32b7f9c3157
6
+ metadata.gz: 1bcc07fbe1a8a464c3f176525cba875eb806928cc57e95e35bdbbe527534d0346a411b8f0e549de1da41d0720169deb65cdd4c5c0b4e1297cdc33ab9dde864a2
7
+ data.tar.gz: 7d68b44c90df6a3428d8b2bf3d9b4b1b9439dddeebb105fc0e4f0f532d6e73c22ce611303be70bb65ebc0e70792476ea1706f89d989b435dc147cd1b593b5daf
data/README.md CHANGED
@@ -5,6 +5,12 @@ A command line tool to automate development workflow in ORA
5
5
  ## Installation
6
6
 
7
7
  $ gem install ora-cli
8
+ $ ora-install
9
+
10
+ ## Uninstallation
11
+
12
+ $ ora-uninstall
13
+ $ gem uninstall ora-cli
8
14
 
9
15
  ## Usage
10
16
 
data/bin/ora-install ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'ora/cli/bash'
4
+ require 'ora/cli/print'
5
+
6
+ ora_path = File.expand_path('../ora', __FILE__)
7
+
8
+ bash = Ora::Cli::Bash.new(nil)
9
+ bash.run "
10
+ rm -f /usr/local/bin/ora
11
+ ln -s #{ora_path} /usr/local/bin/ora
12
+ "
13
+
14
+ print = Ora::Cli::Print.new
15
+ print.green "\nInstall finished"
data/bin/ora-uninstall ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'ora/cli/bash'
4
+ require 'ora/cli/print'
5
+
6
+ bash = Ora::Cli::Bash.new(nil)
7
+ bash.run "rm -f /usr/local/bin/ora"
8
+
9
+ print = Ora::Cli::Print.new
10
+ print.green "\nUninstall finished"
data/lib/ora/cli/path.rb CHANGED
@@ -5,7 +5,7 @@ module Ora::Cli
5
5
  end
6
6
 
7
7
  def self.selecta
8
- File.expand_path('../../../../bin/ora_selecta', __FILE__)
8
+ File.expand_path('../../../../bin/ora-selecta', __FILE__)
9
9
  end
10
10
  end
11
11
  end
data/lib/ora/cli/print.rb CHANGED
@@ -5,23 +5,28 @@ module Ora::Cli
5
5
  end
6
6
 
7
7
  def inline text
8
- print text unless @silent
8
+ print text unless ignore? text
9
9
  text
10
10
  end
11
11
 
12
12
  def plain text
13
- puts text unless @silent
13
+ puts text unless ignore? text
14
14
  text
15
15
  end
16
16
 
17
17
  def green text
18
- puts "\e[32m#{text}\e[0m" unless @silent
18
+ puts "\e[32m#{text}\e[0m" unless ignore? text
19
19
  text
20
20
  end
21
21
 
22
22
  def red text
23
- puts "\e[31m#{text}\e[0m" unless @silent
23
+ puts "\e[31m#{text}\e[0m" unless ignore? text
24
24
  text
25
25
  end
26
+
27
+ private
28
+ def ignore? text
29
+ @silent || text.split.empty?
30
+ end
26
31
  end
27
32
  end
@@ -1,5 +1,5 @@
1
1
  module Ora
2
2
  module Cli
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.6"
4
4
  end
5
5
  end
data/ora-cli.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
17
  spec.bindir = "bin"
18
- spec.executables = ["ora"]
18
+ spec.executables = ["ora-install", "ora-uninstall"]
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.12"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ora-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ducksan Cho
@@ -56,7 +56,8 @@ description: ORA CLI
56
56
  email:
57
57
  - ducktyper@gmail.com
58
58
  executables:
59
- - ora
59
+ - ora-install
60
+ - ora-uninstall
60
61
  extensions: []
61
62
  extra_rdoc_files: []
62
63
  files:
@@ -67,7 +68,9 @@ files:
67
68
  - Rakefile
68
69
  - bin/console
69
70
  - bin/ora
70
- - bin/ora_selecta
71
+ - bin/ora-install
72
+ - bin/ora-selecta
73
+ - bin/ora-uninstall
71
74
  - bin/setup
72
75
  - lib/ora/cli.rb
73
76
  - lib/ora/cli/bash.rb
File without changes