hubbard 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/bin/hubbard +1 -0
  3. data/bin/hubbard~ +15 -15
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.8
1
+ 0.0.9
data/bin/hubbard CHANGED
@@ -110,6 +110,7 @@ def authorize(project_name, action)
110
110
  end
111
111
 
112
112
  def is_authorized(project_name, action)
113
+ return true if @username == 'admin'
113
114
  Dir.chdir(find_project_dir(project_name)) do
114
115
  if action == 'read' && File.read('.visibility').strip == 'public'
115
116
  return true
data/bin/hubbard~ CHANGED
@@ -6,21 +6,6 @@ require 'yaml'
6
6
  $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib')))
7
7
  require 'hubbard'
8
8
 
9
- defaults = { :format => :text }
10
- options = {}
11
- OptionParser.new do |opts|
12
- formats = [:text, :yaml]
13
- opts.on("--private", "Create project with visibility set to private") do |o|
14
- options[:private] = o
15
- end
16
- opts.on("-f", "--format [FORMAT]", formats,
17
- "Select format (#{formats.join(', ')})") do |o|
18
- options[:format] = o
19
- end
20
- end.parse!
21
- OPTIONS = defaults.merge(options)
22
- OPTIONS.freeze
23
-
24
9
  FileUtils.mkdir_p(File.join(Hubbard::HUB_DATA, "projects"))
25
10
  FileUtils.mkdir_p(File.join(Hubbard::HUB_DATA, "accounts"))
26
11
 
@@ -76,6 +61,21 @@ if ENV['SSH_ORIGINAL_COMMAND']
76
61
  end
77
62
  end
78
63
 
64
+ defaults = { :format => :text }
65
+ options = {}
66
+ OptionParser.new do |opts|
67
+ formats = [:text, :yaml]
68
+ opts.on("--private", "Create project with visibility set to private") do |o|
69
+ options[:private] = o
70
+ end
71
+ opts.on("-f", "--format [FORMAT]", formats,
72
+ "Select format (#{formats.join(', ')})") do |o|
73
+ options[:format] = o
74
+ end
75
+ end.parse!
76
+ OPTIONS = defaults.merge(options)
77
+ OPTIONS.freeze
78
+
79
79
  command = next_arg "Please specify a command to run"
80
80
 
81
81
  if command == "run-as"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubbard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Foemmel