adamcooke-radar 1.0.0

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.
Files changed (2) hide show
  1. data/bin/radar +37 -0
  2. metadata +53 -0
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ puts "\e[36;40mRadar CLI\e[0m"
4
+
5
+ config_file = File.join(ENV['HOME'], '.radar')
6
+ if File.exist?(config_file)
7
+ load config_file
8
+ else
9
+ $stderr.puts "Radar configuration not found at #{config_file}"
10
+ Process.exit(1)
11
+ end
12
+
13
+ unless RADAR_PATH
14
+ $stderr.puts "RADAR_PATH is not defined"
15
+ Process.exit(1)
16
+ end
17
+
18
+ ## Command Format: radar {command} {id}
19
+ command, id = ARGV
20
+
21
+ if command.nil? or command == ''
22
+ $stderr.puts "Command not set"
23
+ Process.exit(1)
24
+ end
25
+
26
+ rakefile = File.join(RADAR_PATH, "Rakefile")
27
+ unless File.exist?(rakefile)
28
+ $stderr.puts "Rakefile does not exist at #{rakefile}"
29
+ Process.exit(1)
30
+ end
31
+
32
+ rake = "rake -f #{rakefile} radar:#{command}"
33
+ unless id.nil?
34
+ rake << " id=#{id}"
35
+ end
36
+
37
+ exec(rake)
metadata ADDED
@@ -0,0 +1,53 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: adamcooke-radar
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Adam Cooke
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-05-16 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description:
17
+ email: adam@atechmedia.com
18
+ executables:
19
+ - radar
20
+ extensions: []
21
+
22
+ extra_rdoc_files: []
23
+
24
+ files:
25
+ - bin/radar
26
+ has_rdoc: false
27
+ homepage: http://www.atechmedia.com
28
+ post_install_message:
29
+ rdoc_options: []
30
+
31
+ require_paths:
32
+ - lib
33
+ required_ruby_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: "0"
38
+ version:
39
+ required_rubygems_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ version:
45
+ requirements: []
46
+
47
+ rubyforge_project:
48
+ rubygems_version: 1.2.0
49
+ signing_key:
50
+ specification_version: 2
51
+ summary: Quick access to Radar rake tasks
52
+ test_files: []
53
+