giticious 0.9.2 → 0.9.3

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: 8084fca6e82b428f55b52da0e8a0cf06070c8ee0
4
- data.tar.gz: 7d2358daf73c6ec7f19dfbaeb9f9db9680518cb5
3
+ metadata.gz: e017881d98f992cb3ad73f98197b59614360367a
4
+ data.tar.gz: c46909a25604d2caddc605b6294eadbc351fb65c
5
5
  SHA512:
6
- metadata.gz: c88dda89f4d3119fde4f6bb6f6d739f71042527a36657c07a60bf1f2f04feb96247725123fb618e5bcc18b1e89ecaf4386c986a294ce30d03e4595e87c2cd527
7
- data.tar.gz: 36fd951ce31a539a1a81a6d930f39f08f90b77b20f3f04e2f3cab340462160bd2699a8d2b833d5501965e08303b3307eba9551f2b9523fade350af401225b416
6
+ metadata.gz: 7896375266ad95c52fed2d2f729941c0fcb05414dc9ac9df1cc1a7a6a08f403048a24b672adbb7696d9b1fed5b9dfa07ff1138e6cbe24c9ea17ac58cb64dd6f4
7
+ data.tar.gz: 2b7c2a6876dec722ac99703b10a4cb3958d64c40e839d8675c04e81e201517521fda5ffb0be768de7965f95ba6078a50f4b876df560829f9d82284ab0bb5caf1
@@ -46,7 +46,10 @@ module Giticious
46
46
  command = "#{command_match[1]} 'repositories/#{command_match[2]}.git'"
47
47
 
48
48
  abort "Read access denied" unless perms.perm_read
49
- abort "Write access denied" unless action == "git-receive-pack" and perms.perm_write
49
+
50
+ if action == "git-receive-pack"
51
+ abort "Write access denied" unless perms.perm_write
52
+ end
50
53
 
51
54
  Kernel.exec "git", "shell", "-c", command
52
55
  end
@@ -10,9 +10,7 @@ module Giticious
10
10
  exit 1
11
11
  end
12
12
 
13
- giticious_path = File.realpath(File.join(Giticious::LIBDIR, "..", "..", "bin", "giticious"))
14
-
15
- if Giticious::Service::Pubkey.new.add(username, pubkey, giticious_path)
13
+ if Giticious::Service::Pubkey.new.add(username, pubkey)
16
14
  puts "Public key \"#{pubkey.split(//).last(80).join}\" for user #{username} has been added!"
17
15
  end
18
16
 
@@ -24,12 +24,12 @@ module Giticious
24
24
  false
25
25
  end
26
26
 
27
- def add(user, pubkey, giticious_path)
27
+ def add(user, pubkey)
28
28
  if exists?(pubkey)
29
29
  raise RuntimeError, "This public key does already exist"
30
30
  end
31
31
 
32
- append_line('command="' + giticious_path + ' gitserve ' + user + '",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ' + pubkey)
32
+ append_line('command="/usr/local/bin/giticious gitserve ' + user + '",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ' + pubkey)
33
33
  end
34
34
 
35
35
  def delete(pubkey)
@@ -1,3 +1,3 @@
1
1
  module Giticious
2
- VERSION = "0.9.2"
2
+ VERSION = "0.9.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: giticious
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Prandzioch